From a91a9a3e4b3199c27e392aa7d64f8d22fc12e0e2 Mon Sep 17 00:00:00 2001 From: emilyjevans <30391244+emilyjevans@users.noreply.github.com> Date: Wed, 12 Jun 2024 12:52:03 +0100 Subject: [PATCH] Revert "fix back button on summary page when changing a field" This reverts commit e090b542e7fd5646500353f2a1a7e66ec7386f3d. --- runner/src/server/plugins/engine/models/SummaryViewModel.ts | 2 -- .../plugins/engine/pageControllers/SummaryPageController.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/runner/src/server/plugins/engine/models/SummaryViewModel.ts b/runner/src/server/plugins/engine/models/SummaryViewModel.ts index e843b8eee..37133ceff 100644 --- a/runner/src/server/plugins/engine/models/SummaryViewModel.ts +++ b/runner/src/server/plugins/engine/models/SummaryViewModel.ts @@ -53,7 +53,6 @@ export class SummaryViewModel { message: string; }[] | undefined; - backLink?: string; _outputs: any; // TODO _payApiKey: FormDefinition["payApiKey"]; @@ -68,7 +67,6 @@ export class SummaryViewModel { ) { this.pageTitle = pageTitle; this.name = model.name; - this.backLink = state?.progress?.[state?.progress.length - 1]; const { relevantPages, endPage } = this.getRelevantPages(model, state); const details = this.summaryDetails(request, model, state, relevantPages); const { def } = model; diff --git a/runner/src/server/plugins/engine/pageControllers/SummaryPageController.ts b/runner/src/server/plugins/engine/pageControllers/SummaryPageController.ts index 20948574e..0cd933cbe 100644 --- a/runner/src/server/plugins/engine/pageControllers/SummaryPageController.ts +++ b/runner/src/server/plugins/engine/pageControllers/SummaryPageController.ts @@ -81,7 +81,7 @@ export class SummaryPageController extends PageController { await cacheService.mergeState(request, { progress }); - // viewModel.backLink = progress[progress.length - 2]; + viewModel.backLink = progress[progress.length - 2]; if (viewModel.endPage) { return redirectTo(