From 3ff69de35d7f42dc7ccbb519debf41bd9d7b0e22 Mon Sep 17 00:00:00 2001
From: Vitalii Kiiko
Date: Fri, 27 Dec 2024 14:38:06 +0100
Subject: [PATCH] - fixed access for evaluation page; - changed labels;
---
src/assets/scss/components/appPage.scss | 23 +-
.../DomandaEditInstructorManager/index.js | 961 ++++++++++++++++++
src/pages/DomandaEditPreInstructor/index.js | 6 +-
.../components/AllDomandeTable/index.js | 14 +-
.../BeneficiarioDomandeTable/index.js | 4 +-
src/pages/SoccorsoAddPreInstructor/index.js | 4 +-
src/pages/SoccorsoEditBeneficiario/index.js | 8 +-
src/pages/SoccorsoEditPreInstructor/index.js | 2 +-
.../PreInstructorSoccorsiTable/index.js | 6 +-
src/routes.js | 7 +
10 files changed, 1002 insertions(+), 33 deletions(-)
create mode 100644 src/pages/DomandaEditInstructorManager/index.js
diff --git a/src/assets/scss/components/appPage.scss b/src/assets/scss/components/appPage.scss
index 9d3de37..7d782b3 100644
--- a/src/assets/scss/components/appPage.scss
+++ b/src/assets/scss/components/appPage.scss
@@ -11,7 +11,7 @@
font-weight: 600;
line-height: normal;
}
-
+
.appPageLogin__wrapper {
h1 {
text-align: center;
@@ -89,6 +89,7 @@
}
.appPageSection {
+ position: relative;
display: flex;
flex-direction: column;
align-items: flex-start;
@@ -99,7 +100,7 @@
gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
width: 100%;
-
+
/*> div {
max-width: 50%;
}*/
@@ -130,7 +131,7 @@
padding: 5px 0;
width: 100%;
}
-
+
.col {
display: flex;
flex-direction: column;
@@ -188,7 +189,7 @@
ul, ol {
padding-left: 1rem;
-
+
li {
color: var(--global-textColor);
}
@@ -217,7 +218,7 @@
.appPageSection__pMeta {
margin-bottom: 1em;
-
+
span:nth-of-type(1) {
max-width: 30%;
}
@@ -263,7 +264,7 @@
display: flex;
flex-direction: column;
gap: 1.2rem;
-
+
div {
display: flex;
gap: 0.5rem;
@@ -294,11 +295,11 @@
color: var(--message-info-color);
border-color: var(--message-info-color);
}
-
+
.summary {
font-weight: bold;
}
-
+
a {
color: inherit;
}
@@ -401,7 +402,7 @@
gap: 10px;
align-items: center;
flex-wrap: wrap;
-
+
&.lessGap {
gap: 12px;
}
@@ -418,7 +419,7 @@
background-color: transparent;
color: var(--global-textColor);
padding: 0;
-
+
&:hover {
cursor: pointer;
color: var(--message-info-color);
@@ -440,4 +441,4 @@
grid-template-columns: 1fr;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/pages/DomandaEditInstructorManager/index.js b/src/pages/DomandaEditInstructorManager/index.js
new file mode 100644
index 0000000..589dab1
--- /dev/null
+++ b/src/pages/DomandaEditInstructorManager/index.js
@@ -0,0 +1,961 @@
+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';
+import { klona } from 'klona';
+import { wrap } from 'object-path-immutable';
+
+// store
+import { storeGet, storeSet, useStore } from '../../store';
+
+// api
+import ApplicationEvaluationService from '../../service/application-evaluation-service';
+import AmendmentsService from '../../service/amendments-service';
+import AppointmentService from '../../service/appointment-service';
+
+// tools
+import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
+import getBandoLabel from '../../helpers/getBandoLabel';
+import getDateFromISOstring from '../../helpers/getDateFromISOstring';
+
+// components
+import { Skeleton } from 'primereact/skeleton';
+import { Button } from 'primereact/button';
+import { Tag } from 'primereact/tag';
+import { Checkbox } from 'primereact/checkbox';
+import { Editor } from 'primereact/editor';
+import { InputNumber } from 'primereact/inputnumber';
+import { Toast } from 'primereact/toast';
+import { Dialog } from 'primereact/dialog';
+import HelpIcon from '../../icons/HelpIcon';
+import BlockingOverlay from '../../components/BlockingOverlay';
+import { classNames } from 'primereact/utils';
+import { InputTextarea } from 'primereact/inputtextarea';
+import { InputText } from 'primereact/inputtext';
+import DownloadApplicationArchive from '../DomandaEditPreInstructor/components/DownloadApplicationArchive';
+import DownloadCompanyDelegation from '../DomandaEditPreInstructor/components/DownloadCompanyDelegation';
+import DownloadSignedApplication from '../DomandaEditPreInstructor/components/DownloadSignedApplication';
+import ListOfFiles from '../DomandaEditPreInstructor/components/ListOfFiles';
+import RepeaterFields from '../DomandaEditPreInstructor/components/RepeaterFields';
+
+const APP_EVALUATION_FLOW_ID = process.env.REACT_APP_EVALUATION_FLOW_ID;
+
+const DomandaEditPreInstructor = () => {
+ const isAsyncRequest = useStore().main.isAsyncRequest();
+ const { id } = useParams();
+ const navigate = useNavigate();
+ const [data, setData] = useState({});
+ const [isVisibleCriterionData, setIsVisibleCriterionData] = useState(0);
+ const [criterionDataTitle, setCriterionDataTitle] = useState('');
+ const [criterionDataContent, setCriterionDataContent] = useState('');
+ const [isAdmissible, setIsAdmissible] = useState(false);
+ const [connectedSoccorsoId, setConnectedSoccorsoId] = useState(0);
+ const toast = useRef(null);
+ const [loading, setLoading] = useState(false);
+ const [isVisibleCompleteDialog, setIsVisibleCompleteDialog] = useState(false);
+ const [operationType, setOperationType] = useState('');
+ const [motivation, setMotivation] = useState('');
+ const [isVisibleAppointmentDialog, setIsVisibleAppointmentDialog] = useState(false);
+ const [allFilesRated, setAllFilesRated] = useState(false);
+ const [atLeastOneChecked, setAtLeastOneChecked] = useState(false);
+ const [allChecksChecked, setAllChecksChecked] = useState(false);
+ const [appointmentData, setAppointmentData] = useState({
+ title: '',
+ text: '',
+ duration: 0,
+ amount: 0
+ });
+
+ const goToEvaluationsPage = () => {
+ navigate('/domande');
+ }
+
+ const updateFlagsForSoccorso = (data) => {
+ let nonRatedFilesLength = 0;
+
+ if (data.files) {
+ const nonRatedFiles = data.files
+ .map(el => el.valid)
+ .filter(v => isNil(v));
+ nonRatedFilesLength = nonRatedFiles.length;
+ }
+
+ if (data.amendmentDetails) {
+ const nonRatedFiles = data.amendmentDetails
+ .map(el => el.valid)
+ .filter(v => isNil(v));
+ nonRatedFilesLength = nonRatedFiles.length;
+ }
+
+ setAllFilesRated(nonRatedFilesLength === 0);
+
+ if (data.checklist) {
+ const checkedChecklistItems = data.checklist
+ .map(el => el.valid)
+ .filter(v => v);
+ setAtLeastOneChecked(checkedChecklistItems.length > 0);
+ setAllChecksChecked(checkedChecklistItems.length === data.checklist.length)
+ }
+ }
+
+ const doNewSoccorso = () => {
+ if (connectedSoccorsoId !== 0) {
+ navigate(`/domande/${id}/soccorso/${connectedSoccorsoId}`);
+ } else {
+ doSaveDraft(`/domande/${id}/aggiungi-soccorso/`)
+ }
+ }
+
+ const getCallback = (data) => {
+ if (data.status === 'SUCCESS') {
+ setData(getFormattedData(data.data));
+ setMotivation(data.data.motivation);
+ updateFlagsForSoccorso(data.data);
+ }
+ storeSet.main.unsetAsyncRequest();
+ }
+
+ const errGetCallback = (data) => {
+ if (toast.current && data.message) {
+ toast.current.show({
+ severity: 'error',
+ summary: '',
+ detail: data.message
+ });
+ }
+ set404FromErrorResponse(data);
+ storeSet.main.unsetAsyncRequest();
+ }
+
+ const getFormattedData = (data) => {
+ data.submissionDate = is(String, data.submissionDate) ? new Date(data.submissionDate) : (data.submissionDate ? data.submissionDate : '');
+ data.evaluationDate = is(String, data.evaluationDate) ? new Date(data.evaluationDate) : (data.evaluationDate ? data.evaluationDate : '');
+ return data;
+ };
+
+ const renderHeader = () => {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ };
+
+ 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 => | {v} | )}
+
+
+
+ {item.fieldValue
+ ? item.fieldValue.map((o, i) =>
+ {Object.values(o).map(v => | {v} | )}
+
)
+ : null}
+
+
;
+ 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
+ ?
+
+
+ | {__('Parametro', 'gepafin')} |
+ {__('Punteggio', 'gepafin')} |
+ {__('Stato', 'gepafin')} |
+
+
+
+ {data.criteria.map((o, i) =>
+ | {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)
+ ?
+ {data.applicationStatus === 'EVALUATION'
+ ? __('Richiedi Soccorso Istruttorio', 'gepafin')
+ : __('Apri Soccorso Istruttorio', 'gepafin')}
+
+
+
+ >}
+ /> : null}
+ {data.id
+ ? doSaveDraft()}
+ outlined
+ label={__('Salva bozza valutazione', 'gepafin')}
+ icon="pi pi-save" iconPos="right"/>
+ : doSaveDraft()}
+ label={__('Crea valutazione', 'gepafin')}
+ icon="pi pi-save" iconPos="right"/>}
+ {/*{APP_EVALUATION_FLOW_ID === '1' && ['EVALUATION'].includes(data.applicationStatus)
+ ? : null}*/}
+ {}}
+ label={__('Controlla NDG', 'gepafin')}
+ />
+ {/*{APP_EVALUATION_FLOW_ID === '1' && ['NDG'].includes(data.applicationStatus) && data.ndg
+ ? : null}*/}
+ {}}
+ label={__('Crea l\'appuntamento', 'gepafin')}
+ />
+ {/*{APP_EVALUATION_FLOW_ID === '1' && ['APPOINTMENT'].includes(data.applicationStatus)
+ ? : null}*/}
+ {}}
+ label={__('Ammissibile', 'gepafin')}
+ />
+ {data.id
+ ? : null}
+ {/*{data.id
+ ? : null}*/}
+ {data.id
+ ? : null}
+
+
+
+
+
+
+
+
+
+
+ : <>
+
+
+
+
+
+
+
+
+ >}
+
+ )
+
+}
+
+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 = '' }) => {
?
: null}
-
+
@@ -165,7 +165,7 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
filter sortable
filterPlaceholder={__('Cerca', 'gepafin')}
style={{ minWidth: '10rem' }}/>
-
@@ -173,10 +173,10 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
filterField="submissionDate" dataType="date"
style={{ minWidth: '8rem' }}
body={dateAppliedBodyTemplate} filter filterElement={dateFilterTemplate}/>
- {/**/}
+
{
)
}
-export default AllDomandeTable;
\ No newline at end of file
+export default AllDomandeTable;
diff --git a/src/pages/DomandeBeneficiario/components/BeneficiarioDomandeTable/index.js b/src/pages/DomandeBeneficiario/components/BeneficiarioDomandeTable/index.js
index 1469191..23f988b 100644
--- a/src/pages/DomandeBeneficiario/components/BeneficiarioDomandeTable/index.js
+++ b/src/pages/DomandeBeneficiario/components/BeneficiarioDomandeTable/index.js
@@ -165,7 +165,7 @@ const BeneficiarioDomandeTable = () => {
filter sortable
filterPlaceholder={__('Cerca il nome', 'gepafin')}
style={{ minWidth: '8rem' }}/>
-
@@ -184,4 +184,4 @@ const BeneficiarioDomandeTable = () => {
)
}
-export default BeneficiarioDomandeTable;
\ No newline at end of file
+export default BeneficiarioDomandeTable;
diff --git a/src/pages/SoccorsoAddPreInstructor/index.js b/src/pages/SoccorsoAddPreInstructor/index.js
index bfb4745..dca2bfe 100644
--- a/src/pages/SoccorsoAddPreInstructor/index.js
+++ b/src/pages/SoccorsoAddPreInstructor/index.js
@@ -185,7 +185,7 @@ const SoccorsoAddPreInstructor = () => {
{data.callName}
- {__('Beneficiario', 'gepafin')}
+ {__('Referente Aziendale', 'gepafin')}
{data.beneficiaryName}
@@ -308,4 +308,4 @@ const SoccorsoAddPreInstructor = () => {
}
-export default SoccorsoAddPreInstructor;
\ No newline at end of file
+export default SoccorsoAddPreInstructor;
diff --git a/src/pages/SoccorsoEditBeneficiario/index.js b/src/pages/SoccorsoEditBeneficiario/index.js
index 21da492..ba7cc0a 100644
--- a/src/pages/SoccorsoEditBeneficiario/index.js
+++ b/src/pages/SoccorsoEditBeneficiario/index.js
@@ -275,11 +275,11 @@ const SoccorsoEditBeneficiario = () => {
{data.callName}
- {__('Beneficiario', 'gepafin')}
+ {__('Referente Aziendale', 'gepafin')}
{data.beneficiaryName}
- {__('Azienda', 'gepafin')}
+ {__('Azienda Beneficiaria', 'gepafin')}
@@ -306,7 +306,7 @@ const SoccorsoEditBeneficiario = () => {
{dataAppl.callTitle}
- {__('Azienda', 'gepafin')}
+ {__('Azienda Beneficiaria', 'gepafin')}
{dataAppl.companyName}
@@ -462,4 +462,4 @@ const SoccorsoEditBeneficiario = () => {
}
-export default SoccorsoEditBeneficiario;
\ No newline at end of file
+export default SoccorsoEditBeneficiario;
diff --git a/src/pages/SoccorsoEditPreInstructor/index.js b/src/pages/SoccorsoEditPreInstructor/index.js
index 54922dc..2201c20 100644
--- a/src/pages/SoccorsoEditPreInstructor/index.js
+++ b/src/pages/SoccorsoEditPreInstructor/index.js
@@ -392,7 +392,7 @@ const SoccorsoEditPreInstructor = () => {
{data.callName}
- {__('Beneficiario', 'gepafin')}
+ {__('Referente Aziendale', 'gepafin')}
{data.beneficiaryName}
diff --git a/src/pages/SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable/index.js b/src/pages/SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable/index.js
index e509e43..87cba6b 100644
--- a/src/pages/SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable/index.js
+++ b/src/pages/SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable/index.js
@@ -78,7 +78,7 @@ const PreInstructorSoccorsiTable = ({ openDialogFn }) => {
operator: FilterOperator.AND,
constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }]
},
- beneficiaryName: {
+ companyName: {
operator: FilterOperator.AND,
constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }]
},
@@ -149,7 +149,7 @@ const PreInstructorSoccorsiTable = ({ openDialogFn }) => {
-
{
)
}
-export default PreInstructorSoccorsiTable;
\ No newline at end of file
+export default PreInstructorSoccorsiTable;
diff --git a/src/routes.js b/src/routes.js
index 8b753fc..97be510 100644
--- a/src/routes.js
+++ b/src/routes.js
@@ -38,6 +38,7 @@ import SoccorsoEditBeneficiario from './pages/SoccorsoEditBeneficiario';
import BandoApplicationPreview from './pages/BandoApplicationPreview';
import BandiPreferredBeneficiario from './pages/BandiPreferredBeneficiario';
import DomandeInstructorManager from './pages/DomandeInstructorManager';
+import DomandaEditInstructorManager from './pages/DomandaEditInstructorManager';
const routes = ({ role, chosenCompanyId }) => {
@@ -114,6 +115,12 @@ const routes = ({ role, chosenCompanyId }) => {
{'ROLE_SUPER_ADMIN' === role ? : null}
{'ROLE_BENEFICIARY' === role ? : null}
{'ROLE_PRE_INSTRUCTOR' === role ? : null}
+ {'ROLE_INSTRUCTOR_MANAGER' === role ? : null}
+ }/>
+
+ {'ROLE_SUPER_ADMIN' === role ? : null}
+ {'ROLE_BENEFICIARY' === role ? : null}
+ {'ROLE_PRE_INSTRUCTOR' === role ? : null}
{'ROLE_INSTRUCTOR_MANAGER' === role ? : null}
}/>