From 9c4a581451475d6abcbe296dc019630936563121 Mon Sep 17 00:00:00 2001 From: shuhaib-aot Date: Thu, 14 Nov 2024 15:18:06 +0530 Subject: [PATCH] Disabled revert button on Live --- forms-flow-web/src/components/Form/EditForm/FlowEdit.js | 2 +- forms-flow-web/src/components/Form/EditForm/FormEdit.js | 1 + forms-flow-web/src/components/Modeler/ProcessCreateEdit.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/forms-flow-web/src/components/Form/EditForm/FlowEdit.js b/forms-flow-web/src/components/Form/EditForm/FlowEdit.js index 0bcc1fbb35..0316150b87 100644 --- a/forms-flow-web/src/components/Form/EditForm/FlowEdit.js +++ b/forms-flow-web/src/components/Form/EditForm/FlowEdit.js @@ -238,7 +238,7 @@ const FlowEdit = forwardRef(({ isPublished = false, CategoryType,form }, ref) => categoryType={CategoryType.WORKFLOW} revertBtnAction={fetchHistoryData} historyCount={historiesData?.totalCount || 0} - currentVersionId={processData.id} + disableAllRevertButton={processData.status === "Published"} /> {showTaskVarModal && ( { categoryType={CategoryType.FORM} revertBtnAction={revertFormBtnAction} historyCount={formHistoryData.totalCount} + disableAllRevertButton={isPublished} /> {renderDeleteModal()} diff --git a/forms-flow-web/src/components/Modeler/ProcessCreateEdit.js b/forms-flow-web/src/components/Modeler/ProcessCreateEdit.js index 2a530b6a86..28bba6331c 100644 --- a/forms-flow-web/src/components/Modeler/ProcessCreateEdit.js +++ b/forms-flow-web/src/components/Modeler/ProcessCreateEdit.js @@ -686,6 +686,7 @@ const ProcessCreateEdit = ({ type }) => { revertBtnAction={fetchHistoryData} historyCount={historiesData?.totalCount || 0} currentVersionId={processData.id} + disableAllRevertButton={isPublished} /> );