Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #719 from DFE-Digital/feature/165916-scheme-of-del…
Browse files Browse the repository at this point in the history
…egation

Feature/165916 scheme of delegation
  • Loading branch information
elielijah321 authored May 14, 2024
2 parents 4e00ef8 + f87c3af commit b242bc3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ string IDateValidationMessageProvider.SomeMissing(string displayName, IEnumerabl

string IDateValidationMessageProvider.AllMissing(string displayName)
{
string idRaw = Request.RouteValues["id"] as string;
int id = int.Parse(idRaw ?? string.Empty);
AdvisoryBoardDecision decision = GetDecisionFromSession(id);
string urnRaw = Request.RouteValues["urn"] as string;
int urn = int.Parse(urnRaw ?? string.Empty);
AdvisoryBoardDecision decision = GetDecisionFromSession(urn);
return $"Enter the date when the conversion was {decision.Decision.ToDescription().ToLowerInvariant()}";
}

public LinkItem GetPageForBackLink(int id)
public LinkItem GetPageForBackLink(int urn)
{
return Decision switch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<form method="post">
<div class="govuk-form-group @ModelState.GetErrorStyleClass()">
<label class="govuk-label govuk-label--m" for="decision-maker-name">
<label class="govuk-hint" for="decision-maker-name">
Enter the name of the person who made the decision
</label>
<input class="govuk-input govuk-!-width-two-thirds" id="decision-maker-name" name="decision-maker-name" type="text" value="@Model.DecisionMakerName">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public IActionResult OnPost(int urn)

AdvisoryBoardDecision decision = GetDecisionFromSession(urn) ?? new AdvisoryBoardDecision();
decision.DecisionMadeBy = DecisionMadeBy;
decision.DecisionMakerName = DecisionMadeBy == Data.Models.AdvisoryBoardDecision.DecisionMadeBy.None ? null : decision.DecisionMakerName;

SetDecisionInSession(urn, decision);


return DetermineRedirectPage(decision);
}

Expand Down

0 comments on commit b242bc3

Please sign in to comment.