- added amendemnt page for beneficiary;
- fixed styles in all tables; - fixed displaying requested files list; - fixed page of creating a new amendment;
This commit is contained in:
@@ -207,6 +207,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
> li {
|
> li {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
@@ -378,4 +379,12 @@
|
|||||||
&[disabled] {
|
&[disabled] {
|
||||||
background-color: var(--message-info-background);
|
background-color: var(--message-info-background);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 700px) {
|
||||||
|
.appPageSection {
|
||||||
|
&.columns {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -143,15 +143,15 @@ const AllBandiTable = () => {
|
|||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column field="name" header={__('Nome Bando', 'gepafin')}
|
<Column field="name" header={__('Nome Bando', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data Pubblicazione', 'gepafin')} filterField="start_date" dataType="date"
|
<Column header={__('Data Pubblicazione', 'gepafin')} filterField="start_date" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column header={__('Data Scadenza', 'gepafin')} filterField="end_date" dataType="date"
|
<Column header={__('Data Scadenza', 'gepafin')} filterField="end_date" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')} filterMenuStyle={{ width: '14rem' }}
|
<Column field="status" header={__('Stato', 'gepafin')} filterMenuStyle={{ width: '14rem' }}
|
||||||
style={{ width: '120px' }} body={statusBodyTemplate} filter
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate} filter
|
||||||
filterElement={statusFilterTemplate}/>
|
filterElement={statusFilterTemplate}/>
|
||||||
<Column header={__('Azioni', 'gepafin')}
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
body={actionsBodyTemplate}/>
|
body={actionsBodyTemplate}/>
|
||||||
|
|||||||
@@ -153,15 +153,15 @@ const LatestBandiTable = () => {
|
|||||||
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column field="name" header={__('Nome Bando', 'gepafin')} filter filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
<Column field="name" header={__('Nome Bando', 'gepafin')} filter filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data Pubblicazione', 'gepafin')} filterField="start_date" dataType="date"
|
<Column header={__('Data Pubblicazione', 'gepafin')} filterField="start_date" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column header={__('Data Scadenza', 'gepafin')} filterField="end_date" dataType="date"
|
<Column header={__('Data Scadenza', 'gepafin')} filterField="end_date" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')}
|
<Column field="status" header={__('Stato', 'gepafin')}
|
||||||
style={{ width: '120px' }} body={statusBodyTemplate} />
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate} />
|
||||||
<Column header={__('Azioni', 'gepafin')}
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
body={actionsBodyTemplate}/>
|
body={actionsBodyTemplate}/>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
|
|||||||
@@ -110,10 +110,10 @@ const LatestUsersActivityTable = () => {
|
|||||||
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column header={__('Timestamp', 'gepafin')} filterField="date" dataType="date"
|
<Column header={__('Timestamp', 'gepafin')} filterField="date" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="email" header={__('Utente', 'gepafin')} filter filterPlaceholder="Search by email"
|
<Column field="email" header={__('Utente', 'gepafin')} filter filterPlaceholder="Search by email"
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column field="action" header={__('Azione', 'gepafin')}/>
|
<Column field="action" header={__('Azione', 'gepafin')}/>
|
||||||
<Column field="dettails" header={__('Dettagli', 'gepafin')}/>
|
<Column field="dettails" header={__('Dettagli', 'gepafin')}/>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
|
|||||||
@@ -151,15 +151,15 @@ const LatestBandiTable = () => {
|
|||||||
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column field="name" header={__('Nome Bando', 'gepafin')} filter filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
<Column field="name" header={__('Nome Bando', 'gepafin')} filter filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data Pubblicazione', 'gepafin')} filterField="start_date" dataType="date"
|
<Column header={__('Data Pubblicazione', 'gepafin')} filterField="start_date" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column header={__('Data Scadenza', 'gepafin')} filterField="end_date" dataType="date"
|
<Column header={__('Data Scadenza', 'gepafin')} filterField="end_date" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')}
|
<Column field="status" header={__('Stato', 'gepafin')}
|
||||||
style={{ width: '120px' }} body={statusBodyTemplate} />
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate} />
|
||||||
<Column header={__('Azioni', 'gepafin')}
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
body={actionsBodyTemplate}/>
|
body={actionsBodyTemplate}/>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
|
|||||||
@@ -174,19 +174,20 @@ const MyLatestSubmissionsTable = () => {
|
|||||||
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column field="callTitle" header={__('Bando', 'gepafin')} filter filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
<Column field="callTitle" header={__('Bando', 'gepafin')} filter filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Scadenza', 'gepafin')} filterField="callEndDate" dataType="date"
|
<Column header={__('Scadenza', 'gepafin')} filterField="callEndDate" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column header={__('Ultima modifica', 'gepafin')} filterField="modifiedDate" dataType="date"
|
<Column header={__('Ultima modifica', 'gepafin')} filterField="modifiedDate" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateModifyBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateModifyBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')} filterMenuStyle={{ width: '14rem' }}
|
<Column field="status" header={__('Stato', 'gepafin')} filterMenuStyle={{ width: '14rem' }}
|
||||||
style={{ width: '120px' }} body={statusBodyTemplate} filter
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate} filter
|
||||||
filterElement={statusFilterTemplate}/>
|
filterElement={statusFilterTemplate}/>
|
||||||
<Column header={__('Progressi', 'gepafin')}
|
<Column header={__('Progressi', 'gepafin')}
|
||||||
style={{ minWidth: '10rem' }} field="progress" body={progressBodyTemplate}/>
|
style={{ minWidth: '10rem' }} field="progress" body={progressBodyTemplate}/>
|
||||||
<Column header={__('Azioni', 'gepafin')}
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
|
style={{ minWidth: '10rem' }}
|
||||||
body={actionsBodyTemplate}/>
|
body={actionsBodyTemplate}/>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -144,18 +144,18 @@ const PreInstructorDomandeTable = () => {
|
|||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column field="applicationId" header={__('ID domanda', 'gepafin')}
|
<Column field="applicationId" header={__('ID domanda', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '6rem' }}/>
|
||||||
<Column field="callName" header={__('Bando', 'gepafin')}
|
<Column field="callName" header={__('Bando', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data Ricezione', 'gepafin')} filterField="submissionDate" dataType="date"
|
<Column header={__('Data ricezione', 'gepafin')} filterField="submissionDate" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateAppliedBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateAppliedBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column header={__('Scadenza', 'gepafin')} filterField="callEndDate" dataType="date"
|
<Column header={__('Scadenza', 'gepafin')} filterField="callEndDate" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')}
|
<Column field="status" header={__('Stato', 'gepafin')}
|
||||||
style={{ width: '120px' }} body={statusBodyTemplate} />
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate} />
|
||||||
<Column header={__('Azioni', 'gepafin')}
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
body={actionsBodyTemplate}/>
|
body={actionsBodyTemplate}/>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
|
|||||||
@@ -41,26 +41,8 @@ const DomandaBeneficiario = () => {
|
|||||||
const [isVisibleNewCommDialog, setIsVisibleNewCommDialog] = useState(false);
|
const [isVisibleNewCommDialog, setIsVisibleNewCommDialog] = useState(false);
|
||||||
const [newCommData, setNewCommData] = useState({});
|
const [newCommData, setNewCommData] = useState({});
|
||||||
const [isLoadingCommunication, setIsLoadingCommunication] = useState(false);
|
const [isLoadingCommunication, setIsLoadingCommunication] = useState(false);
|
||||||
const [isVisibleExtendTimeDialog, setIsVisibleExtendTimeDialog] = useState(false);
|
const [isVisibleEmailDialog, setIsVisibleEmailDialog] = useState(false);
|
||||||
const [extendedTime, setExtendedTime] = useState(3);
|
|
||||||
const [isLoadingExtendingTime, setIsLoadingExtendingTime] = useState(false);
|
|
||||||
const [isLoadingReminding, setIsLoadingReminding] = useState(false);
|
|
||||||
const toast = useRef(null);
|
const toast = useRef(null);
|
||||||
const [formInitialData, setFormInitialData] = useState({});
|
|
||||||
const {
|
|
||||||
control,
|
|
||||||
handleSubmit,
|
|
||||||
formState: { errors, isValid },
|
|
||||||
setValue,
|
|
||||||
register,
|
|
||||||
trigger,
|
|
||||||
getValues,
|
|
||||||
clearErrors
|
|
||||||
} = useForm({
|
|
||||||
defaultValues: useMemo(() => {
|
|
||||||
return formInitialData;
|
|
||||||
}, [formInitialData]), mode: 'onChange'
|
|
||||||
});
|
|
||||||
|
|
||||||
const goToArchivePage = () => {
|
const goToArchivePage = () => {
|
||||||
navigate(`/domande`);
|
navigate(`/domande`);
|
||||||
@@ -68,10 +50,12 @@ const DomandaBeneficiario = () => {
|
|||||||
|
|
||||||
const getCallback = (data) => {
|
const getCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
setData(getFormattedData(data.data));
|
if (data.data.length) {
|
||||||
//CommunicationService.getCommsByAmendmentId(data.data.id, getCommsCallback, errGetCommsCallback);
|
setData(getFormattedData(data.data[0]));
|
||||||
|
CommunicationService.getCommsByAmendmentId(data.data[0].id, getCommsCallback, errGetCommsCallback);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//storeSet.main.unsetAsyncRequest();
|
storeSet.main.unsetAsyncRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
const errGetCallback = (data) => {
|
const errGetCallback = (data) => {
|
||||||
@@ -181,8 +165,7 @@ const DomandaBeneficiario = () => {
|
|||||||
|
|
||||||
const createCommunication = () => {
|
const createCommunication = () => {
|
||||||
setIsLoadingCommunication(true);
|
setIsLoadingCommunication(true);
|
||||||
const amendmentId = 0
|
CommunicationService.createCommunication(data.id, newCommData, createCommunicationCallback, errCreateCommunicationCallback);
|
||||||
CommunicationService.createCommunication(amendmentId, newCommData, createCommunicationCallback, errCreateCommunicationCallback);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const createCommunicationCallback = (data) => {
|
const createCommunicationCallback = (data) => {
|
||||||
@@ -272,24 +255,21 @@ const DomandaBeneficiario = () => {
|
|||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Dettagli Richiesta', 'gepafin')}</h2>
|
<h2>{__('Dettagli Richiesta', 'gepafin')}</h2>
|
||||||
<div className="appPageSection columns">
|
<h3>{__('Documenti Richiesti', 'gepafin')}</h3>
|
||||||
<div>
|
<ol className="appPageSection__list">
|
||||||
<h3>{__('Documenti Richiesti', 'gepafin')}</h3>
|
{data.formFields
|
||||||
<ol className="appPageSection__list">
|
? data.formFields.map((o, i) => <li key={o.fieldId}
|
||||||
{data.formFields
|
style={{ flexDirection: 'row' }}>
|
||||||
? data.formFields.map((o, i) => <li key={o.fieldId} style={{ flexDirection: 'row' }}>
|
<span>{o.label}</span>
|
||||||
<span>{o.label}</span>
|
</li>) : null}
|
||||||
</li>) : null}
|
</ol>
|
||||||
</ol>
|
</div>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3>{__('Note e spiegazioni', 'gepafin')}</h3>
|
|
||||||
<div className="appPageSection__withBorder grey ql-editor"
|
|
||||||
style={{ minHeight: '200px' }}>
|
|
||||||
{renderHtmlContent(data.note)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div className="appPageSection">
|
||||||
|
<h3>{__('Note e spiegazioni', 'gepafin')}</h3>
|
||||||
|
<div className="appPageSection__withBorder grey ql-editor"
|
||||||
|
style={{ minHeight: '200px' }}>
|
||||||
|
{renderHtmlContent(data.note)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -340,11 +320,13 @@ const DomandaBeneficiario = () => {
|
|||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={isAsyncRequest}
|
disabled={isAsyncRequest}
|
||||||
|
onClick={() => setIsVisibleEmailDialog(true)}
|
||||||
label={__('Invia documenti via PEC', 'gepafin')}
|
label={__('Invia documenti via PEC', 'gepafin')}
|
||||||
icon="pi pi-envelope" iconPos="right"/>
|
icon="pi pi-envelope" iconPos="right"/>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
outlined
|
outlined
|
||||||
|
onClick={goToArchivePage}
|
||||||
disabled={isAsyncRequest}
|
disabled={isAsyncRequest}
|
||||||
label={__('Chiudi', 'gepafin')}
|
label={__('Chiudi', 'gepafin')}
|
||||||
icon="pi pi-times" iconPos="right"/>
|
icon="pi pi-times" iconPos="right"/>
|
||||||
@@ -383,6 +365,16 @@ const DomandaBeneficiario = () => {
|
|||||||
onChange={(e) => updateNewCommData(e.target.value, 'comment')}/>
|
onChange={(e) => updateNewCommData(e.target.value, 'comment')}/>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
|
<Dialog
|
||||||
|
header={__('Invia documenti via PEC', 'gepafin')}
|
||||||
|
visible={isVisibleEmailDialog}
|
||||||
|
style={{ width: '50vw' }}
|
||||||
|
onHide={() => {if (!isVisibleEmailDialog) return; setIsVisibleEmailDialog(false); }}>
|
||||||
|
<p className="m-0">
|
||||||
|
{data.callEmail}
|
||||||
|
</p>
|
||||||
|
</Dialog>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { storeSet, useStore } from '../../store';
|
|||||||
|
|
||||||
// api
|
// api
|
||||||
import ApplicationEvaluationService from '../../service/application-evaluation-service';
|
import ApplicationEvaluationService from '../../service/application-evaluation-service';
|
||||||
|
import AmendmentsService from '../../service/amendments-service';
|
||||||
|
|
||||||
// tools
|
// tools
|
||||||
import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
|
import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
|
||||||
@@ -37,6 +38,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
const [criterionDataTitle, setCriterionDataTitle] = useState('');
|
const [criterionDataTitle, setCriterionDataTitle] = useState('');
|
||||||
const [criterionDataContent, setCriterionDataContent] = useState('');
|
const [criterionDataContent, setCriterionDataContent] = useState('');
|
||||||
const [isAdmissible, setIsAdmissible] = useState(false);
|
const [isAdmissible, setIsAdmissible] = useState(false);
|
||||||
|
const [connectedSoccorsoId, setConnectedSoccorsoId] = useState(0);
|
||||||
const toast = useRef(null);
|
const toast = useRef(null);
|
||||||
|
|
||||||
const goToEvaluationsPage = () => {
|
const goToEvaluationsPage = () => {
|
||||||
@@ -44,7 +46,12 @@ const DomandaEditPreInstructor = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const doNewSoccorso = () => {
|
const doNewSoccorso = () => {
|
||||||
navigate(`/domande/${id}/aggiungi-soccorso/${data.id}`);
|
if (connectedSoccorsoId !== 0) {
|
||||||
|
navigate(`/domande/${id}/soccorso/${connectedSoccorsoId}`);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
navigate(`/domande/${id}/aggiungi-soccorso/`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getCallback = (data) => {
|
const getCallback = (data) => {
|
||||||
@@ -198,6 +205,17 @@ const DomandaEditPreInstructor = () => {
|
|||||||
setCriterionDataContent('');
|
setCriterionDataContent('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getAmendmentsCallback = (data) => {
|
||||||
|
if (data.status === 'SUCCESS') {
|
||||||
|
if (data.data.length) {
|
||||||
|
setConnectedSoccorsoId(data.data[0].id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const errGetAmendmentsCallback = () => {
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const maxScore = pathOr(0, ['minScore'], data);
|
const maxScore = pathOr(0, ['minScore'], data);
|
||||||
const criteria = pathOr([], ['criteria'], data);
|
const criteria = pathOr([], ['criteria'], data);
|
||||||
@@ -210,9 +228,13 @@ const DomandaEditPreInstructor = () => {
|
|||||||
const parsed = parseInt(id)
|
const parsed = parseInt(id)
|
||||||
const entityId = !isNaN(parsed) ? parsed : 0;
|
const entityId = !isNaN(parsed) ? parsed : 0;
|
||||||
|
|
||||||
|
storeSet.main.setAsyncRequest();
|
||||||
ApplicationEvaluationService.getEvaluationByApplId(getCallback, errGetCallback, [
|
ApplicationEvaluationService.getEvaluationByApplId(getCallback, errGetCallback, [
|
||||||
['applicationId', entityId]
|
['applicationId', entityId]
|
||||||
]);
|
]);
|
||||||
|
AmendmentsService.getSoccorsoByApplId(entityId, getAmendmentsCallback, errGetAmendmentsCallback, [
|
||||||
|
['statuses', 'AWAITING']
|
||||||
|
]);
|
||||||
}, [id]);
|
}, [id]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -448,6 +470,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
<div className="appPageSection__actions">
|
<div className="appPageSection__actions">
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
disabled={!data.id}
|
||||||
onClick={doNewSoccorso}
|
onClick={doNewSoccorso}
|
||||||
outlined
|
outlined
|
||||||
label={<>
|
label={<>
|
||||||
@@ -457,23 +480,31 @@ const DomandaEditPreInstructor = () => {
|
|||||||
</i>
|
</i>
|
||||||
</>}
|
</>}
|
||||||
/>
|
/>
|
||||||
<Button
|
{data.id
|
||||||
type="button"
|
? <Button
|
||||||
onClick={doSaveDraft}
|
type="button"
|
||||||
outlined
|
onClick={doSaveDraft}
|
||||||
label={__('Salva Bozza Valutazione', 'gepafin')}
|
outlined
|
||||||
icon="pi pi-save" iconPos="right"/>
|
label={__('Salva bozza valutazione', 'gepafin')}
|
||||||
<Button
|
icon="pi pi-save" iconPos="right"/>
|
||||||
type="button"
|
: <Button
|
||||||
disabled={!isAdmissible}
|
type="button"
|
||||||
onClick={doApprove}
|
onClick={doSaveDraft}
|
||||||
label={__('Approva Domanda', 'gepafin')}
|
label={__('Crea valutazione', 'gepafin')}
|
||||||
icon="pi pi-check" iconPos="right"/>
|
icon="pi pi-save" iconPos="right"/>}
|
||||||
<Button
|
{data.id
|
||||||
type="button"
|
? <Button
|
||||||
onClick={doReject}
|
type="button"
|
||||||
label={__('Respingi Domanda', 'gepafin')}
|
disabled={!isAdmissible}
|
||||||
icon="pi pi-times" iconPos="right"/>
|
onClick={doApprove}
|
||||||
|
label={__('Approva Domanda', 'gepafin')}
|
||||||
|
icon="pi pi-check" iconPos="right"/> : null}
|
||||||
|
{data.id
|
||||||
|
? <Button
|
||||||
|
type="button"
|
||||||
|
onClick={doReject}
|
||||||
|
label={__('Respingi Domanda', 'gepafin')}
|
||||||
|
icon="pi pi-times" iconPos="right"/> : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -171,18 +171,18 @@ const BeneficiarioDomandeTable = () => {
|
|||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column field="id" header={__('ID domanda', 'gepafin')} filter
|
<Column field="id" header={__('ID domanda', 'gepafin')} filter
|
||||||
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '6rem' }}/>
|
||||||
<Column field="callTitle" header={__('Titolo bando', 'gepafin')} filter
|
<Column field="callTitle" header={__('Titolo bando', 'gepafin')} filter
|
||||||
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data di invio', 'gepafin')} filterField="submissionDate" dataType="date"
|
<Column header={__('Data di invio', 'gepafin')} filterField="submissionDate" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateSubmissionBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateSubmissionBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')} filterMenuStyle={{ width: '14rem' }}
|
<Column field="status" header={__('Stato', 'gepafin')} filterMenuStyle={{ width: '14rem' }}
|
||||||
style={{ width: '120px' }} body={statusBodyTemplate} filter
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate} filter
|
||||||
filterElement={statusFilterTemplate}/>
|
filterElement={statusFilterTemplate}/>
|
||||||
<Column header={__('Esito', 'gepafin')}
|
<Column header={__('Esito', 'gepafin')}
|
||||||
style={{ minWidth: '10rem' }} field="progress" body={progressBodyTemplate}/>
|
style={{ minWidth: '7rem' }} field="progress" body={progressBodyTemplate}/>
|
||||||
<Column header={__('Azioni', 'gepafin')}
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
body={actionsBodyTemplate}/>
|
body={actionsBodyTemplate}/>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
|
|||||||
@@ -54,8 +54,7 @@ const SoccorsoEditPreInstructor = () => {
|
|||||||
setValue,
|
setValue,
|
||||||
register,
|
register,
|
||||||
trigger,
|
trigger,
|
||||||
getValues,
|
getValues
|
||||||
clearErrors
|
|
||||||
} = useForm({
|
} = useForm({
|
||||||
defaultValues: useMemo(() => {
|
defaultValues: useMemo(() => {
|
||||||
return formInitialData;
|
return formInitialData;
|
||||||
|
|||||||
@@ -147,23 +147,23 @@ const PreInstructorSoccorsiTable = ({ openDialogFn }) => {
|
|||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column field="applicationId" header={__('ID domanda', 'gepafin')}
|
<Column field="applicationId" header={__('ID domanda', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '6rem' }}/>
|
||||||
<Column field="callName" header={__('Bando', 'gepafin')}
|
<Column field="callName" header={__('Bando', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column field="beneficiaryName" header={__('Beneficiario', 'gepafin')}
|
<Column field="beneficiaryName" header={__('Beneficiario', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '12rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data Richiesta', 'gepafin')}
|
<Column header={__('Data Richiesta', 'gepafin')}
|
||||||
filterField="startDate" dataType="date"
|
filterField="startDate" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column header={__('Scadenza', 'gepafin')}
|
<Column header={__('Scadenza', 'gepafin')}
|
||||||
filterField="expirationDate" dataType="date"
|
filterField="expirationDate" dataType="date"
|
||||||
style={{ minWidth: '10rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateExpirationBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateExpirationBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')}
|
<Column field="status" header={__('Stato', 'gepafin')}
|
||||||
style={{ width: '120px' }} body={statusBodyTemplate} />
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate} />
|
||||||
<Column header={__('Azioni', 'gepafin')}
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
body={actionsBodyTemplate}/>
|
body={actionsBodyTemplate}/>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ const routes = ({ role, chosenCompanyId }) => {
|
|||||||
{'ROLE_BENEFICIARY' === role ? <DomandaBeneficiario/> : null}
|
{'ROLE_BENEFICIARY' === role ? <DomandaBeneficiario/> : null}
|
||||||
{'ROLE_PRE_INSTRUCTOR' === role ? <DomandaEditPreInstructor/> : null}
|
{'ROLE_PRE_INSTRUCTOR' === role ? <DomandaEditPreInstructor/> : null}
|
||||||
</DefaultLayout>}/>
|
</DefaultLayout>}/>
|
||||||
<Route path="/domande/:id/aggiungi-soccorso/:evaluationId" element={<DefaultLayout>
|
<Route path="/domande/:id/aggiungi-soccorso" element={<DefaultLayout>
|
||||||
{'ROLE_SUPER_ADMIN' === role ? <PageNotFound/> : null}
|
{'ROLE_SUPER_ADMIN' === role ? <PageNotFound/> : null}
|
||||||
{'ROLE_BENEFICIARY' === role ? <PageNotFound/> : null}
|
{'ROLE_BENEFICIARY' === role ? <PageNotFound/> : null}
|
||||||
{'ROLE_PRE_INSTRUCTOR' === role ? <SoccorsoAddPreInstructor/> : null}
|
{'ROLE_PRE_INSTRUCTOR' === role ? <SoccorsoAddPreInstructor/> : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user