From 3b7c8edb4c18fc6a00bd8c969c5b6cbfd33de0af Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Thu, 9 Jan 2025 12:14:36 +0100 Subject: [PATCH] - saving progress; --- src/pages/BandoFlowEdit/index.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pages/BandoFlowEdit/index.js b/src/pages/BandoFlowEdit/index.js index 0f7ffc6..17b1365 100644 --- a/src/pages/BandoFlowEdit/index.js +++ b/src/pages/BandoFlowEdit/index.js @@ -273,6 +273,10 @@ const BandoFlowEdit = () => { } useEffect(() => { + const isAsyncRequest = storeGet.main.isAsyncRequest(); + if (isAsyncRequest) { + return; + } if ('PUBLISH' === bandoStatus) { return; } @@ -330,7 +334,8 @@ const BandoFlowEdit = () => { }, [chosenMainField]); useEffect(() => { - if ('PUBLISH' === bandoStatus) { + const isAsyncRequest = storeGet.main.isAsyncRequest(); + if ('PUBLISH' === bandoStatus || isAsyncRequest) { return; } storeSet.main.flowData([]); @@ -361,6 +366,10 @@ const BandoFlowEdit = () => { }, [initialForm]); useEffect(() => { + const isAsyncRequest = storeGet.main.isAsyncRequest(); + if (isAsyncRequest) { + return; + } if ('PUBLISH' === bandoStatus) { } else { const filtered = flowData.filter(o => o.formId === initialForm); @@ -396,6 +405,10 @@ const BandoFlowEdit = () => { }, [forms]); useEffect(() => { + const isAsyncRequest = storeGet.main.isAsyncRequest(); + if (isAsyncRequest) { + return; + } const chosenFieldItem = head(flowData.filter(o => !isEmpty(o.chosenField))); if (chosenFieldItem) { setChosenMainField(chosenFieldItem.chosenField);