- updated;
This commit is contained in:
@@ -272,27 +272,37 @@ export const resendEmailLabelsByType = {
|
||||
}
|
||||
|
||||
export const rejectionReasons = [
|
||||
{ label: 'Documentazione incompleta', text: 'la stessa è stata sottoposta ad istruttoria di ammissibilità con esito negativo.' },
|
||||
{ label: 'Altri motivi', text: 'la stessa è stata esclusa dalla graduatoria definitiva' }
|
||||
]
|
||||
{
|
||||
id: 1,
|
||||
label: 'Documentazione incompleta',
|
||||
text: 'la stessa è stata sottoposta ad istruttoria di ammissibilità con esito negativo.',
|
||||
subject: 'Esito negativo istruttoria di ammissibilità'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: 'Altri motivi',
|
||||
text: 'la stessa è stata esclusa dalla graduatoria definitiva',
|
||||
subject: 'Esclusione dalla graduatoria definitiva.'
|
||||
}
|
||||
];
|
||||
|
||||
export const amendmentRequestedDocs = {
|
||||
NESSUNA_GARANZIA: [
|
||||
'lettera di accettazione firmata'
|
||||
'Lettera di accettazione firmata'
|
||||
],
|
||||
GARANZIA_MCC: [
|
||||
'lettera di accettazione firmata',
|
||||
'Lettera di accettazione firmata',
|
||||
'Modulo di domanda della agevolazione (ex allegato 4)'
|
||||
],
|
||||
MCC_START_UP: [
|
||||
'lettera di accettazione firmata',
|
||||
'Lettera di accettazione firmata',
|
||||
'Modulo di domanda della agevolazione (ex allegato 4)',
|
||||
'Modello di valutazione bilanci previsionali',
|
||||
'Modello valutazione start up'
|
||||
],
|
||||
ALTRE_GARANZIE: [
|
||||
'lettera di accettazione firmata',
|
||||
'modello privacy',
|
||||
'autocertificazione e altri eventuali in zip/p7m'
|
||||
'Lettera di accettazione firmata',
|
||||
'Modello privacy',
|
||||
'Autocertificazione e altri eventuali in zip/p7m'
|
||||
],
|
||||
}
|
||||
@@ -75,7 +75,7 @@ const getBandoLabel = (status) => {
|
||||
return __('Respinto', 'gepafin');
|
||||
|
||||
case 'TECHNICAL_EVALUATION_REJECTED':
|
||||
return __('Respinto', 'gepafin');
|
||||
return __('Respinto Tec-Fin', 'gepafin');
|
||||
|
||||
default:
|
||||
return '';
|
||||
|
||||
@@ -72,6 +72,9 @@ const getBandoSeverity = (status) => {
|
||||
case 'REJECTED':
|
||||
return 'danger';
|
||||
|
||||
case 'TECHNICAL_EVALUATION_REJECTED':
|
||||
return 'danger';
|
||||
|
||||
default:
|
||||
return 'info';
|
||||
}
|
||||
|
||||
@@ -31,7 +31,9 @@ import SoccorsoResendEmails from '../../../SoccorsoEditPreInstructor/components/
|
||||
|
||||
const APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [] }) => {
|
||||
const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [],
|
||||
applicationStatuses = ['EVALUATION', 'SOCCORSO', 'NDG', 'APPOINTMENT', 'ADMISSIBLE',
|
||||
'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION']}) => {
|
||||
const navigate = useNavigate();
|
||||
const userData = useStoreValue('userData');
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
@@ -54,8 +56,6 @@ const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [] }) => {
|
||||
assignedUserName: { value: null, matchMode: 'equals' }
|
||||
}
|
||||
});
|
||||
const applicationStatuses = ['EVALUATION', 'SOCCORSO', 'NDG', 'APPOINTMENT', 'ADMISSIBLE',
|
||||
'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION'];
|
||||
|
||||
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'applicationId'), [lazyState]);
|
||||
|
||||
|
||||
@@ -525,7 +525,8 @@ const DomandaEditInstructorManager = () => {
|
||||
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 DomandaEditInstructorManager = () => {
|
||||
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 DomandaEditInstructorManager = () => {
|
||||
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 DomandaEditInstructorManager = () => {
|
||||
</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) })}>
|
||||
|
||||
@@ -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) })}>
|
||||
|
||||
@@ -15,7 +15,7 @@ const DomandeArchive = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Domande completate', 'gepafin')}</h2>
|
||||
<DomandeTablePreInstructorAsync statuses={['CLOSE']} userId={0}/>
|
||||
<DomandeTablePreInstructorAsync statuses={['CLOSE']} applicationStatuses={['APPROVED', 'REJECTED', 'TECHNICAL_EVALUATION_REJECTED']} userId={0}/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -20,7 +20,7 @@ const DomandeArchivePreInstructor = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Domande completate', 'gepafin')}</h2>
|
||||
<DomandeTablePreInstructorAsync statuses={['CLOSE']} userId={userData.id}/>
|
||||
<DomandeTablePreInstructorAsync statuses={['CLOSE']} applicationStatuses={['APPROVED', 'REJECTED', 'TECHNICAL_EVALUATION_REJECTED']} userId={userData.id}/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user