Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/nuget/multi-01e240afd6
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielClarkeEducation authored Sep 25, 2024
2 parents bdf8fab + 46a476d commit cb53eec
Show file tree
Hide file tree
Showing 123 changed files with 1,951 additions and 2,106 deletions.
1 change: 1 addition & 0 deletions Dfe.EarlyYearsQualification.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=deserialise/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=eyfs/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=govuk/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ncfe/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=nosonar/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public override bool CanConvert(Type objectType)
return objectType == typeof(IOptionItem);
}

public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
public override object ReadJson(JsonReader reader, Type objectType, object? existingValue,
JsonSerializer serializer)
{
var jo = JObject.Load(reader);
var hasLabel = jo.ContainsKey("label") || jo.ContainsKey("Label");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ namespace Dfe.EarlyYearsQualification.Content.Entities;

public class AdditionalRequirementQuestion
{
public string Question { get; set; } = string.Empty;
public string Question { get; init; } = string.Empty;

public string HintText { get; set; } = string.Empty;
public string HintText { get; init; } = string.Empty;

public string DetailsHeading { get; set; } = string.Empty;
public string DetailsHeading { get; init; } = string.Empty;

public Document? DetailsContent { get; set; }
public Document? DetailsContent { get; init; }

public string ConfirmationStatement { get; set; } = string.Empty;
public string ConfirmationStatement { get; init; } = string.Empty;

public bool AnswerToBeFullAndRelevant { get; set; }
public bool AnswerToBeFullAndRelevant { get; init; }

public List<Option> Answers { get; set; } = [];
public List<Option> Answers { get; init; } = [];
}
37 changes: 35 additions & 2 deletions src/Dfe.EarlyYearsQualification.Content/Entities/CookiesPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ namespace Dfe.EarlyYearsQualification.Content.Entities;

public class CookiesPage
{
private const string NodeTypeName = "SuccessBannerContent";

private readonly Document? _successBannerContent;

public string Heading { get; init; } = string.Empty;

public Document? Body { get; init; }
Expand All @@ -14,11 +18,40 @@ public class CookiesPage

public string SuccessBannerHeading { get; init; } = string.Empty;

public Document? SuccessBannerContent { get; init; }

public string ErrorText { get; init; } = string.Empty;

public NavigationLink? BackButton { get; init; }

public string FormHeading { get; init; } = string.Empty;

public Document? SuccessBannerContent
{
get { return _successBannerContent; }
init
{
if (value == null)
{
_successBannerContent = null;
}
else
{
var newContent = new List<IContent>();

foreach (var content in value.Content)
{
if (content is not Paragraph para) continue;
para.NodeType = NodeTypeName;

newContent.Add(para);
}

_successBannerContent = new Document
{
NodeType = value.NodeType,
Content = newContent,
Data = value.Data
};
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using Contentful.Core.Models;
using Newtonsoft.Json.Linq;

namespace Dfe.EarlyYearsQualification.Content.Entities;

public class GovUkInsetTextModel
public class GovUkInsetTextModel : IContent
{
public SystemProperties Sys { get; } = new();

public string? Name { get; set; }

public JObject? Content { get; init; }
public Document? Content { get; init; }
}
33 changes: 32 additions & 1 deletion src/Dfe.EarlyYearsQualification.Content/Entities/PhaseBanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,40 @@ namespace Dfe.EarlyYearsQualification.Content.Entities;

public class PhaseBanner
{
private readonly Document? _content;

public string PhaseName { get; init; } = string.Empty;

public Document? Content { get; init; }
public Document? Content
{
get { return _content; }
init
{
if (value == null)
{
_content = null;
}
else
{
var newContent = new List<IContent>();

foreach (var content in value.Content)
{
if (content is not Paragraph para) continue;
para.NodeType = nameof(PhaseBanner);

newContent.Add(para);
}

_content = new Document
{
NodeType = value.NodeType,
Content = newContent,
Data = value.Data
};
}
}
}

public bool Show { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,63 @@ namespace Dfe.EarlyYearsQualification.Content.Entities;

public class RatioRequirement
{
public string RatioRequirementName { get; set; } = string.Empty;
public string RatioRequirementName { get; init; } = string.Empty;

public bool FullAndRelevantForLevel2Before2014 { get; set; }
public bool FullAndRelevantForLevel2After2014 { get; set; }

public bool FullAndRelevantForLevel2After2014 { get; init; }

public bool FullAndRelevantForLevel3Before2014 { get; set; }
public bool FullAndRelevantForLevel3After2014 { get; set; }

public bool FullAndRelevantForLevel3After2014 { get; init; }

public bool FullAndRelevantForLevel4Before2014 { get; set; }

public bool FullAndRelevantForLevel4After2014 { get; set; }

public bool FullAndRelevantForLevel5Before2014 { get; set; }

public bool FullAndRelevantForLevel5After2014 { get; set; }

public bool FullAndRelevantForLevel6Before2014 { get; set; }

public bool FullAndRelevantForLevel6After2014 { get; set; }

public bool FullAndRelevantForQtsEtcBefore2014 { get; set; }

public bool FullAndRelevantForQtsEtcAfter2014 { get; set; }

public bool FullAndRelevantForLevel7Before2014 { get; set; }

public bool FullAndRelevantForLevel7After2014 { get; set; }

public string RequirementHeading { get; set; } = string.Empty;

public Document? RequirementForLevel2Before2014 { get; set; }
public Document? RequirementForLevel2After2014 { get; set; }

public Document? RequirementForLevel2After2014 { get; init; }

public Document? RequirementForLevel3Before2014 { get; set; }

public Document? RequirementForLevel3After2014 { get; set; }

public Document? RequirementForLevel4Before2014 { get; set; }

public Document? RequirementForLevel4After2014 { get; set; }

public Document? RequirementForLevel5Before2014 { get; set; }

public Document? RequirementForLevel5After2014 { get; set; }

public Document? RequirementForLevel6Before2014 { get; set; }

public Document? RequirementForLevel6After2014 { get; set; }

public Document? RequirementForQtsEtcBefore2014 { get; set; }

public Document? RequirementForQtsEtcAfter2014 { get; set; }

public Document? RequirementForLevel7Before2014 { get; set; }

public Document? RequirementForLevel7After2014 { get; set; }
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit cb53eec

Please sign in to comment.