diff --git a/app/client/src/ce/api/JSActionAPI.tsx b/app/client/src/ce/api/JSActionAPI.tsx index 8f2b4b8232cb..6e18d265f7db 100644 --- a/app/client/src/ce/api/JSActionAPI.tsx +++ b/app/client/src/ce/api/JSActionAPI.tsx @@ -52,6 +52,7 @@ export interface RefactorAction { oldName: string; collectionName: string; moduleId?: string; + workflowId?: string; contextType?: ActionParentEntityTypeInterface; } export interface RefactorActionRequest extends RefactorAction { diff --git a/app/client/src/sagas/JSPaneSagas.ts b/app/client/src/sagas/JSPaneSagas.ts index a6f20923cf2f..9990f3dd4d8e 100644 --- a/app/client/src/sagas/JSPaneSagas.ts +++ b/app/client/src/sagas/JSPaneSagas.ts @@ -217,6 +217,7 @@ function* handleEachUpdateJSCollection(update: JSUpdate) { collectionName: jsAction.name, pageId: data.nameChangedActions[i].pageId || "", moduleId: data.nameChangedActions[i].moduleId, + workflowId: data.nameChangedActions[i].workflowId, oldName: data.nameChangedActions[i].oldName, newName: data.nameChangedActions[i].newName, }, diff --git a/app/client/src/utils/JSPaneUtils.test.ts b/app/client/src/utils/JSPaneUtils.test.ts index a9720031f432..1d18810cb4b4 100644 --- a/app/client/src/utils/JSPaneUtils.test.ts +++ b/app/client/src/utils/JSPaneUtils.test.ts @@ -299,6 +299,7 @@ const resultRenamedActions = { id: "fun1", collectionId: "1234", moduleId: undefined, + workflowId: undefined, oldName: "myFun1", newName: "myFun11", pageId: "page123", diff --git a/app/client/src/utils/JSPaneUtils.tsx b/app/client/src/utils/JSPaneUtils.tsx index bb1e1834f507..5c37a3d346aa 100644 --- a/app/client/src/utils/JSPaneUtils.tsx +++ b/app/client/src/utils/JSPaneUtils.tsx @@ -31,6 +31,7 @@ export interface JSCollectionDifference { newName: string; pageId: string; moduleId?: string; + workflowId?: string; }>; changedVariables: Variable[]; } @@ -104,6 +105,7 @@ export const getDifferenceInJSCollection = ( newName: newActions[i].name, pageId: updateExisting.pageId, moduleId: updateExisting.moduleId, + workflowId: updateExisting.workflowId, }); newActions.splice(i, 1); toBearchivedActions.splice(indexOfArchived, 1);