From 16772d9a0a3dd6948d06e4f8f8a557972127cef0 Mon Sep 17 00:00:00 2001 From: Jared White Date: Wed, 28 Feb 2024 19:41:58 -0800 Subject: [PATCH] fix: the Save and Return link should only show after the Review step has been reached (#3901) --- sites/public/src/lib/applications/ApplicationConductor.ts | 2 +- sites/public/src/pages/applications/review/summary.tsx | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sites/public/src/lib/applications/ApplicationConductor.ts b/sites/public/src/lib/applications/ApplicationConductor.ts index 6b9355395b..1c4e99abb9 100644 --- a/sites/public/src/lib/applications/ApplicationConductor.ts +++ b/sites/public/src/lib/applications/ApplicationConductor.ts @@ -187,7 +187,7 @@ export default class ApplicationConductor { } canJumpForwardToReview() { - return this.application.completedSections === this.totalNumberOfSections - 1 + return this.application.reachedReviewStep } sync() { diff --git a/sites/public/src/pages/applications/review/summary.tsx b/sites/public/src/pages/applications/review/summary.tsx index 39d03298a6..5068d2fa8d 100644 --- a/sites/public/src/pages/applications/review/summary.tsx +++ b/sites/public/src/pages/applications/review/summary.tsx @@ -56,6 +56,11 @@ const ApplicationSummary = () => { } }, [listing, router]) + useEffect(() => { + conductor.application.reachedReviewStep = true + conductor.sync() + }, [conductor]) + const onSubmit = () => { applicationsService .submissionValidation({