- removed condition for maxScore to be greater than 0;

- fixed logic of closing amendment in status AWAITING;
This commit is contained in:
Vitalii Kiiko
2025-11-17 13:03:30 +01:00
parent a445ddc135
commit 68cc6716e9
5 changed files with 27 additions and 11 deletions

View File

@@ -232,9 +232,17 @@ const SoccorsoEditInstructorManager = () => {
</div>
}
const doCloseAmendment = () => {
doUpdateAmendment(true);
}
const doCloseAmendment = useCallback(() => {
if (data.status === 'AWAITING') {
const submitData = {
internalNote
}
storeSet('setAsyncRequest');
AmendmentsService.closeSoccorso(amendmentId, submitData, closeAmendmentCallback, errCloseAmendmentCallback);
} else {
doUpdateAmendment(true);
}
}, [data]);
const closeAmendmentCallback = (data) => {
if (data.status === 'SUCCESS') {