- fixed request for signed document in applications;
- added filter by status to the table of draft applications; - temp reverted back to previous api for getting amendments;
This commit is contained in:
@@ -55,7 +55,7 @@ const AllBandiAccordion = ({ showOnlyPreferred = false }) => {
|
||||
['onlyPreferredCall', showOnlyPreferred]
|
||||
]);
|
||||
}
|
||||
}, [chosenCompanyId]);
|
||||
}, [chosenCompanyId, companies]);
|
||||
|
||||
const getCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
|
||||
@@ -49,7 +49,7 @@ const AllBandiPreferredAccordion = () => {
|
||||
['userId', userData.id]
|
||||
]);
|
||||
}
|
||||
}, [chosenCompanyId]);
|
||||
}, [chosenCompanyId, companies]);
|
||||
|
||||
const getCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
|
||||
@@ -554,7 +554,6 @@ const BandoApplication = () => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const errDocsGetCallbacks = () => {
|
||||
}
|
||||
|
||||
@@ -604,13 +603,21 @@ const BandoApplication = () => {
|
||||
}, [formValues]);
|
||||
|
||||
useEffect(() => {
|
||||
if (previousStatus.current === applicationStatus || (previousStatus.current !== applicationStatus && isEmpty(previousStatus.current))) {
|
||||
console.log('applicationStatus', previousStatus.current, applicationStatus,
|
||||
previousStatus.current === applicationStatus, (previousStatus.current !== applicationStatus && isEmpty(previousStatus.current)))
|
||||
/*if (previousStatus.current === applicationStatus || (previousStatus.current !== applicationStatus && isEmpty(previousStatus.current))) {
|
||||
previousStatus.current = applicationStatus;
|
||||
return;
|
||||
} else {
|
||||
previousStatus.current = applicationStatus;
|
||||
}*/
|
||||
if (previousStatus.current === applicationStatus) {
|
||||
return
|
||||
}
|
||||
|
||||
previousStatus.current = applicationStatus;
|
||||
|
||||
console.log('applicationStatus ...')
|
||||
if ('DRAFT' === applicationStatus && !isRequestForApplData) {
|
||||
const applId = getApplicationId();
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@ import { Button } from 'primereact/button';
|
||||
import ProperBandoLabel from '../../../../components/ProperBandoLabel';
|
||||
import { Link } from 'react-router-dom';
|
||||
import translationStrings from '../../../../translationStringsForComponents';
|
||||
import { Dropdown } from 'primereact/dropdown';
|
||||
import { Tag } from 'primereact/tag';
|
||||
import getBandoLabel from '../../../../helpers/getBandoLabel';
|
||||
import getBandoSeverity from '../../../../helpers/getBandoSeverity';
|
||||
|
||||
const DraftApplicationsTableAsync = () => {
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
@@ -31,7 +35,8 @@ const DraftApplicationsTableAsync = () => {
|
||||
filters: {
|
||||
id: { value: null, matchMode: 'contains' },
|
||||
callTitle: { value: null, matchMode: 'contains' },
|
||||
companyName: { value: null, matchMode: 'contains' }
|
||||
companyName: { value: null, matchMode: 'contains' },
|
||||
status: { value: null, matchMode: 'contains' }
|
||||
}
|
||||
});
|
||||
const statuses = ['DRAFT', 'AWAITING', 'READY'];
|
||||
@@ -120,6 +125,26 @@ const DraftApplicationsTableAsync = () => {
|
||||
return <ProgressBar value={options.progress} color={'#64748B'}></ProgressBar>;
|
||||
};
|
||||
|
||||
const statusItemTemplate = (option) => {
|
||||
return <Tag value={getBandoLabel(option)} severity={getBandoSeverity(option)}/>;
|
||||
};
|
||||
|
||||
const statusFilterTemplate = (options) => {
|
||||
return <Dropdown value={options.value} options={statuses}
|
||||
onChange={(e) => {
|
||||
options.filterCallback(e.value, options.index)
|
||||
const filters = { ...lazyState.filters };
|
||||
if (e.value) {
|
||||
filters['status'] = { value: e.value, matchMode: 'equals' };
|
||||
} else {
|
||||
delete filters['status'];
|
||||
}
|
||||
setLazyState({ ...lazyState, filters, first: 0 });
|
||||
}}
|
||||
itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel} className="p-column-filter"
|
||||
showClear/>;
|
||||
};
|
||||
|
||||
const actionsBodyTemplate = (rowData) => {
|
||||
return <Link to={`/domande/${rowData.id}/preview`}>
|
||||
<Button severity="info" label={__('Anteprima', 'gepafin')} icon="pi pi-eye" size="small"
|
||||
@@ -155,6 +180,8 @@ const DraftApplicationsTableAsync = () => {
|
||||
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||
style={{ minWidth: '8rem' }}/>
|
||||
<Column field="status" header={__('Stato', 'gepafin')}
|
||||
filterElement={statusFilterTemplate} filter
|
||||
filterMatchModeOptions={translationStrings.statusFilterOptions}
|
||||
style={{ minWidth: '7rem' }} body={statusBodyTemplate}/>
|
||||
<Column header={__('Progressi', 'gepafin')}
|
||||
style={{ minWidth: '10rem' }} field="progress" body={progressBodyTemplate}/>
|
||||
|
||||
@@ -45,7 +45,7 @@ const MyLatestSubmissionsTable = () => {
|
||||
['statuses', ['DRAFT', 'AWAITING', 'READY']]
|
||||
]);
|
||||
}
|
||||
}, [chosenCompanyId]);
|
||||
}, [chosenCompanyId, companies]);
|
||||
|
||||
const getApplCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
|
||||
@@ -41,7 +41,7 @@ const DocumentsTable = ({ type, reload = 0 }) => {
|
||||
['documentType', type]
|
||||
]);
|
||||
}
|
||||
}, [chosenCompanyId, reload]);
|
||||
}, [chosenCompanyId, reload, companies]);
|
||||
|
||||
useEffect(() => {
|
||||
const existingCompany = head(companies.filter(o => o.id === chosenCompanyId));
|
||||
|
||||
@@ -43,7 +43,7 @@ const BeneficiarioDomandeTable = () => {
|
||||
['statuses', ['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT']] // 'NDG', 'ADMISSIBLE', 'APPOINTMENT'
|
||||
]);
|
||||
}
|
||||
}, [chosenCompanyId]);
|
||||
}, [chosenCompanyId, companies]);
|
||||
|
||||
const getApplCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
|
||||
@@ -5,9 +5,8 @@ import { __ } from '@wordpress/i18n';
|
||||
import DashboardService from '../../service/dashboard-service';
|
||||
import { pathOr } from 'ramda';
|
||||
import NumberFlow from '@number-flow/react';
|
||||
//import PreInstructorSoccorsiTable from '../SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable';
|
||||
import SoccorsiPreInstructorTableAsync
|
||||
from '../SoccorsoIstruttorioPreInstructor/components/SoccorsiPreInstructorTableAsync';
|
||||
//import SoccorsiPreInstructorTableAsync from '../SoccorsoIstruttorioPreInstructor/components/SoccorsiPreInstructorTableAsync';
|
||||
import PreInstructorSoccorsiTable from '../SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable';
|
||||
|
||||
const SoccorsoIstruttorioInstructorManager = () => {
|
||||
const [mainStats, setMainStats] = useState({});
|
||||
@@ -88,8 +87,8 @@ const SoccorsoIstruttorioInstructorManager = () => {
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
<div className="appPageSection">
|
||||
{/*<PreInstructorSoccorsiTable userId={0}/>*/}
|
||||
<SoccorsiPreInstructorTableAsync userId={0}/>
|
||||
<PreInstructorSoccorsiTable userId={0}/>
|
||||
{/*<SoccorsiPreInstructorTableAsync userId={0}/>*/}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -2,11 +2,12 @@ import React from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
// components
|
||||
import SoccorsiInstructorManagerMioTableAsync from './components/SoccorsiInstructorManagerMioTableAsync';
|
||||
import { useStore } from '../../store';
|
||||
//import SoccorsiInstructorManagerMioTableAsync from './components/SoccorsiInstructorManagerMioTableAsync';
|
||||
//import { useStore } from '../../store';
|
||||
import InstructorManagerSoccorsiTable from './components/InstructorManagerSoccorsiTable';
|
||||
|
||||
const SoccorsoIstruttorioMioInstructorManager = () => {
|
||||
const userData = useStore().main.userData();
|
||||
//const userData = useStore().main.userData();
|
||||
|
||||
return(
|
||||
<div className="appPage">
|
||||
@@ -17,7 +18,8 @@ const SoccorsoIstruttorioMioInstructorManager = () => {
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
<div className="appPageSection">
|
||||
<SoccorsiInstructorManagerMioTableAsync userId={userData.id}/>
|
||||
{/*<SoccorsiInstructorManagerMioTableAsync userId={userData.id}/>*/}
|
||||
<InstructorManagerSoccorsiTable/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -8,7 +8,8 @@ import { useStore } from '../../store';
|
||||
|
||||
// components
|
||||
import DashboardService from '../../service/dashboard-service';
|
||||
import SoccorsiPreInstructorTableAsync from './components/SoccorsiPreInstructorTableAsync';
|
||||
//import SoccorsiPreInstructorTableAsync from './components/SoccorsiPreInstructorTableAsync';
|
||||
import PreInstructorSoccorsiTable from './components/PreInstructorSoccorsiTable';
|
||||
|
||||
const SoccorsoIstruttorioPreInstructor = () => {
|
||||
const [mainStats, setMainStats] = useState({});
|
||||
@@ -90,7 +91,8 @@ const SoccorsoIstruttorioPreInstructor = () => {
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
<div className="appPageSection">
|
||||
<SoccorsiPreInstructorTableAsync userId={userData.id}/>
|
||||
{/*<SoccorsiPreInstructorTableAsync userId={userData.id}/>*/}
|
||||
<PreInstructorSoccorsiTable userId={userData.id}/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -58,7 +58,7 @@ const BeneficiarioUltimeDomandeTable = () => {
|
||||
['statuses', ['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT']] // 'NDG', 'ADMISSIBLE', 'APPOINTMENT'
|
||||
]);
|
||||
}
|
||||
}, [chosenCompanyId]);
|
||||
}, [chosenCompanyId, companies]);
|
||||
|
||||
const getApplCallback = (resp) => {
|
||||
if (resp.status === 'SUCCESS') {
|
||||
|
||||
@@ -37,7 +37,7 @@ const StatsBeneficiary = () => {
|
||||
if (existingCompany) {
|
||||
DashboardService.getBeneficiaryStatsPage(chosenCompanyId, getStats, errGetStats);
|
||||
}
|
||||
}, [chosenCompanyId]);
|
||||
}, [chosenCompanyId, companies]);
|
||||
|
||||
return(
|
||||
<div className="appPage">
|
||||
|
||||
Reference in New Issue
Block a user