- updated;
This commit is contained in:
@@ -525,7 +525,8 @@ const DomandaEditPreInstructor = () => {
|
||||
files: klona(data.files),
|
||||
note: data.note,
|
||||
motivation: finalDialogData.motivation,
|
||||
rejectedReason: finalDialogData.subject
|
||||
rejectedReason: finalDialogData.reason,
|
||||
rejectedReasonSubject: finalDialogData.subject
|
||||
}
|
||||
|
||||
const formDataToSend = new FormData();
|
||||
@@ -562,7 +563,8 @@ const DomandaEditPreInstructor = () => {
|
||||
amendmentDetails: klona(data.amendmentDetails),
|
||||
note: data.note,
|
||||
motivation: finalDialogData.motivation,
|
||||
rejectedReason: finalDialogData.subject
|
||||
rejectedReason: finalDialogData.reason,
|
||||
rejectedReasonSubject: finalDialogData.subject
|
||||
}
|
||||
|
||||
const formDataToSend = new FormData();
|
||||
@@ -723,7 +725,7 @@ const DomandaEditPreInstructor = () => {
|
||||
onSubmitAction = () => doReject('TECHNICAL_EVALUATION_REJECTED');
|
||||
} else {
|
||||
onSubmitAction = () => doReject('REJECTED');
|
||||
isDisabled = isDisabled || !finalDialogData.subject || isEmpty(finalDialogData.subject) || !finalDialogData.motivation || isEmpty(finalDialogData.motivation)
|
||||
isDisabled = isDisabled || !finalDialogData.reason || isEmpty(finalDialogData.reason) || !finalDialogData.motivation || isEmpty(finalDialogData.motivation)
|
||||
}
|
||||
|
||||
return <div>
|
||||
@@ -1590,22 +1592,31 @@ const DomandaEditPreInstructor = () => {
|
||||
</div> : null}
|
||||
{operationType === 'reject' && APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE'
|
||||
? <div className="appForm__field">
|
||||
<label className={classNames({ 'p-error': !finalDialogData.subject || isEmpty(finalDialogData.subject) })}>
|
||||
<label className={classNames({ 'p-error': !finalDialogData.reason || isEmpty(finalDialogData.reason) })}>
|
||||
{__('Oggetto', 'gepafin')}
|
||||
</label>
|
||||
<Dropdown
|
||||
value={null}
|
||||
value={rejectionReasons.find(reason => reason.id === finalDialogData.reasonId) || null}
|
||||
options={rejectionReasons}
|
||||
optionLabel="label"
|
||||
placeholder={__('Seleziona motivo', 'gepafin')}
|
||||
onChange={(e) => updateFinalDialogData(e.value.text, 'subject')}
|
||||
onChange={(e) => {
|
||||
setFinalDialogData(prev => ({
|
||||
...prev,
|
||||
reasonId: e.value.id,
|
||||
reason: e.value.text,
|
||||
subject: e.value.subject
|
||||
}))
|
||||
}}
|
||||
style={{ marginBottom: '10px' }}
|
||||
/>
|
||||
<InputText
|
||||
name="subject"
|
||||
value={finalDialogData.subject}
|
||||
invalid={!finalDialogData.subject || isEmpty(finalDialogData.subject)}
|
||||
onChange={(e) => updateFinalDialogData(e.target.value, 'subject')}/>
|
||||
<InputTextarea
|
||||
name="reason"
|
||||
value={finalDialogData.reason}
|
||||
invalid={!finalDialogData.reason || isEmpty(finalDialogData.reason)}
|
||||
onChange={(e) => updateFinalDialogData(e.target.value, 'reason')}
|
||||
rows={3}
|
||||
style={{ width: '100%' }}/>
|
||||
</div> : null}
|
||||
<div className="appForm__field">
|
||||
<label className={classNames({ 'p-error': !finalDialogData.motivation || isEmpty(finalDialogData.motivation) })}>
|
||||
|
||||
Reference in New Issue
Block a user