Skip to content

Commit

Permalink
Added risk rating and fixed spacing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-nimbleapproach committed Sep 26, 2024
1 parent 92961a0 commit 0b3504c
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 0b3504c

Please sign in to comment.