Change Date academy order (AO) sent
@@ -216,7 +216,7 @@
}
- @if (Model.IsReadOnly)
+ @if (!Model.IsReadOnly)
{
You can click the button to change the recorded decision.
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/RecordDecisionPreviewViewComponent.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/RecordDecisionPreviewViewComponent.cs
index 5d8615d09..c28aa8d3b 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/RecordDecisionPreviewViewComponent.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/RecordDecisionPreviewViewComponent.cs
@@ -8,23 +8,16 @@
namespace Dfe.PrepareConversions.ViewComponents;
-public class RecordDecisionPreviewViewComponent : ViewComponent
+public class RecordDecisionPreviewViewComponent(IAcademyConversionAdvisoryBoardDecisionRepository decisionRepository, ISession session) : ViewComponent
{
public const string DECISION_SESSION_KEY = "Decision";
- protected readonly ISession _session;
- private readonly IAcademyConversionAdvisoryBoardDecisionRepository _decisionRepository;
+ protected readonly ISession _session = session;
- public RecordDecisionPreviewViewComponent(IAcademyConversionAdvisoryBoardDecisionRepository decisionRepository, ISession session)
+ public async Task InvokeAsync(int id, string AcademyTypeAndRoute, bool isReadOnly)
{
- _decisionRepository = decisionRepository;
- _session = session;
- }
-
- public async Task InvokeAsync(int id, string AcademyTypeAndRoute)
- {
- AdvisoryBoardDecision decision = (await _decisionRepository.Get(id)).Body;
+ var decision = (await decisionRepository.Get(id)).Body;
SetDecisionInSession(id, decision);
- RecordDecisionPreviewViewModel viewModel = new(id, decision, AcademyTypeAndRoute);
+ RecordDecisionPreviewViewModel viewModel = new(id, decision, AcademyTypeAndRoute, isReadOnly);
return View(viewModel);
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/RecordDecisionPreviewViewModel.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/RecordDecisionPreviewViewModel.cs
index c83ec7c51..f6463b58f 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/RecordDecisionPreviewViewModel.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/RecordDecisionPreviewViewModel.cs
@@ -2,10 +2,10 @@
namespace Dfe.PrepareConversions.ViewModels;
-public class RecordDecisionPreviewViewModel(int id, AdvisoryBoardDecision decision, string academyTypeAndRoute)
+public class RecordDecisionPreviewViewModel(int id, AdvisoryBoardDecision decision, string academyTypeAndRoute, bool isReadOnly)
{
public int Id { get; set; } = id;
public string AcademyTypeAndRoute { get; set; } = academyTypeAndRoute;
public AdvisoryBoardDecision Decision { get; set; } = decision;
- public bool IsReadOnly { get; set; }
+ public bool IsReadOnly { get; set; } = isReadOnly;
}
From a6abb8a0508033dbde8a7712f358421356e2147f Mon Sep 17 00:00:00 2001
From: "SHAKIR, Muhammad"
Date: Tue, 8 Oct 2024 13:57:32 +0100
Subject: [PATCH 06/19] added tests and notification message
---
.../Pages/BaseIntegrationTests.MockData.cs | 43 ++++++++-------
.../Pages/BaseIntegrationTests.cs | 6 ++
.../ProjectListIntegrationTests.cs | 38 ++++++++-----
...nformationTemplateDatesIntegrationTests.cs | 28 ++++++++--
...rojectAndTrustRationaleIntegrationTests.cs | 32 ++++++++---
.../ConfirmRisksAndIssuesIntegrationTests.cs | 30 +++++++---
.../RisksAndIssuesIntegrationTests.cs | 4 +-
.../AcademyTypeAndRouteIntegrationTests.cs | 8 +--
...hoolAndTrustInformationIntegrationTests.cs | 55 ++++++++++++++-----
.../AdditionalInformationIntegrationTests.cs | 13 ++---
...SchoolBudgetInformationIntegrationTests.cs | 26 ++++++++-
.../ConfirmSchoolOverviewIntegrationTests.cs | 29 ++++++++--
...irmSchoolPupilForecastsIntegrationTests.cs | 17 ++++++
.../SchoolAndTrustInformation/default.cshtml | 24 ++++----
.../Pages/Shared/_ProjectHeader.cshtml | 35 ++++++++++--
.../Pages/TaskList/Index.cshtml | 28 +++++-----
.../EducationalAttendance.cshtml | 21 +++++++
.../KeyStage2PerformanceTables.cshtml | 21 +++++++
.../KeyStage4PerformanceTables.cshtml | 21 +++++++
.../KeyStage5PerformanceTables.cshtml | 21 +++++++
.../LegalRequirements/LegalSummary.cshtml | 26 ++++++++-
.../LegalRequirements/LegalSummary.cshtml.cs | 2 +-
...alAuthorityInformationTemplateDates.cshtml | 21 +++++++
.../TaskList/PreviewProjectTemplate.cshtml | 25 +++++----
.../ProjectDates/ConfirmProjectDates.cshtml | 21 +++++++
.../ConfirmProjectAndTrustRationale.cshtml | 21 +++++++
.../ConfirmRisksAndIssues.cshtml | 21 +++++++
.../ConversionDetails.cshtml | 21 +++++++
.../SchoolBudgetInformation/Budget.cshtml | 23 +++++++-
.../SchoolOverview/SchoolOverview.cshtml | 21 +++++++
.../ConfirmSchoolPerformance.cshtml | 21 +++++++
.../PupilForecasts.cshtml | 21 +++++++
.../TagHelpers/BackLinkTagHelper.cs | 4 +-
33 files changed, 608 insertions(+), 140 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.MockData.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.MockData.cs
index 094d3794a..cbeeb8cb3 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.MockData.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.MockData.cs
@@ -19,15 +19,17 @@ namespace Dfe.PrepareConversions.Tests.Pages;
public abstract partial class BaseIntegrationTests
{
- private readonly string[] _routes = { AcademyTypeAndRoutes.Voluntary, AcademyTypeAndRoutes.Sponsored };
+ private readonly string[] _routes = [AcademyTypeAndRoutes.Voluntary, AcademyTypeAndRoutes.Sponsored];
protected IEnumerable AddGetProjects(Action postSetup = null,
int? recordCount = null,
- AcademyConversionSearchModelV2 searchModel = null)
+ AcademyConversionSearchModelV2 searchModel = null,
+ bool isReadOnly = false)
{
- List projects = _fixture
+ var projects = _fixture
.Build()
.With(x => x.AcademyTypeAndRoute, _routes[Random.Shared.Next(0, _routes.Length)])
+ .With(x => x.IsReadOnly, isReadOnly)
.CreateMany()
.Select(x =>
{
@@ -47,11 +49,11 @@ protected IEnumerable AddGetProjects(Action(),
- DeliveryOfficerQueryString = Array.Empty(),
- RegionQueryString = Array.Empty(),
- LocalAuthoritiesQueryString = Array.Empty(),
- AdvisoryBoardDatesQueryString = Array.Empty()
+ StatusQueryString = [],
+ DeliveryOfficerQueryString = [],
+ RegionQueryString = [],
+ LocalAuthoritiesQueryString = [],
+ AdvisoryBoardDatesQueryString = []
};
_factory.AddPostWithJsonRequest(PathFor.GetAllProjectsV2, searchModel, response);
@@ -62,8 +64,8 @@ protected ProjectFilterParameters AddGetStatuses()
{
ProjectFilterParameters filterParameters = new()
{
- Statuses = new List { "Accepted", "Accepted with Conditions", "Deferred", "Declined" },
- AssignedUsers = new List { "Bob" }
+ Statuses = ["Accepted", "Accepted with Conditions", "Deferred", "Declined"],
+ AssignedUsers = ["Bob"]
};
@@ -72,11 +74,12 @@ protected ProjectFilterParameters AddGetStatuses()
return filterParameters;
}
- public AcademyConversionProject AddGetProject(Action postSetup = null)
+ public AcademyConversionProject AddGetProject(Action postSetup = null, bool isReadOnly = false)
{
- AcademyConversionProject project = _fixture
+ var project = _fixture
.Build()
.With(x => x.AcademyTypeAndRoute, AcademyTypeAndRoutes.Voluntary)
+ .With(x => x.IsReadOnly, isReadOnly)
.Create();
postSetup?.Invoke(project);
@@ -88,7 +91,7 @@ public AcademyConversionProject AddGetProject(Action p
public KeyStagePerformanceResponse AddGetKeyStagePerformance(int urn, Action postSetup = null)
{
- KeyStagePerformanceResponse keyStagePerformance = _fixture.Create();
+ var keyStagePerformance = _fixture.Create();
postSetup?.Invoke(keyStagePerformance);
_factory.AddGetWithJsonResponse($"/educationPerformance/{urn}", keyStagePerformance);
@@ -97,7 +100,7 @@ public KeyStagePerformanceResponse AddGetKeyStagePerformance(int urn, Action AddGetProjectNotes(int academyConversionProjectId, Action> postSetup = null)
{
- IEnumerable projectNotes = _fixture.CreateMany().ToList();
+ var projectNotes = _fixture.CreateMany().ToList();
postSetup?.Invoke(projectNotes);
_factory.AddGetWithJsonResponse($"/project-notes/{academyConversionProjectId}", projectNotes);
@@ -109,7 +112,7 @@ public UpdateAcademyConversionProject AddPatchProject(AcademyConversi
Expression> propertyThatWillChange,
TProperty expectedNewValue)
{
- UpdateAcademyConversionProject request = _fixture
+ var request = _fixture
.Build()
.OmitAutoProperties()
.With(propertyThatWillChange, expectedNewValue)
@@ -133,7 +136,7 @@ public void GetRoleCapabilities(List roles)
public UpdateAcademyConversionProject AddPatchConfiguredProject(AcademyConversionProject project, Action configure = null)
{
- UpdateAcademyConversionProject request = _fixture
+ var request = _fixture
.Build()
.OmitAutoProperties()
.Create();
@@ -163,7 +166,7 @@ public ProjectNote AddPostProjectNote(int id, AddProjectNote request)
public SetPerformanceDataModel AddPutPerformanceData(AcademyConversionProject project)
{
- SetPerformanceDataModel request = _fixture
+ var request = _fixture
.Build()
.OmitAutoProperties()
.With(x => x.Id, project.Id)
@@ -214,11 +217,11 @@ public UpdateAcademyConversionProject AddPatchProjectMany(AcademyConversionProje
Func, IPostprocessComposer>
postProcess)
{
- IPostprocessComposer composer = _fixture
+ var composer = _fixture
.Build()
.OmitAutoProperties();
- UpdateAcademyConversionProject request = postProcess(composer)
+ var request = postProcess(composer)
.Create();
_factory.AddPatchWithJsonRequest(string.Format(PathFor.UpdateProject, project.Id), request, project);
@@ -258,7 +261,7 @@ public AcademisationApplication AddGetApplication(Action(a => a.With(s => s.Schools, () => new List { _fixture.Create() }));
- AcademisationApplication application = _fixture.Create();
+ var application = _fixture.Create();
postSetup?.Invoke(application);
_factory.AddGetWithJsonResponse(string.Format(_pathFor.GetApplicationByReference, application.ApplicationReference), application);
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.cs
index dcf93bd66..43e2aefcc 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/BaseIntegrationTests.cs
@@ -61,6 +61,12 @@ protected async Task OpenAndConfirmPathAsync(string path, string expe
return resultDocument;
}
+ protected void VerifyElementDoesNotExist(string dataTest)
+ {
+ var anchors = Document.QuerySelectorAll($"[data-test='{dataTest}']").FirstOrDefault();
+ Assert.Null(anchors);
+ }
+
protected void VerifyNullElement(string linkText)
{
var anchors = Document.QuerySelectorAll("a");
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/ProjectList/ProjectListIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/ProjectList/ProjectListIntegrationTests.cs
index 6f7558f73..d091820a6 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/ProjectList/ProjectListIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/ProjectList/ProjectListIntegrationTests.cs
@@ -2,7 +2,6 @@
using AngleSharp.Html.Dom;
using Dfe.Academisation.ExtensionMethods;
using Dfe.PrepareConversions.Data.Models;
-using Dfe.PrepareConversions.Extensions;
using Dfe.PrepareConversions.Tests.Extensions;
using FluentAssertions;
using System.Collections.Generic;
@@ -12,20 +11,16 @@
namespace Dfe.PrepareConversions.Tests.Pages.ProjectList;
-public class ProjectListIntegrationTests : BaseIntegrationTests
+public class ProjectListIntegrationTests(IntegrationTestingWebApplicationFactory factory) : BaseIntegrationTests(factory)
{
- public ProjectListIntegrationTests(IntegrationTestingWebApplicationFactory factory) : base(factory)
- {
- }
-
[Fact]
public async Task Should_display_list_of_projects_and_navigate_to_and_from_task_list()
{
- List projects = AddGetProjects(x => x.AcademyTypeAndRoute = "Converter").ToList();
+ var projects = AddGetProjects(x => x.AcademyTypeAndRoute = "Converter").ToList();
AddGetStatuses();
await OpenAndConfirmPathAsync("/project-list");
- AcademyConversionProject firstProject = AddGetProject(p => p.Id = projects.First().Id);
+ var firstProject = AddGetProject(p => p.Id = projects.First().Id);
await NavigateAsync(projects.First().SchoolName);
Document.Url.Should().BeUrl($"/task-list/{firstProject.Id}?returnToFormAMatMenu=False");
@@ -35,7 +30,7 @@ public async Task Should_display_list_of_projects_and_navigate_to_and_from_task_
for (int i = 0; i < 2; i++)
{
- AcademyConversionProject project = projects.ElementAt(i);
+ var project = projects.ElementAt(i);
Document.QuerySelector($"#school-name-{i}")?.TextContent.Should().Contain(project.SchoolName);
Document.QuerySelector($"#urn-{i}")?.TextContent.Should().Contain(project.Urn.ToString());
@@ -54,7 +49,7 @@ public async Task Should_display_list_of_projects_and_navigate_to_and_from_task_
public async Task Should_display_approved_after_recording_decision()
{
AddGetStatuses();
- IEnumerable projects = AddGetProjects(p => p.ProjectStatus = "Approved");
+ var projects = AddGetProjects(p => p.ProjectStatus = "Approved");
await OpenAndConfirmPathAsync("/project-list");
@@ -66,7 +61,7 @@ public async Task Should_display_approved_after_recording_decision()
public async Task Should_display_pre_advisory_board_by_default()
{
AddGetStatuses();
- List projects = AddGetProjects().ToList();
+ var projects = AddGetProjects().ToList();
await OpenAndConfirmPathAsync("/project-list");
@@ -78,15 +73,32 @@ public async Task Should_display_pre_advisory_board_by_default()
public async Task Should_display_application_received_date_when_no_htb_date_set()
{
AddGetStatuses();
- IEnumerable projects = AddGetProjects(p => p.HeadTeacherBoardDate = null);
+ var projects = AddGetProjects(p => p.HeadTeacherBoardDate = null);
await OpenAndConfirmPathAsync("/project-list");
- AcademyConversionProject project = projects.First();
+ var project = projects.First();
Document.QuerySelector("#application-to-join-trust-0")?.TextContent.Should().Contain(project.NameOfTrust);
Document.QuerySelector("#local-authority-0")?.TextContent.Should().Contain(project.LocalAuthority);
Document.QuerySelector("#application-received-date-0")?.TextContent.Should().Contain(project.CreatedOn.ToDateString());
ResetServer();
}
+
+ [Fact]
+ public async Task Should_not_have_create_project_document_buttons_if_project_read_only()
+ {
+ AddGetStatuses();
+ var projects = AddGetProjects(p => p.ProjectStatus = "Approved", isReadOnly: true);
+
+ await OpenAndConfirmPathAsync("/project-list");
+
+ var project = projects.First();
+
+ await NavigateAsync(project.SchoolName);
+
+ Document.Url.Should().BeUrl($"/task-list/{project.Id}?returnToFormAMatMenu=False");
+ Document.QuerySelector("#preview-project-template-button").Should().BeNull();
+ Document.QuerySelector("#generate-project-template-button").Should().BeNull();
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDatesIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDatesIntegrationTests.cs
index e151b58a9..b19d627ae 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDatesIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDatesIntegrationTests.cs
@@ -21,7 +21,7 @@ public ConfirmLocalAuthorityInformationTemplateDatesIntegrationTests(Integration
[Fact]
public async Task Should_be_in_progress_and_display_la_info_template_when_populated()
{
- AcademyConversionProject project = AddGetProject(p => p.LocalAuthorityInformationTemplateSectionComplete = false);
+ var project = AddGetProject(p => p.LocalAuthorityInformationTemplateSectionComplete = false);
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
@@ -41,7 +41,7 @@ public async Task Should_be_in_progress_and_display_la_info_template_when_popula
[Fact]
public async Task Should_be_completed_and_checked_when_la_info_template_section_complete()
{
- AcademyConversionProject project = AddGetProject(project => project.LocalAuthorityInformationTemplateSectionComplete = true);
+ var project = AddGetProject(project => project.LocalAuthorityInformationTemplateSectionComplete = true);
AddPatchConfiguredProject(project, x =>
{
x.LocalAuthorityInformationTemplateSectionComplete = true;
@@ -65,7 +65,7 @@ public async Task Should_be_completed_and_checked_when_la_info_template_section_
[Fact]
public async Task Should_show_error_summary_when_there_is_an_API_error()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
AddPatchError(project.Id);
await OpenAndConfirmPathAsync($"/task-list/{project.Id}/confirm-local-authority-information-template-dates");
@@ -78,7 +78,7 @@ public async Task Should_show_error_summary_when_there_is_an_API_error()
[Fact]
public async Task Should_navigate_between_task_list_and_confirm_la_info_template_when_navigated_from_task_list()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
await NavigateAsync("LA information template sent date", 0);
@@ -89,4 +89,24 @@ public async Task Should_navigate_between_task_list_and_confirm_la_info_template
Document.Url.Should().BeUrl($"/task-list/{project.Id}");
}
+ [Theory]
+ [InlineData("change-la-info-template-sent-date",
+ "change-la-info-template-returned-date",
+ "change-la-info-template-comments",
+ "change-la-info-template-sharepoint-link")]
+ public async Task Should_not_have_change_link_if_project_read_only(params string[] elements)
+ {
+ var project = AddGetProject(isReadOnly: true);
+
+ await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
+ await NavigateAsync("LA information template sent date", 0);
+
+ Document.Url.Should().Contain($"/task-list/{project.Id}/confirm-local-authority-information-template-dates");
+ foreach (var element in elements)
+ {
+ VerifyElementDoesNotExist(element);
+ }
+ Document.QuerySelector("#la-info-template-complete").Should().BeNull();
+ Document.QuerySelector("#confirm-and-continue-button").Should().BeNull();
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationaleIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationaleIntegrationTests.cs
index 4a49da3f4..508f6528f 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationaleIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationaleIntegrationTests.cs
@@ -8,14 +8,12 @@
namespace Dfe.PrepareConversions.Tests.Pages.TaskList.Rationale;
-public class ConfirmProjectAndTrustRationaleIntegrationTests : BaseIntegrationTests
+public class ConfirmProjectAndTrustRationaleIntegrationTests(IntegrationTestingWebApplicationFactory factory) : BaseIntegrationTests(factory)
{
- public ConfirmProjectAndTrustRationaleIntegrationTests(IntegrationTestingWebApplicationFactory factory) : base(factory) { }
-
[Fact]
public async Task Should_remove_rationale_for_project_if_sponsored()
{
- AcademyConversionProject project = AddGetProject(p => p.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored);
+ var project = AddGetProject(p => p.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored);
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
await NavigateAsync("Rationale");
@@ -26,7 +24,7 @@ public async Task Should_remove_rationale_for_project_if_sponsored()
[Fact]
public async Task Should_be_in_progress_and_display_rationale_when_rationale_populated()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.RationaleSectionComplete = false;
project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Voluntary;
@@ -47,7 +45,7 @@ public async Task Should_be_in_progress_and_display_rationale_when_rationale_pop
[Fact]
public async Task Should_be_completed_and_checked_when_rationale_mark_as_complete_true()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.RationaleSectionComplete = true;
});
@@ -73,7 +71,7 @@ public async Task Should_be_completed_and_checked_when_rationale_mark_as_complet
[Fact]
public async Task Should_be_not_started_and_display_empty_when_rationale_not_prepopulated()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.RationaleForProject = null;
project.RationaleForTrust = null;
@@ -106,7 +104,7 @@ public async Task Should_be_not_started_and_display_empty_when_rationale_not_pre
[Fact]
public async Task Should_show_error_summary_when_there_is_an_API_error()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
AddPatchError(project.Id);
await OpenAndConfirmPathAsync($"/task-list/{project.Id}/confirm-project-trust-rationale");
@@ -119,7 +117,7 @@ public async Task Should_show_error_summary_when_there_is_an_API_error()
[Fact]
public async Task Should_navigate_between_task_list_and_rationale_summary()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
await NavigateAsync("Rationale");
@@ -130,4 +128,20 @@ public async Task Should_navigate_between_task_list_and_rationale_summary()
Document.Url.Should().BeUrl($"/task-list/{project.Id}");
}
+
+ [Fact]
+ public async Task Should_not_have_change_link_if_project_read_only()
+ {
+ var project = AddGetProject(isReadOnly: true);
+
+ await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
+ await NavigateAsync("Rationale");
+
+ Document.Url.Should().BeUrl($"/task-list/{project.Id}/confirm-project-trust-rationale");
+
+ VerifyElementDoesNotExist("change-rationale-for-trust");
+
+ Document.QuerySelector("#rationale-complete").Should().BeNull();
+ Document.QuerySelector("#confirm-and-continue-button").Should().BeNull();
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssuesIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssuesIntegrationTests.cs
index cd5551283..7b583f05e 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssuesIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssuesIntegrationTests.cs
@@ -8,14 +8,12 @@
namespace Dfe.PrepareConversions.Tests.Pages.TaskList.RisksAndIssues;
-public class ConfirmRisksAndIssuesIntegrationTests : BaseIntegrationTests
+public class ConfirmRisksAndIssuesIntegrationTests(IntegrationTestingWebApplicationFactory factory) : BaseIntegrationTests(factory)
{
- public ConfirmRisksAndIssuesIntegrationTests(IntegrationTestingWebApplicationFactory factory) : base(factory) { }
-
[Fact]
public async Task Should_be_in_progress_and_display_risks_and_issues()
{
- AcademyConversionProject project = AddGetProject(p => p.RisksAndIssuesSectionComplete = false);
+ var project = AddGetProject(p => p.RisksAndIssuesSectionComplete = false);
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
@@ -30,7 +28,7 @@ public async Task Should_be_in_progress_and_display_risks_and_issues()
[Fact]
public async Task Should_be_completed_and_checked_when_risks_and_issues_mark_as_complete_true()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.RisksAndIssuesSectionComplete = true;
});
@@ -56,7 +54,7 @@ public async Task Should_be_completed_and_checked_when_risks_and_issues_mark_as_
[Fact]
public async Task Should_be_not_started_and_display_empty_when_risks_and_issues_not_prepopulated()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.RisksAndIssues = null;
project.RisksAndIssuesSectionComplete = false;
@@ -85,7 +83,7 @@ public async Task Should_be_not_started_and_display_empty_when_risks_and_issues_
[Fact]
public async Task Should_show_error_summary_when_there_is_an_API_error()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
AddPatchError(project.Id);
await OpenAndConfirmPathAsync($"/task-list/{project.Id}/confirm-risks-issues");
@@ -98,7 +96,7 @@ public async Task Should_show_error_summary_when_there_is_an_API_error()
[Fact]
public async Task Should_navigate_between_task_list_and_confirm_risks_and_issues()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
await NavigateAsync("Risks and issues");
@@ -109,4 +107,20 @@ public async Task Should_navigate_between_task_list_and_confirm_risks_and_issues
Document.Url.Should().BeUrl($"/task-list/{project.Id}");
}
+
+ [Fact]
+ public async Task Should_not_have_change_link_if_project_read_only()
+ {
+ var project = AddGetProject(isReadOnly: true);
+
+ await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
+ await NavigateAsync("Risks and issues");
+
+ Document.Url.Should().BeUrl($"/task-list/{project.Id}/confirm-risks-issues");
+
+ VerifyElementDoesNotExist("change-risks-and-issues");
+
+ Document.QuerySelector("#risks-and-issues-complete").Should().BeNull();
+ Document.QuerySelector("#confirm-and-continue-button").Should().BeNull();
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/RisksAndIssues/RisksAndIssuesIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/RisksAndIssues/RisksAndIssuesIntegrationTests.cs
index 776b4acb0..62f8c80ad 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/RisksAndIssues/RisksAndIssuesIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/RisksAndIssues/RisksAndIssuesIntegrationTests.cs
@@ -9,10 +9,8 @@
namespace Dfe.PrepareConversions.Tests.Pages.TaskList.RisksAndIssues;
-public class RisksAndIssuesIntegrationTests : BaseIntegrationTests
+public class RisksAndIssuesIntegrationTests(IntegrationTestingWebApplicationFactory factory) : BaseIntegrationTests(factory)
{
- public RisksAndIssuesIntegrationTests(IntegrationTestingWebApplicationFactory factory) : base(factory) { }
-
[Fact]
public async Task Should_navigate_to_and_update_risks_and_issues()
{
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/AcademyTypeAndRouteIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/AcademyTypeAndRouteIntegrationTests.cs
index e311965c1..1ee261721 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/AcademyTypeAndRouteIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/AcademyTypeAndRouteIntegrationTests.cs
@@ -10,15 +10,13 @@
namespace Dfe.PrepareConversions.Tests.Pages.TaskList.SchoolAndTrustInformation;
-public class AcademyTypeAndRouteIntegrationTests : BaseIntegrationTests
+public class AcademyTypeAndRouteIntegrationTests(IntegrationTestingWebApplicationFactory factory) : BaseIntegrationTests(factory)
{
- public AcademyTypeAndRouteIntegrationTests(IntegrationTestingWebApplicationFactory factory) : base(factory) { }
-
[Fact]
public async Task Should_navigate_to_and_update_conversion_support_grant_amount()
{
- AcademyConversionProject project = AddGetProject(x => x.AcademyTypeAndRoute = AcademyTypeAndRoutes.Voluntary);
- UpdateAcademyConversionProject request = AddPatchProjectMany(project, composer =>
+ var project = AddGetProject(x => x.AcademyTypeAndRoute = AcademyTypeAndRoutes.Voluntary);
+ var request = AddPatchProjectMany(project, composer =>
composer
.With(r => r.ConversionSupportGrantAmount)
.With(r => r.ConversionSupportGrantChangeReason)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/ConfirmSchoolAndTrustInformationIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/ConfirmSchoolAndTrustInformationIntegrationTests.cs
index 2fab6750e..5bed4060d 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/ConfirmSchoolAndTrustInformationIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/ConfirmSchoolAndTrustInformationIntegrationTests.cs
@@ -11,14 +11,12 @@
namespace Dfe.PrepareConversions.Tests.Pages.TaskList.SchoolAndTrustInformation;
-public class ConfirmSchoolAndTrustInformationIntegrationTests : BaseIntegrationTests
+public class ConfirmSchoolAndTrustInformationIntegrationTests(IntegrationTestingWebApplicationFactory factory) : BaseIntegrationTests(factory)
{
- public ConfirmSchoolAndTrustInformationIntegrationTests(IntegrationTestingWebApplicationFactory factory) : base(factory) { }
-
[Fact]
public async Task Should_be_in_progress_and_display_school_and_trust_information()
{
- AcademyConversionProject project = AddGetProject(p =>
+ var project = AddGetProject(p =>
{
p.SchoolAndTrustInformationSectionComplete = false;
p.AcademyTypeAndRoute = AcademyTypeAndRoutes.Voluntary;
@@ -49,7 +47,7 @@ public async Task Should_be_in_progress_and_display_school_and_trust_information
[Fact]
public async Task Should_display_an_error_when_school_and_trust_information_is_marked_as_complete_without_advisory_board_date_set()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.SchoolAndTrustInformationSectionComplete = false;
project.HeadTeacherBoardDate = null;
@@ -72,7 +70,7 @@ public async Task Should_display_an_error_when_school_and_trust_information_is_m
[Fact]
public async Task Should_be_completed_and_checked_when_school_and_trust_information_complete()
{
- AcademyConversionProject project = AddGetProject(project => project.SchoolAndTrustInformationSectionComplete = true);
+ var project = AddGetProject(project => project.SchoolAndTrustInformationSectionComplete = true);
AddPatchConfiguredProject(project, x =>
{
x.SchoolAndTrustInformationSectionComplete = true;
@@ -95,7 +93,7 @@ public async Task Should_be_completed_and_checked_when_school_and_trust_informat
[Fact]
public async Task Should_be_not_started_and_display_empty_when_school_and_trust_information_not_prepopulated()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Voluntary;
project.RecommendationForProject = null;
@@ -146,7 +144,7 @@ public async Task Should_be_not_started_and_display_empty_when_school_and_trust_
[Fact]
public async Task Should_show_error_summary_when_there_is_an_API_error()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
AddPatchError(project.Id);
await OpenAndConfirmPathAsync($"/task-list/{project.Id}/conversion-details");
@@ -159,7 +157,7 @@ public async Task Should_show_error_summary_when_there_is_an_API_error()
[Fact]
public async Task Should_show_error_summary_when_grant_amount_less_than_full_amount_and_no_reason_entered()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.ConversionSupportGrantAmount = 2000m;
project.ConversionSupportGrantChangeReason = null;
@@ -185,7 +183,7 @@ public async Task Should_show_error_summary_when_grant_amount_less_than_full_amo
[Fact]
public async Task Should_navigate_between_task_list_and_school_and_trust_information()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
await NavigateAsync("Conversion details");
@@ -200,7 +198,7 @@ public async Task Should_navigate_between_task_list_and_school_and_trust_informa
[Fact]
public async Task Should_display_the_dao_pack_sent_date_row_if_the_project_is_a_directed_academy_order()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.ApplicationReceivedDate = null;
project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored;
@@ -216,7 +214,7 @@ public async Task Should_display_the_dao_pack_sent_date_row_if_the_project_is_a_
[Fact]
public async Task Should_display_empty_for_the_dao_date_if_it_has_not_been_provided()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.ApplicationReceivedDate = null;
project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored;
@@ -234,7 +232,7 @@ public async Task Should_display_the_dao_pack_sent_date_if_it_has_been_provided(
{
DateTime yesterday = DateTime.Today.Subtract(TimeSpan.FromDays(1));
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.ApplicationReceivedDate = null;
project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored;
@@ -250,7 +248,7 @@ public async Task Should_display_the_dao_pack_sent_date_if_it_has_been_provided(
[Fact]
public async Task Should_not_display_the_dao_pack_sent_date_row_if_the_project_is_not_a_directed_academy_order()
{
- AcademyConversionProject project = AddGetProject(project => project.ApplicationReceivedDate = DateTime.Today);
+ var project = AddGetProject(project => project.ApplicationReceivedDate = DateTime.Today);
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
await NavigateAsync("Conversion details");
@@ -262,7 +260,7 @@ public async Task Should_not_display_the_dao_pack_sent_date_row_if_the_project_i
[Fact]
public async Task Should_navigate_to_dao_pack_sent_date_edit_screen_when_the_change_link_is_clicked()
{
- AcademyConversionProject project = AddGetProject(project =>
+ var project = AddGetProject(project =>
{
project.ApplicationReceivedDate = null;
project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored;
@@ -279,4 +277,31 @@ await Document.QuerySelectorAll("a[data-test^=\"change-dao-p
Document.Url.Should().EndWith("/dao-pack-sent-date");
}
+
+ [Theory]
+ [InlineData("change-name-of-trust",
+ "change-form-7-received",
+ "change-dao-pack-sent-date",
+ "change-grant-funding-type",
+ "change-finance-year-following",
+ "change-grant-funding-amount",
+ "change-grant-funding-reason",
+ "change-grant-funding-environmental-improvement-grant",
+ "change-author",
+ "change-cleared-by")]
+ public async Task Should_not_have_change_link_if_project_read_only(params string[] elements)
+ {
+ var project = AddGetProject(isReadOnly: true);
+
+ await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
+ await NavigateAsync("Conversion details");
+
+ Document.Url.Should().BeUrl($"/task-list/{project.Id}/conversion-details");
+ foreach (var element in elements)
+ {
+ VerifyElementDoesNotExist(element);
+ }
+ Document.QuerySelector("#school-and-trust-information-complete").Should().BeNull();
+ Document.QuerySelector("#confirm-and-continue-button").Should().BeNull();
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolBudgetInformation/AdditionalInformationIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolBudgetInformation/AdditionalInformationIntegrationTests.cs
index d75ff877b..d827db62a 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolBudgetInformation/AdditionalInformationIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolBudgetInformation/AdditionalInformationIntegrationTests.cs
@@ -1,7 +1,6 @@
using AngleSharp.Dom;
using AngleSharp.Html.Dom;
using AutoFixture;
-using Dfe.PrepareConversions.Data.Models;
using Dfe.PrepareConversions.Tests.Extensions;
using FluentAssertions;
using System.Threading.Tasks;
@@ -9,15 +8,13 @@
namespace Dfe.PrepareConversions.Tests.Pages.TaskList.SchoolBudgetInformation;
-public class AdditionalInformationIntegrationTests : BaseIntegrationTests
+public class AdditionalInformationIntegrationTests(IntegrationTestingWebApplicationFactory factory) : BaseIntegrationTests(factory)
{
- public AdditionalInformationIntegrationTests(IntegrationTestingWebApplicationFactory factory) : base(factory) { }
-
[Fact]
public async Task Should_navigate_to_and_update_additional_information()
{
- AcademyConversionProject project = AddGetProject();
- UpdateAcademyConversionProject request = AddPatchConfiguredProject(project, x =>
+ var project = AddGetProject();
+ var request = AddPatchConfiguredProject(project, x =>
{
x.SchoolBudgetInformationAdditionalInformation = _fixture.Create();
x.Urn = project.Urn;
@@ -39,7 +36,7 @@ public async Task Should_navigate_to_and_update_additional_information()
[Fact]
public async Task Should_show_error_summary_when_there_is_an_API_error()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
AddPatchError(project.Id);
await OpenAndConfirmPathAsync($"/task-list/{project.Id}/confirm-school-pupil-forecasts/additional-information");
@@ -52,7 +49,7 @@ public async Task Should_show_error_summary_when_there_is_an_API_error()
[Fact]
public async Task Should_navigate_back_to_confirm_school_pupil_forecasts()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
await OpenAndConfirmPathAsync($"/task-list/{project.Id}/confirm-school-budget-information/additional-information");
await NavigateAsync("Back");
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolBudgetInformation/ConfirmSchoolBudgetInformationIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolBudgetInformation/ConfirmSchoolBudgetInformationIntegrationTests.cs
index 10094bf66..75c277f91 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolBudgetInformation/ConfirmSchoolBudgetInformationIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolBudgetInformation/ConfirmSchoolBudgetInformationIntegrationTests.cs
@@ -197,7 +197,7 @@ public async Task Should_show_error_summary_when_there_is_an_API_error()
[Fact]
public async Task Should_navigate_between_task_list_and_confirm_school_budget_information()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
await NavigateAsync("Budget");
@@ -208,4 +208,28 @@ public async Task Should_navigate_between_task_list_and_confirm_school_budget_in
Document.Url.Should().BeUrl($"/task-list/{project.Id}");
}
+
+ [Theory]
+ [InlineData("change-financial-year",
+ "change-finance-year-current",
+ "change-finance-current-capital",
+ "change-next-financial-year",
+ "change-finance-year-following",
+ "change-finance-projected-capital",
+ "change-school-budget-information-additional-information")]
+ public async Task Should_not_have_change_link_if_project_read_only(params string[] elements)
+ {
+ var project = AddGetProject(isReadOnly: true);
+
+ await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
+ await NavigateAsync("Budget");
+
+ Document.Url.Should().BeUrl($"/task-list/{project.Id}/budget");
+ foreach (var element in elements)
+ {
+ VerifyElementDoesNotExist(element);
+ }
+ Document.QuerySelector("#school-budget-information-complete").Should().BeNull();
+ Document.QuerySelector("#confirm-and-continue-button").Should().BeNull();
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolOverview/ConfirmSchoolOverviewIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolOverview/ConfirmSchoolOverviewIntegrationTests.cs
index e06f04d00..cd0c8de19 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolOverview/ConfirmSchoolOverviewIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolOverview/ConfirmSchoolOverviewIntegrationTests.cs
@@ -10,10 +10,8 @@
namespace Dfe.PrepareConversions.Tests.Pages.TaskList.SchoolOverview;
-public class ConfirmSchoolOverviewIntegrationTests : BaseIntegrationTests
+public class ConfirmSchoolOverviewIntegrationTests(IntegrationTestingWebApplicationFactory factory) : BaseIntegrationTests(factory)
{
- public ConfirmSchoolOverviewIntegrationTests(IntegrationTestingWebApplicationFactory factory) : base(factory) { }
-
[Fact]
public async Task Should_be_in_progress_and_display_school_overview()
{
@@ -178,7 +176,7 @@ public async Task Should_show_error_summary_when_there_is_an_API_error()
[Fact]
public async Task Back_link_should_navigate_from_school_overview_to_task_list()
{
- AcademyConversionProject project = AddGetProject();
+ var project = AddGetProject();
AddGetEstablishmentDto(project.Urn.ToString());
await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
@@ -191,6 +189,29 @@ public async Task Back_link_should_navigate_from_school_overview_to_task_list()
Document.Url.Should().BeUrl($"/task-list/{project.Id}");
}
+ [Theory]
+ [InlineData("change-published-admission-number",
+ "change-viability-issues",
+ "change-financial-deficit",
+ "change-part-of-pfi",
+ "change-distance-to-trust-headquarters",
+ "change-member-of-parliament-name-and-party")]
+ public async Task Should_not_have_change_link_if_project_read_only(params string[] elements)
+ {
+ var project = AddGetProject(isReadOnly: true);
+
+ await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
+ await NavigateAsync("School overview");
+
+ Document.Url.Should().BeUrl($"/task-list/{project.Id}/school-overview");
+ foreach (var element in elements)
+ {
+ VerifyElementDoesNotExist(element);
+ }
+ Document.QuerySelector("#school-overview-complete").Should().BeNull();
+ Document.QuerySelector("#confirm-and-continue-button").Should().BeNull();
+ }
+
private static string AsPercentageOf(string numberOfPupils, string schoolCapacity)
{
int? a = int.Parse(numberOfPupils);
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolPupilForecasts/ConfirmSchoolPupilForecastsIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolPupilForecasts/ConfirmSchoolPupilForecastsIntegrationTests.cs
index 09b245a43..3e40bd7d1 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolPupilForecasts/ConfirmSchoolPupilForecastsIntegrationTests.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolPupilForecasts/ConfirmSchoolPupilForecastsIntegrationTests.cs
@@ -122,4 +122,21 @@ public async Task Back_link_should_navigate_from_confirm_school_pupil_forecasts_
Document.Url.Should().BeUrl($"/task-list/{project.Id}");
}
+
+ [Theory]
+ [InlineData("change-school-pupil-forecasts-additional-information")]
+ public async Task Should_not_have_change_link_if_project_read_only(params string[] elements)
+ {
+ var project = AddGetProject(isReadOnly: true);
+
+ await OpenAndConfirmPathAsync($"/task-list/{project.Id}");
+ await NavigateAsync("Pupil forecasts");
+
+ Document.Url.Should().BeUrl($"/task-list/{project.Id}/pupil-forecasts");
+ foreach (var element in elements)
+ {
+ VerifyElementDoesNotExist(element);
+ }
+ Document.QuerySelector("#confirm-and-continue-button").Should().BeNull();
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/SchoolAndTrustInformation/default.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/SchoolAndTrustInformation/default.cshtml
index eeaf0d25c..39ca85284 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/SchoolAndTrustInformation/default.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/SchoolAndTrustInformation/default.cshtml
@@ -11,24 +11,24 @@
-
-
+
+
-
-
-
-
+
+
+
+
@* Voluntary grant *@
-
+
@* Sponsored grant *@
-
-
-
-
-
+
+
+
+
+
@if (Model.IsPreview)
{
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
index d51222873..3c011a379 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
@@ -5,9 +5,30 @@
@Model.SchoolName
-
- Route: @Model.AcademyTypeAndRoute.RouteDescription(@Model.IsFormAMat)
-
+ @if (Model.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
+
+ Route: @Model.AcademyTypeAndRoute.RouteDescription(@Model.IsFormAMat)
+
Project owner:
@@ -19,13 +40,15 @@
{
@Model.AssignedUser.FullName
}
-
- Change
+ @if (!Model.IsReadOnly)
+ {
+ Change
+ }
@Model.ProjectStatus
- @if (Model.HasPermission)
+ @if (Model.HasPermission && !Model.IsReadOnly)
{
Delete project
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Index.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Index.cshtml
index 1113e4d99..771ec1abd 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Index.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Index.cshtml
@@ -8,11 +8,8 @@
}
@section BeforeMain
- {
- @Links.ProjectList.Index.BackText
- @* @Links.ProjectList.Index.BackText *@
-
-
+{
+ @Links.ProjectList.Index.BackText
}
@if (Model.ShowGenerateHtbTemplateError)
@@ -197,14 +194,17 @@
-
-
- Create your project document
-
- Project documents are in Microsoft Word format. You can make changes to documents after you create them.
-
+ @if (!Model.Project.IsReadOnly)
+ {
+
+ Create your project document
+
+
+ Project documents are in Microsoft Word format. You can make changes to documents after you create them.
+
+ }
\ No newline at end of file
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/EducationalAttendance.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/EducationalAttendance.cshtml
index 25f1e046e..e17b47cd6 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/EducationalAttendance.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/EducationalAttendance.cshtml
@@ -14,6 +14,27 @@
@Model.Project.SchoolName
Educational Attendance
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
These performance tables will automatically go into your project template.
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage2PerformanceTables.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage2PerformanceTables.cshtml
index 10bd7c862..39da8848a 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage2PerformanceTables.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage2PerformanceTables.cshtml
@@ -14,6 +14,27 @@
@Model.Project.SchoolName
Key stage 2 performance tables
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
This information comes from Find and compare schools in England. It is for reference only. It will not appear in the project document.
Source of data: Find and compare school performance (opens in new tab)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage4PerformanceTables.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage4PerformanceTables.cshtml
index 3679c159e..5faef955a 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage4PerformanceTables.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage4PerformanceTables.cshtml
@@ -14,6 +14,27 @@
@Model.Project.SchoolName
Key stage 4 performance tables
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
This information comes from Find and compare schools in England. It is for reference only. It will not appear in the project document.
Source of data: Find and compare school performance (opens in new tab)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage5PerformanceTables.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage5PerformanceTables.cshtml
index 8f28129d6..cab586a6c 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage5PerformanceTables.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage5PerformanceTables.cshtml
@@ -14,6 +14,27 @@
@Model.Project.SchoolName
Key stage 5 performance tables
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
This information comes from Find and compare schools in England. It is for reference only. It will not appear in the project document.
Source of data: Find and compare school performance (opens in new tab)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml
index 6fffbfa37..c8c81f2c5 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml
@@ -11,10 +11,32 @@
}
-
+
@Model.SchoolName
Legal requirements
-
+ @if (Model.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
+
+
-
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml.cs
index cc37a0ed8..9f073ca1a 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml.cs
@@ -19,7 +19,7 @@ public void OnGet(int id)
public async Task OnPostAsync(int id)
{
Requirements.IsComplete = IsComplete;
- await academyConversionProjectRepository.UpdateProject(id, Requirements.CreateUpdateAcademyConversionProject());
+ await AcademyConversionProjectRepository.UpdateProject(id, Requirements.CreateUpdateAcademyConversionProject());
return RedirectToPage(Links.TaskList.Index.Page, new { id });
}
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDates.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDates.cshtml
index 007ef445f..77a37a0f9 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDates.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDates.cshtml
@@ -23,6 +23,27 @@
Record dates for the local authority information template
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/PreviewProjectTemplate.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/PreviewProjectTemplate.cshtml
index 03e913396..bbedc5607 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/PreviewProjectTemplate.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/PreviewProjectTemplate.cshtml
@@ -156,16 +156,19 @@
}
-
-
-
- Create your project document
-
-
Project documents are in Microsoft Word format. You can make changes to documents after you create them.
+@if (!Model.Project.IsReadOnly)
+{
+
+
+
+ Create your project document
+
+
Project documents are in Microsoft Word format. You can make changes to documents after you create them.
-
-
-
\ No newline at end of file
+
+
+
+}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/ProjectDates/ConfirmProjectDates.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/ProjectDates/ConfirmProjectDates.cshtml
index bfa7e059b..4687411e0 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/ProjectDates/ConfirmProjectDates.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/ProjectDates/ConfirmProjectDates.cshtml
@@ -17,6 +17,27 @@
Confirm project dates
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationale.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationale.cshtml
index a0af27f93..6fe91a0a0 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationale.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationale.cshtml
@@ -26,6 +26,27 @@
Confirm project and trust rationale
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
@if (ViewData["AcademyTypeAndRoute"].Equals(AcademyTypeAndRoutes.Voluntary))
{
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssues.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssues.cshtml
index 544a3a720..e3ad3a67a 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssues.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssues.cshtml
@@ -22,6 +22,27 @@
Confirm risks and issues
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolAndTrustInformation/ConversionDetails.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolAndTrustInformation/ConversionDetails.cshtml
index 07559e227..eeb1c4417 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolAndTrustInformation/ConversionDetails.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolAndTrustInformation/ConversionDetails.cshtml
@@ -25,6 +25,27 @@
Conversion details
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
@if (ViewData["AcademyTypeAndRoute"].Equals(AcademyTypeAndRoutes.Sponsored))
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolBudgetInformation/Budget.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolBudgetInformation/Budget.cshtml
index d7076d961..9276d1b7d 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolBudgetInformation/Budget.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolBudgetInformation/Budget.cshtml
@@ -22,7 +22,28 @@
@Model.Project.SchoolName
Budget
-
This table will go into your project document.
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
+
This table will go into your project document.
You can add additional information if you need to, this will also go into your project document.
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SchoolOverview.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SchoolOverview.cshtml
index f90bd7142..aea574958 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SchoolOverview.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SchoolOverview.cshtml
@@ -24,6 +24,27 @@
School overview
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
@if (ViewData["AcademyTypeAndRoute"] is AcademyTypeAndRoutes.Sponsored)
{
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPerformance/ConfirmSchoolPerformance.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPerformance/ConfirmSchoolPerformance.cshtml
index f5a5729bd..2e747bd37 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPerformance/ConfirmSchoolPerformance.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPerformance/ConfirmSchoolPerformance.cshtml
@@ -14,6 +14,27 @@
@Model.Project.SchoolName
School performance (Ofsted information)
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
This information comes from TRAMS. It is for reference only. It will not appear in the project document.
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPupilForecasts/PupilForecasts.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPupilForecasts/PupilForecasts.cshtml
index 44fb1b1c8..adb7cafc8 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPupilForecasts/PupilForecasts.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPupilForecasts/PupilForecasts.cshtml
@@ -18,6 +18,27 @@
Pupil forecasts
+ @if (Model.Project.IsReadOnly)
+ {
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
+
+
+ You cannot make changes to this project in Prepare.
+
+
+
+ }
@if (ViewData["AcademyTypeAndRoute"]!.Equals(AcademyTypeAndRoutes.Sponsored))
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/TagHelpers/BackLinkTagHelper.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/TagHelpers/BackLinkTagHelper.cs
index 7fde088a1..07c5e87ad 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/TagHelpers/BackLinkTagHelper.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/TagHelpers/BackLinkTagHelper.cs
@@ -6,10 +6,8 @@
namespace Dfe.PrepareConversions.TagHelpers;
[HtmlTargetElement("govuk-back-link", TagStructure = TagStructure.WithoutEndTag)]
-public class BackLinkTagHelper : AnchorTagHelper
+public class BackLinkTagHelper(IHtmlGenerator generator) : AnchorTagHelper(generator)
{
- public BackLinkTagHelper(IHtmlGenerator generator) : base(generator) { }
-
[HtmlAttributeName("link-item")]
public LinkItem LinkItem { get; set; }
From 64bb8c5cd7a83a60c394cad2447eaa9b37aace2d Mon Sep 17 00:00:00 2001
From: "SHAKIR, Muhammad"
Date: Wed, 9 Oct 2024 15:56:56 +0100
Subject: [PATCH 07/19] Enabled AO sent date and updated text
---
.../RecordDecisionPreview/default.cshtml | 23 ++--
.../Pages/Shared/_ProjectHeader.cshtml | 115 ++++++++++--------
.../Decision/AcademyOrderDate.cshtml.cs | 36 +++---
.../TaskList/Decision/DecisionDate.cshtml.cs | 24 ++--
.../Decision/Models/DecisionBaseModel.cs | 24 ++--
.../Pages/TaskList/Decision/Summary.cshtml | 98 +++++++++------
.../Pages/TaskList/Decision/Summary.cshtml.cs | 15 ++-
.../Pages/TaskList/Index.cshtml.cs | 4 +-
8 files changed, 183 insertions(+), 156 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/RecordDecisionPreview/default.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/RecordDecisionPreview/default.cshtml
index 99aa60da2..f7c7ca92c 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/RecordDecisionPreview/default.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/RecordDecisionPreview/default.cshtml
@@ -205,27 +205,22 @@
}
-
- @if (!Model.IsReadOnly)
- {
-
- Change Date academy order (AO) sent
-
- }
+
+ Change Date academy order (AO) sent
+
}
-
@if (!Model.IsReadOnly)
{
- You can click the button to change the recorded decision.
-
-
-
- Change your decision
-
- }
+ You can click the button to change the recorded decision.
+
+ }
+
+ @(Model.IsReadOnly ? "Confirm date AO sent" : "Change your decision")
+
}
else
{
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
index 3c011a379..f72281acf 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
@@ -5,57 +5,72 @@
@Model.SchoolName
- @if (Model.IsReadOnly)
- {
-
-
-
-
- Project approved
-
-
- This project was approved and moved to Complete conversions transfers and changes on @Model.ApplicationReceivedDate.
-
-
- You cannot make changes to this project in Prepare.
-
-
-
- }
-
- Route: @Model.AcademyTypeAndRoute.RouteDescription(@Model.IsFormAMat)
-
-
- Project owner:
- @if (Model.AssignedUser == null || string.IsNullOrWhiteSpace(Model?.AssignedUser.FullName))
- {
- Empty
- }
- else
- {
- @Model.AssignedUser.FullName
- }
- @if (!Model.IsReadOnly)
- {
- Change
- }
-
-
- @Model.ProjectStatus
-
- @if (Model.HasPermission && !Model.IsReadOnly)
- {
-
- Delete project
-
- }
-
-
+
+ @if (Model.IsReadOnly)
+ {
+
+
+
+
+
+ Project approved
+
+
+ This project was approved and moved to Complete conversions transfers and changes on @Model.ApplicationReceivedDate.
+
+ @if (Model.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
+
+
+
+ }
+
+
+ Route: @Model.AcademyTypeAndRoute.RouteDescription(@Model.IsFormAMat)
+
+
+ Project owner:
+
+ @if (Model.AssignedUser == null || string.IsNullOrWhiteSpace(Model?.AssignedUser.FullName))
+ {
+ Empty
+ }
+ else
+ {
+ @Model.AssignedUser.FullName
+ }
+ @if (!Model.IsReadOnly)
+ {
+ Change
+ }
+
+
+ @Model.ProjectStatus
+
+ @if (Model.HasPermission && !Model.IsReadOnly)
+ {
+
+ Delete project
+
+ }
+
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml.cs
index 432cf52a6..3ede87e23 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml.cs
@@ -1,6 +1,7 @@
using Dfe.Academisation.ExtensionMethods;
using Dfe.PrepareConversions.Data.Models.AdvisoryBoardDecision;
using Dfe.PrepareConversions.Data.Services;
+using Dfe.PrepareConversions.Data.Services.Interfaces;
using Dfe.PrepareConversions.Models;
using Dfe.PrepareConversions.Pages.TaskList.Decision.Models;
using Dfe.PrepareConversions.Services;
@@ -9,21 +10,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
+using System.Threading.Tasks;
namespace Dfe.PrepareConversions.Pages.TaskList.Decision;
-public class AcademyOrderDateModel : DecisionBaseModel, IDateValidationMessageProvider
+public class AcademyOrderDateModel(IAcademyConversionProjectRepository repository,
+ ISession session,
+ ErrorService errorService,
+ IAcademyConversionAdvisoryBoardDecisionRepository decisionRepository) : DecisionBaseModel(repository, session), IDateValidationMessageProvider
{
- private readonly ErrorService _errorService;
-
- public AcademyOrderDateModel(IAcademyConversionProjectRepository repository,
- ISession session,
- ErrorService errorService)
- : base(repository, session)
- {
- _errorService = errorService;
- }
-
[BindProperty(Name = "academy-order-date", BinderType = typeof(DateInputModelBinder))]
[DateValidation(DateRangeValidationService.DateRange.PastOrToday)]
[Display(Name = "academy-order-date")]
@@ -47,10 +42,15 @@ string IDateValidationMessageProvider.AllMissing(string displayName)
}
- public IActionResult OnGet(int id)
+ public async Task
OnGetAsync(int id)
{
- AdvisoryBoardDecision decision = GetDecisionFromSession(id);
- if (decision.Decision == null) return RedirectToPage(Links.TaskList.Index.Page, new { id });
+ var decision = GetDecisionFromSession(id);
+ if (decision.Decision == null)
+ {
+ decision = (await decisionRepository.Get(id)).Body;
+ SetDecisionInSession(id, decision);
+ if (decision.Decision == null) return RedirectToPage(Links.TaskList.Index.Page, new { id });
+ }
Decision = decision;
DecisionText = decision.Decision.ToString()?.ToLowerInvariant();
@@ -61,15 +61,15 @@ public IActionResult OnGet(int id)
return Page();
}
- public IActionResult OnPost(int id)
+ public async Task OnPost(int id)
{
- AdvisoryBoardDecision decision = GetDecisionFromSession(id);
+ var decision = GetDecisionFromSession(id);
decision.AcademyOrderDate = AcademyOrderDate;
if (!ModelState.IsValid)
{
- _errorService.AddErrors(Request.Form.Keys, ModelState);
- return OnGet(id);
+ errorService.AddErrors(Request.Form.Keys, ModelState);
+ return await OnGetAsync(id);
}
SetDecisionInSession(id, decision);
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/DecisionDate.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/DecisionDate.cshtml.cs
index 60788b1c9..b7c930526 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/DecisionDate.cshtml.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/DecisionDate.cshtml.cs
@@ -12,18 +12,10 @@
namespace Dfe.PrepareConversions.Pages.TaskList.Decision;
-public class DecisionDate : DecisionBaseModel, IDateValidationMessageProvider
+public class DecisionDate(IAcademyConversionProjectRepository repository,
+ ISession session,
+ ErrorService errorService) : DecisionBaseModel(repository, session), IDateValidationMessageProvider
{
- private readonly ErrorService _errorService;
-
- public DecisionDate(IAcademyConversionProjectRepository repository,
- ISession session,
- ErrorService errorService)
- : base(repository, session)
- {
- _errorService = errorService;
- }
-
[BindProperty(Name = "decision-date", BinderType = typeof(DateInputModelBinder))]
[DateValidation(DateRangeValidationService.DateRange.PastOrToday)]
[Display(Name = "decision")]
@@ -43,14 +35,14 @@ string IDateValidationMessageProvider.AllMissing(string displayName)
{
string idRaw = Request.RouteValues["id"] as string;
int id = int.Parse(idRaw ?? string.Empty);
- AdvisoryBoardDecision decision = GetDecisionFromSession(id);
+ var decision = GetDecisionFromSession(id);
return decision.Decision == AdvisoryBoardDecisions.DAORevoked ? "Enter the date the DAO was revoked" : $"Enter the date when the conversion was {decision.Decision.ToDescription().ToLowerInvariant()}";
}
public IActionResult OnGet(int id)
{
- AdvisoryBoardDecision decision = GetDecisionFromSession(id);
+ var decision = GetDecisionFromSession(id);
if (decision.Decision == null) return RedirectToPage(Links.TaskList.Index.Page, new { id });
Decision = GetDecisionFromSession(id);
@@ -64,12 +56,12 @@ public IActionResult OnGet(int id)
public IActionResult OnPost(int id)
{
- AdvisoryBoardDecision decision = GetDecisionFromSession(id);
+ var decision = GetDecisionFromSession(id);
decision.AdvisoryBoardDecisionDate = DateOfDecision;
if (!ModelState.IsValid)
{
- _errorService.AddErrors(Request.Form.Keys, ModelState);
+ errorService.AddErrors(Request.Form.Keys, ModelState);
return OnGet(id);
}
@@ -79,6 +71,6 @@ public IActionResult OnPost(int id)
return RedirectToPage(Links.Decision.AcademyOrderDate.Page, new { id });
}
- return RedirectToPage(Links.Decision.Summary.Page, new { id });
+ return RedirectToPage(Links.Decision.Summary.Page, new { id});
}
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Models/DecisionBaseModel.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Models/DecisionBaseModel.cs
index 9d76f8152..a3dab46d8 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Models/DecisionBaseModel.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Models/DecisionBaseModel.cs
@@ -1,5 +1,4 @@
-using Dfe.PrepareConversions.Data;
-using Dfe.PrepareConversions.Data.Models;
+using Dfe.PrepareConversions.Data.Models;
using Dfe.PrepareConversions.Data.Models.AdvisoryBoardDecision;
using Dfe.PrepareConversions.Data.Services;
using Dfe.PrepareConversions.Extensions;
@@ -11,11 +10,12 @@
namespace Dfe.PrepareConversions.Pages.TaskList.Decision.Models;
-public abstract class DecisionBaseModel : PageModel
+public abstract class DecisionBaseModel(IAcademyConversionProjectRepository repository, ISession session) : PageModel
{
public const string DECISION_SESSION_KEY = "Decision";
- protected readonly IAcademyConversionProjectRepository _repository;
- protected readonly ISession _session;
+ public const string PROJECT_READONLY_SESSION_KEY = "Project_iro";
+ protected readonly IAcademyConversionProjectRepository _repository = repository;
+ protected readonly ISession _session = session;
protected AcademyConversionProject _project;
///
@@ -23,12 +23,6 @@ public abstract class DecisionBaseModel : PageModel
///
protected bool PropagateBackLinkOverride = true;
- protected DecisionBaseModel(IAcademyConversionProjectRepository repository, ISession session)
- {
- _repository = repository;
- _session = session;
- }
-
public BackLinkModel BackLinkModel { get; set; }
public string SchoolName { get; set; }
public string AcademyTypeAndRoute { get; set; }
@@ -42,7 +36,7 @@ protected DecisionBaseModel(IAcademyConversionProjectRepository repository, ISes
private async Task SetDefaults(int id)
{
Id = id;
- ApiResponse project = await _repository.GetProjectById(id);
+ var project = await _repository.GetProjectById(id);
SchoolName = project.Body.SchoolName;
AcademyTypeAndRoute = project.Body.AcademyTypeAndRoute;
}
@@ -77,6 +71,12 @@ protected AdvisoryBoardDecision GetDecisionFromSession(int id)
return _session.Get($"{DECISION_SESSION_KEY}_{id}") ?? new AdvisoryBoardDecision();
}
+ protected bool GetIsProjectReadOnly(int id)
+ {
+ _ = bool.TryParse(_session.GetString($"{PROJECT_READONLY_SESSION_KEY}_{id}"), out bool isReadOnly);
+ return isReadOnly;
+ }
+
///
/// Stores the provided in the current session.
///
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Summary.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Summary.cshtml
index db8d9e64f..41a7622cc 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Summary.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Summary.cshtml
@@ -13,7 +13,7 @@
}
Record the decision
-Check your answers before recording this decision
+@(Model.IsReadOnly ? "Check your answers": "Check your answers before recording this decision")
@@ -46,9 +46,12 @@
-
-
- Changedecision
-
+ @if (!Model.IsReadOnly)
+ {
+
+ Changedecision
+
+ }
@@ -98,29 +101,32 @@
-
- @if (Model.Decision.Decision == AdvisoryBoardDecisions.Declined)
- {
-
- Changedeclined-reason
-
- }
- else if (Model.Decision.Decision == AdvisoryBoardDecisions.Deferred)
- {
-
- Changedeferred-reason
-
- }
- else if (Model.Decision.Decision == AdvisoryBoardDecisions.Withdrawn)
- {
-
- Changewithdrawn-reason
-
- }
- else if (Model.Decision.Decision == AdvisoryBoardDecisions.DAORevoked)
- {
-
- Changedaorevoked-reason
-
+ @if(!Model.IsReadOnly)
+ {
+ if (Model.Decision.Decision == AdvisoryBoardDecisions.Declined)
+ {
+
+ Changedeclined-reason
+
+ }
+ else if (Model.Decision.Decision == AdvisoryBoardDecisions.Deferred)
+ {
+
+ Changedeferred-reason
+
+ }
+ else if (Model.Decision.Decision == AdvisoryBoardDecisions.Withdrawn)
+ {
+
+ Changewithdrawn-reason
+
+ }
+ else if (Model.Decision.Decision == AdvisoryBoardDecisions.DAORevoked)
+ {
+
+ Changedaorevoked-reason
+
+ }
}
@@ -142,11 +148,14 @@
}
-
- @if (Model.Decision.Decision != AdvisoryBoardDecisions.DAORevoked)
+ @if (!Model.IsReadOnly)
{
-
- Changewho made this decision
-
+ @if (Model.Decision.Decision != AdvisoryBoardDecisions.DAORevoked)
+ {
+
+ Changewho made this decision
+
+ }
}
@@ -175,9 +184,12 @@
}
-
- Changedecision maker's name
-
+ @if(!Model.IsReadOnly)
+ {
+
+ Changedecision maker's name
+
+ }
@@ -201,9 +213,12 @@
}
-
- Changecondition answer
-
+ @if (!Model.IsReadOnly)
+ {
+
+ Changecondition answer
+
+ }
}
@@ -225,9 +240,12 @@
-
+ @if(!Model.IsReadOnly)
+ {
+
Changedate of decision
-
+
+ }
@* AO Date *@
@@ -260,6 +278,6 @@
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Summary.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Summary.cshtml.cs
index 535a3a6e6..d511792c9 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Summary.cshtml.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/Summary.cshtml.cs
@@ -6,7 +6,7 @@
using Dfe.PrepareConversions.Data.Services.Interfaces;
using Dfe.PrepareConversions.Extensions;
using Dfe.PrepareConversions.Models;
-using Dfe.PrepareConversions.Pages.TaskList.Decision.Models;
+using Dfe.PrepareConversions.Pages.TaskList.Decision.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Net;
@@ -20,6 +20,7 @@ public class SummaryModel(IAcademyConversionProjectRepository repository,
IAcademyConversionProjectRepository academyConversionProjectRepository) : DecisionBaseModel(repository, session)
{
public AdvisoryBoardDecision Decision { get; set; }
+ public bool IsReadOnly { get; set; }
public string DecisionText =>
Decision.Decision == AdvisoryBoardDecisions.DAORevoked
? "DAO revoked"
@@ -29,6 +30,8 @@ public class SummaryModel(IAcademyConversionProjectRepository repository,
public IActionResult OnGet(int id)
{
Decision = GetDecisionFromSession(id);
+ IsReadOnly = GetIsProjectReadOnly(id);
+
if (AcademyTypeAndRoute == AcademyTypeAndRoutes.Voluntary)
{
SetBackLinkModel(Links.Decision.AcademyOrderDate, id);
@@ -46,21 +49,23 @@ public async Task
OnPostAsync(int id)
{
if (!ModelState.IsValid) return OnGet(id);
- AdvisoryBoardDecision decision = GetDecisionFromSession(id);
+ var decision = GetDecisionFromSession(id);
decision.ConversionProjectId = id;
await CreateOrUpdateDecision(id, decision);
- SetDecisionInSession(id, null);
+ SetDecisionInSession(id, null);
- TempData.SetNotification(NotificationType.Success, "Done", "Decision recorded");
+ TempData.SetNotification(NotificationType.Success, "Done", GetIsProjectReadOnly(id)
+ ? "Date academy order sent confirmed"
+ : "Decision recorded");
return RedirectToPage(Links.TaskList.Index.Page, new { id });
}
private async Task CreateOrUpdateDecision(int id, AdvisoryBoardDecision decision)
{
- ApiResponse savedDecision = await advisoryBoardDecisionRepository.Get(id);
+ var savedDecision = await advisoryBoardDecisionRepository.Get(id);
if (savedDecision.StatusCode == HttpStatusCode.NotFound)
{
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Index.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Index.cshtml.cs
index 6ce6436e2..5b19c6234 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Index.cshtml.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Index.cshtml.cs
@@ -17,7 +17,8 @@ public class IndexModel(KeyStagePerformanceService keyStagePerformanceService,
IAcademyConversionProjectRepository repository,
ErrorService errorService, ISession session) : BaseAcademyConversionProjectPageModel(repository)
{
- public const string SESSION_KEY = "RoleCapabilities";
+ public const string SESSION_KEY = "RoleCapabilities";
+ public const string PROJECT_READONLY_SESSION_KEY = "Project_iro";
protected readonly ISession _session = session;
public bool ShowGenerateHtbTemplateError { get; set; }
@@ -86,6 +87,7 @@ public override async Task OnGetAsync(int id)
TaskList.HasAbsenceData = keyStagePerformance.HasSchoolAbsenceData;
}
Project.HasPermission = _session.HasPermission($"{SESSION_KEY}_{HttpContext.User.Identity.Name}", RoleCapability.DeleteConversionProject);
+ _session.SetString($"{PROJECT_READONLY_SESSION_KEY}_{id}", Project.IsReadOnly.ToString());
return Page();
}
}
From f3479a822d6c36204ffeebf30ebf7a2568461cac Mon Sep 17 00:00:00 2001
From: "SHAKIR, Muhammad"
Date: Wed, 9 Oct 2024 16:21:43 +0100
Subject: [PATCH 08/19] Fixed prepare letting user to change decision for
locked project issue
---
.../RecordDecisionPreview/default.cshtml | 15 +++++++++++----
.../TaskList/Decision/RecordDecision.cshtml.cs | 8 ++++----
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/RecordDecisionPreview/default.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/RecordDecisionPreview/default.cshtml
index f7c7ca92c..0ed36bdfa 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/RecordDecisionPreview/default.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Components/RecordDecisionPreview/default.cshtml
@@ -217,10 +217,17 @@
You can click the button to change the recorded decision.
- }
-
- @(Model.IsReadOnly ? "Confirm date AO sent" : "Change your decision")
-
+
+ Change your decision
+
+ }
+ else
+ {
+
+ @(Model.IsReadOnly ? "Confirm date AO sent" : "Change your decision")
+
+ }
+
}
else
{
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/RecordDecision.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/RecordDecision.cshtml.cs
index e3a06f17f..197d3e954 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/RecordDecision.cshtml.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/RecordDecision.cshtml.cs
@@ -34,11 +34,11 @@ public RecordDecisionModel(IAcademyConversionProjectRepository repository,
public async Task OnGet(int id)
{
- AdvisoryBoardDecision sessionDecision = GetDecisionFromSession(id);
+ var sessionDecision = GetDecisionFromSession(id);
if (sessionDecision.Decision == null)
{
- ApiResponse savedDecision = await _decisionRepository.Get(id);
+ var savedDecision = await _decisionRepository.Get(id);
SetDecisionInSession(id, savedDecision?.Body);
AdvisoryBoardDecision = savedDecision?.Body?.Decision;
}
@@ -53,11 +53,11 @@ public async Task OnPost(int id)
{
if (!ModelState.IsValid)
{
- _errorService.AddErrors(new[] { "AdvisoryBoardDecision" }, ModelState);
+ _errorService.AddErrors(["AdvisoryBoardDecision"], ModelState);
return await OnGet(id);
}
- AdvisoryBoardDecision decision = GetDecisionFromSession(id) ?? new AdvisoryBoardDecision();
+ var decision = GetDecisionFromSession(id) ?? new AdvisoryBoardDecision();
decision.Decision = AdvisoryBoardDecision.Value;
SetDecisionInSession(id, decision);
From c250c6689b55138ebb7c547e9a0432554d63fae6 Mon Sep 17 00:00:00 2001
From: "SHAKIR, Muhammad"
Date: Wed, 9 Oct 2024 17:25:12 +0100
Subject: [PATCH 09/19] Display content based on isvoluntary flag
---
.../Pages/Shared/_ProjectHeader.cshtml | 2 +-
.../TaskList/Decision/AcademyOrderDate.cshtml | 9 ++++++++-
.../Decision/AcademyOrderDate.cshtml.cs | 9 +++++++--
.../EducationalAttendance.cshtml | 17 ++++++++++++++---
.../KeyStage2PerformanceTables.cshtml | 17 ++++++++++++++---
.../KeyStage4PerformanceTables.cshtml | 17 ++++++++++++++---
.../KeyStage5PerformanceTables.cshtml | 17 ++++++++++++++---
.../LegalRequirements/LegalModelBase.cs | 7 ++++++-
.../LegalRequirements/LegalSummary.cshtml | 17 ++++++++++++++---
...ocalAuthorityInformationTemplateDates.cshtml | 17 ++++++++++++++---
.../ProjectDates/ConfirmProjectDates.cshtml | 17 ++++++++++++++---
.../ConfirmProjectAndTrustRationale.cshtml | 17 ++++++++++++++---
.../RisksAndIssues/ConfirmRisksAndIssues.cshtml | 17 ++++++++++++++---
.../ConversionDetails.cshtml | 17 ++++++++++++++---
.../SchoolBudgetInformation/Budget.cshtml | 17 ++++++++++++++---
.../SchoolOverview/SchoolOverview.cshtml | 17 ++++++++++++++---
.../ConfirmSchoolPerformance.cshtml | 17 ++++++++++++++---
.../SchoolPupilForecasts/PupilForecasts.cshtml | 17 ++++++++++++++---
18 files changed, 218 insertions(+), 47 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
index f72281acf..3776405b5 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
@@ -26,7 +26,7 @@
@if (Model.IsVoluntary)
{
- You can only
+ You can only
enter or change the date the academy order was sent
to this school. All other information is locked.
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml
index fe22bc910..dbcf318e6 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml
@@ -7,7 +7,14 @@
@section BeforeMain
{
-
+ @if (Model.IsReadOnly)
+ {
+
+ }
+ else
+ {
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml.cs
index 3ede87e23..409be6a42 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml.cs
@@ -5,6 +5,7 @@
using Dfe.PrepareConversions.Models;
using Dfe.PrepareConversions.Pages.TaskList.Decision.Models;
using Dfe.PrepareConversions.Services;
+using DocumentFormat.OpenXml.Vml.Spreadsheet;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
@@ -28,6 +29,9 @@ public class AcademyOrderDateModel(IAcademyConversionProjectRepository repositor
public AdvisoryBoardDecision Decision { get; set; }
+ public bool IsReadOnly { get; set; }
+ public LinkItem BackLink { get;set; }
+
string IDateValidationMessageProvider.SomeMissing(string displayName, IEnumerable missingParts)
{
return $"Date must include a {string.Join(" and ", missingParts)}";
@@ -37,7 +41,7 @@ string IDateValidationMessageProvider.AllMissing(string displayName)
{
string idRaw = Request.RouteValues["id"] as string;
int id = int.Parse(idRaw ?? string.Empty);
- AdvisoryBoardDecision decision = GetDecisionFromSession(id);
+ var decision = GetDecisionFromSession(id);
return $"Enter the date when the conversion was {decision.Decision.ToDescription().ToLowerInvariant()}";
}
@@ -55,7 +59,8 @@ public async Task OnGetAsync(int id)
Decision = decision;
DecisionText = decision.Decision.ToString()?.ToLowerInvariant();
AcademyOrderDate = Decision.AcademyOrderDate;
-
+ IsReadOnly = GetIsProjectReadOnly(id);
+ BackLink = new() { Page = Request.Headers["Referer"], BackText = "backText" };
SetBackLinkModel(Links.Decision.DecisionDate, id);
return Page();
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/EducationalAttendance.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/EducationalAttendance.cshtml
index e17b47cd6..011024450 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/EducationalAttendance.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/EducationalAttendance.cshtml
@@ -29,9 +29,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage2PerformanceTables.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage2PerformanceTables.cshtml
index 39da8848a..a654882f3 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage2PerformanceTables.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage2PerformanceTables.cshtml
@@ -29,9 +29,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage4PerformanceTables.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage4PerformanceTables.cshtml
index 5faef955a..28404b526 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage4PerformanceTables.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage4PerformanceTables.cshtml
@@ -29,9 +29,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage5PerformanceTables.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage5PerformanceTables.cshtml
index cab586a6c..d9383e024 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage5PerformanceTables.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/KeyStagePerformance/KeyStage5PerformanceTables.cshtml
@@ -29,9 +29,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalModelBase.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalModelBase.cs
index a4b6e8126..5b4ae725c 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalModelBase.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalModelBase.cs
@@ -1,3 +1,4 @@
+using Dfe.PrepareConversions.Data.Models;
using Dfe.PrepareConversions.Data.Models.AcademyConversion;
using Dfe.PrepareConversions.Data.Services;
using Dfe.PrepareConversions.Models;
@@ -5,6 +6,7 @@
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Primitives;
+using System;
using System.Threading.Tasks;
namespace Dfe.PrepareConversions.Pages.TaskList.LegalRequirements;
@@ -17,6 +19,7 @@ public class LegalModelBase(IAcademyConversionProjectRepository academyConversio
public string SchoolName { get; private set; }
public Data.Models.AcademyConversion.LegalRequirements Requirements { get; private set; }
public bool IsReadOnly { get; set; }
+ public bool IsVoluntary { get; set; }
public override async Task OnPageHandlerExecutionAsync(PageHandlerExecutingContext context, PageHandlerExecutionDelegate next)
{
@@ -37,8 +40,10 @@ public override async Task OnPageHandlerExecutionAsync(PageHandlerExecutingConte
var project = await AcademyConversionProjectRepository.GetProjectById(Id);
if (project.Success)
{
- Requirements = Data.Models.AcademyConversion.LegalRequirements.From(project.Body);
+ Requirements = Data.Models.AcademyConversion.LegalRequirements.From(project.Body);
IsReadOnly = project.Body.IsReadOnly;
+ IsVoluntary = string.IsNullOrWhiteSpace(project.Body.AcademyTypeAndRoute) is false &&
+ project.Body.AcademyTypeAndRoute.Equals(AcademyTypeAndRoutes.Voluntary, StringComparison.InvariantCultureIgnoreCase);
}
else
{
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml
index c8c81f2c5..e13ccb99a 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LegalRequirements/LegalSummary.cshtml
@@ -29,9 +29,20 @@
This project was approved and moved to Complete conversions transfers and changes on.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDates.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDates.cshtml
index 77a37a0f9..70629d474 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDates.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/LocalAuthorityInformationTemplate/ConfirmLocalAuthorityInformationTemplateDates.cshtml
@@ -38,9 +38,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/ProjectDates/ConfirmProjectDates.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/ProjectDates/ConfirmProjectDates.cshtml
index 4687411e0..bca498e66 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/ProjectDates/ConfirmProjectDates.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/ProjectDates/ConfirmProjectDates.cshtml
@@ -32,9 +32,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationale.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationale.cshtml
index 6fe91a0a0..680924d62 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationale.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Rationale/ConfirmProjectAndTrustRationale.cshtml
@@ -41,9 +41,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssues.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssues.cshtml
index e3ad3a67a..0ca393eb6 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssues.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/RisksAndIssues/ConfirmRisksAndIssues.cshtml
@@ -37,9 +37,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolAndTrustInformation/ConversionDetails.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolAndTrustInformation/ConversionDetails.cshtml
index eeb1c4417..80255d3ed 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolAndTrustInformation/ConversionDetails.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolAndTrustInformation/ConversionDetails.cshtml
@@ -40,9 +40,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolBudgetInformation/Budget.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolBudgetInformation/Budget.cshtml
index 9276d1b7d..e01976e7a 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolBudgetInformation/Budget.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolBudgetInformation/Budget.cshtml
@@ -37,9 +37,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SchoolOverview.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SchoolOverview.cshtml
index aea574958..6a0791b41 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SchoolOverview.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolOverview/SchoolOverview.cshtml
@@ -39,9 +39,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPerformance/ConfirmSchoolPerformance.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPerformance/ConfirmSchoolPerformance.cshtml
index 2e747bd37..5466cc229 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPerformance/ConfirmSchoolPerformance.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPerformance/ConfirmSchoolPerformance.cshtml
@@ -29,9 +29,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPupilForecasts/PupilForecasts.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPupilForecasts/PupilForecasts.cshtml
index adb7cafc8..d52cdd349 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPupilForecasts/PupilForecasts.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/SchoolPupilForecasts/PupilForecasts.cshtml
@@ -33,9 +33,20 @@
This project was approved and moved to Complete conversions transfers and changes on @Model.Project.ApplicationReceivedDate.
-
- You cannot make changes to this project in Prepare.
-
+ @if (Model.Project.IsVoluntary)
+ {
+
+ You can only
+ enter or change the date the academy order was sent
+ to this school. All other information is locked.
+
+ }
+ else
+ {
+
+ You cannot make changes to this project in Prepare.
+
+ }
}
From 834b1f087241e5b134f5dc5daeeba3183cb95ffa Mon Sep 17 00:00:00 2001
From: "SHAKIR, Muhammad"
Date: Fri, 11 Oct 2024 14:10:22 +0100
Subject: [PATCH 10/19] Return to previous page
---
.../Dfe.PrepareConversions.Data/Models/User.cs | 15 ++++-----------
.../Dfe.PrepareConversions/Models/Links.cs | 4 ++--
.../Pages/Shared/_ProjectHeader.cshtml | 2 +-
.../TaskList/Decision/AcademyOrderDate.cshtml | 11 ++---------
.../TaskList/Decision/AcademyOrderDate.cshtml.cs | 12 ++++++------
.../EducationalAttendance.cshtml | 2 +-
.../KeyStage2PerformanceTables.cshtml | 2 +-
.../KeyStage4PerformanceTables.cshtml | 2 +-
.../KeyStage5PerformanceTables.cshtml | 2 +-
.../LegalRequirements/LegalSummary.cshtml | 2 +-
...mLocalAuthorityInformationTemplateDates.cshtml | 2 +-
.../ProjectDates/ConfirmProjectDates.cshtml | 2 +-
.../ConfirmProjectAndTrustRationale.cshtml | 2 +-
.../RisksAndIssues/ConfirmRisksAndIssues.cshtml | 2 +-
.../ConversionDetails.cshtml | 2 +-
.../SchoolBudgetInformation/Budget.cshtml | 2 +-
.../TaskList/SchoolOverview/SchoolOverview.cshtml | 2 +-
.../ConfirmSchoolPerformance.cshtml | 2 +-
.../SchoolPupilForecasts/PupilForecasts.cshtml | 2 +-
19 files changed, 29 insertions(+), 43 deletions(-)
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/User.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/User.cs
index 63944cf0d..6856b0381 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/User.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/User.cs
@@ -1,15 +1,8 @@
namespace Dfe.PrepareConversions.Data.Models;
-public class User
+public class User(string id, string emailAddress, string fullName)
{
- public User(string id, string emailAddress, string fullName)
- {
- Id = id;
- EmailAddress = emailAddress;
- FullName = fullName;
- }
-
- public string Id { get; set; }
- public string EmailAddress { get; }
- public string FullName { get; }
+ public string Id { get; set; } = id;
+ public string EmailAddress { get; } = emailAddress;
+ public string FullName { get; } = fullName;
}
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/Links.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/Links.cs
index 4d1a2be83..a4efbe907 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/Links.cs
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Models/Links.cs
@@ -6,14 +6,14 @@ namespace Dfe.PrepareConversions.Models;
public static class Links
{
- private static readonly List _links = new();
+ private static readonly List _links = [];
private static string _transfersUrl;
public static string TransfersUrl => _transfersUrl;
private static bool _isApplicationDocumentsEnabled;
public static bool IsApplicationDocumentsEnabled => _isApplicationDocumentsEnabled;
- private static LinkItem AddLinkItem(string page, string backText = "Back")
+ public static LinkItem AddLinkItem(string page, string backText = "Back")
{
LinkItem item = new() { Page = page, BackText = backText };
_links.Add(item);
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
index 3776405b5..2c054e82f 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/Shared/_ProjectHeader.cshtml
@@ -26,7 +26,7 @@
@if (Model.IsVoluntary)
{
- You can only
+ You can only
enter or change the date the academy order was sent
to this school. All other information is locked.
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml
index dbcf318e6..6fee54b2c 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/Pages/TaskList/Decision/AcademyOrderDate.cshtml
@@ -7,21 +7,14 @@
@section BeforeMain
{
- @if (Model.IsReadOnly)
- {
-
- }
- else
- {
-
- }
+
}
-
Record the decision
Date the academy order (AO) was sent
+
diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/appsettings.json b/Dfe.PrepareConversions/Dfe.PrepareConversions/appsettings.json
index fb7556841..0bf39a824 100644
--- a/Dfe.PrepareConversions/Dfe.PrepareConversions/appsettings.json
+++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/appsettings.json
@@ -38,8 +38,8 @@
},
"ApplicationLinks": {
"SharePointTemplateUrl": "https://educationgovuk.sharepoint.com/sites/lvewp00030/SitePages/7-Monitoring%20&%20Decision%20Making/1-Advisory%20Board/Advisory%20Board.aspx",
- "RevocationGuidanceLink": "https://educationgovuk.sharepoint.com/:w:/r/sites/lvedfe00116/_layouts/15/Doc.aspx?action=default&file=Revocation_Guidance_Mar24.docx&mobileredirect=true&sourcedoc=%7B563CD875-E0A4-46F0-AEC2-8C19453E24D5%7D"
- "CompleteHandoverProjectList": ""
+ "RevocationGuidanceLink": "https://educationgovuk.sharepoint.com/:w:/r/sites/lvedfe00116/_layouts/15/Doc.aspx?action=default&file=Revocation_Guidance_Mar24.docx&mobileredirect=true&sourcedoc=%7B563CD875-E0A4-46F0-AEC2-8C19453E24D5%7D",
+ "CompleteHandoverProjectListLink": "https://dev.complete.education.gov.uk/projects/all/handover"
},
"ApplicationInsights": {
"EnableBrowserAnalytics": "No",
From f7a10ae01514f4585e6e1245d1aaf0a96dc97e45 Mon Sep 17 00:00:00 2001
From: "SHAKIR, Muhammad"