- unblocked saving call form partially;

This commit is contained in:
Vitalii Kiiko
2024-09-30 15:36:36 +02:00
parent 5627cc11ec
commit 524a39e5de
6 changed files with 138 additions and 27 deletions

View File

@@ -47,7 +47,8 @@ const BandoEdit = () => {
//const values = formRef.current.getValues();
//const diffData = equal(values, data);
// TODO warn about unsaved data
if (isFormValid) {
goToStep(0);
/*if (isFormValid) {
goToStep(0)
} else {
bandoMsgs.current.show([
@@ -58,7 +59,7 @@ const BandoEdit = () => {
closable: true
}
]);
}
}*/
}
},
{
@@ -67,12 +68,14 @@ const BandoEdit = () => {
if (activeStep === 1) {
return false
}
console.log('11');
bandoMsgs.current.clear();
const isFormValid = formRef.current.isFormValid();
//const values = formRef.current.getValues();
//const diffData = equal(values, data);
// TODO warn about unsaved data
if (isFormValid) {
goToStep(1);
/*if (isFormValid) {
goToStep(1);
} else {
bandoMsgs.current.show([
@@ -83,7 +86,7 @@ const BandoEdit = () => {
closable: true
}
]);
}
}*/
}
}
];
@@ -235,8 +238,7 @@ const BandoEdit = () => {
if (bandoId === 0) {
setData({
status: 'draft',
name: ''
status: null
});
storeSet.main.unsetAsyncRequest();
@@ -293,7 +295,7 @@ const BandoEdit = () => {
? <Steps
model={stepItems}
activeIndex={activeStep}
readOnly={false}/>
readOnly={isNil(data.status)}/>
: null}
<BlockingOverlay shouldDisplay={isAsyncRequest}/>