- updated contract functionality;
This commit is contained in:
@@ -78,10 +78,10 @@ const getBandoLabel = (status) => {
|
|||||||
return __('Respinto Tec-Fin', 'gepafin');
|
return __('Respinto Tec-Fin', 'gepafin');
|
||||||
|
|
||||||
case 'AWAITING_CONTRACT':
|
case 'AWAITING_CONTRACT':
|
||||||
return __('Awaiting contract', 'gepafin');
|
return __('In attesa di contratto', 'gepafin');
|
||||||
|
|
||||||
case 'CONTRACT_SIGNED':
|
case 'CONTRACT_SIGNED':
|
||||||
return __('Contract signed', 'gepafin');
|
return __('Contratto firmato', 'gepafin');
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ const DashboardBeneficiario = () => {
|
|||||||
|
|
||||||
const getUploadApplicationContractCallback = (data) => {
|
const getUploadApplicationContractCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
//setData(getFormattedData(data.data));
|
setContractsData(null);
|
||||||
if (toast.current && data.message) {
|
if (toast.current && data.message) {
|
||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'success',
|
severity: 'success',
|
||||||
@@ -185,7 +185,7 @@ const DashboardBeneficiario = () => {
|
|||||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, width: '100%' }}>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, width: '100%' }}>
|
||||||
<div style={{ display: 'flex', gap: 10 }}>
|
<div style={{ display: 'flex', gap: 10 }}>
|
||||||
<i className="pi pi-info-circle"></i>
|
<i className="pi pi-info-circle"></i>
|
||||||
<span className="summary">{__('You must upload contract for applications:', 'gepafin')}</span>
|
<span className="summary">{__('Contratti in attesa:', 'gepafin')}</span>
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
{contractsData.map(o => <li key={o.id}>
|
{contractsData.map(o => <li key={o.id}>
|
||||||
@@ -313,7 +313,7 @@ const DashboardBeneficiario = () => {
|
|||||||
style={{ maxWidth: '600px', width: '100%' }}
|
style={{ maxWidth: '600px', width: '100%' }}
|
||||||
onHide={hideContractDialog}>
|
onHide={hideContractDialog}>
|
||||||
<div className="appForm__field">
|
<div className="appForm__field">
|
||||||
<p>The administration requires you to download these documents:</p>
|
<p>Scarica il contratto:</p>
|
||||||
<ul>
|
<ul>
|
||||||
{contractFormData?.instructorDocuments
|
{contractFormData?.instructorDocuments
|
||||||
? contractFormData.instructorDocuments.map(o => <li key={o.id}>
|
? contractFormData.instructorDocuments.map(o => <li key={o.id}>
|
||||||
@@ -321,18 +321,18 @@ const DashboardBeneficiario = () => {
|
|||||||
</li>)
|
</li>)
|
||||||
: null}
|
: null}
|
||||||
</ul>
|
</ul>
|
||||||
<p>Sign them digitally and upload them back in the form below:</p>
|
<p>Firmalo digitalmente e ricaricalo</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="appForm__field">
|
<div className="appForm__field">
|
||||||
<label
|
<label
|
||||||
className={classNames({ 'p-error': !contractFormData.files || isEmpty(contractFormData.files) })}>
|
className={classNames({ 'p-error': !contractFormData.files || isEmpty(contractFormData.files) })}>
|
||||||
{__('Files', 'gepafin')}*
|
{__('Files', 'gepafin')}* (p7m)
|
||||||
</label>
|
</label>
|
||||||
<FileUpload
|
<FileUpload
|
||||||
ref={contractFormFilesRef}
|
ref={contractFormFilesRef}
|
||||||
name="files[]"
|
name="files[]"
|
||||||
multiple
|
multiple
|
||||||
accept={mimeTypes.map(o => o.code).join(',')}
|
accept='.p7m,application/pkcs7-mime,application/x-pkcs7-mime'
|
||||||
maxFileSize={defaultMaxFileSize}
|
maxFileSize={defaultMaxFileSize}
|
||||||
auto={false}
|
auto={false}
|
||||||
customUpload={true}
|
customUpload={true}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import MyLatestSubmissionsTableAsync from '../DashboardBeneficiario/components/M
|
|||||||
import LatestBandiBeneficiarioTableAsync from '../DashboardBeneficiario/components/LatestBandiBeneficiarioTableAsync';
|
import LatestBandiBeneficiarioTableAsync from '../DashboardBeneficiario/components/LatestBandiBeneficiarioTableAsync';
|
||||||
import { classNames } from 'primereact/utils';
|
import { classNames } from 'primereact/utils';
|
||||||
import { FileUpload } from 'primereact/fileupload';
|
import { FileUpload } from 'primereact/fileupload';
|
||||||
import { defaultMaxFileSize, mimeTypes } from '../../configData';
|
import { defaultMaxFileSize } from '../../configData';
|
||||||
import { Dialog } from 'primereact/dialog';
|
import { Dialog } from 'primereact/dialog';
|
||||||
import { Toast } from 'primereact/toast';
|
import { Toast } from 'primereact/toast';
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ const DashboardBeneficiarioConfidi = () => {
|
|||||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, width: '100%' }}>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, width: '100%' }}>
|
||||||
<div style={{ display: 'flex', gap: 10 }}>
|
<div style={{ display: 'flex', gap: 10 }}>
|
||||||
<i className="pi pi-info-circle"></i>
|
<i className="pi pi-info-circle"></i>
|
||||||
<span className="summary">{__('You must upload contract for applications:', 'gepafin')}</span>
|
<span className="summary">{__('Contratti in attesa:', 'gepafin')}</span>
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
{contractsData.map(o => <li key={o.id}>
|
{contractsData.map(o => <li key={o.id}>
|
||||||
@@ -313,7 +313,7 @@ const DashboardBeneficiarioConfidi = () => {
|
|||||||
style={{ maxWidth: '600px', width: '100%' }}
|
style={{ maxWidth: '600px', width: '100%' }}
|
||||||
onHide={hideContractDialog}>
|
onHide={hideContractDialog}>
|
||||||
<div className="appForm__field">
|
<div className="appForm__field">
|
||||||
<p>The administration requires you to download these documents:</p>
|
<p>Scarica il contratto:</p>
|
||||||
<ul>
|
<ul>
|
||||||
{contractFormData?.instructorDocuments
|
{contractFormData?.instructorDocuments
|
||||||
? contractFormData.instructorDocuments.map(o => <li key={o.id}>
|
? contractFormData.instructorDocuments.map(o => <li key={o.id}>
|
||||||
@@ -321,18 +321,18 @@ const DashboardBeneficiarioConfidi = () => {
|
|||||||
</li>)
|
</li>)
|
||||||
: null}
|
: null}
|
||||||
</ul>
|
</ul>
|
||||||
<p>Sign them digitally and upload them back in the form below:</p>
|
<p>Firmalo digitalmente e ricaricalo</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="appForm__field">
|
<div className="appForm__field">
|
||||||
<label
|
<label
|
||||||
className={classNames({ 'p-error': !contractFormData.files || isEmpty(contractFormData.files) })}>
|
className={classNames({ 'p-error': !contractFormData.files || isEmpty(contractFormData.files) })}>
|
||||||
{__('Files', 'gepafin')}*
|
{__('Files', 'gepafin')}* (p7m)
|
||||||
</label>
|
</label>
|
||||||
<FileUpload
|
<FileUpload
|
||||||
ref={contractFormFilesRef}
|
ref={contractFormFilesRef}
|
||||||
name="files[]"
|
name="files[]"
|
||||||
multiple
|
multiple
|
||||||
accept={mimeTypes.map(o => o.code).join(',')}
|
accept='.p7m,application/pkcs7-mime,application/x-pkcs7-mime'
|
||||||
maxFileSize={defaultMaxFileSize}
|
maxFileSize={defaultMaxFileSize}
|
||||||
auto={false}
|
auto={false}
|
||||||
customUpload={true}
|
customUpload={true}
|
||||||
|
|||||||
@@ -31,9 +31,15 @@ import SoccorsoResendEmails from '../../../SoccorsoEditPreInstructor/components/
|
|||||||
|
|
||||||
const APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
const APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||||
|
|
||||||
const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [],
|
const DomandeTablePreInstructorAsync = ({
|
||||||
applicationStatuses = ['EVALUATION', 'SOCCORSO', 'NDG', 'APPOINTMENT', 'ADMISSIBLE',
|
userId = null,
|
||||||
'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION']}) => {
|
statuses = [],
|
||||||
|
applicationStatuses = [
|
||||||
|
'EVALUATION', 'SOCCORSO', 'NDG', 'APPOINTMENT', 'ADMISSIBLE',
|
||||||
|
'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION',
|
||||||
|
'AWAITING_CONTRACT', 'CONTRACT_SIGNED'
|
||||||
|
]
|
||||||
|
}) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const userData = useStoreValue('userData');
|
const userData = useStoreValue('userData');
|
||||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||||
@@ -244,7 +250,7 @@ const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [],
|
|||||||
AssignedApplicationService.assignApplicationPaginated(paginationQuery, getCallback, errGetCallbacks);
|
AssignedApplicationService.assignApplicationPaginated(paginationQuery, getCallback, errGetCallbacks);
|
||||||
}
|
}
|
||||||
}, [lazyState]);
|
}, [lazyState]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="appPageSection__table">
|
<div className="appPageSection__table">
|
||||||
<DataTable
|
<DataTable
|
||||||
@@ -300,7 +306,7 @@ const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [],
|
|||||||
<Column field="assignedUserName" header={__('Assegnato', 'gepafin')}
|
<Column field="assignedUserName" header={__('Assegnato', 'gepafin')}
|
||||||
filterField="assignedUserName" filter
|
filterField="assignedUserName" filter
|
||||||
filterMatchModeOptions={translationStrings.textFilterOptions}
|
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column field="applicationStatus" header={__('Stato', 'gepafin')}
|
<Column field="applicationStatus" header={__('Stato', 'gepafin')}
|
||||||
style={{ minWidth: '7rem' }} body={statusBodyTemplate}
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate}
|
||||||
filter
|
filter
|
||||||
|
|||||||
@@ -1078,7 +1078,11 @@ const DomandaEditInstructorManager = () => {
|
|||||||
|
|
||||||
const getUploadApplicationContractCallback = (data) => {
|
const getUploadApplicationContractCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
//setData(getFormattedData(data.data));
|
setData((prev) => ({
|
||||||
|
...prev,
|
||||||
|
applicationStatus: 'AWAITING_CONTRACT',
|
||||||
|
contract: data.data
|
||||||
|
}));
|
||||||
if (toast.current && data.message) {
|
if (toast.current && data.message) {
|
||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'success',
|
severity: 'success',
|
||||||
|
|||||||
@@ -1078,7 +1078,11 @@ const DomandaEditPreInstructor = () => {
|
|||||||
|
|
||||||
const getUploadApplicationContractCallback = (data) => {
|
const getUploadApplicationContractCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
//setData(getFormattedData(data.data));
|
setData((prev) => ({
|
||||||
|
...prev,
|
||||||
|
applicationStatus: 'AWAITING_CONTRACT',
|
||||||
|
contract: data.data
|
||||||
|
}));
|
||||||
if (toast.current && data.message) {
|
if (toast.current && data.message) {
|
||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'success',
|
severity: 'success',
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const AllDomandeBeneficiarioTableAsync = ({ statuses }) => {
|
|||||||
companyName: { value: null, matchMode: 'contains' },
|
companyName: { value: null, matchMode: 'contains' },
|
||||||
submissionDate: { value: null, matchMode: 'dateIs' },
|
submissionDate: { value: null, matchMode: 'dateIs' },
|
||||||
assignedUserName: { value: null, matchMode: 'equals' },
|
assignedUserName: { value: null, matchMode: 'equals' },
|
||||||
status: { value: null, matchMode: 'equals' }
|
applicationStatus: { value: null, matchMode: 'equals' }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -122,13 +122,14 @@ const AllDomandeBeneficiarioTableAsync = ({ statuses }) => {
|
|||||||
options.filterCallback(e.value, options.index)
|
options.filterCallback(e.value, options.index)
|
||||||
const filters = { ...lazyState.filters };
|
const filters = { ...lazyState.filters };
|
||||||
if (e.value) {
|
if (e.value) {
|
||||||
filters['status'] = { value: e.value, matchMode: 'equals' };
|
filters['applicationStatus'] = { value: e.value, matchMode: 'equals' };
|
||||||
} else {
|
} else {
|
||||||
delete filters['status'];
|
delete filters['applicationStatus'];
|
||||||
}
|
}
|
||||||
setLazyState({ ...lazyState, filters, first: 0 });
|
setLazyState({ ...lazyState, filters, first: 0 });
|
||||||
}}
|
}}
|
||||||
itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel} className="p-column-filter"/>;
|
itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel}
|
||||||
|
className="p-column-filter"/>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const dateFilterTemplate = (options) => {
|
const dateFilterTemplate = (options) => {
|
||||||
@@ -182,7 +183,7 @@ const AllDomandeBeneficiarioTableAsync = ({ statuses }) => {
|
|||||||
filterMatchModeOptions={translationStrings.dateFilterOptions}
|
filterMatchModeOptions={translationStrings.dateFilterOptions}
|
||||||
style={{ minWidth: '8rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateAppliedBodyTemplate}/>
|
body={dateAppliedBodyTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')}
|
<Column field="applicationStatus" header={__('Stato', 'gepafin')}
|
||||||
filterElement={statusFilterTemplate} filter
|
filterElement={statusFilterTemplate} filter
|
||||||
filterMatchModeOptions={translationStrings.statusFilterOptions}
|
filterMatchModeOptions={translationStrings.statusFilterOptions}
|
||||||
style={{ minWidth: '8rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
|
|||||||
@@ -23,8 +23,10 @@ const DomandeBeneficiario = () => {
|
|||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<AllDomandeBeneficiarioTableAsync statuses={['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT',
|
<AllDomandeBeneficiarioTableAsync
|
||||||
'APPOINTMENT', 'NDG', 'ADMISSIBLE', 'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION']}/>
|
statuses={['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT',
|
||||||
|
'APPOINTMENT', 'NDG', 'ADMISSIBLE', 'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION',
|
||||||
|
'AWAITING_CONTRACT', 'CONTRACT_SIGNED']}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user