diff --git a/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml b/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml index da62a2617..876559bb5 100644 --- a/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml +++ b/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml @@ -37,7 +37,7 @@ @foreach (var reason in Model.ReasonOptions) { var checkboxId = reason.Heading.ToLower().Replace(" ", "-"); - var textareaName = $"Details{reason.Heading.Replace(" ", "")}"; + var textareaName = $"Details[{checkboxId}]";
diff --git a/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml.cs b/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml.cs index 3e184ae30..68c9a1207 100644 --- a/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml.cs +++ b/Dfe.PrepareTransfers.Web/Pages/Projects/TransferDates/Reason.cshtml.cs @@ -85,6 +85,7 @@ public async Task OnPostAsync() return RedirectToPage("/Projects/TransferDates/Index", new { Urn }); } + private List GetReasonOptions(bool isDateSooner) { var soonerReasons = new List { "faster-progress", "error-correction" }; diff --git a/Dfe.PrepareTransfers.Web/Pages/TaskList/DateHistory/DateHistory.cshtml b/Dfe.PrepareTransfers.Web/Pages/TaskList/DateHistory/DateHistory.cshtml index 635ef6bd3..f1a51b2f2 100644 --- a/Dfe.PrepareTransfers.Web/Pages/TaskList/DateHistory/DateHistory.cshtml +++ b/Dfe.PrepareTransfers.Web/Pages/TaskList/DateHistory/DateHistory.cshtml @@ -2,6 +2,7 @@ @using Dfe.PrepareTransfers.Data.Models @using Dfe.PrepareTransfers.Data.Models.AdvisoryBoardDecision @using Dfe.PrepareTransfers.Data.TRAMS +@using Dfe.PrepareTransfers.Web.ExtensionMethods @model Dfe.PrepareTransfers.Web.Pages.TaskList.DateHistory.DateHistory @{ @@ -18,15 +19,22 @@
-

Transfer date history

+ - @if (Model.OpeningDateHistory == null || !Model.OpeningDateHistory.Any()) + @if ((Model.OpeningDateHistory == null || !Model.OpeningDateHistory.Any()) && Model.Project.Dates.Target is not null) { +

Current proposed transfer date

+

The current proposed transfer date is @Model.Project.Dates.Target.ToFormattedDate().

+ } + else if ((Model.OpeningDateHistory == null || !Model.OpeningDateHistory.Any()) && Model.Project.Dates.Target is null) + { +

Transfer date history

The proposed transfer date has not been entered yet. When it has been it will be displayed here.

Any future changes to the proposed transfer date will also be shown here.

} else { +

Current proposed transfer date

The current proposed transfer date is @Model.OpeningDateHistory.OrderByDescending(h => h.ChangedAt).FirstOrDefault()?.NewDate?.ToString("d MMMM yyyy").

Transfer date changes