Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #723 from DFE-Digital/hotfix/transfer-context-new
Browse files Browse the repository at this point in the history
Hotfix/transfer context new
  • Loading branch information
paullocknimble authored May 21, 2024
2 parents ece5315 + 96a5de3 commit 34ac377
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dfe.PrepareTransfers.Web.Integration.Tests/BasicTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public async Task Should_be_success_result_on_get(string url)
Document.QuerySelector("h1.govuk-heading-xl").TextContent.Trim().Should().Be("Transfer projects");
Document.QuerySelector("[data-cy=select-projectlist-filter-count]").TextContent.Trim().Should().Be("1 projects found");
Document.QuerySelector("[data-id=project-link-001]").TextContent
.Trim().Should().Be(projects.First().TransferringAcademies[0].IncomingTrustName);
.Trim().Should().Be(projects.First().TransferringAcademies[0].IncomingTrustName.ToTitleCase());
}
}
}
9 changes: 3 additions & 6 deletions Dfe.PrepareTransfers.Web/Pages/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,17 @@
</div>
}

<div class="govuk-grid-row govuk-!-margin-bottom-9">
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-xl" data-cy="select-heading">
Transfer projects
</h1>
<p class="govuk-body-l">
<p class="govuk-body">
Find and manage existing transfer projects or create a new one.
</p>
<a asp-page="/Transfers/NewTransfersInformation" role="button" draggable="false"
class="govuk-button govuk-button--start" data-module="govuk-button" data-test="create-transfer">
class="govuk-button" data-module="govuk-button" data-test="create-transfer">
Create a new transfer
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false">
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"></path>
</svg>
</a>
</div>
</div>
Expand Down
18 changes: 16 additions & 2 deletions Dfe.PrepareTransfers.Web/Pages/Shared/_ProjectListRows.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@using Dfe.Academisation.ExtensionMethods
@using Dfe.PrepareTransfers.Data.Models
@using Dfe.PrepareTransfers.Data.Models.Projects
@using Microsoft.AspNetCore.Html

@model IEnumerable<ProjectSearchResult>

Expand All @@ -17,15 +19,27 @@
<h2 class="govuk-caption-l govuk-!-margin-bottom-0 govuk-!-margin-top-1">
<strong>
<a data-id="project-link-@project.Urn" class="govuk-link" asp-page="/Projects/Index" asp-route-urn="@project.Urn">
@(firstOutgoingAcademy?.IncomingTrustName ?? project.OutgoingTrustName)
@(firstOutgoingAcademy?.IncomingTrustName.ToTitleCase() ?? project.OutgoingTrustName.ToTitleCase())
</a>
</strong>
</h2>

<p class="govuk-!-margin-top-3">
<div>
<strong>UKPRN:</strong>
@((!project.IsFormAMat.HasValue || !project.IsFormAMat.Value) ? @firstOutgoingAcademy?.IncomingTrustUkprn : @project.OutgoingTrustUkprn)
@{
var result = !project.IsFormAMat.HasValue || !project.IsFormAMat.Value
? string.IsNullOrEmpty(firstOutgoingAcademy?.IncomingTrustUkprn)
? new HtmlString("<span class=\"empty\">Empty</span>")
: new HtmlString(firstOutgoingAcademy?.IncomingTrustUkprn)
: string.IsNullOrEmpty(project?.OutgoingTrustUkprn)
? new HtmlString("<span class=\"empty\">Empty</span>")
: new HtmlString(project?.OutgoingTrustUkprn);
}

@result


</div>
<div>
<strong>Route:</strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="govuk-form-group @formClasses">
<fieldset class="govuk-fieldset" aria-required="true">
<legend class="govuk-fieldset__legend govuk-fieldset__legend--xl">
<h1 class="govuk-fieldset__heading">Is there a preferred trust for this school?</h1>
<h1 class="govuk-fieldset__heading">Is there a preferred trust for these academies?</h1>
</legend>

<p asp-gds-validation-for="PreferredTrustViewModel.HasPreferredTrust"></p>
Expand Down

0 comments on commit 34ac377

Please sign in to comment.