- updated zustand and react libraries;

- added 'put in draft' btn;
This commit is contained in:
Vitalii Kiiko
2025-04-10 12:36:19 +02:00
parent 44ba9036cb
commit 7dcf932819
90 changed files with 677 additions and 587 deletions

View File

@@ -177,7 +177,7 @@ const BandoFlowEdit = () => {
}, [flowStructure, forms]);
const doSave = () => {
storeSet.main.setAsyncRequest();
storeSet('setAsyncRequest');
const bandoId = getBandoId();
if (flowMsgs.current) {
@@ -197,12 +197,12 @@ const BandoFlowEdit = () => {
});
}
}
storeSet.main.unsetAsyncRequest();
storeSet('unsetAsyncRequest');
}
const errGetFlowCreateCallback = (data) => {
set404FromErrorResponse(data);
storeSet.main.unsetAsyncRequest();
storeSet('unsetAsyncRequest');
}
const getFormsCallback = (data) => {
@@ -212,15 +212,15 @@ const BandoFlowEdit = () => {
setFormOptions([{ label: '', value: '' }, ...formOptions]);
const bandoId = getBandoId();
storeSet.main.setAsyncRequest();
storeSet('setAsyncRequest');
FlowService.getFlow(bandoId, (resp) => getFlowCallback(resp, data.data), errGetFlowCallback);
}
storeSet.main.unsetAsyncRequest();
storeSet('unsetAsyncRequest');
}
const errGetFormsCallback = (data) => {
set404FromErrorResponse(data);
storeSet.main.unsetAsyncRequest();
storeSet('unsetAsyncRequest');
}
const getFlowCallback = (data, forms) => {
@@ -261,12 +261,12 @@ const BandoFlowEdit = () => {
});
}
}
storeSet.main.unsetAsyncRequest();
storeSet('unsetAsyncRequest');
}
const errGetFlowCallback = (data) => {
set404FromErrorResponse(data);
storeSet.main.unsetAsyncRequest();
storeSet('unsetAsyncRequest');
}
const setItemRef = (id, element) => {
@@ -314,7 +314,7 @@ const BandoFlowEdit = () => {
useEffect(() => {
const bandoId = getBandoId();
storeSet.main.setAsyncRequest();
storeSet('setAsyncRequest');
FormsService.getFormsForCall(bandoId, getFormsCallback, errGetFormsCallback);
}, [id]);