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

SchoolPhase is now considered for grants #909

Merged
merged 5 commits into from
Sep 18, 2023
Merged
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 @@ -9,6 +9,7 @@ public class AcademyConversionProject
public int? Urn { get; set; }
public DateTime CreatedOn { get; set; }
public string SchoolName { get; set; }
public string SchoolPhase { get; set; }
public string LocalAuthority { get; set; }
public string ApplicationReferenceNumber { get; set; }
public string ProjectStatus { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<dl class="govuk-summary-list">
<div class="govuk-summary-list__row">
<govuk-summary-list-row name="grant-funding-type" label="Grant type" key-width="@kw" value="@Model.Project.ConversionSupportGrantType" asp-route-id="@Model.Project.Id" asp-page="@Links.SchoolAndTrustInformationSection.GrantType.Page" hidden-text="grant funding type" />
<govuk-summary-list-row name="grant-funding-amount" label="Default grant amount" key-width="@kw" value="@UpdateAcademyConversionProjectPageModel.CalculateGrantAmount(Model.Project.ConversionSupportGrantType).ToMoneyString(true)" asp-route-id="Project.Id" hidden-text="grant funding amount" />
<govuk-summary-list-row name="grant-funding-amount" label="Default grant amount" key-width="@kw" value="@UpdateAcademyConversionProjectPageModel.CalculateGrantAmount(Model.Project.ConversionSupportGrantType, Model.Project.SchoolPhase).ToMoneyString(true)" asp-route-id="Project.Id" hidden-text="grant funding amount" />
</div>
</dl>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,30 @@ private void RePopDatePickerModelsAfterValidationFail()
Project.LocalAuthorityInformationTemplateSentDate = AcademyConversionProject.LocalAuthorityInformationTemplateSentDate;
Project.LocalAuthorityInformationTemplateReturnedDate = AcademyConversionProject.LocalAuthorityInformationTemplateReturnedDate;
}
public static decimal? CalculateGrantAmount(string type)
public static decimal? CalculateGrantAmount(string type, string phase)
{
return type switch
switch (phase.ToLower())
{
SponsoredGrantType.FastTrack => 70000,
SponsoredGrantType.Full => 110000,
SponsoredGrantType.Intermediate => 90000,
_ => 0
};
case "primary":
return type switch
{
SponsoredGrantType.FastTrack => 70000,
SponsoredGrantType.Full => 110000,
SponsoredGrantType.Intermediate => 90000,
_ => 0
};
case "secondary":
return type switch
{
SponsoredGrantType.FastTrack => 80000,
SponsoredGrantType.Full => 150000,
SponsoredGrantType.Intermediate => 115000,
_ => 0
};
}

// Else return default £25k
return 25000;
}

protected UpdateAcademyConversionProject Build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ProjectViewModel(AcademyConversionProject project)
LocalAuthority = project.LocalAuthority;
ApplicationReceivedDate = project.ApplicationReceivedDate.ToDateString();
AssignedDate = project.AssignedDate.ToDateString();
Phase = project.ProjectStatus;
SchoolPhase = project.SchoolPhase;
HeadTeacherBoardDate = project.HeadTeacherBoardDate;

LocalAuthorityInformationTemplateSentDate = project.LocalAuthorityInformationTemplateSentDate;
Expand Down Expand Up @@ -118,7 +118,7 @@ public ProjectViewModel(AcademyConversionProject project)
public string LocalAuthority { get; }
public string ApplicationReceivedDate { get; }
public string AssignedDate { get; }
public string Phase { get; }
public string SchoolPhase { get; }
public DateTime? HeadTeacherBoardDate { get; set; }

public DateTime? LocalAuthorityInformationTemplateSentDate { get; set; }
Expand Down
3 changes: 3 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## NEXT

* Sponsored Conversions inital MVP prepared
* Sponsored grants now take into account the different tracks and school phase
* User Story 136870 : hyperlink fixes
* User Story 137325 : Remove signed by field
* User Story 137350 : Project details tab fixed
Expand Down
Loading