Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update project list view #957

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
public string ConversionSupportGrantEnvironmentalImprovementGrant { get; set; }
public bool? ConversionSupportGrantAmountChanged { get; set; }
public DateTime? DaoPackSentDate { get; set; }
public string Region { get; set; }

// Annex B
public bool? AnnexBFormReceived { get; set; }
Expand All @@ -56,7 +57,7 @@

// External Application Form
public bool? ExternalApplicationFormSaved { get; set; }
public string? ExternalApplicationFormUrl { get; set; }

Check warning on line 60 in Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademyConversionProject.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

// School Overview
public string PublishedAdmissionNumber { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,9 @@
<table class="govuk-table">
<caption class="govuk-table__caption govuk-table__caption--m govuk-visually-hidden">Projects (@Model.ProjectCount)</caption>

<thead class="govuk-table__head">
<tr class="govuk-table__row">
<th class="govuk-table__header app-!-width-three-fifths">Application information</th>
<th class="govuk-table__header govuk-!-text-align-right app-!-width-two-fifths prepare-text-align-right">Project status and dates</th>
</tr>
</thead>

<tbody class="govuk-table__body">
@{
var index = 0;
foreach (ProjectListViewModel project in Model.Projects)
{
<partial if="project.IsSponsored" name="Shared/SponsoredProjectListRow" model="project.Row(index)"/>
<partial if="project.IsVoluntary" name="Shared/VoluntaryProjectListRow" model="project.Row(index)"/>
<partial if="project.IsFormAMat" name="Shared/FormAMatProjectListRow" model="project.Row(index)"/>

index++;
}
<partial name="Shared/_ProjectListRows" model="Model.Projects" />
}
</tbody>
</table>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@using Dfe.Academisation.ExtensionMethods
@using Dfe.PrepareConversions.TagHelpers
@model List<ProjectListViewModel>

@{
var index = 0;

foreach (var project in Model)
{
var projectRow = project.Row(index);

var isFormAMat = project.IsFormAMat;
var matTypeClass = isFormAMat ? "form-a-mat" : "join-a-mat";
var link = isFormAMat ? @Links.FormAMat.Index.Page : @Links.TaskList.Index.Page;

<tr class="govuk-table__row @matTypeClass" data-cy="select-projectlist-filter-row">
<td class="govuk-table__cell">
<div class="govuk-!-margin-top-1 govuk-!-margin-bottom-2">
<strong>
<a id="@("school-name-" + projectRow.Index)" class="govuk-link" asp-page="@link" asp-route-id="@projectRow.Item.Id">@projectRow.Item.SchoolName</a>
</strong>
</div>
<div>
<span id="@("urn-" + projectRow.Index)"><strong>URN:</strong> @projectRow.Item.SchoolURN</span>
</div>
@if (@projectRow.Item.LocalAuthority.IsEmpty() is false)
{
<div id="@("local-authority-" + projectRow.Index)">
<strong>Local authority:</strong>
@projectRow.Item.LocalAuthority
</div>
}
<div id="@("region-" + projectRow.Index)">
<strong>Region:</strong>
@projectRow.Item.Region
</div>
<div id="@("incoming-trust-" + projectRow.Index)">
<strong>Incoming trust:</strong>
@projectRow.Item.NameOfTrust
</div>
<div id="@("advisory-board-date-" + projectRow.Index)">
<strong>Advisory board date:</strong>
<span if="projectRow.Item.HeadTeacherBoardDate.IsEmpty()" class="empty">Empty</span>
<span if="projectRow.Item.HeadTeacherBoardDate.IsPresent()">@projectRow.Item.HeadTeacherBoardDate</span>
</div>
@if (!isFormAMat)
{
<div id="@("assigned-to-" + projectRow.Index)" class="do">
<strong>Assigned to:</strong>
<span if="projectRow.Item.AssignedUserFullName.IsEmpty()" class="empty">Empty</span>
<strong if="projectRow.Item.AssignedUserFullName.IsPresent()">@projectRow.Item.AssignedUserFullName</strong>
</div>
}
<div>
<strong class="govuk-tag govuk-tag--@projectRow.Item.Status.Colour" id="project-status-@projectRow.Item.Id">@projectRow.Item.Status.Value</strong>
</div>
</td>
</tr>

index++;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public static ProjectListViewModel Build(AcademyConversionProject academyConvers
Status = MapProjectStatus(academyConversionProject.ProjectStatus),
AssignedUserFullName = academyConversionProject.AssignedUser?.FullName,
CreatedOn = academyConversionProject.CreatedOn,
TypeAndRoute = academyConversionProject.AcademyTypeAndRoute
TypeAndRoute = academyConversionProject.AcademyTypeAndRoute,
Region = academyConversionProject.Region
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
public string AssignedUserFullName { get; init; }
public DateTime? CreatedOn { get; init; }
public string TypeAndRoute { get; init; }
public string Region { get; set; }

public bool ShowHtbDate => string.IsNullOrWhiteSpace(HeadTeacherBoardDate) is false;

Check warning on line 22 in Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/ProjectListViewModel.cs

View workflow job for this annotation

GitHub Actions / build

Remove the unnecessary Boolean literal(s). (https://rules.sonarsource.com/csharp/RSPEC-1125)
public bool ShowProposedOpeningDate => string.IsNullOrWhiteSpace(ProposedAcademyOpeningDate) is false;

Check warning on line 23 in Dfe.PrepareConversions/Dfe.PrepareConversions/ViewModels/ProjectListViewModel.cs

View workflow job for this annotation

GitHub Actions / build

Remove the unnecessary Boolean literal(s). (https://rules.sonarsource.com/csharp/RSPEC-1125)

protected override string TypeAndRouteValue => TypeAndRoute;
Expand Down
Loading