From 0211df03293b28ac5f6b848d2106de132772a172 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Fri, 14 Feb 2025 10:09:56 +0100 Subject: [PATCH 01/15] - added auto saving on validation application request; --- src/pages/BandoApplication/index.js | 24 +++++++++++-------- .../BuilderElementProperLabel/index.js | 6 +++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/pages/BandoApplication/index.js b/src/pages/BandoApplication/index.js index b168f58..0690ba2 100644 --- a/src/pages/BandoApplication/index.js +++ b/src/pages/BandoApplication/index.js @@ -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,11 +259,19 @@ 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], + ['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); } diff --git a/src/pages/BandoFormsEdit/components/BuilderElementProperLabel/index.js b/src/pages/BandoFormsEdit/components/BuilderElementProperLabel/index.js index bcc7ef3..99f65a8 100644 --- a/src/pages/BandoFormsEdit/components/BuilderElementProperLabel/index.js +++ b/src/pages/BandoFormsEdit/components/BuilderElementProperLabel/index.js @@ -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
{renderHtmlContent(label)} - {isRequired ? * : null} + {isRequired || maybeNonEmptyTables ? * : null}
} From f22fd04137dc28b538688b45bc30c159cbd8693e Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Fri, 14 Feb 2025 12:04:47 +0100 Subject: [PATCH 02/15] - sockjs config updated; --- src/components/NotificationsSidebar/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/NotificationsSidebar/index.js b/src/components/NotificationsSidebar/index.js index 91555de..8d5e7b3 100644 --- a/src/components/NotificationsSidebar/index.js +++ b/src/components/NotificationsSidebar/index.js @@ -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({ From 153e17132a911beb7d5ae2c6d99b9f22cbdcd056 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Fri, 14 Feb 2025 16:05:04 +0100 Subject: [PATCH 03/15] - added amountAccepted field; --- src/pages/DomandaEditPreInstructor/index.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index 6e1def2..95d42b5 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -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); @@ -388,7 +389,8 @@ const DomandaEditPreInstructor = () => { checklist: klona(data.checklist), files: klona(data.files), note: data.note, - motivation + motivation, + amountAccepted } setLoading(true); @@ -1206,6 +1208,17 @@ const DomandaEditPreInstructor = () => { footer={footerCompleteDialog} style={{ maxWidth: '600px', width: '100%' }} onHide={hideCompleteDialog}> +
+ + setAmountAccepted(e.value)}/> +
Date: Fri, 14 Feb 2025 16:20:17 +0100 Subject: [PATCH 04/15] - added conditions for approve/reject buttons; --- src/pages/DomandaEditPreInstructor/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index 95d42b5..807853a 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -812,7 +812,7 @@ const DomandaEditPreInstructor = () => { ?
diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index 2be4553..65e4e5e 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -741,7 +741,7 @@ const DomandaEditPreInstructor = () => { if (data.evaluationVersion === 'V1') { return !allFilesRated || !atLeastOneChecked; } else if (data.evaluationVersion === 'V2') { - return !atLeastOneChecked; + return !allFilesRated || !atLeastOneChecked; } else { return true; } @@ -944,7 +944,7 @@ const DomandaEditPreInstructor = () => { ['evaluationDocument'] )} shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationBlockedForUser(data)} - sourceId={data.assignedApplicationId} + sourceId={data.applicationId} sourceName="evaluation"/> From b90b00bc81c803266ddeb2ea2feaae860d166f4c Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Tue, 18 Feb 2025 14:03:44 +0100 Subject: [PATCH 10/15] - fixed fileupload correct ID for its source; --- src/pages/DomandaEditInstructorManager/index.js | 2 +- src/pages/DomandaEditPreInstructor/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/DomandaEditInstructorManager/index.js b/src/pages/DomandaEditInstructorManager/index.js index f2f9ced..ae60116 100644 --- a/src/pages/DomandaEditInstructorManager/index.js +++ b/src/pages/DomandaEditInstructorManager/index.js @@ -939,7 +939,7 @@ const DomandaEditInstructorManager = () => { ['evaluationDocument'] )} shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationBlockedForUser(data)} - sourceId={data.applicationId} + sourceId={data.id} sourceName="evaluation"/> diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index 65e4e5e..4fc2ef4 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -944,7 +944,7 @@ const DomandaEditPreInstructor = () => { ['evaluationDocument'] )} shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationBlockedForUser(data)} - sourceId={data.applicationId} + sourceId={data.id} sourceName="evaluation"/> From f9622bac0ddb001b8e511c5ed5ab5dba7b1083df Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Tue, 18 Feb 2025 17:30:22 +0100 Subject: [PATCH 11/15] - removed console.log; --- src/pages/BandoViewBeneficiario/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/BandoViewBeneficiario/index.js b/src/pages/BandoViewBeneficiario/index.js index 97b6b8f..73656cf 100644 --- a/src/pages/BandoViewBeneficiario/index.js +++ b/src/pages/BandoViewBeneficiario/index.js @@ -340,8 +340,6 @@ const BandoViewBeneficiario = () => { } }, [data]); - console.log('applicationObj', applicationObj) - return (
{!isAsyncRequest && !isEmpty(data) From 589d91ed6c5fef0d64d1e9e861ae34bb93aabf60 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Wed, 19 Feb 2025 11:56:41 +0100 Subject: [PATCH 12/15] - updated templates of application evaluation; --- src/pages/DomandaEditInstructorManager/index.js | 10 ++++++++-- src/pages/DomandaEditPreInstructor/index.js | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/pages/DomandaEditInstructorManager/index.js b/src/pages/DomandaEditInstructorManager/index.js index ae60116..f706531 100644 --- a/src/pages/DomandaEditInstructorManager/index.js +++ b/src/pages/DomandaEditInstructorManager/index.js @@ -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(); diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index 4fc2ef4..64d4020 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -697,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({ @@ -710,6 +710,12 @@ const DomandaEditPreInstructor = () => { detail: data.message }); } + if (data.data.appointmentId) { + setData({ + ...data, + appointmentId: data.data.appointmentId + }); + } } setIsVisibleAppointmentDialog(false); storeSet.main.unsetAsyncRequest(); From 894e8ac0185f0d05965adb3e43ce2efe945ac2f2 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Fri, 21 Feb 2025 12:26:59 +0100 Subject: [PATCH 13/15] - added msg; --- src/pages/Login/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pages/Login/index.js b/src/pages/Login/index.js index be260a1..1fbcee3 100644 --- a/src/pages/Login/index.js +++ b/src/pages/Login/index.js @@ -158,6 +158,13 @@ const Login = () => {
+
+ + {__('Gentili clienti a causa del momentaneo disservizio dello Spid si prega di provare ad accedere con la carta di identità elettronica. Stiamo cercando di risolvere al più presto il problema.', 'gepafin')} +
+ +
+

{__('Hai problemi di accesso con SPID?', 'gepafin')}

Date: Fri, 21 Feb 2025 13:52:07 +0100 Subject: [PATCH 14/15] - updated msg; --- src/pages/Login/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Login/index.js b/src/pages/Login/index.js index 1fbcee3..e2b46dc 100644 --- a/src/pages/Login/index.js +++ b/src/pages/Login/index.js @@ -160,7 +160,7 @@ const Login = () => {
- {__('Gentili clienti a causa del momentaneo disservizio dello Spid si prega di provare ad accedere con la carta di identità elettronica. Stiamo cercando di risolvere al più presto il problema.', 'gepafin')} + {__('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')}
From 923a1e389f93d0f25af2f5a7c74b6af609a3f425 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Fri, 21 Feb 2025 16:05:29 +0100 Subject: [PATCH 15/15] - removed msg; --- src/pages/Login/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Login/index.js b/src/pages/Login/index.js index e2b46dc..c7047cf 100644 --- a/src/pages/Login/index.js +++ b/src/pages/Login/index.js @@ -156,12 +156,12 @@ const Login = () => { {__('Entra con SPID / CIE', 'gepafin')} -
+ {/*
{__('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')} -
+
*/}