- removed abort signal from fetch requests;
- fixed sending motivation text when accepting/rejecting;
This commit is contained in:
@@ -438,7 +438,7 @@ const DomandaEditPreInstructor = () => {
|
||||
errApproveRejectCallback
|
||||
);
|
||||
}
|
||||
}, [data]);
|
||||
}, [data, motivation]);
|
||||
|
||||
const doReject = useCallback(() => {
|
||||
if (data.evaluationVersion === 'V1') {
|
||||
@@ -485,7 +485,7 @@ const DomandaEditPreInstructor = () => {
|
||||
errApproveRejectCallback
|
||||
);
|
||||
}
|
||||
}, [data]);
|
||||
}, [data, motivation]);
|
||||
|
||||
const approveRejectCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
@@ -616,7 +616,7 @@ const DomandaEditPreInstructor = () => {
|
||||
disabled={loading || ('approve' === operationType && (!amountAccepted || isEmpty(amountAccepted) || amountAccepted === 0))}
|
||||
label={__('Invia', 'gepafin')} onClick={'approve' === operationType ? doApprove : doReject}/>
|
||||
</div>
|
||||
}, [amountAccepted, data]);
|
||||
}, [amountAccepted, data, motivation]);
|
||||
|
||||
const initiateApproving = () => {
|
||||
setOperationType('approve');
|
||||
|
||||
Reference in New Issue
Block a user