Skip to content

Commit

Permalink
persist start page
Browse files Browse the repository at this point in the history
  • Loading branch information
CathLass committed Dec 17, 2024
1 parent 2bee478 commit cf222c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public void OnGet()

public async Task<IActionResult> OnPostAsync()
{
//InductionStatus = JourneyInstance!.State.InductionStatus;
await JourneyInstance!.UpdateStateAsync(state =>
{
// TODO - store the start date
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public async Task<IActionResult> OnPostAsync()
await JourneyInstance!.UpdateStateAsync(state =>
{
state.InductionStatus = InductionStatus;
if (state.JourneyStartPage == null)
{
state.JourneyStartPage = InductionJourneyPage.Status;
}
});

return Redirect(PageLink(NextPage));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public async Task Cancel_RedirectsToExpectedPage(string fromPage)
[InlineData("edit-induction/exemption-reasons", InductionJourneyPage.ExemptionReason)]
[InlineData("edit-induction/start-date", InductionJourneyPage.StartDate)]
[InlineData("edit-induction/date-completed", InductionJourneyPage.CompletedDate)]
public async Task Post_PersistsBacklinkBreadcrumb(string page, InductionJourneyPage pageName)
public async Task Post_PersistsStartPage(string page, InductionJourneyPage pageName)
{
// Arrange
InductionStatus inductionStatus = InductionStatus.Passed;
Expand Down

0 comments on commit cf222c8

Please sign in to comment.