Merge branch 'develop' into feature/documents-page
This commit is contained in:
@@ -203,7 +203,14 @@ const NotificationsSidebar = () => {
|
||||
}
|
||||
|
||||
const connectWebSocket = () => {
|
||||
socket.current = new SockJS(socketUrl);
|
||||
socket.current = new SockJS(socketUrl, null, {
|
||||
transports: [
|
||||
'websocket',
|
||||
'xhr-streaming',
|
||||
'xhr-polling'
|
||||
]
|
||||
}
|
||||
);
|
||||
stomp.current = Stomp.over(socket.current);
|
||||
|
||||
stomp.current.configure({
|
||||
|
||||
@@ -95,6 +95,8 @@ const TopBarProfileMenu = ({ menuLeftRef }) => {
|
||||
detail: __('L\'azienda è stata cambiata')
|
||||
});
|
||||
}
|
||||
|
||||
navigate('/')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,11 +100,7 @@ const BandoApplication = () => {
|
||||
const formValues = watch();
|
||||
|
||||
const onValidate = () => {
|
||||
const applId = getApplicationId();
|
||||
storeSet.main.setAsyncRequest();
|
||||
formMsgs.current.clear();
|
||||
|
||||
ApplicationService.validateApplication(applId, {}, validateApplicationCallback, errValidateApplicationCallback);
|
||||
saveDraft('VALIDATE');
|
||||
};
|
||||
|
||||
const onSubmit = () => {
|
||||
@@ -263,13 +259,24 @@ const BandoApplication = () => {
|
||||
});
|
||||
}
|
||||
if (!isEmpty(saveAndMove) && is(String, saveAndMove)) {
|
||||
storeSet.main.setAsyncRequest();
|
||||
ApplicationService.getApplicationForm(data.data.id, getApplFormCallback, errGetApplFormCallbacks, [
|
||||
['formId', formId],
|
||||
['action', saveAndMove]
|
||||
]);
|
||||
if (['NEXT','PREVIOUS'].includes(saveAndMove)) {
|
||||
storeSet.main.setAsyncRequest();
|
||||
ApplicationService.getApplicationForm(data.data.id, getApplFormCallback, errGetApplFormCallbacks, [
|
||||
['formId', formId],
|
||||
['companyId', chosenCompanyId],
|
||||
['action', saveAndMove]
|
||||
]);
|
||||
} else if (['VALIDATE'].includes(saveAndMove)) {
|
||||
const applId = getApplicationId();
|
||||
storeSet.main.setAsyncRequest();
|
||||
formMsgs.current.clear();
|
||||
|
||||
ApplicationService.validateApplication(applId, {}, validateApplicationCallback, errValidateApplicationCallback);
|
||||
}
|
||||
} else {
|
||||
ApplicationService.getApplicationForm(data.data.id, getStatusCheckCallback, errGetStatusCheckCallbacks);
|
||||
ApplicationService.getApplicationForm(data.data.id, getStatusCheckCallback, errGetStatusCheckCallbacks, [
|
||||
['companyId', chosenCompanyId]
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -576,7 +583,9 @@ const BandoApplication = () => {
|
||||
|
||||
if (applId) {
|
||||
storeSet.main.setAsyncRequest();
|
||||
ApplicationService.getApplicationForm(applId, getApplFormCallback, errGetApplFormCallbacks);
|
||||
ApplicationService.getApplicationForm(applId, getApplFormCallback, errGetApplFormCallbacks, [
|
||||
['companyId', chosenCompanyId]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,7 +617,9 @@ const BandoApplication = () => {
|
||||
if (applId) {
|
||||
storeSet.main.setAsyncRequest();
|
||||
setIsRequestForApplData(true);
|
||||
ApplicationService.getApplicationForm(applId, getApplFormCallback, errGetApplFormCallbacks);
|
||||
ApplicationService.getApplicationForm(applId, getApplFormCallback, errGetApplFormCallbacks, [
|
||||
['companyId', chosenCompanyId]
|
||||
]);
|
||||
}
|
||||
}, [id, chosenCompanyId]);
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ const BandoApplicationPreview = () => {
|
||||
const [totalSteps, setTotalSteps] = useState(0);
|
||||
const [applicationStatus, setApplicationStatus] = useState('');
|
||||
const [activeStep, setActiveStep] = useState(1);
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const role = useStore().main.getRole();
|
||||
const isAsyncRequest = useStore().main.isAsyncRequest();
|
||||
const toast = useRef(null);
|
||||
const formMsgs = useRef(null);
|
||||
@@ -130,18 +132,34 @@ const BandoApplicationPreview = () => {
|
||||
|
||||
const goBackward = () => {
|
||||
storeSet.main.setAsyncRequest();
|
||||
ApplicationService.getApplicationForm(id, getApplFormCallback, errGetApplFormCallbacks, [
|
||||
['formId', formId],
|
||||
['action', 'PREVIOUS']
|
||||
]);
|
||||
const queryParams = 'ROLE_BENEFICIARY' === role
|
||||
? [
|
||||
['formId', formId],
|
||||
['companyId', chosenCompanyId],
|
||||
['action', 'PREVIOUS']
|
||||
]
|
||||
: [
|
||||
['formId', formId],
|
||||
['action', 'PREVIOUS']
|
||||
];
|
||||
|
||||
ApplicationService.getApplicationForm(id, getApplFormCallback, errGetApplFormCallbacks, queryParams);
|
||||
}
|
||||
|
||||
const goForward = () => {
|
||||
storeSet.main.setAsyncRequest();
|
||||
ApplicationService.getApplicationForm(id, getApplFormCallback, errGetApplFormCallbacks, [
|
||||
['formId', formId],
|
||||
['action', 'NEXT']
|
||||
]);
|
||||
const queryParams = 'ROLE_BENEFICIARY' === role
|
||||
? [
|
||||
['formId', formId],
|
||||
['companyId', chosenCompanyId],
|
||||
['action', 'NEXT']
|
||||
]
|
||||
: [
|
||||
['formId', formId],
|
||||
['action', 'NEXT']
|
||||
];
|
||||
|
||||
ApplicationService.getApplicationForm(id, getApplFormCallback, errGetApplFormCallbacks, queryParams);
|
||||
}
|
||||
|
||||
const getApplFormCallback = (data) => {
|
||||
@@ -310,7 +328,12 @@ const BandoApplicationPreview = () => {
|
||||
|
||||
if (applId) {
|
||||
storeSet.main.setAsyncRequest();
|
||||
ApplicationService.getApplicationForm(applId, getApplFormCallback, errGetApplFormCallbacks);
|
||||
const queryParams = 'ROLE_BENEFICIARY' === role
|
||||
? [
|
||||
['companyId', chosenCompanyId]
|
||||
]
|
||||
: [];
|
||||
ApplicationService.getApplicationForm(applId, getApplFormCallback, errGetApplFormCallbacks, queryParams);
|
||||
}
|
||||
}, [id]);
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, setInitialData, g
|
||||
![
|
||||
'descriptionShort', 'descriptionLong', 'documentationRequested', 'threshold',
|
||||
'aimedTo', 'criteria', 'docs', 'checklist', 'faq', 'amount', 'amountMin', 'amountMax',
|
||||
'email', 'phoneNumber', 'checkList', 'images', 'numberOfCheck', 'productId'
|
||||
'email', 'phoneNumber', 'checkList', 'images', 'numberOfCheck', 'appointmentTemplateId'
|
||||
].includes(fieldName)
|
||||
}
|
||||
|
||||
@@ -497,12 +497,12 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, setInitialData, g
|
||||
{APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE'
|
||||
? <FormField
|
||||
type="numberinput"
|
||||
disabled={shouldDisableField('productId')}
|
||||
fieldName="productId"
|
||||
label={__('Prodotto ID dentro Odessa', 'gepafin')}
|
||||
disabled={shouldDisableField('appointmentTemplateId')}
|
||||
fieldName="appointmentTemplateId"
|
||||
label={__('Template ID dentro Odessa', 'gepafin')}
|
||||
control={control}
|
||||
errors={errors}
|
||||
defaultValue={values['productId']}
|
||||
defaultValue={values['appointmentTemplateId']}
|
||||
config={{
|
||||
required: __('È obbligatorio', 'gepafin'),
|
||||
}}
|
||||
|
||||
@@ -9,7 +9,9 @@ const BuilderElementProperLabel = ({ id, defaultLabel }) => {
|
||||
const elements = useStore().main.formElements();
|
||||
const element = head(elements.filter(o => o.id === id));
|
||||
const [label, setLabel] = useState('');
|
||||
const isRequired = pathOr(false, ['validators', 'isRequired'], element)
|
||||
const isRequired = pathOr(false, ['validators', 'isRequired'], element);
|
||||
const customValidation = pathOr(false, ['validators', 'custom'], element);
|
||||
let maybeNonEmptyTables = customValidation === 'nonEmptyTables';
|
||||
|
||||
useEffect(() => {
|
||||
const label = head(element.settings.filter(o => o.name === 'label'));
|
||||
@@ -26,7 +28,7 @@ const BuilderElementProperLabel = ({ id, defaultLabel }) => {
|
||||
|
||||
return <div className="label">
|
||||
{renderHtmlContent(label)}
|
||||
{isRequired ? <span className="appForm__field--required">*</span> : null}
|
||||
{isRequired || maybeNonEmptyTables ? <span className="appForm__field--required">*</span> : null}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -340,8 +340,6 @@ const BandoViewBeneficiario = () => {
|
||||
}
|
||||
}, [data]);
|
||||
|
||||
console.log('applicationObj', applicationObj)
|
||||
|
||||
return (
|
||||
<div className="appPage">
|
||||
{!isAsyncRequest && !isEmpty(data)
|
||||
|
||||
@@ -102,7 +102,8 @@ const InstructorManagerMieDomandeTable = ({ userId = null, statuses = [] }) => {
|
||||
evaluationEndDate: {
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||
}
|
||||
},
|
||||
status: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -102,7 +102,8 @@ const PreInstructorDomandeTable = ({ userId = null, statuses = [] }) => {
|
||||
evaluationEndDate: {
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||
}
|
||||
},
|
||||
status: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -157,8 +157,8 @@ const DomandaEditInstructorManager = () => {
|
||||
if (formFieldsChecklist.length >= minChecks) {
|
||||
const valuesTotal = formFieldsChecklist.map(v => formValues[v]);
|
||||
const valuesFirst = valuesTotal.toSpliced(minChecks);
|
||||
setAtLeastOneChecked(valuesTotal.filter(v => v === true).length === valuesTotal.length);
|
||||
setAllChecksChecked(valuesFirst.filter(v => v === true).length === valuesFirst.length)
|
||||
setAtLeastOneChecked(valuesFirst.filter(v => Boolean(v) === true).length === valuesFirst.length);
|
||||
setAllChecksChecked(valuesTotal.filter(v => Boolean(v) === true).length === valuesTotal.length);
|
||||
}
|
||||
}
|
||||
}, [formValues]);
|
||||
@@ -695,11 +695,11 @@ const DomandaEditInstructorManager = () => {
|
||||
}
|
||||
}
|
||||
|
||||
AppointmentService.createAppointment(id, submitData, getAppointemntCallback, errGetAppointemntCallback);
|
||||
AppointmentService.createAppointment(id, submitData, getAppointmentCallback, errGetAppointemntCallback);
|
||||
}
|
||||
}
|
||||
|
||||
const getAppointemntCallback = (data) => {
|
||||
const getAppointmentCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
if (toast.current && data.message) {
|
||||
toast.current.show({
|
||||
@@ -708,6 +708,12 @@ const DomandaEditInstructorManager = () => {
|
||||
detail: data.message
|
||||
});
|
||||
}
|
||||
if (data.data.appointmentId) {
|
||||
setData({
|
||||
...data,
|
||||
appointmentId: data.data.appointmentId
|
||||
});
|
||||
}
|
||||
}
|
||||
setIsVisibleAppointmentDialog(false);
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
@@ -939,7 +945,7 @@ const DomandaEditInstructorManager = () => {
|
||||
['evaluationDocument']
|
||||
)}
|
||||
shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationBlockedForUser(data)}
|
||||
sourceId={data.assignedApplicationId}
|
||||
sourceId={data.id}
|
||||
sourceName="evaluation"/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ const DomandaEditPreInstructor = () => {
|
||||
const [isVisibleCompleteDialog, setIsVisibleCompleteDialog] = useState(false);
|
||||
const [operationType, setOperationType] = useState('');
|
||||
const [motivation, setMotivation] = useState('');
|
||||
const [amountAccepted, setAmountAccepted] = useState(0);
|
||||
const [isVisibleAppointmentDialog, setIsVisibleAppointmentDialog] = useState(false);
|
||||
const [allFilesRated, setAllFilesRated] = useState(false);
|
||||
const [atLeastOneChecked, setAtLeastOneChecked] = useState(false);
|
||||
@@ -157,8 +158,8 @@ const DomandaEditPreInstructor = () => {
|
||||
if (formFieldsChecklist.length >= minChecks) {
|
||||
const valuesTotal = formFieldsChecklist.map(v => formValues[v]);
|
||||
const valuesFirst = valuesTotal.toSpliced(minChecks);
|
||||
setAtLeastOneChecked(valuesTotal.filter(v => v === true).length === valuesTotal.length);
|
||||
setAllChecksChecked(valuesFirst.filter(v => v === true).length === valuesFirst.length)
|
||||
setAtLeastOneChecked(valuesFirst.filter(v => Boolean(v) === true).length === valuesFirst.length);
|
||||
setAllChecksChecked(valuesTotal.filter(v => Boolean(v) === true).length === valuesTotal.length);
|
||||
}
|
||||
}
|
||||
}, [formValues]);
|
||||
@@ -388,7 +389,8 @@ const DomandaEditPreInstructor = () => {
|
||||
checklist: klona(data.checklist),
|
||||
files: klona(data.files),
|
||||
note: data.note,
|
||||
motivation
|
||||
motivation,
|
||||
amountAccepted
|
||||
}
|
||||
|
||||
setLoading(true);
|
||||
@@ -695,11 +697,11 @@ const DomandaEditPreInstructor = () => {
|
||||
}
|
||||
}
|
||||
|
||||
AppointmentService.createAppointment(id, submitData, getAppointemntCallback, errGetAppointemntCallback);
|
||||
AppointmentService.createAppointment(id, submitData, getAppointmentCallback, errGetAppointemntCallback);
|
||||
}
|
||||
}
|
||||
|
||||
const getAppointemntCallback = (data) => {
|
||||
const getAppointmentCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
if (toast.current && data.message) {
|
||||
toast.current.show({
|
||||
@@ -708,6 +710,12 @@ const DomandaEditPreInstructor = () => {
|
||||
detail: data.message
|
||||
});
|
||||
}
|
||||
if (data.data.appointmentId) {
|
||||
setData({
|
||||
...data,
|
||||
appointmentId: data.data.appointmentId
|
||||
});
|
||||
}
|
||||
}
|
||||
setIsVisibleAppointmentDialog(false);
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
@@ -734,7 +742,7 @@ const DomandaEditPreInstructor = () => {
|
||||
const userData = storeGet.main.userData()
|
||||
return isAsyncRequest || userData.id !== data.assignedUserId;
|
||||
}
|
||||
|
||||
|
||||
const shouldDisableNewSoccorso = () => {
|
||||
if (data.evaluationVersion === 'V1') {
|
||||
return !allFilesRated || !atLeastOneChecked;
|
||||
@@ -810,7 +818,7 @@ const DomandaEditPreInstructor = () => {
|
||||
? <Button
|
||||
type="button"
|
||||
disabled={!isAdmissible
|
||||
|| ['APPROVED'].includes(data.applicationStatus)
|
||||
|| ['APPROVED','REJECTED'].includes(data.applicationStatus)
|
||||
|| evaluationBlockedForUser(data)
|
||||
|| (APP_EVALUATION_FLOW_ID === '1' && !['ADMISSIBLE'].includes(data.applicationStatus))
|
||||
}
|
||||
@@ -820,9 +828,11 @@ const DomandaEditPreInstructor = () => {
|
||||
{data.id
|
||||
? <Button
|
||||
type="button"
|
||||
disabled={APP_EVALUATION_FLOW_ID === '1'
|
||||
disabled={['APPROVED','REJECTED'].includes(data.applicationStatus)
|
||||
|| APP_EVALUATION_FLOW_ID === '1'
|
||||
&& (!['EVALUATION', 'ADMISSIBLE', 'APPOINTMENT'].includes(data.applicationStatus)
|
||||
|| evaluationBlockedForUser(data))}
|
||||
|| evaluationBlockedForUser(data))
|
||||
}
|
||||
onClick={initiateRejecting}
|
||||
label={__('Respingi domanda', 'gepafin')}
|
||||
icon="pi pi-times" iconPos="right"/> : null}
|
||||
@@ -940,7 +950,7 @@ const DomandaEditPreInstructor = () => {
|
||||
['evaluationDocument']
|
||||
)}
|
||||
shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationBlockedForUser(data)}
|
||||
sourceId={data.assignedApplicationId}
|
||||
sourceId={data.id}
|
||||
sourceName="evaluation"/>
|
||||
</div>
|
||||
|
||||
@@ -1206,6 +1216,17 @@ const DomandaEditPreInstructor = () => {
|
||||
footer={footerCompleteDialog}
|
||||
style={{ maxWidth: '600px', width: '100%' }}
|
||||
onHide={hideCompleteDialog}>
|
||||
<div className="appForm__field">
|
||||
<label
|
||||
className={classNames({ 'p-error': isEmpty(amountAccepted) || amountAccepted === 0 })}>
|
||||
{__('Importo approvato', 'gepafin')}
|
||||
</label>
|
||||
<InputNumber
|
||||
value={amountAccepted}
|
||||
keyfilter="int"
|
||||
invalid={isEmpty(amountAccepted) || amountAccepted === 0}
|
||||
onChange={(e) => setAmountAccepted(e.value)}/>
|
||||
</div>
|
||||
<div className="appForm__field">
|
||||
<label>{__('Motivazione', 'gepafin')}</label>
|
||||
<Editor
|
||||
|
||||
@@ -177,8 +177,10 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
|
||||
filter sortable
|
||||
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||
style={{ minWidth: '8rem' }}/>
|
||||
<Column field="status" header={__('Stato', 'gepafin')}
|
||||
style={{ minWidth: '8rem' }} body={statusBodyTemplate}
|
||||
<Column field="status"
|
||||
header={__('Stato', 'gepafin')}
|
||||
style={{ minWidth: '8rem' }}
|
||||
body={statusBodyTemplate}
|
||||
filter
|
||||
filterElement={statusFilterTemplate}/>
|
||||
<Column header={__('Azioni', 'gepafin')}
|
||||
|
||||
@@ -156,6 +156,13 @@ const Login = () => {
|
||||
<span>{__('Entra con SPID / CIE', 'gepafin')}</span>
|
||||
</button>
|
||||
|
||||
{/*<div className="appPage__spacer"></div>
|
||||
|
||||
<div className="appPageSection__message warning">
|
||||
<i className="pi pi-exclamation-triangle"></i>
|
||||
<span>{__('Gentili clienti abbiamo riscontrato dei problemi di autenticazione allo Spid per alcuni provider, in caso di impossibilità di accesso si prega di provare ad accedere con la carta di identità elettronica. Stiamo cercando di risolvere al più presto tutti i problemi.', 'gepafin')}</span>
|
||||
</div>*/}
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
<p><a href={origin} onClick={openCacheFaq}>{__('Hai problemi di accesso con SPID?', 'gepafin')}</a></p>
|
||||
|
||||
@@ -94,8 +94,8 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
||||
evaluationEndDate: {
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||
}
|
||||
});
|
||||
},
|
||||
status: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }, });
|
||||
};
|
||||
|
||||
const renderHeader = () => {
|
||||
@@ -165,8 +165,11 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
||||
filterField="evaluationEndDate" dataType="date"
|
||||
style={{ minWidth: '8rem' }}
|
||||
body={dateExpirationBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||
<Column field="status" header={__('Stato', 'gepafin')}
|
||||
style={{ minWidth: '7rem' }} body={statusBodyTemplate} filter
|
||||
<Column field="status"
|
||||
header={__('Stato', 'gepafin')}
|
||||
style={{ minWidth: '7rem' }}
|
||||
body={statusBodyTemplate}
|
||||
filter
|
||||
filterElement={statusFilterTemplate} />
|
||||
<Column header={__('Azioni', 'gepafin')}
|
||||
body={actionsBodyTemplate}/>
|
||||
|
||||
Reference in New Issue
Block a user