- added company name to tables with applications;
- added form and file inputs to the page of editing/viewing soccorso for beneficiary;
This commit is contained in:
@@ -284,7 +284,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, setInitialData, g
|
|||||||
options={checklistOptions}
|
options={checklistOptions}
|
||||||
errors={errors}
|
errors={errors}
|
||||||
register={register}
|
register={register}
|
||||||
label={<>{__('Checklist valutazione Pre-Istruttoria', 'gepafin')}*
|
label={<>{__('Checklist valutazione Istruttoria', 'gepafin')}*
|
||||||
<span>{__('(almeno 1 elemento)', 'gepafin')}</span></>}
|
<span>{__('(almeno 1 elemento)', 'gepafin')}</span></>}
|
||||||
config={{
|
config={{
|
||||||
validate: {
|
validate: {
|
||||||
|
|||||||
@@ -172,9 +172,15 @@ const DraftApplicationsTable = () => {
|
|||||||
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column field="id" header={__('ID domanda', 'gepafin')}
|
<Column field="id" header={__('ID domanda', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
sortable
|
||||||
|
filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column field="callTitle" header={__('Bando', 'gepafin')} filter
|
<Column field="callTitle" header={__('Bando', 'gepafin')}
|
||||||
|
filter sortable
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
|
style={{ minWidth: '8rem' }}/>
|
||||||
|
<Column field="companyName" header={__('Azienda', 'gepafin')}
|
||||||
|
filter sortable
|
||||||
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
{/*<Column header={__('Scadenza', 'gepafin')} filterField="callEndDate" dataType="date"
|
{/*<Column header={__('Scadenza', 'gepafin')} filterField="callEndDate" dataType="date"
|
||||||
@@ -184,7 +190,8 @@ const DraftApplicationsTable = () => {
|
|||||||
style={{ minWidth: '8rem' }}
|
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={{ minWidth: '7rem' }} 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}/>
|
||||||
|
|||||||
@@ -177,16 +177,26 @@ const MyLatestSubmissionsTable = () => {
|
|||||||
header={header}
|
header={header}
|
||||||
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')}
|
||||||
|
sortable
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
|
style={{ minWidth: '8rem' }}/>
|
||||||
|
<Column field="companyName" header={__('Azienda', 'gepafin')}
|
||||||
|
filter sortable
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Scadenza', 'gepafin')} filterField="callEndDate" dataType="date"
|
<Column header={__('Scadenza', 'gepafin')} filterField="callEndDate" dataType="date"
|
||||||
style={{ minWidth: '8rem' }}
|
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: '8rem' }}
|
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={{ minWidth: '7rem' }} body={statusBodyTemplate} filter
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate}
|
||||||
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}/>
|
||||||
|
|||||||
@@ -143,10 +143,15 @@ const PreInstructorDomandeTable = () => {
|
|||||||
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
||||||
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')}
|
sortable filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '6rem' }}/>
|
style={{ minWidth: '6rem' }}/>
|
||||||
<Column field="callName" header={__('Bando', 'gepafin')}
|
<Column field="callName" header={__('Bando', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
filter sortable
|
||||||
|
filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
|
style={{ minWidth: '8rem' }}/>
|
||||||
|
<Column field="companyName" header={__('Azienda', 'gepafin')}
|
||||||
|
filter sortable
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data ricezione', 'gepafin')} filterField="submissionDate" dataType="date"
|
<Column header={__('Data ricezione', 'gepafin')} filterField="submissionDate" dataType="date"
|
||||||
style={{ minWidth: '8rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useState, useEffect, useRef, useMemo } from 'react';
|
||||||
import { __, sprintf } from '@wordpress/i18n';
|
import { __, sprintf } from '@wordpress/i18n';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
import { is, isEmpty, isNil } from 'ramda';
|
import { is, isEmpty, isNil } from 'ramda';
|
||||||
@@ -27,6 +27,9 @@ import { Dialog } from 'primereact/dialog';
|
|||||||
import { InputText } from 'primereact/inputtext';
|
import { InputText } from 'primereact/inputtext';
|
||||||
import { InputTextarea } from 'primereact/inputtextarea';
|
import { InputTextarea } from 'primereact/inputtextarea';
|
||||||
import ApplicationService from '../../service/application-service';
|
import ApplicationService from '../../service/application-service';
|
||||||
|
import FormField from '../../components/FormField';
|
||||||
|
import { useForm } from 'react-hook-form';
|
||||||
|
import { klona } from 'klona';
|
||||||
|
|
||||||
const DomandaBeneficiario = () => {
|
const DomandaBeneficiario = () => {
|
||||||
const isAsyncRequest = useStore().main.isAsyncRequest();
|
const isAsyncRequest = useStore().main.isAsyncRequest();
|
||||||
@@ -40,6 +43,20 @@ const DomandaBeneficiario = () => {
|
|||||||
const [isLoadingCommunication, setIsLoadingCommunication] = useState(false);
|
const [isLoadingCommunication, setIsLoadingCommunication] = useState(false);
|
||||||
const [isVisibleEmailDialog, setIsVisibleEmailDialog] = useState(false);
|
const [isVisibleEmailDialog, setIsVisibleEmailDialog] = useState(false);
|
||||||
const toast = useRef(null);
|
const toast = useRef(null);
|
||||||
|
const [formInitialData, setFormInitialData] = useState({});
|
||||||
|
const {
|
||||||
|
control,
|
||||||
|
handleSubmit,
|
||||||
|
formState: { errors },
|
||||||
|
setValue,
|
||||||
|
register,
|
||||||
|
trigger,
|
||||||
|
getValues
|
||||||
|
} = useForm({
|
||||||
|
defaultValues: useMemo(() => {
|
||||||
|
return formInitialData;
|
||||||
|
}, [formInitialData]), mode: 'onChange'
|
||||||
|
});
|
||||||
|
|
||||||
const goToArchivePage = () => {
|
const goToArchivePage = () => {
|
||||||
navigate(`/domande`);
|
navigate(`/domande`);
|
||||||
@@ -57,8 +74,16 @@ const DomandaBeneficiario = () => {
|
|||||||
const getCallback = (data) => {
|
const getCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
if (data.data.length) {
|
if (data.data.length) {
|
||||||
setData(getFormattedData(data.data[0]));
|
const amendmentObj = data.data[0];
|
||||||
CommunicationService.getCommsByAmendmentId(data.data[0].id, getCommsCallback, errGetCommsCallback);
|
setData(getFormattedData(amendmentObj));
|
||||||
|
const formDataInitial = amendmentObj.applicationFormFields.reduce((acc, cur) => {
|
||||||
|
if (cur.fieldValue) {
|
||||||
|
acc[cur.fieldId] = cur.fieldValue;
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
setFormInitialData(formDataInitial);
|
||||||
|
CommunicationService.getCommsByAmendmentId(amendmentObj.id, getCommsCallback, errGetCommsCallback);
|
||||||
storeSet.main.unsetAsyncRequest();
|
storeSet.main.unsetAsyncRequest();
|
||||||
} else {
|
} else {
|
||||||
ApplicationService.getApplication(id, getApplCallback, errGetCallback)
|
ApplicationService.getApplication(id, getApplCallback, errGetCallback)
|
||||||
@@ -186,6 +211,60 @@ const DomandaBeneficiario = () => {
|
|||||||
setIsLoadingCommunication(false);
|
setIsLoadingCommunication(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onSubmit = () => {
|
||||||
|
};
|
||||||
|
|
||||||
|
const doUpdateAmendment = () => {
|
||||||
|
trigger();
|
||||||
|
let formValues = klona(getValues());
|
||||||
|
const newFormValues = Object.keys(formValues)
|
||||||
|
.reduce((acc, cur) => {
|
||||||
|
let fieldVal = formValues[cur];
|
||||||
|
|
||||||
|
fieldVal = isEmpty(fieldVal) ? null : fieldVal;
|
||||||
|
fieldVal = is(Array, fieldVal) ? fieldVal.map(o => o.id).join(',') : null;
|
||||||
|
|
||||||
|
acc.push({
|
||||||
|
'fieldId': cur,
|
||||||
|
'fieldValue': fieldVal
|
||||||
|
});
|
||||||
|
return acc;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const submitData = {
|
||||||
|
applicationFormFields: newFormValues,
|
||||||
|
}
|
||||||
|
const amendmentId = data.id;
|
||||||
|
|
||||||
|
storeSet.main.setAsyncRequest();
|
||||||
|
AmendmentsService.updateSoccorso(amendmentId, submitData, updateAmendmentCallback, errUpdateAmendmentCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateAmendmentCallback = (data) => {
|
||||||
|
if (data.status === 'SUCCESS') {
|
||||||
|
if (toast.current) {
|
||||||
|
toast.current.show({
|
||||||
|
severity: 'success',
|
||||||
|
summary: '',
|
||||||
|
detail: data.message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
storeSet.main.unsetAsyncRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
const errUpdateAmendmentCallback = (data) => {
|
||||||
|
if (toast.current && data.message) {
|
||||||
|
toast.current.show({
|
||||||
|
severity: 'error',
|
||||||
|
summary: '',
|
||||||
|
detail: data.message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
set404FromErrorResponse(data);
|
||||||
|
storeSet.main.unsetAsyncRequest();
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="appPage">
|
<div className="appPage">
|
||||||
<div className="appPage__pageHeader">
|
<div className="appPage__pageHeader">
|
||||||
@@ -272,59 +351,85 @@ const DomandaBeneficiario = () => {
|
|||||||
|
|
||||||
{data.id
|
{data.id
|
||||||
? <div className="appPageSection">
|
? <div className="appPageSection">
|
||||||
<h2>{__('Dettagli Richiesta', 'gepafin')}</h2>
|
<h2>{__('Dettagli Richiesta', 'gepafin')}</h2>
|
||||||
<h3>{__('Documenti Richiesti', 'gepafin')}</h3>
|
<h3>{__('Note e spiegazioni', 'gepafin')}</h3>
|
||||||
<ol className="appPageSection__list">
|
<div className="appPageSection__withBorder grey ql-editor"
|
||||||
|
style={{ minHeight: '200px' }}>
|
||||||
|
{renderHtmlContent(data.note)}
|
||||||
|
</div>
|
||||||
|
</div> : null}
|
||||||
|
|
||||||
|
{data.id
|
||||||
|
? <div className="appPageSection">
|
||||||
|
<h3>{__('Documenti Richiesti', 'gepafin')}</h3>
|
||||||
|
<form className="appForm" onSubmit={handleSubmit(onSubmit)}>
|
||||||
|
{data.formFields
|
||||||
|
? data.formFields.map((o, i) => {
|
||||||
|
/*const thisField = head(test.updatedFormFields.filter(j => j.fieldId === o.fieldId));
|
||||||
|
const value = pathOr({}, ['fieldValue'], thisField);
|
||||||
|
console.log('value', value, o.fieldId);*/
|
||||||
|
return <FormField
|
||||||
|
key={o.fieldId}
|
||||||
|
disabled={data.status === 'CLOSE'}
|
||||||
|
type="fileupload"
|
||||||
|
setDataFn={setValue}
|
||||||
|
saveFormCallback={doUpdateAmendment}
|
||||||
|
fieldName={o.fieldId}
|
||||||
|
label={o.label}
|
||||||
|
control={control}
|
||||||
|
errors={errors}
|
||||||
|
defaultValue={formInitialData[o.fieldId] ? formInitialData[o.fieldId] : []}
|
||||||
|
accept={[]}
|
||||||
|
doctype="document"
|
||||||
|
register={register}
|
||||||
|
sourceId={data.applicationId}
|
||||||
|
source="application"
|
||||||
|
multiple={true}
|
||||||
|
/>
|
||||||
|
}) : null}
|
||||||
|
</form>
|
||||||
|
{/*<ol className="appPageSection__list">
|
||||||
{data.formFields
|
{data.formFields
|
||||||
? data.formFields.map((o, i) => <li key={o.fieldId}
|
? data.formFields.map((o, i) => <li key={o.fieldId}
|
||||||
style={{ flexDirection: 'row' }}>
|
style={{ flexDirection: 'row' }}>
|
||||||
<span>{o.label}</span>
|
<span>{o.label}</span>
|
||||||
</li>) : null}
|
</li>) : null}
|
||||||
</ol>
|
</ol>*/}
|
||||||
</div> : null}
|
</div> : null}
|
||||||
|
|
||||||
{data.id
|
{data.id
|
||||||
? <div className="appPageSection">
|
? <div className="appPageSection">
|
||||||
<h3>{__('Note e spiegazioni', 'gepafin')}</h3>
|
<h2>{__('Comunicazioni', 'gepafin')}</h2>
|
||||||
<div className="appPageSection__withBorder grey ql-editor"
|
<table className="myTable">
|
||||||
style={{ minHeight: '200px' }}>
|
<thead className="myThead">
|
||||||
{renderHtmlContent(data.note)}
|
<tr>
|
||||||
</div>
|
<th style={{ width: 250 }}>{__('Data', 'gepafin')}</th>
|
||||||
</div> : null}
|
<th>{__('Comunicazione', 'gepafin')}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody className="myTbody">
|
||||||
|
{!isNil(comms) && !isEmpty(comms)
|
||||||
|
? comms.map((o, i) => <tr key={o.id}>
|
||||||
|
<td valign="top">
|
||||||
|
{getDateFromISOstring(o.commentedDate)}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<h3>{o.title}</h3>
|
||||||
|
<p>{o.comment}</p>
|
||||||
|
</td>
|
||||||
|
</tr>)
|
||||||
|
: <tr>
|
||||||
|
<td>-</td>
|
||||||
|
<td>-</td>
|
||||||
|
</tr>}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
{data.id
|
<Button
|
||||||
? <div className="appPageSection">
|
style={{ marginTop: 30 }}
|
||||||
<h2>{__('Comunicazioni', 'gepafin')}</h2>
|
onClick={openNewCommDialog}
|
||||||
<table className="myTable">
|
disabled={data.status === 'CLOSE'}
|
||||||
<thead className="myThead">
|
type="button"
|
||||||
<tr>
|
|
||||||
<th style={{ width: 250 }}>{__('Data', 'gepafin')}</th>
|
|
||||||
<th>{__('Comunicazione', 'gepafin')}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody className="myTbody">
|
|
||||||
{!isNil(comms) && !isEmpty(comms)
|
|
||||||
? comms.map((o, i) => <tr key={o.id}>
|
|
||||||
<td valign="top">
|
|
||||||
{getDateFromISOstring(o.commentedDate)}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<h3>{o.title}</h3>
|
|
||||||
<p>{o.comment}</p>
|
|
||||||
</td>
|
|
||||||
</tr>)
|
|
||||||
: <tr>
|
|
||||||
<td>-</td>
|
|
||||||
<td>-</td>
|
|
||||||
</tr>}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
style={{ marginTop: 30 }}
|
|
||||||
onClick={openNewCommDialog}
|
|
||||||
disabled={data.status === 'CLOSE'}
|
|
||||||
type="button"
|
|
||||||
label={__('Aggiungi Comunicazione', 'gepafin')}
|
label={__('Aggiungi Comunicazione', 'gepafin')}
|
||||||
icon="pi pi-plus" iconPos="right"/>
|
icon="pi pi-plus" iconPos="right"/>
|
||||||
</div> : null}
|
</div> : null}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
const updateEvaluationValue = (value, path, maxValue) => {
|
const updateEvaluationValue = (value, path, maxValue) => {
|
||||||
let finalValue = value;
|
let finalValue = value;
|
||||||
|
|
||||||
if (maxValue) {
|
if (maxValue || maxValue === 0) {
|
||||||
finalValue = value > maxValue ? maxValue : value;
|
finalValue = value > maxValue ? maxValue : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,6 +258,10 @@ const DomandaEditPreInstructor = () => {
|
|||||||
const errGetAmendmentsCallback = () => {
|
const errGetAmendmentsCallback = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const shouldDisableField = (fieldName) => {
|
||||||
|
return !['EVALUATION'].includes(data.status) || ['ADMISSIBLE'].includes(data.status) && fieldName !== 'criteria'
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const maxScore = pathOr(0, ['minScore'], data);
|
const maxScore = pathOr(0, ['minScore'], data);
|
||||||
const criteria = pathOr([], ['criteria'], data);
|
const criteria = pathOr([], ['criteria'], data);
|
||||||
@@ -329,9 +333,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection"></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Punteggi di valutazione', 'gepafin')}</h2>
|
<h2>{__('Punteggi di valutazione', 'gepafin')}</h2>
|
||||||
@@ -350,7 +352,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
<td>
|
<td>
|
||||||
<div className="p-inputgroup">
|
<div className="p-inputgroup">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
disabled={data.status === 'CLOSE'}
|
disabled={shouldDisableField('criteria')}
|
||||||
placeholder={__('Punteggio', 'gepafin')}
|
placeholder={__('Punteggio', 'gepafin')}
|
||||||
keyfilter="int"
|
keyfilter="int"
|
||||||
value={o.score}
|
value={o.score}
|
||||||
@@ -373,7 +375,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
onClick={() => displayCriterionData(o.id)}
|
onClick={() => displayCriterionData(o.id)}
|
||||||
aria-label={__('Mostra', 'gepafin')}/> : null}
|
aria-label={__('Mostra', 'gepafin')}/> : null}
|
||||||
<Button icon="pi pi-thumbs-up" rounded outlined
|
<Button icon="pi pi-thumbs-up" rounded outlined
|
||||||
disabled={data.status === 'CLOSE'}
|
disabled={shouldDisableField('criteria')}
|
||||||
severity={!isNil(o.valid) && o.valid ? 'success' : 'secondary'}
|
severity={!isNil(o.valid) && o.valid ? 'success' : 'secondary'}
|
||||||
onClick={() => updateEvaluationValue(
|
onClick={() => updateEvaluationValue(
|
||||||
true,
|
true,
|
||||||
@@ -381,7 +383,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
)}
|
)}
|
||||||
aria-label={__('Su', 'gepafin')}/>
|
aria-label={__('Su', 'gepafin')}/>
|
||||||
<Button icon="pi pi-thumbs-down" rounded outlined
|
<Button icon="pi pi-thumbs-down" rounded outlined
|
||||||
disabled={data.status === 'CLOSE'}
|
disabled={shouldDisableField('criteria')}
|
||||||
severity={!isNil(o.valid) && !o.valid ? 'danger' : 'secondary'}
|
severity={!isNil(o.valid) && !o.valid ? 'danger' : 'secondary'}
|
||||||
onClick={() => updateEvaluationValue(
|
onClick={() => updateEvaluationValue(
|
||||||
false,
|
false,
|
||||||
@@ -422,7 +424,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
<div className="appPageSection__checklist">
|
<div className="appPageSection__checklist">
|
||||||
{data.checklist.map((o, i) => <div key={o.id}>
|
{data.checklist.map((o, i) => <div key={o.id}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
disabled={data.status === 'CLOSE'}
|
disabled={shouldDisableField('checklist')}
|
||||||
inputId={`checklist_${o.id}`}
|
inputId={`checklist_${o.id}`}
|
||||||
onChange={(e) => updateEvaluationValue(
|
onChange={(e) => updateEvaluationValue(
|
||||||
e.checked,
|
e.checked,
|
||||||
@@ -438,7 +440,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
<div>
|
<div>
|
||||||
<Editor
|
<Editor
|
||||||
value={data.note}
|
value={data.note}
|
||||||
readOnly={data.status === 'CLOSE'}
|
readOnly={shouldDisableField('note')}
|
||||||
placeholder={__('Digita qui il messagio', 'gepafin')}
|
placeholder={__('Digita qui il messagio', 'gepafin')}
|
||||||
headerTemplate={header}
|
headerTemplate={header}
|
||||||
onTextChange={(e) => updateEvaluationValue(
|
onTextChange={(e) => updateEvaluationValue(
|
||||||
@@ -466,7 +468,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
outlined severity="info"
|
outlined severity="info"
|
||||||
aria-label={__('Mostra', 'gepafin')}/> : null}
|
aria-label={__('Mostra', 'gepafin')}/> : null}
|
||||||
<Button icon="pi pi-thumbs-up" rounded outlined
|
<Button icon="pi pi-thumbs-up" rounded outlined
|
||||||
disabled={data.status === 'CLOSE'}
|
disabled={shouldDisableField('files')}
|
||||||
severity={!isNil(o.valid) && o.valid ? 'success' : 'secondary'}
|
severity={!isNil(o.valid) && o.valid ? 'success' : 'secondary'}
|
||||||
onClick={() => updateEvaluationValue(
|
onClick={() => updateEvaluationValue(
|
||||||
true,
|
true,
|
||||||
@@ -474,7 +476,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
)}
|
)}
|
||||||
aria-label={__('Su', 'gepafin')}/>
|
aria-label={__('Su', 'gepafin')}/>
|
||||||
<Button icon="pi pi-thumbs-down" rounded outlined
|
<Button icon="pi pi-thumbs-down" rounded outlined
|
||||||
disabled={data.status === 'CLOSE'}
|
disabled={shouldDisableField('files')}
|
||||||
severity={!isNil(o.valid) && !o.valid ? 'danger' : 'secondary'}
|
severity={!isNil(o.valid) && !o.valid ? 'danger' : 'secondary'}
|
||||||
onClick={() => updateEvaluationValue(
|
onClick={() => updateEvaluationValue(
|
||||||
false,
|
false,
|
||||||
|
|||||||
@@ -157,11 +157,17 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
||||||
onFilter={(e) => setFilters(e.filters)}>
|
onFilter={(e) => setFilters(e.filters)}>
|
||||||
<Column field="id" header={__('ID domanda', 'gepafin')}
|
<Column field="id" header={__('ID domanda', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
sortable
|
||||||
|
filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column field="callTitle" header={__('Bando', 'gepafin')}
|
<Column field="callTitle" header={__('Bando', 'gepafin')}
|
||||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
filter sortable
|
||||||
|
filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '10rem' }}/>
|
style={{ minWidth: '10rem' }}/>
|
||||||
|
<Column field="companyName" header={__('Azienda', 'gepafin')}
|
||||||
|
filter sortable
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data Ricezione', 'gepafin')}
|
<Column header={__('Data Ricezione', 'gepafin')}
|
||||||
filterField="submissionDate" dataType="date"
|
filterField="submissionDate" dataType="date"
|
||||||
style={{ minWidth: '8rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ const Domande = () => {
|
|||||||
<div className="appForm__field">
|
<div className="appForm__field">
|
||||||
<label
|
<label
|
||||||
className={classNames({ 'p-error': isEmpty(chosenUser) || chosenUser === 0 || chosenApplication === 0 })}>
|
className={classNames({ 'p-error': isEmpty(chosenUser) || chosenUser === 0 || chosenApplication === 0 })}>
|
||||||
{__('Pre-istruttore', 'gepafin')}*
|
{__('Istruttore', 'gepafin')}*
|
||||||
</label>
|
</label>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
value={chosenUser}
|
value={chosenUser}
|
||||||
|
|||||||
@@ -171,17 +171,23 @@ const BeneficiarioDomandeTable = () => {
|
|||||||
header={header}
|
header={header}
|
||||||
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
emptyMessage={__('Nessun dato disponibile', 'gepafin')}
|
||||||
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')}
|
||||||
|
sortable
|
||||||
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '6rem' }}/>
|
style={{ minWidth: '6rem' }}/>
|
||||||
<Column field="callTitle" header={__('Titolo bando', 'gepafin')} filter
|
<Column field="callTitle" header={__('Titolo bando', 'gepafin')}
|
||||||
|
filter sortable
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
|
style={{ minWidth: '8rem' }}/>
|
||||||
|
<Column field="companyName" header={__('Azienda', 'gepafin')}
|
||||||
|
filter sortable
|
||||||
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
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: '8rem' }}
|
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={{ minWidth: '7rem' }} body={statusBodyTemplate} filter
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate}
|
||||||
filterElement={statusFilterTemplate}/>
|
filterElement={statusFilterTemplate}/>
|
||||||
<Column header={__('Esito', 'gepafin')}
|
<Column header={__('Esito', 'gepafin')}
|
||||||
style={{ minWidth: '7rem' }} field="progress" body={progressBodyTemplate}/>
|
style={{ minWidth: '7rem' }} field="progress" body={progressBodyTemplate}/>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { klona } from 'klona';
|
|||||||
import { wrap } from 'object-path-immutable';
|
import { wrap } from 'object-path-immutable';
|
||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
import emailjs from '@emailjs/browser';
|
import emailjs from '@emailjs/browser';
|
||||||
import { useNavigate } from 'react-router-dom';
|
//import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
// store
|
// store
|
||||||
import { storeSet, useStore, storeGet } from '../../store';
|
import { storeSet, useStore, storeGet } from '../../store';
|
||||||
@@ -41,7 +41,7 @@ const ProfileCompany = () => {
|
|||||||
const [isVisibleRemoveDialog, setIsVisibleRemoveDialog] = useState(false);
|
const [isVisibleRemoveDialog, setIsVisibleRemoveDialog] = useState(false);
|
||||||
const { delegaFirstName = '', delegaLastName = '', delegaCodiceFiscale = '' } = delegaData;
|
const { delegaFirstName = '', delegaLastName = '', delegaCodiceFiscale = '' } = delegaData;
|
||||||
const toast = useRef(null);
|
const toast = useRef(null);
|
||||||
const navigate = useNavigate();
|
//const navigate = useNavigate();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
control,
|
control,
|
||||||
|
|||||||
@@ -397,8 +397,6 @@ const SoccorsoEditPreInstructor = () => {
|
|||||||
AmendmentsService.getSoccorsoById(getCallback, errGetCallback, [['id', soccorsoEntityId]]);
|
AmendmentsService.getSoccorsoById(getCallback, errGetCallback, [['id', soccorsoEntityId]]);
|
||||||
}, [amendmentId]);
|
}, [amendmentId]);
|
||||||
|
|
||||||
console.log('formInitialData', formInitialData)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="appPage">
|
<div className="appPage">
|
||||||
<div className="appPage__pageHeader">
|
<div className="appPage__pageHeader">
|
||||||
@@ -536,13 +534,6 @@ const SoccorsoEditPreInstructor = () => {
|
|||||||
/>
|
/>
|
||||||
}) : null}
|
}) : null}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{/*<Button
|
|
||||||
style={{ marginTop: 30 }}
|
|
||||||
type="button"
|
|
||||||
disabled={data.status === 'CLOSE'}
|
|
||||||
onClick={doUpdateAmendment}
|
|
||||||
label={__('Aggiorna', 'gepafin')}/>*/}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user