From 42d0e4f0216a1adca3a80a94e3e03993cae52027 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 00:36:54 +0530 Subject: [PATCH] feat: navigate to prev page --- server/src/workflow-management/classes/Generator.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/src/workflow-management/classes/Generator.ts b/server/src/workflow-management/classes/Generator.ts index a784185f..5f19e47a 100644 --- a/server/src/workflow-management/classes/Generator.ts +++ b/server/src/workflow-management/classes/Generator.ts @@ -519,4 +519,15 @@ export class WorkflowGenerator { } + public onGoBack = (newUrl: string) => { + //it's safe to always add a go back action to the first rule in the workflow + this.workflowRecord.workflow[0].what.push({ + action: 'goBack', + args: [{waitUntil: 'commit'}], + }); + this.notifyUrlChange(newUrl); + this.socket.emit('workflow', this.workflowRecord); + } + + }