Skip to content

Commit

Permalink
Merge pull request #926 from DFE-Digital/feature/182433
Browse files Browse the repository at this point in the history
Rename Education brief to Education plans and policies
  • Loading branch information
sukhybhullar-nimble authored Nov 4, 2024
2 parents 0f535ba + f1a0530 commit f48e716
Show file tree
Hide file tree
Showing 23 changed files with 13,793 additions and 313 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ namespace Dfe.ManageFreeSchoolProjects.API.Contracts.Project.Tasks;
public class EducationBriefTask
{

public bool? EducationPlanInEducationBrief { get; set; }
public bool? EducationPolicesInEducationBrief{ get; set; }
public bool? PupilAssessmentAndTrackingHistoryInPlace { get; set; }
public bool? EducationBriefSavedToWorkplaces { get; set; }
public bool? TrustConfirmedPlansAndPoliciesInPlace { get; set; }
public bool? CommissionedEEToReviewSafeguardingPolicy { get; set; }
public bool? CommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy { get; set; }
public DateTime? DateEEReviewedEducationBrief { get; set; }
public bool? SavedEESpecificationAndAdviceInWorkplaces { get; set; }
public bool? SavedCopiesOfPlansAndPoliciesInWorkplaces { get; set; }
public DateTime? DateTrustProvidedEducationBrief { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,12 @@ public static Milestones BuildEducationBriefTask(string rid)

result.Rid = rid;

result.FSGPreOpeningMilestonesEducationPlanInBrief = true;
result.FSGPreOpeningMilestonesEducationPolicesInBrief = true;
result.FSGPreOpeningMilestonesEducationBriefPupilAssessmentAndTrackingHistory = true;
result.FSGPreOpeningMilestonesEducationBriefSavedToWorkplaces = true;
result.FSGPreOpeningMilestonesEPPTrustConfirmedPlansAndPoliciesInPlace = true;
result.FSGPreOpeningMilestonesEPPCommissionedEEToReviewSafeguardingPolicy = true;
result.FSGPreOpeningMilestonesEPPDateEEReviewedEducationBrief = new DateTime().AddDays(1);
result.FSGPreOpeningMilestonesEPPSavedEESpecificationAndAdviceInWorkplaces = true;




return result;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Threading.Tasks;
using Dfe.ManageFreeSchoolProjects.API.Contracts.Project.Tasks;
using Dfe.ManageFreeSchoolProjects.API.Tests.Fixtures;
Expand All @@ -21,28 +22,35 @@ public async Task Patch_NewEducationBrief_Returns_201()
using var context = _testFixture.GetContext();
context.Kpi.Add(project);
await context.SaveChangesAsync();



var request = new UpdateProjectByTaskRequest()
{
EducationBrief = new EducationBriefTask()
{
EducationPlanInEducationBrief = true,
EducationPolicesInEducationBrief = null,
PupilAssessmentAndTrackingHistoryInPlace = false,
EducationBriefSavedToWorkplaces = true
TrustConfirmedPlansAndPoliciesInPlace = true,
DateTrustProvidedEducationBrief = null,
CommissionedEEToReviewSafeguardingPolicy = true,
CommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy = null,
DateEEReviewedEducationBrief = DateTime.Now.Date.AddDays(-5),
SavedCopiesOfPlansAndPoliciesInWorkplaces = null,
SavedEESpecificationAndAdviceInWorkplaces = true,
}
};

var projectResponse = await _client.UpdateProjectTask(projectId, request, TaskName.EducationBrief.ToString());

projectResponse.EducationBrief.EducationPlanInEducationBrief.Should().Be(request.EducationBrief.EducationPlanInEducationBrief);
projectResponse.EducationBrief.EducationPolicesInEducationBrief.Should().Be(request.EducationBrief.EducationPolicesInEducationBrief);
projectResponse.EducationBrief.PupilAssessmentAndTrackingHistoryInPlace.Should().Be(request.EducationBrief.PupilAssessmentAndTrackingHistoryInPlace);
projectResponse.EducationBrief.EducationBriefSavedToWorkplaces.Should().Be(request.EducationBrief.EducationBriefSavedToWorkplaces);
}
projectResponse.EducationBrief.TrustConfirmedPlansAndPoliciesInPlace.Should().Be(request.EducationBrief.TrustConfirmedPlansAndPoliciesInPlace);
projectResponse.EducationBrief.DateTrustProvidedEducationBrief.Should().Be(request.EducationBrief.DateTrustProvidedEducationBrief);
projectResponse.EducationBrief.CommissionedEEToReviewSafeguardingPolicy.Should().Be(request.EducationBrief.CommissionedEEToReviewSafeguardingPolicy);
projectResponse.EducationBrief.CommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy.Should().Be(request.EducationBrief.CommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy);
projectResponse.EducationBrief.DateEEReviewedEducationBrief.Should().Be(request.EducationBrief.DateEEReviewedEducationBrief);
projectResponse.EducationBrief.SavedCopiesOfPlansAndPoliciesInWorkplaces.Should().Be(request.EducationBrief.SavedCopiesOfPlansAndPoliciesInWorkplaces);
projectResponse.EducationBrief.SavedEESpecificationAndAdviceInWorkplaces.Should().Be(request.EducationBrief.SavedEESpecificationAndAdviceInWorkplaces);
}

[Fact]
public async Task Patch_EducationBriefMeeting_Returns_201()
public async Task Patch_ExistingEducationBrief_Returns_201()
{
var project = DatabaseModelBuilder.BuildProject();
var projectId = project.ProjectStatusProjectId;
Expand All @@ -59,18 +67,24 @@ public async Task Patch_EducationBriefMeeting_Returns_201()
{
EducationBrief = new EducationBriefTask()
{
EducationPlanInEducationBrief = true,
EducationPolicesInEducationBrief = null,
PupilAssessmentAndTrackingHistoryInPlace = false,
EducationBriefSavedToWorkplaces = true
TrustConfirmedPlansAndPoliciesInPlace = true,
DateTrustProvidedEducationBrief = DateTime.Now.Date.AddDays(-5),
CommissionedEEToReviewSafeguardingPolicy = true,
CommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy = true,
DateEEReviewedEducationBrief = DateTime.Now.Date.AddDays(-4),
SavedCopiesOfPlansAndPoliciesInWorkplaces =true,
SavedEESpecificationAndAdviceInWorkplaces = true,
}
};

var projectResponse = await _client.UpdateProjectTask(projectId, request, TaskName.EducationBrief.ToString());

projectResponse.EducationBrief.EducationPlanInEducationBrief.Should().Be(request.EducationBrief.EducationPlanInEducationBrief);
projectResponse.EducationBrief.EducationPolicesInEducationBrief.Should().Be(request.EducationBrief.EducationPolicesInEducationBrief);
projectResponse.EducationBrief.PupilAssessmentAndTrackingHistoryInPlace.Should().Be(request.EducationBrief.PupilAssessmentAndTrackingHistoryInPlace);
projectResponse.EducationBrief.EducationBriefSavedToWorkplaces.Should().Be(request.EducationBrief.EducationBriefSavedToWorkplaces);
}
}
projectResponse.EducationBrief.TrustConfirmedPlansAndPoliciesInPlace.Should().Be(request.EducationBrief.TrustConfirmedPlansAndPoliciesInPlace);
projectResponse.EducationBrief.DateTrustProvidedEducationBrief.Should().Be(request.EducationBrief.DateTrustProvidedEducationBrief);
projectResponse.EducationBrief.CommissionedEEToReviewSafeguardingPolicy.Should().Be(request.EducationBrief.CommissionedEEToReviewSafeguardingPolicy);
projectResponse.EducationBrief.CommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy.Should().Be(request.EducationBrief.CommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy);
projectResponse.EducationBrief.DateEEReviewedEducationBrief.Should().Be(request.EducationBrief.DateEEReviewedEducationBrief);
projectResponse.EducationBrief.SavedCopiesOfPlansAndPoliciesInWorkplaces.Should().Be(request.EducationBrief.SavedCopiesOfPlansAndPoliciesInWorkplaces);
projectResponse.EducationBrief.SavedEESpecificationAndAdviceInWorkplaces.Should().Be(request.EducationBrief.SavedEESpecificationAndAdviceInWorkplaces);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void Build_ReturnsProjectReport()
AssertEntry(nameof(FundingAgreementHealthCheckTask.DraftedFundingAgreementHealthCheck), "Yes", project, columnHeaders);
AssertEntry(nameof(FundingAgreementSubmissionTask.DraftedFundingAgreementSubmission), "Yes", project, columnHeaders);
AssertEntry(nameof(GiasTask.CheckedTrustInformation), "Yes", project, columnHeaders);
AssertEntry(nameof(EducationBriefTask.EducationPlanInEducationBrief), "Yes", project, columnHeaders);
AssertEntry(nameof(EducationBriefTask.CommissionedEEToReviewSafeguardingPolicy), "Yes", project, columnHeaders);
AssertEntry(nameof(AdmissionsArrangementsTask.TrustConfirmedAdmissionsArrangementsTemplate), "Yes", project, columnHeaders);
AssertEntry(nameof(ImpactAssessmentTask.ImpactAssessment), "Yes", project, columnHeaders);
AssertEntry(nameof(EqualitiesAssessmentTask.CompletedEqualitiesProcessRecord), "Yes", project, columnHeaders);
Expand Down Expand Up @@ -235,7 +235,7 @@ private static List<ProjectReportSourceData> BuildSourceData()
},
EducationBrief = new EducationBriefTask()
{
EducationPlanInEducationBrief = true
CommissionedEEToReviewSafeguardingPolicy = true
},
AdmissionsArrangements = new AdmissionsArrangementsTask()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ public static EducationBriefTask Build(Milestones milestones)
{
return new EducationBriefTask()
{
EducationPlanInEducationBrief = milestones?.FSGPreOpeningMilestonesEducationPlanInBrief,
EducationPolicesInEducationBrief = milestones?.FSGPreOpeningMilestonesEducationPolicesInBrief,
PupilAssessmentAndTrackingHistoryInPlace = milestones?.FSGPreOpeningMilestonesEducationBriefPupilAssessmentAndTrackingHistory,
EducationBriefSavedToWorkplaces = milestones?.FSGPreOpeningMilestonesEducationBriefSavedToWorkplaces
};
TrustConfirmedPlansAndPoliciesInPlace = milestones?.FSGPreOpeningMilestonesEPPTrustConfirmedPlansAndPoliciesInPlace,
CommissionedEEToReviewSafeguardingPolicy = milestones?.FSGPreOpeningMilestonesEPPCommissionedEEToReviewSafeguardingPolicy,
CommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy = milestones?.FSGPreOpeningMilestonesEPPCommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy,
DateEEReviewedEducationBrief = milestones?.FSGPreOpeningMilestonesEPPDateEEReviewedEducationBrief,
SavedEESpecificationAndAdviceInWorkplaces = milestones?.FSGPreOpeningMilestonesEPPSavedEESpecificationAndAdviceInWorkplaces,
SavedCopiesOfPlansAndPoliciesInWorkplaces = milestones?.FSGPreOpeningMilestonesEPPSavedCopiesOfPlansAndPoliciesInWorkplaces,
DateTrustProvidedEducationBrief = milestones?.FSGPreOpeningMilestonesDateTrustProvidedEducationBrief,
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ join milestones in _context.Milestones on kpi.Rid equals milestones.Rid into joi
from milestones in joinedMilestones.DefaultIfEmpty()
select new GetProjectByTaskResponse()
{
EducationBrief = new EducationBriefTask()
{
EducationPlanInEducationBrief = milestones.FSGPreOpeningMilestonesEducationPlanInBrief,
EducationPolicesInEducationBrief = milestones.FSGPreOpeningMilestonesEducationPolicesInBrief,
PupilAssessmentAndTrackingHistoryInPlace = milestones.FSGPreOpeningMilestonesEducationBriefPupilAssessmentAndTrackingHistory,
EducationBriefSavedToWorkplaces = milestones.FSGPreOpeningMilestonesEducationBriefSavedToWorkplaces
}
EducationBrief = EducationBriefTaskBuilder.Build(milestones)
}).FirstOrDefaultAsync();

return result ?? new GetProjectByTaskResponse() { EducationBrief = new() };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Dfe.ManageFreeSchoolProjects.Data;
using Dfe.ManageFreeSchoolProjects.Data.Entities.Existing;
using Microsoft.EntityFrameworkCore;

namespace Dfe.ManageFreeSchoolProjects.API.UseCases.Project.Tasks.EducationBrief;
Expand Down Expand Up @@ -31,9 +32,13 @@ public async Task Update(UpdateTaskServiceParameters parameters)
_context.Add(db);
}

db.FSGPreOpeningMilestonesEducationPlanInBrief = task.EducationPlanInEducationBrief;
db.FSGPreOpeningMilestonesEducationPolicesInBrief = task.EducationPolicesInEducationBrief;
db.FSGPreOpeningMilestonesEducationBriefPupilAssessmentAndTrackingHistory = task.PupilAssessmentAndTrackingHistoryInPlace;
db.FSGPreOpeningMilestonesEducationBriefSavedToWorkplaces = task.EducationBriefSavedToWorkplaces;
db.FSGPreOpeningMilestonesEPPTrustConfirmedPlansAndPoliciesInPlace = task.TrustConfirmedPlansAndPoliciesInPlace;
db.FSGPreOpeningMilestonesEPPCommissionedEEToReviewSafeguardingPolicy = task.CommissionedEEToReviewSafeguardingPolicy;
db.FSGPreOpeningMilestonesEPPCommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy = task.CommissionedEEToReviewPupilAssessmentRecordingAndReportingPolicy;
db.FSGPreOpeningMilestonesEPPDateEEReviewedEducationBrief = task.DateEEReviewedEducationBrief;
db.FSGPreOpeningMilestonesEPPSavedEESpecificationAndAdviceInWorkplaces = task.SavedEESpecificationAndAdviceInWorkplaces;
db.FSGPreOpeningMilestonesEPPSavedCopiesOfPlansAndPoliciesInWorkplaces = task.SavedCopiesOfPlansAndPoliciesInWorkplaces;
db.FSGPreOpeningMilestonesDateTrustProvidedEducationBrief = task.DateTrustProvidedEducationBrief;

}
}
Loading

0 comments on commit f48e716

Please sign in to comment.