- 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]
|
['onlyPreferredCall', showOnlyPreferred]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}, [chosenCompanyId]);
|
}, [chosenCompanyId, companies]);
|
||||||
|
|
||||||
const getCallback = (data) => {
|
const getCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const AllBandiPreferredAccordion = () => {
|
|||||||
['userId', userData.id]
|
['userId', userData.id]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}, [chosenCompanyId]);
|
}, [chosenCompanyId, companies]);
|
||||||
|
|
||||||
const getCallback = (data) => {
|
const getCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
|
|||||||
@@ -554,7 +554,6 @@ const BandoApplication = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const errDocsGetCallbacks = () => {
|
const errDocsGetCallbacks = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -604,13 +603,21 @@ const BandoApplication = () => {
|
|||||||
}, [formValues]);
|
}, [formValues]);
|
||||||
|
|
||||||
useEffect(() => {
|
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;
|
previousStatus.current = applicationStatus;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
previousStatus.current = applicationStatus;
|
previousStatus.current = applicationStatus;
|
||||||
|
}*/
|
||||||
|
if (previousStatus.current === applicationStatus) {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
previousStatus.current = applicationStatus;
|
||||||
|
|
||||||
|
console.log('applicationStatus ...')
|
||||||
if ('DRAFT' === applicationStatus && !isRequestForApplData) {
|
if ('DRAFT' === applicationStatus && !isRequestForApplData) {
|
||||||
const applId = getApplicationId();
|
const applId = getApplicationId();
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ import { Button } from 'primereact/button';
|
|||||||
import ProperBandoLabel from '../../../../components/ProperBandoLabel';
|
import ProperBandoLabel from '../../../../components/ProperBandoLabel';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import translationStrings from '../../../../translationStringsForComponents';
|
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 DraftApplicationsTableAsync = () => {
|
||||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||||
@@ -31,7 +35,8 @@ const DraftApplicationsTableAsync = () => {
|
|||||||
filters: {
|
filters: {
|
||||||
id: { value: null, matchMode: 'contains' },
|
id: { value: null, matchMode: 'contains' },
|
||||||
callTitle: { 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'];
|
const statuses = ['DRAFT', 'AWAITING', 'READY'];
|
||||||
@@ -120,6 +125,26 @@ const DraftApplicationsTableAsync = () => {
|
|||||||
return <ProgressBar value={options.progress} color={'#64748B'}></ProgressBar>;
|
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) => {
|
const actionsBodyTemplate = (rowData) => {
|
||||||
return <Link to={`/domande/${rowData.id}/preview`}>
|
return <Link to={`/domande/${rowData.id}/preview`}>
|
||||||
<Button severity="info" label={__('Anteprima', 'gepafin')} icon="pi pi-eye" size="small"
|
<Button severity="info" label={__('Anteprima', 'gepafin')} icon="pi pi-eye" size="small"
|
||||||
@@ -155,6 +180,8 @@ const DraftApplicationsTableAsync = () => {
|
|||||||
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')}
|
<Column field="status" header={__('Stato', 'gepafin')}
|
||||||
|
filterElement={statusFilterTemplate} filter
|
||||||
|
filterMatchModeOptions={translationStrings.statusFilterOptions}
|
||||||
style={{ minWidth: '7rem' }} body={statusBodyTemplate}/>
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate}/>
|
||||||
<Column header={__('Progressi', 'gepafin')}
|
<Column header={__('Progressi', 'gepafin')}
|
||||||
style={{ minWidth: '10rem' }} field="progress" body={progressBodyTemplate}/>
|
style={{ minWidth: '10rem' }} field="progress" body={progressBodyTemplate}/>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const MyLatestSubmissionsTable = () => {
|
|||||||
['statuses', ['DRAFT', 'AWAITING', 'READY']]
|
['statuses', ['DRAFT', 'AWAITING', 'READY']]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}, [chosenCompanyId]);
|
}, [chosenCompanyId, companies]);
|
||||||
|
|
||||||
const getApplCallback = (data) => {
|
const getApplCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const DocumentsTable = ({ type, reload = 0 }) => {
|
|||||||
['documentType', type]
|
['documentType', type]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}, [chosenCompanyId, reload]);
|
}, [chosenCompanyId, reload, companies]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const existingCompany = head(companies.filter(o => o.id === chosenCompanyId));
|
const existingCompany = head(companies.filter(o => o.id === chosenCompanyId));
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const BeneficiarioDomandeTable = () => {
|
|||||||
['statuses', ['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT']] // 'NDG', 'ADMISSIBLE', 'APPOINTMENT'
|
['statuses', ['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT']] // 'NDG', 'ADMISSIBLE', 'APPOINTMENT'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}, [chosenCompanyId]);
|
}, [chosenCompanyId, companies]);
|
||||||
|
|
||||||
const getApplCallback = (data) => {
|
const getApplCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ import { __ } from '@wordpress/i18n';
|
|||||||
import DashboardService from '../../service/dashboard-service';
|
import DashboardService from '../../service/dashboard-service';
|
||||||
import { pathOr } from 'ramda';
|
import { pathOr } from 'ramda';
|
||||||
import NumberFlow from '@number-flow/react';
|
import NumberFlow from '@number-flow/react';
|
||||||
//import PreInstructorSoccorsiTable from '../SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable';
|
//import SoccorsiPreInstructorTableAsync from '../SoccorsoIstruttorioPreInstructor/components/SoccorsiPreInstructorTableAsync';
|
||||||
import SoccorsiPreInstructorTableAsync
|
import PreInstructorSoccorsiTable from '../SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable';
|
||||||
from '../SoccorsoIstruttorioPreInstructor/components/SoccorsiPreInstructorTableAsync';
|
|
||||||
|
|
||||||
const SoccorsoIstruttorioInstructorManager = () => {
|
const SoccorsoIstruttorioInstructorManager = () => {
|
||||||
const [mainStats, setMainStats] = useState({});
|
const [mainStats, setMainStats] = useState({});
|
||||||
@@ -88,8 +87,8 @@ const SoccorsoIstruttorioInstructorManager = () => {
|
|||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
{/*<PreInstructorSoccorsiTable userId={0}/>*/}
|
<PreInstructorSoccorsiTable userId={0}/>
|
||||||
<SoccorsiPreInstructorTableAsync userId={0}/>
|
{/*<SoccorsiPreInstructorTableAsync userId={0}/>*/}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,11 +2,12 @@ import React from 'react';
|
|||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import SoccorsiInstructorManagerMioTableAsync from './components/SoccorsiInstructorManagerMioTableAsync';
|
//import SoccorsiInstructorManagerMioTableAsync from './components/SoccorsiInstructorManagerMioTableAsync';
|
||||||
import { useStore } from '../../store';
|
//import { useStore } from '../../store';
|
||||||
|
import InstructorManagerSoccorsiTable from './components/InstructorManagerSoccorsiTable';
|
||||||
|
|
||||||
const SoccorsoIstruttorioMioInstructorManager = () => {
|
const SoccorsoIstruttorioMioInstructorManager = () => {
|
||||||
const userData = useStore().main.userData();
|
//const userData = useStore().main.userData();
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className="appPage">
|
<div className="appPage">
|
||||||
@@ -17,7 +18,8 @@ const SoccorsoIstruttorioMioInstructorManager = () => {
|
|||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<SoccorsiInstructorManagerMioTableAsync userId={userData.id}/>
|
{/*<SoccorsiInstructorManagerMioTableAsync userId={userData.id}/>*/}
|
||||||
|
<InstructorManagerSoccorsiTable/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ import { useStore } from '../../store';
|
|||||||
|
|
||||||
// components
|
// components
|
||||||
import DashboardService from '../../service/dashboard-service';
|
import DashboardService from '../../service/dashboard-service';
|
||||||
import SoccorsiPreInstructorTableAsync from './components/SoccorsiPreInstructorTableAsync';
|
//import SoccorsiPreInstructorTableAsync from './components/SoccorsiPreInstructorTableAsync';
|
||||||
|
import PreInstructorSoccorsiTable from './components/PreInstructorSoccorsiTable';
|
||||||
|
|
||||||
const SoccorsoIstruttorioPreInstructor = () => {
|
const SoccorsoIstruttorioPreInstructor = () => {
|
||||||
const [mainStats, setMainStats] = useState({});
|
const [mainStats, setMainStats] = useState({});
|
||||||
@@ -90,7 +91,8 @@ const SoccorsoIstruttorioPreInstructor = () => {
|
|||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<SoccorsiPreInstructorTableAsync userId={userData.id}/>
|
{/*<SoccorsiPreInstructorTableAsync userId={userData.id}/>*/}
|
||||||
|
<PreInstructorSoccorsiTable userId={userData.id}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ const BeneficiarioUltimeDomandeTable = () => {
|
|||||||
['statuses', ['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT']] // 'NDG', 'ADMISSIBLE', 'APPOINTMENT'
|
['statuses', ['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT']] // 'NDG', 'ADMISSIBLE', 'APPOINTMENT'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}, [chosenCompanyId]);
|
}, [chosenCompanyId, companies]);
|
||||||
|
|
||||||
const getApplCallback = (resp) => {
|
const getApplCallback = (resp) => {
|
||||||
if (resp.status === 'SUCCESS') {
|
if (resp.status === 'SUCCESS') {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const StatsBeneficiary = () => {
|
|||||||
if (existingCompany) {
|
if (existingCompany) {
|
||||||
DashboardService.getBeneficiaryStatsPage(chosenCompanyId, getStats, errGetStats);
|
DashboardService.getBeneficiaryStatsPage(chosenCompanyId, getStats, errGetStats);
|
||||||
}
|
}
|
||||||
}, [chosenCompanyId]);
|
}, [chosenCompanyId, companies]);
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className="appPage">
|
<div className="appPage">
|
||||||
|
|||||||
Reference in New Issue
Block a user