-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #515 from DFE-Digital/overview-performance
Overview Page re-architected to use services
- Loading branch information
Showing
28 changed files
with
1,041 additions
and
627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
DfE.FindInformationAcademiesTrusts.Data/Repositories/Academy/AcademyOverview.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace DfE.FindInformationAcademiesTrusts.Data.Repositories.Academy; | ||
|
||
public record AcademyOverview( | ||
string Urn, | ||
string LocalAuthority, | ||
int? NumberOfPupils, | ||
int? SchoolCapacity, | ||
OfstedRatingScore CurrentOfstedRating | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
DfE.FindInformationAcademiesTrusts/Extensions/OfstedRatingScoreExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using DfE.FindInformationAcademiesTrusts.Data; | ||
|
||
namespace DfE.FindInformationAcademiesTrusts.Extensions; | ||
|
||
public static class OfstedRatingScoreExtensions | ||
{ | ||
public static int ToDataSortValue(this OfstedRatingScore rating) | ||
{ | ||
return rating switch | ||
{ | ||
OfstedRatingScore.Outstanding => 1, | ||
OfstedRatingScore.Good => 2, | ||
OfstedRatingScore.RequiresImprovement => 3, | ||
OfstedRatingScore.Inadequate => 4, | ||
OfstedRatingScore.None => 5, | ||
_ => -1 | ||
}; | ||
} | ||
|
||
public static string ToDisplayString(this OfstedRatingScore rating) | ||
{ | ||
return rating switch | ||
{ | ||
OfstedRatingScore.Outstanding => "Outstanding", | ||
OfstedRatingScore.Good => "Good", | ||
OfstedRatingScore.RequiresImprovement => "Requires improvement", | ||
OfstedRatingScore.Inadequate => "Inadequate", | ||
OfstedRatingScore.None => "Not yet inspected", | ||
_ => "Unknown" | ||
}; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
@page | ||
@using DfE.FindInformationAcademiesTrusts.Data | ||
@using DfE.FindInformationAcademiesTrusts.Extensions | ||
@model OverviewModel | ||
|
||
@{ | ||
|
@@ -9,21 +10,24 @@ | |
<section> | ||
<div class="govuk-!-margin-top-9 govuk-!-margin-bottom-1"> | ||
<div class="govuk-grid-row"> | ||
<!-- Trust Summary Section --> | ||
<div class="govuk-grid-column-one-half"> | ||
<section class="govuk-summary-card" data-testid="trust-summary"> | ||
<div class="govuk-summary-card__title-wrapper"> | ||
<h2 class="govuk-summary-card__title" id="trust-information">Trust summary</h2> | ||
</div> | ||
<div class="govuk-summary-card__content"> | ||
<dl class="govuk-summary-list"> | ||
<!-- Total Academies --> | ||
<div class="govuk-summary-list__row"> | ||
<dt class="govuk-summary-list__key govuk-!-width-one-half"> | ||
Total academies | ||
</dt> | ||
<dd class="govuk-summary-list__value" data-testid="total-academies"> | ||
@Model.NumberOfAcademiesInTrust | ||
@Model.TotalAcademies | ||
</dd> | ||
</div> | ||
<!-- Academies in Each Local Authority --> | ||
<div class="govuk-summary-list__row"> | ||
<dt class="govuk-summary-list__key govuk-!-width-one-half"> | ||
Academies in each local authority | ||
|
@@ -35,31 +39,34 @@ | |
} | ||
</dd> | ||
</div> | ||
<!-- Pupil Numbers --> | ||
<div class="govuk-summary-list__row"> | ||
<dt class="govuk-summary-list__key govuk-!-width-one-half"> | ||
Pupil numbers | ||
</dt> | ||
<dd class="govuk-summary-list__value" data-testid="number-of-pupils"> | ||
@($"{Model.TotalPupilNumbersInTrust:n0}") | ||
@($"{Model.TotalPupilNumbers:n0}") | ||
</dd> | ||
</div> | ||
<!-- Pupil Capacity and Percentage Full --> | ||
<div class="govuk-summary-list__row"> | ||
<dt class="govuk-summary-list__key govuk-!-width-one-half"> | ||
Pupil capacity <br>(% full) | ||
</dt> | ||
<dd class="govuk-summary-list__value" data-testid="pupil-capacity"> | ||
@($"{Model.TotalPupilCapacityInTrust:n0}") | ||
@if (Model.TotalPercentageCapacityInTrust is not null) | ||
@($"{Model.TotalCapacity:n0}") | ||
@if (Model.PercentageFull is not null) | ||
{ | ||
<br> | ||
@($"({Model.TotalPercentageCapacityInTrust}%)") | ||
@($"({Model.PercentageFull}%)") | ||
} | ||
</dd> | ||
</div> | ||
</dl> | ||
</div> | ||
</section> | ||
</div> | ||
<!-- Ofsted Ratings Section --> | ||
<div class="govuk-grid-column-one-half"> | ||
<section class="govuk-summary-card" data-testid="ofsted-ratings"> | ||
<div class="govuk-summary-card__title-wrapper"> | ||
|
@@ -74,26 +81,15 @@ | |
</tr> | ||
</thead> | ||
<tbody class="govuk-table__body"> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-body govuk-table__cell" data-sort-value="1">Outstanding</td> | ||
<td class="govuk-body govuk-table__cell govuk-table__cell--numeric" data-testid="ofsted-rating-outstanding">@Model.GetNumberOfAcademiesWithOfstedRating(OfstedRatingScore.Outstanding)</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-body govuk-table__cell" data-sort-value="2">Good</td> | ||
<td class="govuk-body govuk-table__cell govuk-table__cell--numeric" data-testid="ofsted-rating-good">@Model.GetNumberOfAcademiesWithOfstedRating(OfstedRatingScore.Good)</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-body govuk-table__cell" data-sort-value="3">Requires improvement</td> | ||
<td class="govuk-body govuk-table__cell govuk-table__cell--numeric" data-testid="ofsted-rating-requires-improvement">@Model.GetNumberOfAcademiesWithOfstedRating(OfstedRatingScore.RequiresImprovement)</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-body govuk-table__cell" data-sort-value="4">Inadequate</td> | ||
<td class="govuk-body govuk-table__cell govuk-table__cell--numeric" data-testid="ofsted-rating-inadequate">@Model.GetNumberOfAcademiesWithOfstedRating(OfstedRatingScore.Inadequate)</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-body govuk-table__cell" data-sort-value="5">Not yet inspected</td> | ||
<td class="govuk-body govuk-table__cell govuk-table__cell--numeric" data-testid="ofsted-rating-not-inspected-yet">@Model.GetNumberOfAcademiesWithOfstedRating(OfstedRatingScore.None)</td> | ||
</tr> | ||
@foreach (var rating in Enum.GetValues(typeof(OfstedRatingScore)).Cast<OfstedRatingScore>()) | ||
{ | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-body govuk-table__cell" data-sort-value="@rating.ToDataSortValue()">@rating.ToDisplayString()</td> | ||
<td class="govuk-body govuk-table__cell govuk-table__cell--numeric" data-test-id="[email protected]()"> | ||
@Model.GetNumberOfAcademiesWithOfstedRating(rating) | ||
</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</table> | ||
</div> | ||
|
Oops, something went wrong.