From 24057216952482ddb77fc6395d6d8bfd40a602ad Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Mon, 9 Dec 2024 15:29:50 +0100 Subject: [PATCH 01/37] - saving progress; --- src/configData.js | 34 +++--- .../components/ArchiveDocument/index.js | 4 +- .../components/ListOfFiles/index.js | 2 +- .../components/RepeaterFields/index.js | 103 ++++++++++++++++++ src/pages/DomandaEditPreInstructor/index.js | 20 +++- src/service/appointment-service.js | 2 +- src/service/network-service.js | 1 + 7 files changed, 143 insertions(+), 23 deletions(-) create mode 100644 src/pages/DomandaEditPreInstructor/components/RepeaterFields/index.js diff --git a/src/configData.js b/src/configData.js index c8827e7..ba5d649 100644 --- a/src/configData.js +++ b/src/configData.js @@ -67,87 +67,87 @@ export const protocolType = [ export const classificationType = [ { - 'idClassificazione': 101, + 'idClassificazione': 1, 'name': 'BILANCIO', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 102, + 'idClassificazione': 2, 'name': 'DICHHIARAZIONE DEI REDDITI', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 103, + 'idClassificazione': 3, 'name': 'SITUAZIONE CONTABILE', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 104, + 'idClassificazione': 4, 'name': 'PROSPETTO CONTO ECONOMICO', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 105, + 'idClassificazione': 5, 'name': 'CENTRALE DEI RISCHI', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 106, + 'idClassificazione': 6, 'name': 'RELAZIONE AZIENDALE ILLUSTRATIVA (MOD R1C, R1I, R1R, R1R A SECONDO DEI ', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 107, + 'idClassificazione': 7, 'name': 'DOCUMENTO IDENTITA\'', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 108, + 'idClassificazione': 8, 'name': 'MODELLO SP1', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 109, + 'idClassificazione': 9, 'name': 'PRIVACY', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 110, + 'idClassificazione': 10, 'name': 'DOCUMENTAZIONE CHE ATTESTA POSSIBILITA\' DI RILASCIARE GAA FAVORE', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 111, + 'idClassificazione': 11, 'name': 'MODELLO AR1 D.LG 231/2007', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 112, + 'idClassificazione': 12, 'name': 'DOCUMENTO IDENTITA\' FIRMATORIO DICHHIARAZIONE SOSTITUTIVA', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 113, + 'idClassificazione': 13, 'name': 'PRIVACY FIRMATARIO DICHHIARAZIONE SOSTITUTIVA', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 114, + 'idClassificazione': 14, 'name': 'NULLAOSTA ANTIMAFIA', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 201, + 'idClassificazione': 1, 'name': 'LETTERA ESITO DELIBERA', 'idTipoprotocollo': 2 }, { - 'idClassificazione': 202, + 'idClassificazione': 2, 'name': 'LETTERA DI GARANZIA', 'idTipoprotocollo': 1 }, { - 'idClassificazione': 203, + 'idClassificazione': 3, 'name': 'GENERICO', 'idTipoprotocollo': 3 } diff --git a/src/pages/DomandaEditPreInstructor/components/ArchiveDocument/index.js b/src/pages/DomandaEditPreInstructor/components/ArchiveDocument/index.js index b50c321..bd72bc8 100644 --- a/src/pages/DomandaEditPreInstructor/components/ArchiveDocument/index.js +++ b/src/pages/DomandaEditPreInstructor/components/ArchiveDocument/index.js @@ -18,7 +18,7 @@ import set404FromErrorResponse from '../../../../helpers/set404FromErrorResponse import { storeSet } from '../../../../store'; import { Toast } from 'primereact/toast'; -const ArchiveDocument = ({ applicationId, ndg = '', fileId = 0 }) => { +const ArchiveDocument = ({ applicationId, ndg = '', fileId = 0, docAttachmentId = null }) => { const [loading, setLoading] = useState(false); const [isVisibleDialog, setIsVisibleDialog] = useState(false); const [modalData, setModalData] = useState({}); @@ -119,7 +119,7 @@ const ArchiveDocument = ({ applicationId, ndg = '', fileId = 0 }) => { setTypes(protocolType.map(o => ({ value: o.id, label: o.name }))); }, []); - return (!isEmpty(ndg) + return (!isEmpty(ndg) && !docAttachmentId ? <> + + + + + + + + + + + + ); + }; + + const header = renderHeader(); + useEffect(() => { if (formInitialData) { //reset(); @@ -189,7 +218,7 @@ const DomandaBeneficiario = () => { {data.id ?

{sprintf(__('Soccorso Istruttorio: richiesta integrazione documenti per domanda #%s', 'gepafin'), id)} -

: null} + : null} {dataAppl.id ?

{sprintf(__('Dettagli: domanda #%s', 'gepafin'), dataAppl.id)} @@ -298,7 +327,7 @@ const DomandaBeneficiario = () => { disabled={data.status === 'CLOSE'} type="fileupload" setDataFn={setValue} - /*saveFormCallback={doUpdateAmendment}*/ + saveFormCallback={doUpdateAmendment} fieldName={o.fieldId} label={o.label} control={control} @@ -321,18 +350,39 @@ const DomandaBeneficiario = () => { : null} - {data.id - ?
-

{__('Documenti aggiuntivi', 'gepafin')}

- updateNewAmendmentData( - data, - ['amendmentDocuments'] - )} +
+

{__('Documenti aggiuntivi', 'gepafin')}

+
+

{__('Notes', 'gepafin')}

+
+ updateNewAmendmentData( + e.htmlValue, + 'amendmentNotes' + )} + style={{ height: 80 * 3, width: '100%' }} + /> +
+ -
: null} + multiple={true} + /> +
+
{data.id ?
@@ -371,7 +421,10 @@ const DomandaBeneficiario = () => { header={__('Invia documenti via PEC', 'gepafin')} visible={isVisibleEmailDialog} style={{ width: '50vw' }} - onHide={() => {if (!isVisibleEmailDialog) return; setIsVisibleEmailDialog(false); }}> + onHide={() => { + if (!isVisibleEmailDialog) return; + setIsVisibleEmailDialog(false); + }}>

{data.callEmail}

diff --git a/src/pages/DomandaEditPreInstructor/components/RepeaterFields/index.js b/src/pages/DomandaEditPreInstructor/components/RepeaterFields/index.js index 32983d3..7a24f29 100644 --- a/src/pages/DomandaEditPreInstructor/components/RepeaterFields/index.js +++ b/src/pages/DomandaEditPreInstructor/components/RepeaterFields/index.js @@ -1,7 +1,8 @@ -import React, { useMemo, useState, useEffect, useCallback } from 'react'; -import { useForm } from 'react-hook-form'; +import React, { useMemo, useState, useCallback } from 'react'; +import { useForm, useFieldArray } from 'react-hook-form'; import { isEmpty, head } from 'ramda'; import { __ } from '@wordpress/i18n'; +import { klona } from 'klona'; // tools import uniqid from '../../../../helpers/uniqid'; @@ -15,13 +16,11 @@ const RepeaterFields = ({ sourceName, updateFn = () => { }, - defaultValue = [], updateCallbackFn = () => { - } + }, + defaultValue = [], }) => { - const [items, setItems] = useState([]); const [chosen, setChosen] = useState(''); - const [formInitialData, setFormInitialData] = useState({}); const { control, handleSubmit, @@ -29,90 +28,67 @@ const RepeaterFields = ({ setValue, register, trigger, - reset, - watch, - getValues + getValues, + watch } = useForm({ defaultValues: useMemo(() => { - return formInitialData; - }, [formInitialData]), mode: 'onChange' + return { + items: defaultValue || [] + }; + }, [defaultValue]), mode: 'onChange' }); - const watchName = watch('nameValue'); - const watchFile = watch('fileValue'); + const { fields, append, remove } = useFieldArray({ + control, + name: 'items' + }); + + const watchFields = watch('items'); const onSubmit = () => { - }; - - const doUpdateAfterFileUploaded = () => { - trigger(); } - const addNew = useCallback(() => { - setValue('nameValue', ''); - setValue('fileValue', []); - trigger(); + const doUpdateAfterFileUploaded = () => { + const formData = getValues(); + updateFn(formData.items); + updateCallbackFn(formData.items); + } + + const addNew = () => { const uid = uniqid('f'); const newItem = { fieldId: uid, nameValue: '', fileValue: [] } - setItems([...items, newItem]); - setChosen(uid); + append(newItem); + setChosen(newItem.fieldId); trigger(); - }, [items]); + }; const setNewChosen = useCallback((id) => { - const chosenObj = head(items.filter(o => id === o.fieldId)); - setChosen(chosen === id ? '' : id); - reset(); + const chosenObj = head(fields.filter(o => id === o.fieldId)); if (chosenObj) { - setValue('nameValue', chosenObj.nameValue); - setValue('fileValue', chosenObj.fileValue); + setChosen(chosen === id ? '' : id); } - }, [items]); + }, [fields, chosen]); - const removeItem = useCallback((id) => { - setItems([...items.filter(o => id !== o.fieldId)]); - if (chosen === id) { + const removeItem = useCallback((index) => { + const chosenObj = klona(fields[index]); + remove(index); + if (chosen === chosenObj.fieldId) { setChosen(''); - reset(); } - }, [items, chosen]); - - useEffect(() => { - const updatedItems = items.map((o) => { - return o.fieldId === chosen ? { - ...o, - nameValue: watchName - } : o; - }) - setItems([...updatedItems]); - }, [watchName]); - - useEffect(() => { - const updatedItems = items.map((o) => { - return o.fieldId === chosen ? { - ...o, - fileValue: watchFile - } : o; - }); - setItems([...updatedItems]); - }, [watchFile]); - - useEffect(() => { - updateFn(items); - }, [items]); - - useEffect(() => { - setItems(defaultValue); - }, []) + const formData = getValues(); + updateFn(formData.items); + updateCallbackFn(formData.items); + }, [fields, chosen]); return (
- {items - ? items.map(o =>
+ {watchFields + ? watchFields.map((o, index) =>
setNewChosen(o.fieldId)}>{o.nameValue}
+
+ +
- {chosen === o.fieldId - ?
- - -
: null}
) : null} @@ -159,7 +135,7 @@ const RepeaterFields = ({ className="fieldsRepeater__addNew" outlined type="button" - disabled={!isEmpty(chosen.fileId) && (isEmpty(watchName) || isEmpty(watchFile))} + disabled={watchFields && watchFields.filter(o => isEmpty(o.nameValue) || isEmpty(o.fileValue)).length > 0} onClick={addNew} label={__('Aggiungi nuovo file', 'gepafin')} /> diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index 1e2a316..cdc8138 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useRef } from 'react'; +import React, { useState, useEffect, useRef, useCallback } from 'react'; import { __, sprintf } from '@wordpress/i18n'; import { useNavigate, useParams } from 'react-router-dom'; import { is, isEmpty, isNil, sum, pathOr, head } from 'ramda'; @@ -153,7 +153,7 @@ const DomandaEditPreInstructor = () => { updateFlagsForSoccorso(newData); } - const doSaveDraft = (doRedirect = '') => { + const doSaveDraft = useCallback((doRedirect = '') => { const formData = { criteria: klona(data.criteria), checklist: klona(data.checklist), @@ -173,7 +173,7 @@ const DomandaEditPreInstructor = () => { (data) => updateCallback(data, doRedirect), errUpdateCallback ); - } + }, [data]); const updateCallback = (data, doRedirect = '') => { if (data.status === 'SUCCESS') { @@ -605,7 +605,7 @@ const DomandaEditPreInstructor = () => {
-
+ {/*

{__('Documenti di soccorso', 'gepafin')}

{data.amendmentDetails .filter(o => o.amendmentDocuments && !isEmpty(o.amendmentDocuments) @@ -632,7 +632,7 @@ const DomandaEditPreInstructor = () => { name="files" ndg={data.ndg} applicationId={id}/>)} -
+
*/}

{__('Punteggi di valutazione', 'gepafin')}

diff --git a/src/pages/SoccorsoEditPreInstructor/index.js b/src/pages/SoccorsoEditPreInstructor/index.js index f87c683..67689f0 100644 --- a/src/pages/SoccorsoEditPreInstructor/index.js +++ b/src/pages/SoccorsoEditPreInstructor/index.js @@ -36,6 +36,7 @@ const SoccorsoEditPreInstructor = () => { const { id, amendmentId } = useParams(); const navigate = useNavigate(); const [data, setData] = useState({}); + const [isVisibleCloseAmendDialog, setIsVisibleCloseAmendDialog] = useState(false); const [isVisibleExtendTimeDialog, setIsVisibleExtendTimeDialog] = useState(false); const [extendedTime, setExtendedTime] = useState(3); const [isLoadingExtendingTime, setIsLoadingExtendingTime] = useState(false); @@ -63,12 +64,16 @@ const SoccorsoEditPreInstructor = () => { const getCallback = (data) => { if (data.status === 'SUCCESS') { setData(getFormattedData(data.data)); - const formDataInitial = data.data.applicationFormFields.reduce((acc, cur) => { + let formDataInitial = data.data.applicationFormFields.reduce((acc, cur) => { if (cur.fieldValue) { acc[cur.fieldId] = cur.fieldValue; } return acc; }, {}); + formDataInitial = { + ...formDataInitial, + amendmentDocuments: data.amendmentDocuments + } setFormInitialData(formDataInitial); } storeSet.main.unsetAsyncRequest(); @@ -124,6 +129,7 @@ const SoccorsoEditPreInstructor = () => { trigger(); let formValues = klona(getValues()); const newFormValues = Object.keys(formValues) + .filter(v => v !== 'amendmentDocuments') .reduce((acc, cur) => { let fieldVal = formValues[cur]; @@ -136,16 +142,7 @@ const SoccorsoEditPreInstructor = () => { }); return acc; }, []); - const newAmendDocs = data.amendmentDocuments - .reduce((acc, cur) => { - const newObj = { - ...klona(cur), - fileValue: cur.fileValue[0] ? cur.fileValue[0].id : '' - } - - acc.push(newObj); - return acc; - }, []); + const newAmendDocs = formValues.amendmentDocuments.map(o => o.id).join(','); const submitData = { applicationFormFields: newFormValues, @@ -188,8 +185,29 @@ const SoccorsoEditPreInstructor = () => { storeSet.main.unsetAsyncRequest(); } + const openCloseAmendmentDialog = () => { + setIsVisibleCloseAmendDialog(true); + } + + const headerCloseAmendDialog = () => { + return {__('Chiudi Soccorso Istruttorio', 'gepafin')} + } + + const hideCloseAmendDialog = () => { + setIsVisibleCloseAmendDialog(false); + } + + const footerCloseAmendDialog = () => { + return
+
+ } + const doCloseAmendment = () => { - doUpdateAmendment(); const submitData = { internalNote: data.internalNote } @@ -311,7 +329,6 @@ const SoccorsoEditPreInstructor = () => { useEffect(() => { if (formInitialData) { - //reset(); Object.keys(formInitialData).map(k => setValue(k, formInitialData[k])); trigger(); } @@ -324,7 +341,6 @@ const SoccorsoEditPreInstructor = () => { AmendmentsService.getSoccorsoById(getCallback, errGetCallback, [['id', soccorsoEntityId]]); }, [amendmentId]); - console.log('data', data.amendmentDocuments); return (
@@ -432,31 +448,28 @@ const SoccorsoEditPreInstructor = () => {

{__('Documenti aggiuntivi', 'gepafin')}

- {data.id - ? updateNewAmendmentData( - data, - ['amendmentDocuments'] - )} - sourceId={amendmentId} - sourceName="AMENDMENT"/> : null} -
- -
- -
- - updateNewAmendmentData( - e.htmlValue, - ['internalNote'] - )} - style={{ height: 80 * 3, width: '100%' }} +
+ {data.amendmentNotes + ? <> +

{__('Notes', 'gepafin')}

+
+ {renderHtmlContent(data.amendmentNotes)} +
+ : null} +
@@ -469,6 +482,12 @@ const SoccorsoEditPreInstructor = () => {
+
+ + +
+ +
+ + updateNewAmendmentData( + e.htmlValue, + ['internalNote'] + )} + style={{ height: 80 * 3, width: '100%' }} + /> +
+
+
) From 23525141b13b720e0502e57a7523505d2734916f Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Wed, 18 Dec 2024 15:00:17 +0100 Subject: [PATCH 11/37] - saving progress - amendment page works for both instructor and beneficiary; --- src/pages/BandoApplicationPreview/index.js | 1 - .../ElementSettingTableColumns-old/index.js | 94 +++++++++++-------- src/pages/DomandaBeneficiario/index.js | 92 +++++++++--------- .../components/ListOfFiles/index.js | 53 ++++++----- src/pages/DomandaEditPreInstructor/index.js | 30 +++--- .../components/AllDomandeTable/index.js | 12 ++- src/pages/Domande/index.js | 2 +- src/pages/SoccorsoEditPreInstructor/index.js | 20 ++-- 8 files changed, 170 insertions(+), 134 deletions(-) diff --git a/src/pages/BandoApplicationPreview/index.js b/src/pages/BandoApplicationPreview/index.js index 74b79d4..cb19582 100644 --- a/src/pages/BandoApplicationPreview/index.js +++ b/src/pages/BandoApplicationPreview/index.js @@ -266,7 +266,6 @@ const BandoApplicationPreview = () => { {activeStep < totalSteps ?
)} -
{stateFieldData .filter(o => o.predefined) @@ -116,19 +133,22 @@ const ElementSettingTableColumns = ({
- {o.rows.map((c, k) => { - const properIndex = findIndex(propEq(o.name, 'name'))(stateFieldData); + {rowsData.map((c, k) => { return
- {properSubField(c, properIndex, k)} -
})} -
)} diff --git a/src/pages/DomandaBeneficiario/index.js b/src/pages/DomandaBeneficiario/index.js index f35a2b7..1eaece3 100644 --- a/src/pages/DomandaBeneficiario/index.js +++ b/src/pages/DomandaBeneficiario/index.js @@ -78,7 +78,7 @@ const DomandaBeneficiario = () => { }, {}); formDataInitial = { ...formDataInitial, - amendmentDocuments: data.amendmentDocuments + amendmentDocuments: amendmentObj.amendmentDocuments } setFormInitialData(formDataInitial); storeSet.main.unsetAsyncRequest(); @@ -108,7 +108,7 @@ const DomandaBeneficiario = () => { } const getFormattedData = (data) => { - data.submissionDate = is(String, data.submissionDate) ? new Date(data.submissionDate) : (data.submissionDate ? data.submissionDate : ''); + data.evaluationEndDate = is(String, data.evaluationEndDate) ? new Date(data.evaluationEndDate) : (data.evaluationEndDate ? data.evaluationEndDate : ''); data.startDate = is(String, data.startDate) ? new Date(data.startDate) : (data.startDate ? data.startDate : ''); data.expirationDate = is(String, data.expirationDate) ? new Date(data.expirationDate) : (data.expirationDate ? data.expirationDate : ''); return data; @@ -156,13 +156,17 @@ const DomandaBeneficiario = () => { detail: data.message }); } - const newFormDataInitial = data.data.applicationFormFields.reduce((acc, cur) => { + let formDataInitial = data.data.applicationFormFields.reduce((acc, cur) => { if (cur.fieldValue) { acc[cur.fieldId] = cur.fieldValue; } return acc; - }, formInitialData); - setFormInitialData(newFormDataInitial); + }, {}); + formDataInitial = { + ...formDataInitial, + amendmentDocuments: data.data.amendmentDocuments + } + setFormInitialData(formDataInitial); } storeSet.main.unsetAsyncRequest(); } @@ -350,39 +354,42 @@ const DomandaBeneficiario = () => {
: null} -
-

{__('Documenti aggiuntivi', 'gepafin')}

-
-

{__('Notes', 'gepafin')}

-
- updateNewAmendmentData( - e.htmlValue, - 'amendmentNotes' - )} - style={{ height: 80 * 3, width: '100%' }} + {data.id + ?
+

{__('Documenti aggiuntivi', 'gepafin')}

+
+

{__('Notes', 'gepafin')}

+
+ updateNewAmendmentData( + e.htmlValue, + 'amendmentNotes' + )} + style={{ height: 80 * 3, width: '100%' }} + /> +
+
- -
-
+
: null} {data.id ?
@@ -400,12 +407,13 @@ const DomandaBeneficiario = () => { onClick={() => setIsVisibleEmailDialog(true)} label={__('Invia documenti via PEC', 'gepafin')} icon="pi pi-envelope" iconPos="right"/> : null} -
: null} +
{renderHtmlContent(o.label)}
+
+ {o.fileDetail && o.fileDetail.length === 1 + ?
{o.fileDetail && o.fileDetail.length > 1 ?
    { - {/*
    +

    {__('Documenti di soccorso', 'gepafin')}

    {data.amendmentDetails - .filter(o => o.amendmentDocuments && !isEmpty(o.amendmentDocuments) - || o.formFieldDocuments && !isEmpty(o.formFieldDocuments)) .map(o => { - const aDocs = pathOr([],['amendmentDocuments'], o) - .map(o => ({ - id: o.fieldId, - label: o.nameValue, - fileDetail: o.fileValue, - valid: o.valid - })); + const aDocs = pathOr([],['amendmentDocuments'], o); + const aNotes = pathOr('',['amendmentNotes'], o); + const aValid = pathOr(null,['valid'], o); + const aDocsObj = { + id: o.amendmentId, + label: aNotes, + fileDetail: aDocs, + valid: aValid + } const fDocs = pathOr([],['formFieldDocuments'], o); return { - id: o.id, - files: [...aDocs, ...fDocs] + files: [aDocsObj, ...fDocs] } }) - .map(o => )} -
    */} +

    {__('Punteggi di valutazione', 'gepafin')}

    diff --git a/src/pages/Domande/components/AllDomandeTable/index.js b/src/pages/Domande/components/AllDomandeTable/index.js index f4696c1..d7cdd41 100644 --- a/src/pages/Domande/components/AllDomandeTable/index.js +++ b/src/pages/Domande/components/AllDomandeTable/index.js @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import { __ } from '@wordpress/i18n'; import { is, uniq } from 'ramda'; -import { Link } from 'react-router-dom'; +import { Link, useLocation } from 'react-router-dom'; // api import ApplicationService from '../../../../service/application-service'; @@ -21,6 +21,7 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => { const [filters, setFilters] = useState(null); const [localAsyncRequest, setLocalAsyncRequest] = useState(false); const [, setStatuses] = useState([]); + const location = useLocation(); useEffect(() => { setLocalAsyncRequest(true); @@ -113,14 +114,15 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => { const actionsBodyTemplate = (rowData) => { return
    - {openDialogFn + {openDialogFn && rowData.applicationStatus === 'SUBMIT' ?
    -
    -

    {__('Documenti di soccorso', 'gepafin')}

    - {data.amendmentDetails - .map(o => { - const aDocs = pathOr([],['amendmentDocuments'], o); - const aNotes = pathOr('',['amendmentNotes'], o); - const aValid = pathOr(null,['valid'], o); - const aDocsObj = { - id: o.amendmentId, - label: aNotes, - fileDetail: aDocs, - valid: aValid - } - const fDocs = pathOr([],['formFieldDocuments'], o); - - return { - files: [aDocsObj, ...fDocs] - } - }) - .map((o, i) => +

    {__('Documenti di soccorso', 'gepafin')}

    + )} -
    + applicationId={id}/> + : null}

    {__('Punteggi di valutazione', 'gepafin')}

    @@ -749,14 +787,14 @@ const DomandaEditPreInstructor = () => { onClick={() => doSaveDraft()} label={__('Crea valutazione', 'gepafin')} icon="pi pi-save" iconPos="right"/>} - {APP_EVALUATION_FLOW_ID === '1' && ['EVALUATION'].includes(data.applicationStatus) + {/*{APP_EVALUATION_FLOW_ID === '1' && ['EVALUATION'].includes(data.applicationStatus) ?
    diff --git a/src/pages/Domande/components/AllDomandeTable/index.js b/src/pages/Domande/components/AllDomandeTable/index.js index d7cdd41..7c751bf 100644 --- a/src/pages/Domande/components/AllDomandeTable/index.js +++ b/src/pages/Domande/components/AllDomandeTable/index.js @@ -114,7 +114,7 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => { const actionsBodyTemplate = (rowData) => { return
    - {openDialogFn && rowData.applicationStatus === 'SUBMIT' + {openDialogFn && rowData.status === 'SUBMIT' ?
    @@ -762,7 +766,8 @@ const DomandaEditPreInstructor = () => { {['EVALUATION', 'SOCCORSO', 'CLOSE'].includes(data.applicationStatus) ? + ; + }; + + const roleBodyTemplate = (rowData) => { + return rowData.role.roleName; + }; + + const statusBodyTemplate = (rowData) => { + return ; + }; + + const statusFilterTemplate = (options) => { + return options.filterCallback(e.value, options.index)} + itemTemplate={statusItemTemplate} placeholder={__('Scegli uno', 'gepafin')} + className="p-column-filter" + showClear/>; + }; + + const statusItemTemplate = (option) => { + return ; + }; + + const actionsBodyTemplate = (rowData) => { + return + : null} {!isEmpty(chosenCompanyId) && chosenCompanyId !== 0 && data.confidi + && (data.id !== 6 || (data.id === 6 && REACT_APP_HUB_ID !== 'p4lk3bcx1RStqTaIVVbXs')) ? : null} @@ -229,4 +233,4 @@ const AllBandiAccordion = ({ showOnlyPreferred = false }) => { ) } -export default AllBandiAccordion; \ No newline at end of file +export default AllBandiAccordion; diff --git a/src/pages/BandoViewBeneficiario/index.js b/src/pages/BandoViewBeneficiario/index.js index f717c67..66209f8 100644 --- a/src/pages/BandoViewBeneficiario/index.js +++ b/src/pages/BandoViewBeneficiario/index.js @@ -116,7 +116,16 @@ const BandoViewBeneficiario = () => { const submitApplication = () => { if (data.confidi) { - displayConfidiPopup(); + if (data.id === 6 && REACT_APP_HUB_ID === 'p4lk3bcx1RStqTaIVVbXs') { + if (applicationObj && applicationObj.id) { + navigate(`/imieibandi/${applicationObj.id}`); + } else { + const bandoId = getBandoId(); + ApplicationService.createApplication(bandoId, {}, createApplCallback, errCreateApplCallback, [['companyId', chosenCompanyId]]); + } + } else { + displayConfidiPopup(); + } } else { if (REACT_APP_HUB_ID === 't7jh5wfg9QXylNaTZkPoE') { const bandoId = getBandoId(); From bb983feb1248bc1c5ff6d380ef77c7e38b6da9aa Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Tue, 24 Dec 2024 14:50:20 +0100 Subject: [PATCH 19/37] - added sidebar container for notifications; - styles and interactions for notifications; --- .../scss/components/notificationsSidebar.scss | 55 ++++++++ src/assets/scss/theme.scss | 3 +- .../components/NotificationItem/index.js | 19 +++ .../NotificationItemChosen/index.js | 22 ++++ src/components/NotificationsSidebar/index.js | 121 ++++++++++++++++++ .../components/AppTopbar/index.js | 24 +--- 6 files changed, 224 insertions(+), 20 deletions(-) create mode 100644 src/assets/scss/components/notificationsSidebar.scss create mode 100644 src/components/NotificationsSidebar/components/NotificationItem/index.js create mode 100644 src/components/NotificationsSidebar/components/NotificationItemChosen/index.js create mode 100644 src/components/NotificationsSidebar/index.js diff --git a/src/assets/scss/components/notificationsSidebar.scss b/src/assets/scss/components/notificationsSidebar.scss new file mode 100644 index 0000000..2bc2eb8 --- /dev/null +++ b/src/assets/scss/components/notificationsSidebar.scss @@ -0,0 +1,55 @@ +.notificationsIcon { + &:hover { + cursor: pointer; + } +} + +.notificationsSidebar { + max-width: 360px; + width: 100%; +} + +.notificationsSidebar__loading { + padding: 30px 0; + display: flex; + justify-content: center; + flex-direction: column; + align-items: center; + gap: 10px; +} + +.notificationsSidebar__list { + display: flex; + flex-direction: column; + gap: 5px; + list-style: none; + padding: 0; +} + +.notificationsSidebar__listItem { + display: flex; + justify-content: space-between; + align-items: center; + gap: 5px; + padding: 15px 0; + border-bottom: 1px solid #e7e7e7; + + &:hover { + cursor: pointer; + color: var(--primary-text); + } +} + +.notificationsSidebar__listItemContent { + display: flex; + flex-direction: column; + gap: 5px; + font-size: 14px; +} + +.notificationsSidebar__listItemChosen { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 5px; +} diff --git a/src/assets/scss/theme.scss b/src/assets/scss/theme.scss index 4ad1ef5..2b48f72 100644 --- a/src/assets/scss/theme.scss +++ b/src/assets/scss/theme.scss @@ -44,4 +44,5 @@ @import "./components/error404.scss"; @import "./components/myTable.scss"; @import "./components/evaluation.scss"; -@import "./components/fieldsRepeater.scss"; \ No newline at end of file +@import "./components/fieldsRepeater.scss"; +@import "./components/notificationsSidebar.scss"; diff --git a/src/components/NotificationsSidebar/components/NotificationItem/index.js b/src/components/NotificationsSidebar/components/NotificationItem/index.js new file mode 100644 index 0000000..df13bc0 --- /dev/null +++ b/src/components/NotificationsSidebar/components/NotificationItem/index.js @@ -0,0 +1,19 @@ +import React from 'react'; + +const NotificationItem = ({ item, clickFn }) => { + const handleClick = () => { + clickFn(item.id); + } + + return ( +
  • +
    + {item.title} + {item.createdDate} +
    + +
  • + ) +} + +export default NotificationItem; diff --git a/src/components/NotificationsSidebar/components/NotificationItemChosen/index.js b/src/components/NotificationsSidebar/components/NotificationItemChosen/index.js new file mode 100644 index 0000000..4821df3 --- /dev/null +++ b/src/components/NotificationsSidebar/components/NotificationItemChosen/index.js @@ -0,0 +1,22 @@ +import React from 'react'; +import { __ } from '@wordpress/i18n'; +import { Button } from 'primereact/button'; + +const NotificationItemChosen = ({ item, closeFn }) => { + return ( +
    +
    + ) +} + +export default NotificationItemChosen; diff --git a/src/components/NotificationsSidebar/index.js b/src/components/NotificationsSidebar/index.js new file mode 100644 index 0000000..55b08f5 --- /dev/null +++ b/src/components/NotificationsSidebar/index.js @@ -0,0 +1,121 @@ +import React, { useEffect, useState } from 'react'; +import { __ } from '@wordpress/i18n'; +import { head, isEmpty } from 'ramda'; + +// components +import { Badge } from 'primereact/badge'; +import { Sidebar } from 'primereact/sidebar'; +import { TabPanel, TabView } from 'primereact/tabview'; +import NotificationItem from './components/NotificationItem'; +import NotificationItemChosen from './components/NotificationItemChosen'; + +const NotificationsSidebar = () => { + const [activeIndex, setActiveIndex] = useState(0); + const [loading, setLoading] = useState(false); + const [notificationsVisible, setNotificationsVisible] = useState(false); + const [notifications, setNotifications] = useState([]); + const [notificationsRead, setNotificationsRead] = useState([]); + const [chosenMsg, setChosenMsg] = useState({}); + + // Handle tab change + const handleTabChange = (e) => { + setActiveIndex(e.index); + fetchTabData(e.index); + }; + + const fetchTabData = (index) => { + setChosenMsg({}); + console.log('fetchTabData', index); + setLoading(true); + setTimeout(() => { + setLoading(false); + }, 7000) + } + + const chooseNotification = (id) => { + const properItems = activeIndex === 0 ? notifications : notificationsRead; + const chosen = head(properItems.filter(o => o.id === id)); + if (chosen) { + setChosenMsg(chosen); + } + } + + const closeChosenMsg = () => { + setChosenMsg({}); + } + + useEffect(() => { + setNotifications(() => { + const msg = { + 'id': 35, + 'createdDate': '2024-12-23T14:55:27.278103', + 'updatedDate': '2024-12-23T14:55:27.278103', + 'userId': 30, + 'title': 'Il Risultato della Valutazione per la Richiesta È Disponibile', + 'message': 'Il risultato della valutazione per la richiesta ai sensi del protocollo n. 10000015 è ora disponibile.', + 'status': 'UNREAD', + 'companyId': 103, + 'redirectUrl': 'EVALUATION_RESULT', + 'notificationType': 'EVALUATION_RESULT' + }; + return Array.from({ length: 33 }, (_, index) => ({ + ...msg, + id: msg.id + index + })); + }) + }, []); + + return ( + <> + setNotificationsVisible(true)}> + + + setNotificationsVisible(false)}> + + + {loading + ?
    + +
    + : !isEmpty(chosenMsg) + ? + : (notifications.length > 0 + ?
      + {notifications.map(o => )} +
    + :
    + + {__('Vuoto', 'gepafin')} +
    )} +
    + + {loading + ?
    + +
    + : !isEmpty(chosenMsg) + ? + : (notificationsRead.length > 0 + ?
      + {notificationsRead.map(o => )} +
    + : +
    + + {__('Vuoto', 'gepafin')} +
    )} +
    +
    +
    + + ) +} + +export default NotificationsSidebar; diff --git a/src/layouts/DefaultLayout/components/AppTopbar/index.js b/src/layouts/DefaultLayout/components/AppTopbar/index.js index 27c3a6b..8bb75b4 100644 --- a/src/layouts/DefaultLayout/components/AppTopbar/index.js +++ b/src/layouts/DefaultLayout/components/AppTopbar/index.js @@ -1,4 +1,4 @@ -import React, { useRef, useState } from 'react'; +import React, { useRef } from 'react'; import { __ } from '@wordpress/i18n'; // components @@ -8,14 +8,12 @@ import LogoIcon from '../../../../icons/LogoIcon'; import { IconField } from 'primereact/iconfield'; import { InputIcon } from 'primereact/inputicon'; import { InputText } from 'primereact/inputtext'; -import { Badge } from 'primereact/badge'; import { Button } from 'primereact/button'; import TopBarProfileMenu from '../../../../components/TopBarProfileMenu'; -import { Sidebar } from 'primereact/sidebar'; +import NotificationsSidebar from '../../../../components/NotificationsSidebar'; const AppTopbar = () => { const menuLeft = useRef(null); - const [notificationsVisible, setNotificationsVisible] = useState(false); const startContent = @@ -26,14 +24,13 @@ const AppTopbar = () => { - - - + {/* */} + + + + + + + + + + + + ); + }; + + const header = renderHeader(); + + const updateEvaluationValue = (value, path, maxValue = null) => { + let finalValue = value; + + if (maxValue || maxValue === 0) { + finalValue = value > maxValue ? maxValue : value; + } + + const newData = wrap(data).set(path, finalValue).value(); + setData(newData); + updateFlagsForSoccorso(newData); + } + + const doSaveDraft = useCallback((doRedirect = '') => { + const formData = { + criteria: klona(data.criteria), + checklist: klona(data.checklist), + files: klona(data.files), + evaluationDocument: klona(data.evaluationDocument.map(o => ({ + ...o, + fileValue: o.fileValue[0] ? o.fileValue[0].id : '' + }) + )), + amendmentDetails: klona(data.amendmentDetails), + note: data.note + } + + ApplicationEvaluationService.updateEvaluation( + data.assignedApplicationId, + formData, + (data) => updateCallback(data, doRedirect), + errUpdateCallback + ); + }, [data]); + + const updateCallback = (data, doRedirect = '') => { + if (data.status === 'SUCCESS') { + setData(getFormattedData(data.data)); + if (toast.current) { + toast.current.show({ + severity: 'success', + summary: '', + detail: data.message + }); + } + if (!isEmpty(doRedirect)) { + navigate(doRedirect); + } + } + storeSet.main.unsetAsyncRequest(); + } + + const errUpdateCallback = (data) => { + if (toast.current && data.message) { + toast.current.show({ + severity: 'error', + summary: '', + detail: data.message + }); + } + set404FromErrorResponse(data); + storeSet.main.unsetAsyncRequest(); + } + + const doApprove = () => { + const formData = { + applicationStatus: 'APPROVED', + criteria: klona(data.criteria), + checklist: klona(data.checklist), + files: klona(data.files), + note: data.note, + motivation + } + + setIsVisibleCompleteDialog(false); + ApplicationEvaluationService.updateEvaluation(data.assignedApplicationId, formData, updateStatusCallback, errUpdateStatusCallback); + } + + const doReject = () => { + const formData = { + applicationStatus: 'REJECTED', + criteria: klona(data.criteria), + checklist: klona(data.checklist), + files: klona(data.files), + note: data.note, + motivation + } + + setIsVisibleCompleteDialog(false); + ApplicationEvaluationService.updateEvaluation(data.assignedApplicationId, formData, updateStatusCallback, errUpdateStatusCallback); + } + + const updateStatusCallback = (data) => { + if (data.status === 'SUCCESS') { + setData(getFormattedData(data.data)); + if (toast.current) { + toast.current.show({ + severity: 'success', + summary: '', + detail: data.message + }); + } + } + storeSet.main.unsetAsyncRequest(); + } + + const errUpdateStatusCallback = (data) => { + if (toast.current && data.message) { + toast.current.show({ + severity: 'error', + summary: '', + detail: data.message + }); + } + set404FromErrorResponse(data); + storeSet.main.unsetAsyncRequest(); + } + + const displayCriterionData = (id) => { + const criterion = head(data.criteria.filter(o => o.id === id)); + setCriterionDataTitle(criterion.label); + const content =
    +

    {__('I campi correlati')}

    + {criterion.criteriaMappedFields ? criterion.criteriaMappedFields.map(o => criteriaDataItem(o)) : null} +
    ; + setCriterionDataContent(content); + setIsVisibleCriterionData(id); + } + + const criteriaDataItem = (item) => { + let content = ''; + + switch (item.fieldName) { + case 'fileupload' : + content =
      + {item.fieldValue + ? item.fieldValue.map(o =>
    • + {o.filePath ? {o.name} : null} +
    • ) + : null} +
    ; + break; + case 'table' : + const th = Object.keys(item.fieldValue[0]); + content = + + + {th.map(v => )} + + + + {item.fieldValue + ? item.fieldValue.map((o, i) => + {Object.values(o).map(v => )} + ) + : null} + +
    {v}
    {v}
    ; + break; + default : + content = item.fieldValue; + break; + } + + return
    + {item.fieldLabel} + {content} +
    + } + + const hideCriterionData = () => { + setIsVisibleCriterionData(0); + setCriterionDataTitle(''); + setCriterionDataContent(''); + } + + const getAmendmentsCallback = (data) => { + if (data.status === 'SUCCESS') { + if (data.data.length) { + setConnectedSoccorsoId(data.data[0].id); + } + } + } + + const errGetAmendmentsCallback = () => { + if (toast.current && data.message) { + toast.current.show({ + severity: 'error', + summary: '', + detail: data.message + }); + } + set404FromErrorResponse(data); + } + + const shouldDisableField = (fieldName) => { + return !['EVALUATION'].includes(data.applicationStatus) + || (['ADMISSIBLE'].includes(data.applicationStatus) && fieldName !== 'criteria') + } + + const headerCompleteDialog = () => { + return 'approve' === operationType + ? {__('Confermare l\'approvazione', 'gepafin')} + : {__('Confermare il rifiuto', 'gepafin')}; + } + + const hideCompleteDialog = () => { + setIsVisibleCompleteDialog(false); + setOperationType(''); + setMotivation(''); + } + + const footerCompleteDialog = () => { + return
    +
    + } + + const initiateApproving = () => { + setOperationType('approve'); + setIsVisibleCompleteDialog(true); + + } + + const initiateRejecting = () => { + setOperationType('reject'); + setIsVisibleCompleteDialog(true); + } + + const doCheckNDG = () => { + storeSet.main.setAsyncRequest(); + doSaveDraft(); + setTimeout(() => { + AppointmentService.getNdg(id, getNdgCallback, errGetNdgCallback); + }, 100); + } + + const getNdgCallback = (data) => { + if (data.status === 'SUCCESS') { + if (toast.current && data.message) { + toast.current.show({ + severity: 'success', + summary: '', + detail: data.message + }); + } + } + storeSet.main.unsetAsyncRequest(); + } + + const errGetNdgCallback = (data) => { + if (toast.current && data.message) { + toast.current.show({ + severity: data.status === 'SUCCESS' ? 'info' : 'error', + summary: '', + detail: data.message + }); + } + set404FromErrorResponse(data); + storeSet.main.unsetAsyncRequest(); + } + + const doCreateAppointment = () => { + setAppointmentData({ + title: '', + text: '', + duration: 0, + amount: 0 + }); + setIsVisibleAppointmentDialog(true); + } + + const setValue = (name, value) => { + const newData = wrap(appointmentData).set(name, value).value(); + setAppointmentData(newData); + } + + const headerAppointmentDialog = () => { + return {__('Crea appuntamento', 'gepafin')}; + } + + const hideAppointmentDialog = () => { + setIsVisibleAppointmentDialog(false); + setAppointmentData({}); + } + + const footerAppointmentDialog = () => { + return
    +
    + } + + const doCreateAppointmentRequest = () => { + if ( + !isEmpty(appointmentData.title) && !isEmpty(appointmentData.text) && !isEmpty(appointmentData.amount) + && !isEmpty(appointmentData.duration) && appointmentData.duration !== 0 && appointmentData.amount !== 0 + ) { + storeSet.main.setAsyncRequest(); + const submitData = { + 'importoBreveTermine': appointmentData.amount, + 'durataMesiFinanziamento': appointmentData.duration, + 'nota': { + 'titolo': appointmentData.title, + 'testo': appointmentData.text + } + } + + AppointmentService.createAppointment(id, submitData, getAppointemntCallback, errGetAppointemntCallback); + } + } + + const getAppointemntCallback = (data) => { + if (data.status === 'SUCCESS') { + if (toast.current && data.message) { + toast.current.show({ + severity: 'success', + summary: '', + detail: data.message + }); + } + } + setIsVisibleAppointmentDialog(false); + storeSet.main.unsetAsyncRequest(); + } + + const errGetAppointemntCallback = (data) => { + if (toast.current && data.message) { + toast.current.show({ + severity: data.status === 'SUCCESS' ? 'info' : 'error', + summary: '', + detail: data.message + }); + } + setIsVisibleAppointmentDialog(false); + set404FromErrorResponse(data); + storeSet.main.unsetAsyncRequest(); + } + + const doMakeAdmisible = () => { + // TODO + } + + const evaluationShouldBeBlocked = (data = {}) => { + const userData = storeGet.main.userData() + return isAsyncRequest || userData.id !== data.assignedUserId; + } + + useEffect(() => { + const maxScore = pathOr(0, ['minScore'], data); + const criteria = pathOr([], ['criteria'], data); + const scoreSum = sum(criteria.map(o => o.score)); + + setIsAdmissible(scoreSum !== 0 && scoreSum >= maxScore); + }, [data]); + + useEffect(() => { + const parsed = parseInt(id) + const entityId = !isNaN(parsed) ? parsed : 0; + + storeSet.main.setAsyncRequest(); + ApplicationEvaluationService.getEvaluationByApplId(getCallback, errGetCallback, [ + ['applicationId', entityId] + ]); + AmendmentsService.getSoccorsoByApplId(entityId, getAmendmentsCallback, errGetAmendmentsCallback, [ + ['statuses', 'AWAITING'] + ]); + }, [id]); + + return ( +
    +
    +

    {__('Valuta domanda', 'gepafin')}

    +
    + +
    + + +
    +
    + +
    + + {!isAsyncRequest && !isEmpty(data) + ?
    +
    +

    + {__('ID domanda', 'gepafin')} + {data.applicationId} +

    +

    + {__('Protocollo', 'gepafin')} + {data.protocolNumber} +

    +

    + {__('NDG', 'gepafin')} + {data.ndg} +

    +

    + {__('Appuntamento', 'gepafin')} + {data.appointmentId} +

    +

    + {__('Bando', 'gepafin')} + {data.callName} +

    +

    + {__('Referente Aziendale', 'gepafin')} + {data.beneficiary} +

    +

    + {__('Azienda Beneficiaria', 'gepafin')} + {data.companyName} +

    +

    + {__('Data ricezione', 'gepafin')} + {getDateFromISOstring(data.submissionDate)} +

    +

    + {__('Data assegnazione', 'gepafin')} + {getDateFromISOstring(data.assignedAt)} +

    +

    + {__('Scadenza Valutazione', 'gepafin')} + {getDateFromISOstring(data.evaluationEndDate)} +

    +

    + {__('Stato', 'gepafin')} + {getBandoLabel(data.applicationStatus)} +

    +
    + +
    +

    {__('Scarica documenti della domanda', 'gepafin')}

    +
    + + + +
    +
    + +
    +

    {__('Documenti aggiuntivi', 'gepafin')}

    + updateEvaluationValue( + data, + ['evaluationDocument'] + )} + shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationShouldBeBlocked(data)} + sourceId={data.assignedApplicationId} + sourceName="evaluation"/> +
    + +
    +

    {__('Checklist Valutazione', 'gepafin')}

    +
    +
    +

    {__('Lista', 'gepafin')}

    +
    +
    + {data.checklist.map((o, i) =>
    + updateEvaluationValue( + e.checked, + ['checklist', i, 'valid'] + )} + checked={o.valid}> + +
    )} +
    +
    + +

    {__('Note', 'gepafin')}

    +
    + updateEvaluationValue( + e.htmlValue, + ['note'] + )} + style={{ height: 80 * 3, width: '100%' }} + /> +
    +
    +
    +

    {__('Documenti allegati', 'gepafin')}

    + shouldDisableField(name) || evaluationShouldBeBlocked(data)} + name="files" + ndg={data.ndg} + applicationId={id}/> +
    +
    +
    + + {!isEmpty(data.amendmentDetails) + ?
    +

    {__('Documenti di soccorso', 'gepafin')}

    + shouldDisableField(name) || evaluationShouldBeBlocked(data)} + name="amendmentDetails" + ndg={data.ndg} + applicationId={id}/> +
    : null} + +
    +

    {__('Punteggi di valutazione', 'gepafin')}

    + {data.criteria + ? + + + + + + + + + {data.criteria.map((o, i) => + + + + )} + + + + + + + + + + + +
    {__('Parametro', 'gepafin')}{__('Punteggio', 'gepafin')}{__('Stato', 'gepafin')}
    {o.label} +
    + updateEvaluationValue( + e.value, + ['criteria', i, 'score'], + o.criteria + )}/> + + / {o.maxScore} + +
    +
    +
    + {!isEmpty(o.criteriaMappedFields) + ?
    +
    {__('Punteggio:', 'gepafin')}{sum(data.criteria.map(o => o.score))} + {isAdmissible + ? : null} + {!isAdmissible + ? : null} +
    {sprintf(__('Punteggio minimo per l\'ammissione: %d'), data.minScore)}
    : null} +
    + +
    + +
    + {__('Azioni rapide', 'gepafin')} +
    + +
    +
    + {['EVALUATION', 'SOCCORSO', 'CLOSE'].includes(data.applicationStatus) + ?
    +
    + + + {criterionDataContent} + + + +
    + + setMotivation(e.htmlValue)} + style={{ height: 80 * 3, width: '100%' }} + /> +
    +
    + + +
    + + setValue('amount', e.value)}/> +
    +
    + + setValue('duration', e.value)}/> +
    +
    + + setValue('title', e.target.value)}/> +
    +
    + + setValue('text', e.target.value)} + rows={3} + cols={30}/> +
    +
    + +
    + : <> + + + + + + + + + } +
    + ) + +} + +export default DomandaEditPreInstructor; diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index df7742c..9c2c517 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -568,11 +568,11 @@ const DomandaEditPreInstructor = () => { {data.callName}

    - {__('Beneficiario', 'gepafin')} + {__('Referente Aziendale', 'gepafin')} {data.beneficiary}

    - {__('Azienda', 'gepafin')} + {__('Azienda Beneficiaria', 'gepafin')} {data.companyName}

    @@ -934,4 +934,4 @@ const DomandaEditPreInstructor = () => { } -export default DomandaEditPreInstructor; \ No newline at end of file +export default DomandaEditPreInstructor; diff --git a/src/pages/Domande/components/AllDomandeTable/index.js b/src/pages/Domande/components/AllDomandeTable/index.js index 8505ff8..6159a66 100644 --- a/src/pages/Domande/components/AllDomandeTable/index.js +++ b/src/pages/Domande/components/AllDomandeTable/index.js @@ -139,7 +139,7 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => { ? - ; - }; - - const roleBodyTemplate = (rowData) => { - return rowData.role.roleName; - }; - - const statusBodyTemplate = (rowData) => { - return ; - }; - - const statusFilterTemplate = (options) => { - return options.filterCallback(e.value, options.index)} - itemTemplate={statusItemTemplate} placeholder={__('Scegli uno', 'gepafin')} - className="p-column-filter" - showClear/>; - }; - - const statusItemTemplate = (option) => { - return ; - }; - - const actionsBodyTemplate = (rowData) => { - return -