open modal works
This commit is contained in:
@@ -613,14 +613,28 @@ const DomandaEditInstructorManager = () => {
|
||||
}
|
||||
|
||||
const footerCompleteDialog = useCallback(() => {
|
||||
return <div>
|
||||
<Button type="button" label={__('Annulla', 'gepafin')} onClick={hideCompleteDialog} outlined/>
|
||||
<Button
|
||||
type="button"
|
||||
disabled={loading || ('approve' === operationType && (!amountAccepted || isEmpty(amountAccepted) || amountAccepted === 0))}
|
||||
label={__('Invia', 'gepafin')} onClick={'approve' === operationType ? doApprove : doReject}/>
|
||||
</div>
|
||||
}, [amountAccepted, data, motivation]);
|
||||
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 <div>
|
||||
<Button type="button" label={__('Annulla', 'gepafin')} onClick={hideCompleteDialog} outlined/>
|
||||
<Button
|
||||
type="button"
|
||||
disabled={isDisabled}
|
||||
label={__('Invia', 'gepafin')} onClick={onSubmitAction}/>
|
||||
</div>
|
||||
}, [amountAccepted, data, motivation]);
|
||||
|
||||
const initiateApproving = () => {
|
||||
setOperationType('approve');
|
||||
@@ -633,6 +647,11 @@ const DomandaEditInstructorManager = () => {
|
||||
setIsVisibleCompleteDialog(true);
|
||||
}
|
||||
|
||||
const initiateTFRejecting = () => {
|
||||
setOperationType('tf_reject');
|
||||
setIsVisibleCompleteDialog(true);
|
||||
}
|
||||
|
||||
const doCheckNDG = () => {
|
||||
doSaveDraft(doGetNDGRequest);
|
||||
}
|
||||
@@ -895,7 +914,7 @@ const DomandaEditInstructorManager = () => {
|
||||
<Button
|
||||
type="button"
|
||||
disabled={!data.id || !['TECHNICAL_EVALUATION'].includes(data.applicationStatus) || evaluationBlockedForUser(data)}
|
||||
onClick={()=>doRejectingStatus(data.assignedApplicationId)}
|
||||
onClick={initiateTFRejecting}
|
||||
icon="pi pi-info-circle" iconPos="right"
|
||||
severity={isAdmissible ? 'success' : 'warning'}
|
||||
label={__('Respingi domanda per valutazione TF negativa', 'gepafin')}
|
||||
|
||||
Reference in New Issue
Block a user