Skip to content

Commit

Permalink
Merge pull request #849 from DFE-Digital/feature/147094
Browse files Browse the repository at this point in the history
Added risk rating and removed duplicate header from Pre-funding agreement checkpoint meeting
  • Loading branch information
sukhybhullar-nimble authored Sep 27, 2024
2 parents 79fc73a + 5bfcae9 commit 3d802c7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-xl" data-testid="title">
<h1 class="govuk-heading-xl" data-testid="title">
<span class="govuk-caption-l" data-testid="school-name">
@Model.Project.SchoolName
Expand Down Expand Up @@ -53,5 +52,17 @@
Confirm and continue
</button>
</form>

<div class="govuk-grid-row govuk-!-margin-top-6">
<div class="govuk-grid-column-two-thirds">
<h2 class="govuk-heading-l" data-testid="title">Review risk rating</h2>
<p class="govuk-body">You may want to update the risk rating after the readiness to open meeting.</p>
<govuk-risk-rating-summary project-id="@Model.ProjectId"
change-link-text="Change"
date="@Model.ProjectRisk.Date"
risk-rating="@Model.ProjectRisk.Overall.RiskRating"
summary="@Model.ProjectRisk.Overall.Summary" />
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Dfe.ManageFreeSchoolProjects.API.Contracts.Project.Risk;
using Dfe.ManageFreeSchoolProjects.API.Contracts.Project.Tasks;
using Dfe.ManageFreeSchoolProjects.Constants;
using Dfe.ManageFreeSchoolProjects.Logging;
Expand All @@ -9,30 +10,31 @@

namespace Dfe.ManageFreeSchoolProjects.Pages.Project.Tasks.PreFundingAgreementCheckpointMeeting;

public class ViewPreFundingAgreementCheckpointMeetingModel : ViewTaskBaseModel
public class ViewPreFundingAgreementCheckpointMeetingModel(
IGetProjectByTaskService getProjectService,
IGetTaskStatusService getTaskStatusService,
IUpdateTaskStatusService updateTaskStatusService,
IGetProjectRiskService getProjectRiskService,
ILogger<ViewPreFundingAgreementCheckpointMeetingModel> logger)
: ViewTaskBaseModel(getProjectService, getTaskStatusService, updateTaskStatusService)
{
private readonly ILogger<ViewPreFundingAgreementCheckpointMeetingModel> _logger;

public ViewPreFundingAgreementCheckpointMeetingModel(
IGetProjectByTaskService getProjectService,
ILogger<ViewPreFundingAgreementCheckpointMeetingModel> logger,
IGetTaskStatusService getTaskStatusService, IUpdateTaskStatusService updateTaskStatusService) : base(getProjectService, getTaskStatusService, updateTaskStatusService)
{
_logger = logger;
}
public GetProjectRiskResponse ProjectRisk { get; set; }

public async Task<ActionResult> OnGet()
{
_logger.LogMethodEntered();
logger.LogMethodEntered();

await GetTask(TaskName.PreFundingAgreementCheckpointMeeting);

ProjectRisk = await getProjectRiskService.Execute(ProjectId, 1);

return Page();
}

public async Task<ActionResult> OnPost()
{
_logger.LogMethodEntered();
logger.LogMethodEntered();

await PostTask(TaskName.PreFundingAgreementCheckpointMeeting);

Expand Down

0 comments on commit 3d802c7

Please sign in to comment.