Skip to content

Commit

Permalink
Tweaks based on updated designs
Browse files Browse the repository at this point in the history
  • Loading branch information
hortha committed Dec 4, 2023
1 parent 2b88765 commit 1a7ea50
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<div class="govuk-button-group">
<govuk-button type="submit">Confirm mandatory qualification</govuk-button>
<govuk-button formaction="@LinkGenerator.MqAddCheckAnswersCancel(Model.PersonId, Model.JourneyInstance!.InstanceId)" class="govuk-button--secondary" type="submit">Cancel</govuk-button>
<govuk-button formaction="@LinkGenerator.MqAddCheckAnswersCancel(Model.PersonId, Model.JourneyInstance!.InstanceId)" class="govuk-button--secondary" type="submit">Cancel and return to record</govuk-button>
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
}
}
</govuk-radios>
<govuk-button type="submit">Continue</govuk-button>

<div class="govuk-button-group">
<govuk-button type="submit">Continue</govuk-button>
<govuk-button formaction="@LinkGenerator.MqAddProviderCancel(Model.PersonId, Model.JourneyInstance!.InstanceId)" class="govuk-button--secondary" type="submit">Cancel and return to record</govuk-button>
</div>
</form>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public async Task<IActionResult> OnPost()
return Redirect(_linkGenerator.MqAddSpecialism(PersonId, JourneyInstance!.InstanceId));
}

public async Task<IActionResult> OnPostCancel()
{
await JourneyInstance!.DeleteAsync();
return Redirect(_linkGenerator.PersonDetail(PersonId));
}

public override async Task OnPageHandlerExecutionAsync(PageHandlerExecutingContext context, PageHandlerExecutionDelegate next)
{
var personDetail = (ContactDetail?)context.HttpContext.Items["CurrentPersonDetail"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
<div class="govuk-grid-column-two-thirds-from-desktop">
<form action="@LinkGenerator.MqAddResult(Model.PersonId, Model.JourneyInstance!.InstanceId)" method="post">
<govuk-radios asp-for="Result" data-testid="result-options">
<govuk-radios-item value="@dfeta_qualification_dfeta_MQ_Status.InProgress" data-testid="result-in-progress">
In Progress
</govuk-radios-item>
<govuk-radios-item value="@dfeta_qualification_dfeta_MQ_Status.Deferred" data-testid="result-deferred">
Deferred
</govuk-radios-item>
Expand All @@ -28,6 +25,9 @@
<govuk-radios-item value="@dfeta_qualification_dfeta_MQ_Status.Failed" data-testid="result-failed">
Failed
</govuk-radios-item>
<govuk-radios-item value="@dfeta_qualification_dfeta_MQ_Status.InProgress" data-testid="result-in-progress">
In Progress
</govuk-radios-item>
<govuk-radios-item value="@dfeta_qualification_dfeta_MQ_Status.Passed" data-testid="result-passed">
Passed
<govuk-radios-item-conditional>
Expand All @@ -43,7 +43,10 @@
</govuk-radios-item>
</govuk-radios>

<govuk-button type="submit">Continue</govuk-button>
<div class="govuk-button-group">
<govuk-button type="submit">Continue</govuk-button>
<govuk-button formaction="@LinkGenerator.MqAddResultCancel(Model.PersonId, Model.JourneyInstance!.InstanceId)" class="govuk-button--secondary" type="submit">Cancel and return to record</govuk-button>
</div>
</form>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public async Task<IActionResult> OnPost()
return Redirect(_linkGenerator.MqAddCheckAnswers(PersonId, JourneyInstance!.InstanceId));
}

public async Task<IActionResult> OnPostCancel()
{
await JourneyInstance!.DeleteAsync();
return Redirect(_linkGenerator.PersonDetail(PersonId));
}

public override async Task OnPageHandlerExecutionAsync(PageHandlerExecutingContext context, PageHandlerExecutionDelegate next)
{
var personDetail = (ContactDetail?)context.HttpContext.Items["CurrentPersonDetail"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
}
</govuk-radios>

<govuk-button type="submit">Continue</govuk-button>
<div class="govuk-button-group">
<govuk-button type="submit">Continue</govuk-button>
<govuk-button formaction="@LinkGenerator.MqAddSpecialismCancel(Model.PersonId, Model.JourneyInstance!.InstanceId)" class="govuk-button--secondary" type="submit">Cancel and return to record</govuk-button>
</div>
</form>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ public async Task<IActionResult> OnPost()
return Redirect(_linkGenerator.MqAddStartDate(PersonId, JourneyInstance!.InstanceId));
}

public async Task<IActionResult> OnPostCancel()
{
await JourneyInstance!.DeleteAsync();
return Redirect(_linkGenerator.PersonDetail(PersonId));
}

public override async Task OnPageHandlerExecutionAsync(PageHandlerExecutingContext context, PageHandlerExecutionDelegate next)
{
var personDetail = (ContactDetail?)context.HttpContext.Items["CurrentPersonDetail"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
</govuk-date-input-fieldset>
</govuk-date-input>

<govuk-button type="submit">Continue</govuk-button>
<div class="govuk-button-group">
<govuk-button type="submit">Continue</govuk-button>
<govuk-button formaction="@LinkGenerator.MqAddStartDateCancel(Model.PersonId, Model.JourneyInstance!.InstanceId)" class="govuk-button--secondary" type="submit">Cancel and return to record</govuk-button>
</div>
</form>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public async Task<IActionResult> OnPost()
return Redirect(_linkGenerator.MqAddResult(PersonId, JourneyInstance!.InstanceId));
}

public async Task<IActionResult> OnPostCancel()
{
await JourneyInstance!.DeleteAsync();
return Redirect(_linkGenerator.PersonDetail(PersonId));
}

public override async Task OnPageHandlerExecutionAsync(PageHandlerExecutingContext context, PageHandlerExecutionDelegate next)
{
var personDetail = (ContactDetail?)context.HttpContext.Items["CurrentPersonDetail"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,27 @@ public string MqAdd(Guid personId) =>
public string MqAddProvider(Guid personId, JourneyInstanceId? journeyInstanceId) =>
GetRequiredPathByPage("/Mqs/AddMq/Provider", routeValues: new { personId }, journeyInstanceId: journeyInstanceId);

public string MqAddProviderCancel(Guid personId, JourneyInstanceId journeyInstanceId) =>
GetRequiredPathByPage("/Mqs/AddMq/Provider", "cancel", routeValues: new { personId }, journeyInstanceId: journeyInstanceId);

public string MqAddSpecialism(Guid personId, JourneyInstanceId journeyInstanceId) =>
GetRequiredPathByPage("/Mqs/AddMq/Specialism", routeValues: new { personId }, journeyInstanceId: journeyInstanceId);

public string MqAddSpecialismCancel(Guid personId, JourneyInstanceId journeyInstanceId) =>
GetRequiredPathByPage("/Mqs/AddMq/Specialism", "cancel", routeValues: new { personId }, journeyInstanceId: journeyInstanceId);

public string MqAddStartDate(Guid personId, JourneyInstanceId journeyInstanceId) =>
GetRequiredPathByPage("/Mqs/AddMq/StartDate", routeValues: new { personId }, journeyInstanceId: journeyInstanceId);

public string MqAddStartDateCancel(Guid personId, JourneyInstanceId journeyInstanceId) =>
GetRequiredPathByPage("/Mqs/AddMq/StartDate", "cancel", routeValues: new { personId }, journeyInstanceId: journeyInstanceId);

public string MqAddResult(Guid personId, JourneyInstanceId journeyInstanceId) =>
GetRequiredPathByPage("/Mqs/AddMq/Result", routeValues: new { personId }, journeyInstanceId: journeyInstanceId);

public string MqAddResultCancel(Guid personId, JourneyInstanceId journeyInstanceId) =>
GetRequiredPathByPage("/Mqs/AddMq/Result", "cancel", routeValues: new { personId }, journeyInstanceId: journeyInstanceId);

public string MqAddCheckAnswers(Guid personId, JourneyInstanceId journeyInstanceId) =>
GetRequiredPathByPage("/Mqs/AddMq/CheckAnswers", routeValues: new { personId }, journeyInstanceId: journeyInstanceId);

Expand Down

0 comments on commit 1a7ea50

Please sign in to comment.