Skip to content

Commit

Permalink
Merge pull request #909 from DFE-Digital/feature/137597-word-doc-spon…
Browse files Browse the repository at this point in the history
…sored

SchoolPhase is now considered for grants
  • Loading branch information
dneed-nimble authored Sep 18, 2023
2 parents 105649e + ef322e5 commit acbba27
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
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

0 comments on commit acbba27

Please sign in to comment.