diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index 394233b..59d47b6 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -612,12 +612,26 @@ const DomandaEditPreInstructor = () => { } const footerCompleteDialog = useCallback(() => { + let onSubmitAction; + let isDisabled = loading; + + if (operationType === 'approve') { + onSubmitAction = doApprove; + isDisabled = isDisabled || !amountAccepted || isEmpty(amountAccepted) || amountAccepted === 0; + } else if (operationType === 'tf_reject') { + onSubmitAction = doRejectingStatus; + + } else { + onSubmitAction = doReject; + + } + return