diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/CheckAnswers.cshtml b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/CheckAnswers.cshtml index 047f10937b..d83b67ebad 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/CheckAnswers.cshtml +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/CheckAnswers.cshtml @@ -55,7 +55,7 @@
Confirm mandatory qualification - Cancel + Cancel and return to record
diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Provider.cshtml b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Provider.cshtml index 120010d984..ee8ccbe756 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Provider.cshtml +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Provider.cshtml @@ -25,7 +25,11 @@ } } - Continue + +
+ Continue + Cancel and return to record +
diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Provider.cshtml.cs b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Provider.cshtml.cs index cb3625c8f0..4865fc1c6a 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Provider.cshtml.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Provider.cshtml.cs @@ -50,6 +50,12 @@ public async Task OnPost() return Redirect(_linkGenerator.MqAddSpecialism(PersonId, JourneyInstance!.InstanceId)); } + public async Task 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"]; diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Result.cshtml b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Result.cshtml index 4a9d1051ba..eb3f83725a 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Result.cshtml +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Result.cshtml @@ -16,9 +16,6 @@
- - In Progress - Deferred @@ -28,6 +25,9 @@ Failed + + In Progress + Passed @@ -43,7 +43,10 @@ - Continue +
+ Continue + Cancel and return to record +
diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Result.cshtml.cs b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Result.cshtml.cs index dc77d20c33..b704af17cc 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Result.cshtml.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Result.cshtml.cs @@ -58,6 +58,12 @@ public async Task OnPost() return Redirect(_linkGenerator.MqAddCheckAnswers(PersonId, JourneyInstance!.InstanceId)); } + public async Task 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"]; diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Specialism.cshtml b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Specialism.cshtml index c51a7e103c..0452ee2c0b 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Specialism.cshtml +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Specialism.cshtml @@ -26,7 +26,10 @@ } - Continue +
+ Continue + Cancel and return to record +
diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Specialism.cshtml.cs b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Specialism.cshtml.cs index a4499e599e..61ceed1d5c 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Specialism.cshtml.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/Specialism.cshtml.cs @@ -48,6 +48,12 @@ public async Task OnPost() return Redirect(_linkGenerator.MqAddStartDate(PersonId, JourneyInstance!.InstanceId)); } + public async Task 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"]; diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/StartDate.cshtml b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/StartDate.cshtml index dbbe48bdf7..0a97b779e2 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/StartDate.cshtml +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/StartDate.cshtml @@ -19,7 +19,10 @@ - Continue +
+ Continue + Cancel and return to record +
diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/StartDate.cshtml.cs b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/StartDate.cshtml.cs index 9f50c3b99a..0f413807b9 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/StartDate.cshtml.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Mqs/AddMq/StartDate.cshtml.cs @@ -45,6 +45,12 @@ public async Task OnPost() return Redirect(_linkGenerator.MqAddResult(PersonId, JourneyInstance!.InstanceId)); } + public async Task 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"]; diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/TrsLinkGenerator.cs b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/TrsLinkGenerator.cs index 090edd39ec..1e049ddb82 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/TrsLinkGenerator.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/TrsLinkGenerator.cs @@ -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);