- saving progress;

This commit is contained in:
Vitalii Kiiko
2025-01-09 12:14:36 +01:00
parent ab7be49fc6
commit 3b7c8edb4c

View File

@@ -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);