- updated async tables;
- fixed typo; - added some QOL;
This commit is contained in:
@@ -74,6 +74,7 @@ const Fileupload = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const confirmDelete = (event, file) => {
|
const confirmDelete = (event, file) => {
|
||||||
|
console.log('confirmDelete', file)
|
||||||
confirmPopup({
|
confirmPopup({
|
||||||
target: event.currentTarget,
|
target: event.currentTarget,
|
||||||
message: __('Sei sicuro di cancellare il file?', 'gepafin'),
|
message: __('Sei sicuro di cancellare il file?', 'gepafin'),
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { __ } from '@wordpress/i18n';
|
|||||||
import { Editor } from 'primereact/editor';
|
import { Editor } from 'primereact/editor';
|
||||||
import BlockingOverlay from '../../../BlockingOverlay';
|
import BlockingOverlay from '../../../BlockingOverlay';
|
||||||
import { Button } from 'primereact/button';
|
import { Button } from 'primereact/button';
|
||||||
|
import { isNil } from 'ramda';
|
||||||
|
|
||||||
const Delta = Quill.import('delta');
|
const Delta = Quill.import('delta');
|
||||||
|
|
||||||
@@ -53,15 +54,17 @@ const Wysiwyg = ({
|
|||||||
<>
|
<>
|
||||||
<BlockingOverlay shouldDisplay={disabled}/>
|
<BlockingOverlay shouldDisplay={disabled}/>
|
||||||
<label htmlFor={fieldName} className={classNames({ 'p-error': errors[fieldName] })}>
|
<label htmlFor={fieldName} className={classNames({ 'p-error': errors[fieldName] })}>
|
||||||
{label}{config.required || config.isRequired ? <span className="appForm__field--required">*</span> : null}
|
{label}{config.required || config.isRequired ?
|
||||||
|
<span className="appForm__field--required">*</span> : null}
|
||||||
</label>
|
</label>
|
||||||
<Button
|
{!isNil(setDataFn)
|
||||||
|
? <Button
|
||||||
label={__('Cancella testo', 'gepafin')}
|
label={__('Cancella testo', 'gepafin')}
|
||||||
type="button"
|
type="button"
|
||||||
severity="warning"
|
severity="warning"
|
||||||
outlined
|
outlined
|
||||||
onClick={handleCleanValue}
|
onClick={handleCleanValue}
|
||||||
/>
|
/> : null}
|
||||||
<Controller
|
<Controller
|
||||||
name={fieldName}
|
name={fieldName}
|
||||||
control={control}
|
control={control}
|
||||||
@@ -77,8 +80,8 @@ const Wysiwyg = ({
|
|||||||
modules={{
|
modules={{
|
||||||
clipboard: {
|
clipboard: {
|
||||||
matchers: [
|
matchers: [
|
||||||
[ Node.ELEMENT_NODE, function(node, delta) {
|
[Node.ELEMENT_NODE, function (node, delta) {
|
||||||
const ops = delta.ops.map((op) => ({insert: op.insert}));
|
const ops = delta.ops.map((op) => ({ insert: op.insert }));
|
||||||
return new Delta(ops)
|
return new Delta(ops)
|
||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -201,7 +201,8 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, setInitialData, g
|
|||||||
![
|
![
|
||||||
'descriptionShort', 'descriptionLong', 'documentationRequested', 'threshold',
|
'descriptionShort', 'descriptionLong', 'documentationRequested', 'threshold',
|
||||||
'aimedTo', 'criteria', 'docs', 'checklist', 'faq', 'amount', 'amountMin', 'amountMax',
|
'aimedTo', 'criteria', 'docs', 'checklist', 'faq', 'amount', 'amountMin', 'amountMax',
|
||||||
'email', 'phoneNumber', 'checkList', 'images', 'numberOfCheck', 'appointmentTemplateId'
|
'email', 'phoneNumber', 'checkList', 'images', 'numberOfCheck', 'appointmentTemplateId',
|
||||||
|
'endDate', 'endTime'
|
||||||
].includes(fieldName)
|
].includes(fieldName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, setInitialData, g
|
|||||||
![
|
![
|
||||||
'descriptionShort', 'descriptionLong', 'documentationRequested', 'threshold',
|
'descriptionShort', 'descriptionLong', 'documentationRequested', 'threshold',
|
||||||
'aimedTo', 'criteria', 'docs', 'checklist', 'faq', 'amount', 'amountMin', 'amountMax',
|
'aimedTo', 'criteria', 'docs', 'checklist', 'faq', 'amount', 'amountMin', 'amountMax',
|
||||||
'email', 'phoneNumber', 'checkList', 'images'
|
'email', 'phoneNumber', 'checkList', 'images', 'endDate', 'endTime'
|
||||||
].includes(fieldName)
|
].includes(fieldName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,169 @@
|
|||||||
|
import React, { useState, useEffect, useCallback } from 'react';
|
||||||
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { is, pathOr, isEmpty } from 'ramda';
|
||||||
|
|
||||||
|
// store
|
||||||
|
import { useStore } from '../../../../store';
|
||||||
|
|
||||||
|
// api
|
||||||
|
import ApplicationService from '../../../../service/application-service';
|
||||||
|
|
||||||
|
// components
|
||||||
|
import { DataTable } from 'primereact/datatable';
|
||||||
|
import { Column } from 'primereact/column';
|
||||||
|
import { ProgressBar } from 'primereact/progressbar';
|
||||||
|
import { Button } from 'primereact/button';
|
||||||
|
import ProperBandoLabel from '../../../../components/ProperBandoLabel';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
import translationStrings from '../../../../translationStringsForComponents';
|
||||||
|
|
||||||
|
const DraftApplicationsTableAsync = () => {
|
||||||
|
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||||
|
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||||
|
const [items, setItems] = useState(null);
|
||||||
|
const [totalRecordsNum, setTotalRecordsNum] = useState(0);
|
||||||
|
const [lazyState, setLazyState] = useState({
|
||||||
|
first: 0,
|
||||||
|
rows: 5,
|
||||||
|
page: 0,
|
||||||
|
sortField: null,
|
||||||
|
sortOrder: null,
|
||||||
|
filters: {
|
||||||
|
id: { value: null, matchMode: 'contains' },
|
||||||
|
callTitle: { value: null, matchMode: 'contains' },
|
||||||
|
companyName: { value: null, matchMode: 'contains' }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const statuses = ['DRAFT'];
|
||||||
|
|
||||||
|
const getPaginationQuery = useCallback(() => {
|
||||||
|
let sortBy = {
|
||||||
|
columnName: "ID",
|
||||||
|
sortDesc: true
|
||||||
|
};
|
||||||
|
|
||||||
|
if (lazyState.sortField) {
|
||||||
|
sortBy = {
|
||||||
|
columnName: lazyState.sortField,
|
||||||
|
sortDesc: lazyState.sortOrder === -1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
globalFilters: {
|
||||||
|
page: lazyState.page ? lazyState.page + 1 : 1,
|
||||||
|
limit: lazyState.rows,
|
||||||
|
sortBy
|
||||||
|
},
|
||||||
|
status: statuses,
|
||||||
|
filters: Object.keys(lazyState.filters).reduce((acc, cur) => {
|
||||||
|
const value = pathOr('', ['filters', cur, 'value'], lazyState);
|
||||||
|
if (!isEmpty(value)) {
|
||||||
|
acc[cur] = lazyState.filters[cur];
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, {}),
|
||||||
|
}
|
||||||
|
}, [lazyState]);
|
||||||
|
|
||||||
|
const onPage = (event) => {
|
||||||
|
setLazyState(event);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSort = (event) => {
|
||||||
|
event['first'] = 0;
|
||||||
|
event['page'] = 0;
|
||||||
|
setLazyState(event);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onFilter = useCallback((event) => {
|
||||||
|
event['first'] = 0;
|
||||||
|
event['page'] = 0;
|
||||||
|
setLazyState(event);
|
||||||
|
}, [lazyState]);
|
||||||
|
|
||||||
|
const getApplCallback = (resp) => {
|
||||||
|
if (resp.status === 'SUCCESS') {
|
||||||
|
const { body, totalRecords,
|
||||||
|
//currentPage, totalPages, pageSize
|
||||||
|
} = resp.data;
|
||||||
|
setTotalRecordsNum(totalRecords);
|
||||||
|
setItems(getFormattedData(body));
|
||||||
|
}
|
||||||
|
setLocalAsyncRequest(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
const errGetApplCallback = () => {
|
||||||
|
setLocalAsyncRequest(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getFormattedData = (data) => {
|
||||||
|
return data.map((d) => {
|
||||||
|
d.callEndDate = is(String, d.callEndDate) ? new Date(d.callEndDate) : (d.callEndDate ? d.callEndDate : '');
|
||||||
|
d.modifiedDate = is(String, d.modifiedDate) ? new Date(d.modifiedDate) : (d.modifiedDate ? d.modifiedDate : '');
|
||||||
|
d.submissionDate = is(String, d.submissionDate) ? new Date(d.submissionDate) : (d.submissionDate ? d.submissionDate : '');
|
||||||
|
return d;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setLocalAsyncRequest(true);
|
||||||
|
const paginationQuery = getPaginationQuery();
|
||||||
|
|
||||||
|
ApplicationService.getApplicationsPaginated(paginationQuery, getApplCallback, errGetApplCallback);
|
||||||
|
}, [lazyState, chosenCompanyId]);
|
||||||
|
|
||||||
|
const statusBodyTemplate = (rowData) => {
|
||||||
|
return <ProperBandoLabel status={rowData.status}/>;
|
||||||
|
};
|
||||||
|
|
||||||
|
const progressBodyTemplate = (options) => {
|
||||||
|
return <ProgressBar value={options.progress} color={'#64748B'}></ProgressBar>;
|
||||||
|
};
|
||||||
|
|
||||||
|
const actionsBodyTemplate = (rowData) => {
|
||||||
|
return <Link to={`/domande/${rowData.id}/preview`}>
|
||||||
|
<Button severity="info" label={__('Anteprima', 'gepafin')} icon="pi pi-eye" size="small"
|
||||||
|
iconPos="right"/>
|
||||||
|
</Link>
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="appPageSection__table">
|
||||||
|
<DataTable
|
||||||
|
value={items} stripedRows showGridlines
|
||||||
|
lazy filterDisplay="menu" dataKey="id" paginator
|
||||||
|
first={lazyState.first} rows={lazyState.rows} totalRecords={totalRecordsNum} onPage={onPage}
|
||||||
|
onSort={onSort} sortField={lazyState.sortField} sortOrder={lazyState.sortOrder}
|
||||||
|
onFilter={onFilter} filters={lazyState.filters} loading={localAsyncRequest}
|
||||||
|
emptyMessage={translationStrings.emptyMessage}>
|
||||||
|
<Column field="id" header={__('ID domanda', 'gepafin')}
|
||||||
|
sortable
|
||||||
|
filterField="id" filter
|
||||||
|
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
|
style={{ minWidth: '8rem' }}/>
|
||||||
|
<Column field="callTitle" header={__('Bando', 'gepafin')}
|
||||||
|
sortable
|
||||||
|
filterField="callTitle" filter
|
||||||
|
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
|
style={{ minWidth: '8rem' }}/>
|
||||||
|
<Column field="companyName" header={__('Azienda', 'gepafin')}
|
||||||
|
sortable
|
||||||
|
filterField="companyName" filter
|
||||||
|
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
|
style={{ minWidth: '8rem' }}/>
|
||||||
|
<Column field="status" header={__('Stato', 'gepafin')}
|
||||||
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate}/>
|
||||||
|
<Column header={__('Progressi', 'gepafin')}
|
||||||
|
style={{ minWidth: '10rem' }} field="progress" body={progressBodyTemplate}/>
|
||||||
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
|
style={{ minWidth: '10rem' }}
|
||||||
|
body={actionsBodyTemplate}/>
|
||||||
|
</DataTable>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DraftApplicationsTableAsync;
|
||||||
@@ -177,6 +177,7 @@ const LatestBandiTableAsync = () => {
|
|||||||
sortable
|
sortable
|
||||||
filterField="name" filter
|
filterField="name" filter
|
||||||
filterMatchModeOptions={translationStrings.textFilterOptions}
|
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
header={__('Nome Bando', 'gepafin')}
|
header={__('Nome Bando', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data Pubblicazione', 'gepafin')}
|
<Column header={__('Data Pubblicazione', 'gepafin')}
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ import DashboardService from '../../service/dashboard-service';
|
|||||||
|
|
||||||
// components
|
// components
|
||||||
import { Button } from 'primereact/button';
|
import { Button } from 'primereact/button';
|
||||||
import DraftApplicationsTable from './components/DraftApplicationsTable';
|
|
||||||
import ChartDomandePerBando from '../../components/ChartDomandePerBando';
|
import ChartDomandePerBando from '../../components/ChartDomandePerBando';
|
||||||
import ChartStatoDomande from '../../components/ChartStatoDomande';
|
import ChartStatoDomande from '../../components/ChartStatoDomande';
|
||||||
import LatestBandiTableAsync from './components/LatestBandiTableAsync';
|
import LatestBandiTableAsync from './components/LatestBandiTableAsync';
|
||||||
import AllDomandeTableAsync from '../Domande/components/AllDomandeTableAsync';
|
import AllDomandeTableAsync from '../Domande/components/AllDomandeTableAsync';
|
||||||
|
import DraftApplicationsTableAsync from './components/DraftApplicationsTableAsync';
|
||||||
|
|
||||||
const Dashboard = () => {
|
const Dashboard = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -150,16 +150,9 @@ const Dashboard = () => {
|
|||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Domande in bozza', 'gepafin')}</h2>
|
<h2>{__('Domande in bozza', 'gepafin')}</h2>
|
||||||
<DraftApplicationsTable/>
|
<DraftApplicationsTableAsync/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/*<div className="appPage__spacer"></div>
|
|
||||||
|
|
||||||
<div className="appPageSection">
|
|
||||||
<h2>{__('Attività Recenti Utenti', 'gepafin')}</h2>
|
|
||||||
<LatestUsersActivityTable/>
|
|
||||||
</div>*/}
|
|
||||||
|
|
||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
{chartStats.applicationPerCall
|
{chartStats.applicationPerCall
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ 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 { ConfirmPopup, confirmPopup } from 'primereact/confirmpopup';
|
import { ConfirmPopup, confirmPopup } from 'primereact/confirmpopup';
|
||||||
|
import isDateTimeInPast from '../../../../helpers/isDateTimeInPast';
|
||||||
|
|
||||||
const MyLatestSubmissionsTable = () => {
|
const MyLatestSubmissionsTable = () => {
|
||||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||||
@@ -165,25 +166,28 @@ const MyLatestSubmissionsTable = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const actionsBodyTemplate = (rowData) => {
|
const actionsBodyTemplate = (rowData) => {
|
||||||
return 'DRAFT' === rowData.status
|
const isCallExpired = isDateTimeInPast(rowData.callEndDate, rowData.callEndTime);
|
||||||
? <div className="appPageSection__tableActions lessGap">
|
return <div className="appPageSection__tableActions lessGap">
|
||||||
<Link to={`/imieibandi/${rowData.id}`}>
|
{'DRAFT' === rowData.status && !isCallExpired
|
||||||
|
? <Link to={`/imieibandi/${rowData.id}`}>
|
||||||
<Button severity="info" label={__('Modifica', 'gepafin')} icon="pi pi-pencil" size="small"
|
<Button severity="info" label={__('Modifica', 'gepafin')} icon="pi pi-pencil" size="small"
|
||||||
iconPos="right"/>
|
iconPos="right"/>
|
||||||
</Link>
|
</Link>
|
||||||
|
: null}
|
||||||
|
{'DRAFT' !== rowData.status || isCallExpired
|
||||||
|
? <Link to={`/imieibandi/${rowData.id}`}>
|
||||||
|
<Button severity="info" label={__('Mostra', 'gepafin')} icon="pi pi-eye" size="small"
|
||||||
|
iconPos="right"/>
|
||||||
|
</Link>
|
||||||
|
: null}
|
||||||
<ConfirmPopup/>
|
<ConfirmPopup/>
|
||||||
<Button severity="danger"
|
<Button severity="danger"
|
||||||
/*onClick={() => handleDeleteApplication(rowData.id)}*/
|
|
||||||
onClick={(event) => confirmDelete(event, rowData.id)}
|
onClick={(event) => confirmDelete(event, rowData.id)}
|
||||||
label={__('Cancella', 'gepafin')}
|
label={__('Cancella', 'gepafin')}
|
||||||
icon="pi pi-trash"
|
icon="pi pi-trash"
|
||||||
size="small"
|
size="small"
|
||||||
iconPos="right"/>
|
iconPos="right"/>
|
||||||
</div>
|
</div>
|
||||||
: <Link to={`/imieibandi/${rowData.id}`}>
|
|
||||||
<Button severity="info" label={__('Mostra', 'gepafin')} icon="pi pi-eye" size="small"
|
|
||||||
iconPos="right"/>
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,198 @@
|
|||||||
|
import React, { useEffect, useState, useCallback } from 'react';
|
||||||
|
import { __ } from '@wordpress/i18n';
|
||||||
|
import { isEmpty, pathOr } from 'ramda';
|
||||||
|
|
||||||
|
import translationStrings from '../../../../translationStringsForComponents';
|
||||||
|
|
||||||
|
// api
|
||||||
|
import BandoService from '../../../../service/bando-service';
|
||||||
|
|
||||||
|
// tools
|
||||||
|
import getTimeParsedFromString from '../../../../helpers/getTimeParsedFromString';
|
||||||
|
import getTimeFromISOstring from '../../../../helpers/getTimeFromISOstring';
|
||||||
|
import getFormattedDateString from '../../../../helpers/getFormattedDateString';
|
||||||
|
import getBandoLabel from '../../../../helpers/getBandoLabel';
|
||||||
|
import getBandoSeverity from '../../../../helpers/getBandoSeverity';
|
||||||
|
|
||||||
|
// components
|
||||||
|
import { DataTable } from 'primereact/datatable';
|
||||||
|
import { Column } from 'primereact/column';
|
||||||
|
import ProperBandoLabel from '../../../../components/ProperBandoLabel';
|
||||||
|
import { Dropdown } from 'primereact/dropdown';
|
||||||
|
import { Tag } from 'primereact/tag';
|
||||||
|
import { Calendar } from 'primereact/calendar';
|
||||||
|
|
||||||
|
const LatestBandiTableInstructorManagerAsync = () => {
|
||||||
|
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||||
|
const [items, setItems] = useState(null);
|
||||||
|
const [totalRecordsNum, setTotalRecordsNum] = useState(0);
|
||||||
|
const [lazyState, setLazyState] = useState({
|
||||||
|
first: 0,
|
||||||
|
rows: 5,
|
||||||
|
page: 0,
|
||||||
|
sortField: null,
|
||||||
|
sortOrder: null,
|
||||||
|
filters: {
|
||||||
|
name: { value: null, matchMode: 'contains' },
|
||||||
|
startDate: { value: null, matchMode: 'date_is' },
|
||||||
|
endDate: { value: null, matchMode: 'date_is' },
|
||||||
|
status: { value: null, matchMode: 'equals' }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const statuses = ['PUBLISH'];
|
||||||
|
|
||||||
|
const getPaginationQuery = useCallback(() => {
|
||||||
|
let sortBy = {
|
||||||
|
columnName: "ID",
|
||||||
|
sortDesc: true
|
||||||
|
};
|
||||||
|
|
||||||
|
if (lazyState.sortField) {
|
||||||
|
sortBy = {
|
||||||
|
columnName: lazyState.sortField,
|
||||||
|
sortDesc: lazyState.sortOrder === -1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
globalFilters: {
|
||||||
|
page: lazyState.page ? lazyState.page + 1 : 1,
|
||||||
|
limit: lazyState.rows,
|
||||||
|
sortBy
|
||||||
|
},
|
||||||
|
status: statuses,
|
||||||
|
filters: Object.keys(lazyState.filters).reduce((acc, cur) => {
|
||||||
|
const value = pathOr('', ['filters', cur, 'value'], lazyState);
|
||||||
|
if (!isEmpty(value)) {
|
||||||
|
acc[cur] = lazyState.filters[cur];
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, {}),
|
||||||
|
}
|
||||||
|
}, [lazyState]);
|
||||||
|
|
||||||
|
const onPage = (event) => {
|
||||||
|
setLazyState(event);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSort = (event) => {
|
||||||
|
event['first'] = 0;
|
||||||
|
event['page'] = 0;
|
||||||
|
setLazyState(event);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onFilter = useCallback((event) => {
|
||||||
|
event['first'] = 0;
|
||||||
|
event['page'] = 0;
|
||||||
|
setLazyState(event);
|
||||||
|
}, [lazyState]);
|
||||||
|
|
||||||
|
const getCallback = (resp) => {
|
||||||
|
if (resp.status === 'SUCCESS') {
|
||||||
|
const { body, totalRecords,
|
||||||
|
//currentPage, totalPages, pageSize
|
||||||
|
} = resp.data;
|
||||||
|
setTotalRecordsNum(totalRecords);
|
||||||
|
setItems(getFormattedData(body));
|
||||||
|
}
|
||||||
|
setLocalAsyncRequest(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
const errGetCallbacks = () => {
|
||||||
|
setLocalAsyncRequest(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getFormattedData = (data) => {
|
||||||
|
return [...(data || [])].map((d) => {
|
||||||
|
d.startDate = new Date(d.dates[0]);
|
||||||
|
d.endDate = new Date(d.dates[1]);
|
||||||
|
|
||||||
|
return d;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const statusBodyTemplate = (rowData) => {
|
||||||
|
return <ProperBandoLabel status={rowData.status}/>;
|
||||||
|
};
|
||||||
|
|
||||||
|
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 dateFilterTemplate = (options) => {
|
||||||
|
return <Calendar value={options.value} onChange={(e) => options.filterCallback(e.value, options.index)}
|
||||||
|
dateFormat="mm/dd/yy" placeholder="mm/dd/yyyy" mask="99/99/9999"/>;
|
||||||
|
};
|
||||||
|
|
||||||
|
const dateStartBodyTemplate = (rowData) => {
|
||||||
|
const startTimeObj = getTimeParsedFromString(rowData.startTime);
|
||||||
|
return getFormattedDateString(rowData.startDate) + ' ' + getTimeFromISOstring(startTimeObj);
|
||||||
|
};
|
||||||
|
|
||||||
|
const dateEndBodyTemplate = (rowData) => {
|
||||||
|
const endTimeObg = getTimeParsedFromString(rowData.endTime);
|
||||||
|
return getFormattedDateString(rowData.endDate) + ' ' + getTimeFromISOstring(endTimeObg);
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setLocalAsyncRequest(true);
|
||||||
|
const paginationQuery = getPaginationQuery();
|
||||||
|
|
||||||
|
BandoService.getBandiPaginated(paginationQuery, getCallback, errGetCallbacks);
|
||||||
|
}, [lazyState]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="appPageSection__table">
|
||||||
|
<DataTable
|
||||||
|
value={items} stripedRows showGridlines
|
||||||
|
lazy filterDisplay="menu" dataKey="id" paginator
|
||||||
|
first={lazyState.first} rows={lazyState.rows} totalRecords={totalRecordsNum} onPage={onPage}
|
||||||
|
onSort={onSort} sortField={lazyState.sortField} sortOrder={lazyState.sortOrder}
|
||||||
|
onFilter={onFilter} filters={lazyState.filters} loading={localAsyncRequest}
|
||||||
|
emptyMessage={translationStrings.emptyMessage}>
|
||||||
|
<Column field="name"
|
||||||
|
sortable
|
||||||
|
filterField="name" filter
|
||||||
|
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
|
header={__('Nome Bando', 'gepafin')}
|
||||||
|
style={{ minWidth: '8rem' }}/>
|
||||||
|
<Column header={__('Data Pubblicazione', 'gepafin')}
|
||||||
|
filterElement={dateFilterTemplate} filter
|
||||||
|
filterField="startDate" dataType="date"
|
||||||
|
filterMatchModeOptions={translationStrings.dateFilterOptions}
|
||||||
|
style={{ minWidth: '8rem' }}
|
||||||
|
body={dateStartBodyTemplate}/>
|
||||||
|
<Column header={__('Data Scadenza', 'gepafin')}
|
||||||
|
filterElement={dateFilterTemplate} filter
|
||||||
|
filterField="endDate" dataType="date"
|
||||||
|
filterMatchModeOptions={translationStrings.dateFilterOptions}
|
||||||
|
style={{ minWidth: '8rem' }}
|
||||||
|
body={dateEndBodyTemplate}/>
|
||||||
|
<Column field="status"
|
||||||
|
filterElement={statusFilterTemplate} filter
|
||||||
|
filterMatchModeOptions={translationStrings.statusFilterOptions}
|
||||||
|
header={__('Stato', 'gepafin')}
|
||||||
|
style={{ minWidth: '7rem' }}
|
||||||
|
body={statusBodyTemplate} />
|
||||||
|
</DataTable>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LatestBandiTableInstructorManagerAsync;
|
||||||
@@ -9,11 +9,11 @@ import DashboardService from '../../service/dashboard-service';
|
|||||||
|
|
||||||
// components
|
// components
|
||||||
import { Button } from 'primereact/button';
|
import { Button } from 'primereact/button';
|
||||||
import LatestBandiTableInstructorManager from './components/LatestBandiTableInstructorManager';
|
|
||||||
import AllDomandeTable from '../Domande/components/AllDomandeTable';
|
|
||||||
import DraftApplicationsTable from '../Dashboard/components/DraftApplicationsTable';
|
|
||||||
import ChartDomandePerBando from '../../components/ChartDomandePerBando';
|
import ChartDomandePerBando from '../../components/ChartDomandePerBando';
|
||||||
import ChartStatoDomande from '../../components/ChartStatoDomande';
|
import ChartStatoDomande from '../../components/ChartStatoDomande';
|
||||||
|
import LatestBandiTableInstructorManagerAsync from './components/LatestBandiTableInstructorManagerAsync';
|
||||||
|
import DraftApplicationsTableAsync from '../Dashboard/components/DraftApplicationsTableAsync';
|
||||||
|
import AllDomandeTableAsync from '../Domande/components/AllDomandeTableAsync';
|
||||||
|
|
||||||
const DashboardInstructorManager = () => {
|
const DashboardInstructorManager = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -107,27 +107,23 @@ const DashboardInstructorManager = () => {
|
|||||||
|
|
||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
{/*<div className="appPageSection">
|
|
||||||
<h2>{__('Panoramica delle domande da valutare', 'gepafin')}</h2>
|
|
||||||
<PreInstructorDomandeTable statuses={['OPEN', 'SOCCORSO']} userId={0}/>
|
|
||||||
</div>*/}
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Ultimi bandi pubblicati', 'gepafin')}</h2>
|
<h2>{__('Ultimi bandi pubblicati', 'gepafin')}</h2>
|
||||||
<LatestBandiTableInstructorManager/>
|
<LatestBandiTableInstructorManagerAsync/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Ultime domande pubblicate', 'gepafin')}</h2>
|
<h2>{__('Ultime domande pubblicate', 'gepafin')}</h2>
|
||||||
<AllDomandeTable/>
|
<AllDomandeTableAsync/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Domande in bozza', 'gepafin')}</h2>
|
<h2>{__('Domande in bozza', 'gepafin')}</h2>
|
||||||
<DraftApplicationsTable/>
|
<DraftApplicationsTableAsync/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ const PreInstructorDomandeTable = ({ userId = null, statuses = [] }) => {
|
|||||||
operator: FilterOperator.AND,
|
operator: FilterOperator.AND,
|
||||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||||
},
|
},
|
||||||
status: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
applicationStatus: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ const PreInstructorDomandeTable = ({ userId = null, statuses = [] }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const statusBodyTemplate = (rowData) => {
|
const statusBodyTemplate = (rowData) => {
|
||||||
return <ProperBandoLabel status={rowData.status}/>;
|
return <ProperBandoLabel status={rowData.applicationStatus}/>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const statusFilterTemplate = (options) => {
|
const statusFilterTemplate = (options) => {
|
||||||
@@ -216,7 +216,7 @@ const PreInstructorDomandeTable = ({ userId = null, statuses = [] }) => {
|
|||||||
<Column header={__('Scadenza', 'gepafin')} filterField="evaluationEndDate" dataType="date"
|
<Column header={__('Scadenza', 'gepafin')} filterField="evaluationEndDate" dataType="date"
|
||||||
style={{ minWidth: '8rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')}
|
<Column field="applicationStatus" header={__('Stato', 'gepafin')}
|
||||||
style={{ minWidth: '7rem' }} body={statusBodyTemplate} filter
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate} filter
|
||||||
filterElement={statusFilterTemplate} />
|
filterElement={statusFilterTemplate} />
|
||||||
<Column header={__('Azioni', 'gepafin')}
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
|
|||||||
@@ -973,6 +973,15 @@ const DomandaEditInstructorManager = () => {
|
|||||||
data,
|
data,
|
||||||
['evaluationDocument']
|
['evaluationDocument']
|
||||||
)}
|
)}
|
||||||
|
updateCallbackFn={(files) => doSaveDraft(
|
||||||
|
null,
|
||||||
|
{
|
||||||
|
evaluationDocument: klona(files.map(o => ({
|
||||||
|
...o,
|
||||||
|
fileValue: o.fileValue[0] ? o.fileValue[0].id : ''
|
||||||
|
})
|
||||||
|
))
|
||||||
|
})}
|
||||||
shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationBlockedForUser(data)}
|
shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationBlockedForUser(data)}
|
||||||
sourceId={data.id}
|
sourceId={data.id}
|
||||||
sourceName="evaluation"/>
|
sourceName="evaluation"/>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const ApplicationInfo = ({ data }) => {
|
|||||||
<span>{getDateTimeFromISOstring(data.assignedAt)}</span>
|
<span>{getDateTimeFromISOstring(data.assignedAt)}</span>
|
||||||
</p>
|
</p>
|
||||||
<p className="appPageSection__pMeta">
|
<p className="appPageSection__pMeta">
|
||||||
<span>{__('Aassegnato a', 'gepafin')}</span>
|
<span>{__('Assegnato a', 'gepafin')}</span>
|
||||||
<span>{data.assignedUserName}</span>
|
<span>{data.assignedUserName}</span>
|
||||||
</p>
|
</p>
|
||||||
<p className="appPageSection__pMeta">
|
<p className="appPageSection__pMeta">
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ const RepeaterFields = ({
|
|||||||
source={sourceName}
|
source={sourceName}
|
||||||
sourceId={sourceId}
|
sourceId={sourceId}
|
||||||
multiple={false}
|
multiple={false}
|
||||||
deleteOnBackend={false}
|
deleteOnBackend={true}
|
||||||
config={{ required: __('È obbligatorio', 'gepafin') }}
|
config={{ required: __('È obbligatorio', 'gepafin') }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -976,6 +976,15 @@ const DomandaEditPreInstructor = () => {
|
|||||||
data,
|
data,
|
||||||
['evaluationDocument']
|
['evaluationDocument']
|
||||||
)}
|
)}
|
||||||
|
updateCallbackFn={(files) => doSaveDraft(
|
||||||
|
null,
|
||||||
|
{
|
||||||
|
evaluationDocument: klona(files.map(o => ({
|
||||||
|
...o,
|
||||||
|
fileValue: o.fileValue[0] ? o.fileValue[0].id : ''
|
||||||
|
})
|
||||||
|
))
|
||||||
|
})}
|
||||||
shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationBlockedForUser(data)}
|
shouldDisable={['APPROVED', 'REJECTED'].includes(data.applicationStatus) || evaluationBlockedForUser(data)}
|
||||||
sourceId={data.id}
|
sourceId={data.id}
|
||||||
sourceName="evaluation"/>
|
sourceName="evaluation"/>
|
||||||
|
|||||||
@@ -183,17 +183,19 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
sortable
|
sortable
|
||||||
filterField="id" filter
|
filterField="id" filter
|
||||||
filterMatchModeOptions={translationStrings.textFilterOptions}
|
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||||
|
filterPlaceholder={__('Cerca', 'gepafin')}
|
||||||
style={{ minWidth: '6rem' }}/>
|
style={{ minWidth: '6rem' }}/>
|
||||||
<Column field="protocolNumber" header={__('Protocollo', 'gepafin')}
|
<Column field="protocolNumber" header={__('Protocollo', 'gepafin')}
|
||||||
filterPlaceholder={__('Cerca', 'gepafin')}
|
|
||||||
style={{ minWidth: '6rem' }}/>
|
style={{ minWidth: '6rem' }}/>
|
||||||
<Column field="callTitle" header={__('Bando', 'gepafin')}
|
<Column field="callTitle" header={__('Bando', 'gepafin')}
|
||||||
filterField="callTitle" filter
|
filterField="callTitle" filter
|
||||||
filterMatchModeOptions={translationStrings.textFilterOptions}
|
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '10rem' }}/>
|
style={{ minWidth: '10rem' }}/>
|
||||||
<Column field="companyName" header={__('Azienda Beneficiaria', 'gepafin')}
|
<Column field="companyName" header={__('Azienda Beneficiaria', 'gepafin')}
|
||||||
filterField="companyName" filter
|
filterField="companyName" filter
|
||||||
filterMatchModeOptions={translationStrings.textFilterOptions}
|
filterMatchModeOptions={translationStrings.textFilterOptions}
|
||||||
|
filterPlaceholder={__('Cerca il nome', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column header={__('Data Ricezione', 'gepafin')}
|
<Column header={__('Data Ricezione', 'gepafin')}
|
||||||
filterElement={dateFilterTemplate} filter
|
filterElement={dateFilterTemplate} filter
|
||||||
@@ -203,8 +205,7 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
body={dateAppliedBodyTemplate}/>
|
body={dateAppliedBodyTemplate}/>
|
||||||
<Column field="assignedUserName" header={__('Assegnato', 'gepafin')}
|
<Column field="assignedUserName" header={__('Assegnato', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }}/>
|
style={{ minWidth: '8rem' }}/>
|
||||||
<Column field="status"
|
<Column field="status" header={__('Stato', 'gepafin')}
|
||||||
header={__('Stato', 'gepafin')}
|
|
||||||
filterElement={statusFilterTemplate} filter
|
filterElement={statusFilterTemplate} filter
|
||||||
filterMatchModeOptions={translationStrings.statusFilterOptions}
|
filterMatchModeOptions={translationStrings.statusFilterOptions}
|
||||||
style={{ minWidth: '8rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { isEmpty, pathOr } from 'ramda';
|
|||||||
// api
|
// api
|
||||||
import UserService from '../../service/user-service';
|
import UserService from '../../service/user-service';
|
||||||
import AssignedApplicationService from '../../service/assigned-application-service';
|
import AssignedApplicationService from '../../service/assigned-application-service';
|
||||||
|
import DashboardService from '../../service/dashboard-service';
|
||||||
|
|
||||||
// store
|
// store
|
||||||
import { storeSet } from '../../store';
|
import { storeSet } from '../../store';
|
||||||
@@ -14,14 +15,13 @@ import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
|
|||||||
import uniqid from '../../helpers/uniqid';
|
import uniqid from '../../helpers/uniqid';
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import AllDomandeTable from './components/AllDomandeTable';
|
|
||||||
import { Dialog } from 'primereact/dialog';
|
import { Dialog } from 'primereact/dialog';
|
||||||
import { Button } from 'primereact/button';
|
import { Button } from 'primereact/button';
|
||||||
import { classNames } from 'primereact/utils';
|
import { classNames } from 'primereact/utils';
|
||||||
import { Dropdown } from 'primereact/dropdown';
|
import { Dropdown } from 'primereact/dropdown';
|
||||||
import DraftApplicationsTable from '../Dashboard/components/DraftApplicationsTable';
|
|
||||||
import NumberFlow from '@number-flow/react';
|
import NumberFlow from '@number-flow/react';
|
||||||
import DashboardService from '../../service/dashboard-service';
|
import DraftApplicationsTableAsync from '../Dashboard/components/DraftApplicationsTableAsync';
|
||||||
|
import AllDomandeTableAsync from './components/AllDomandeTableAsync';
|
||||||
|
|
||||||
const Domande = () => {
|
const Domande = () => {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@@ -166,7 +166,7 @@ const Domande = () => {
|
|||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Domande pubblicate', 'gepafin')}</h2>
|
<h2>{__('Domande pubblicate', 'gepafin')}</h2>
|
||||||
<AllDomandeTable openDialogFn={openAssignDialog} updaterString={updaterString}/>
|
<AllDomandeTableAsync openDialogFn={openAssignDialog} updaterString={updaterString}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
@@ -224,7 +224,7 @@ const Domande = () => {
|
|||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Domande in bozza', 'gepafin')}</h2>
|
<h2>{__('Domande in bozza', 'gepafin')}</h2>
|
||||||
<DraftApplicationsTable/>
|
<DraftApplicationsTableAsync/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const LoginConfidi = () => {
|
|||||||
<div className="appPageLogin__wrapper">
|
<div className="appPageLogin__wrapper">
|
||||||
<LogoIcon/>
|
<LogoIcon/>
|
||||||
|
|
||||||
<h1>{__('Accedi', 'gepafin')}</h1>
|
<h1>{__('Accesso CONFIDI', 'gepafin')}</h1>
|
||||||
|
|
||||||
<Messages ref={errorMsgs}/>
|
<Messages ref={errorMsgs}/>
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
|||||||
const getFormattedData = (data) => {
|
const getFormattedData = (data) => {
|
||||||
return data.map((d) => {
|
return data.map((d) => {
|
||||||
d.startDate = is(String, d.startDate) ? new Date(d.startDate) : (d.startDate ? d.startDate : '');
|
d.startDate = is(String, d.startDate) ? new Date(d.startDate) : (d.startDate ? d.startDate : '');
|
||||||
d.evaluationEndDate = is(String, d.evaluationEndDate) ? new Date(d.evaluationEndDate) : (d.evaluationEndDate ? d.evaluationEndDate : '');
|
d.expirationDate = is(String, d.expirationDate) ? new Date(d.expirationDate) : (d.expirationDate ? d.expirationDate : '');
|
||||||
return d;
|
return d;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -91,7 +91,7 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
|||||||
operator: FilterOperator.AND,
|
operator: FilterOperator.AND,
|
||||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||||
},
|
},
|
||||||
evaluationEndDate: {
|
expirationDate: {
|
||||||
operator: FilterOperator.AND,
|
operator: FilterOperator.AND,
|
||||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||||
},
|
},
|
||||||
@@ -111,7 +111,7 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const dateExpirationBodyTemplate = (rowData) => {
|
const dateExpirationBodyTemplate = (rowData) => {
|
||||||
return rowData.evaluationEndDate ? formatDate(rowData.evaluationEndDate) : '';
|
return rowData.expirationDate ? formatDate(rowData.expirationDate) : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const dateFilterTemplate = (options) => {
|
const dateFilterTemplate = (options) => {
|
||||||
@@ -162,7 +162,7 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
|||||||
style={{ minWidth: '8rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column header={__('Scadenza', 'gepafin')}
|
<Column header={__('Scadenza', 'gepafin')}
|
||||||
filterField="evaluationEndDate" dataType="date"
|
filterField="expirationDate" dataType="date"
|
||||||
style={{ minWidth: '8rem' }}
|
style={{ minWidth: '8rem' }}
|
||||||
body={dateExpirationBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateExpirationBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status"
|
<Column field="status"
|
||||||
|
|||||||
Reference in New Issue
Block a user