-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a support task when automatic matching fails
- Loading branch information
Showing
19 changed files
with
2,624 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ecordSystem/src/TeachingRecordSystem.AuthorizeAccess/Pages/SupportRequestSubmitted.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@page "/request-submitted" | ||
@model TeachingRecordSystem.AuthorizeAccess.Pages.SupportRequestSubmittedModel | ||
@{ | ||
ViewBag.Title = "Support request submitted"; | ||
} | ||
|
||
<govuk-panel> | ||
<govuk-panel-title>@ViewBag.Title</govuk-panel-title> | ||
<govuk-panel-body> | ||
We’ll contact you within<br /> | ||
<strong>5 days</strong> | ||
</govuk-panel-body> | ||
</govuk-panel> |
46 changes: 46 additions & 0 deletions
46
...rdSystem/src/TeachingRecordSystem.AuthorizeAccess/Pages/SupportRequestSubmitted.cshtml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using Microsoft.AspNetCore.Mvc.Filters; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
using TeachingRecordSystem.FormFlow; | ||
|
||
namespace TeachingRecordSystem.AuthorizeAccess.Pages; | ||
|
||
[Journey(SignInJourneyState.JourneyName), RequireJourneyInstance] | ||
public class SupportRequestSubmittedModel(SignInJourneyHelper helper) : PageModel | ||
{ | ||
public JourneyInstance<SignInJourneyState>? JourneyInstance { get; set; } | ||
|
||
public void OnGet() | ||
{ | ||
} | ||
|
||
public override void OnPageHandlerExecuting(PageHandlerExecutingContext context) | ||
{ | ||
var state = JourneyInstance!.State; | ||
|
||
if (state.OneLoginAuthenticationTicket is null || !state.IdentityVerified) | ||
{ | ||
// Not authenticated/verified with One Login | ||
context.Result = BadRequest(); | ||
} | ||
else if (state.AuthenticationTicket is not null) | ||
{ | ||
// Already matched to a Teaching Record | ||
context.Result = Redirect(helper.GetSafeRedirectUri(JourneyInstance)); | ||
} | ||
else if (!state.HaveNationalInsuranceNumber.HasValue) | ||
{ | ||
// Not answered the NINO question | ||
context.Result = Redirect(helper.LinkGenerator.NationalInsuranceNumber(JourneyInstance.InstanceId)); | ||
} | ||
else if (!state.HaveTrn.HasValue) | ||
{ | ||
// Not answered the TRN question | ||
context.Result = Redirect(helper.LinkGenerator.Trn(JourneyInstance.InstanceId)); | ||
} | ||
else if (!state.HasPendingSupportRequest) | ||
{ | ||
// Not supported a submit request | ||
context.Result = Redirect(helper.LinkGenerator.CheckAnswers(JourneyInstance.InstanceId)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.