Skip to content

Commit

Permalink
Merge pull request #247 from DFE-Digital/bug/147871-create-proj-schoo…
Browse files Browse the repository at this point in the history
…ltype-wrong-page-order

Fix - page order for create journey
  • Loading branch information
dangood84 authored Nov 17, 2023
2 parents 10cdbb1 + 3632c63 commit 5d80d0a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public string GetPreviousPage(CreateProjectPageName currentPageName, CreateProje
CreateProjectPageName.SchoolName => RouteConstants.CreateProjectId,
CreateProjectPageName.Region => RouteConstants.CreateProjectSchool,
CreateProjectPageName.LocalAuthority => RouteConstants.CreateProjectRegion,
CreateProjectPageName.SchoolType => RouteConstants.CreateProjectLocalAuthority,
CreateProjectPageName.SearchTrust => RouteConstants.CreateProjectSchoolType,
CreateProjectPageName.SearchTrust => RouteConstants.CreateProjectLocalAuthority,
CreateProjectPageName.ConfirmTrustSearch => RouteConstants.CreateProjectSearchTrust,
CreateProjectPageName.NotifyUser => string.Format(RouteConstants.CreateProjectConfirmTrust, routeParameter),
CreateProjectPageName.SchoolType => string.Format(RouteConstants.CreateProjectConfirmTrust, routeParameter),
CreateProjectPageName.NotifyUser => RouteConstants.CreateProjectSchoolType,
CreateProjectPageName.CheckYourAnswers => RouteConstants.CreateNotifyUser,
_ => throw new ArgumentOutOfRangeException($"Unsupported create project page {currentPageName}")
};
Expand All @@ -41,11 +41,10 @@ public string GetNextPage(CreateProjectPageName pageName, string routeParameter
CreateProjectPageName.ProjectId => RouteConstants.CreateProjectSchool,
CreateProjectPageName.SchoolName => RouteConstants.CreateProjectRegion,
CreateProjectPageName.Region => RouteConstants.CreateProjectLocalAuthority,
CreateProjectPageName.LocalAuthority => RouteConstants.CreateProjectSchoolType,
CreateProjectPageName.SchoolType => RouteConstants.CreateProjectSearchTrust,
CreateProjectPageName.SearchTrust => string.Format(RouteConstants.CreateProjectConfirmTrust,
routeParameter),
CreateProjectPageName.ConfirmTrustSearch => RouteConstants.CreateNotifyUser,
CreateProjectPageName.LocalAuthority => RouteConstants.CreateProjectSearchTrust,
CreateProjectPageName.SearchTrust => string.Format(RouteConstants.CreateProjectConfirmTrust, routeParameter),
CreateProjectPageName.ConfirmTrustSearch => RouteConstants.CreateProjectSchoolType,
CreateProjectPageName.SchoolType => RouteConstants.CreateNotifyUser,
CreateProjectPageName.NotifyUser => RouteConstants.CreateProjectCheckYourAnswers,
CreateProjectPageName.CheckYourAnswers => RouteConstants.CreateProjectConfirmation,
_ => throw new ArgumentOutOfRangeException($"Unsupported create project page {pageName}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public IActionResult OnGet()

var projectCache = _createProjectCache.Get();

BackLink = GetPreviousPage(CreateProjectPageName.NotifyUser, projectCache.Navigation, projectCache.TRN);
BackLink = GetPreviousPage(CreateProjectPageName.NotifyUser, projectCache.Navigation);

Email = projectCache.EmailToNotify;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public IActionResult OnGet()
}

var project = _createProjectCache.Get();
BackLink = GetPreviousPage(CreateProjectPageName.SchoolType, project.Navigation);
BackLink = GetPreviousPage(CreateProjectPageName.SchoolType, project.Navigation, project.TRN);

SchoolType = project.SchoolType.ToIntString();

Expand Down

0 comments on commit 5d80d0a

Please sign in to comment.