- assegnare btn is enabled for all statuses;
This commit is contained in:
@@ -43,7 +43,10 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
status: { value: null, matchMode: 'equals' }
|
status: { value: null, matchMode: 'equals' }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const statuses = ['SUBMIT', 'EVALUATION', 'SOCCORSO', 'APPOINTMENT', 'NDG', 'ADMISSIBLE', 'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION'];
|
const statuses = [
|
||||||
|
'SUBMIT', 'EVALUATION', 'SOCCORSO', 'APPOINTMENT', 'NDG', 'ADMISSIBLE',
|
||||||
|
'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION'
|
||||||
|
];
|
||||||
|
|
||||||
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'id'), [lazyState]);
|
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'id'), [lazyState]);
|
||||||
|
|
||||||
@@ -65,7 +68,8 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
|
|
||||||
const getCallback = (resp) => {
|
const getCallback = (resp) => {
|
||||||
if (resp.status === 'SUCCESS') {
|
if (resp.status === 'SUCCESS') {
|
||||||
const { body, totalRecords,
|
const {
|
||||||
|
body, totalRecords,
|
||||||
//currentPage, totalPages, pageSize
|
//currentPage, totalPages, pageSize
|
||||||
} = resp.data;
|
} = resp.data;
|
||||||
setTotalRecordsNum(totalRecords);
|
setTotalRecordsNum(totalRecords);
|
||||||
@@ -89,12 +93,13 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
|
|
||||||
const actionsBodyTemplate = (rowData) => {
|
const actionsBodyTemplate = (rowData) => {
|
||||||
return <div className="appPageSection__tableActions lessGap">
|
return <div className="appPageSection__tableActions lessGap">
|
||||||
{openDialogFn && ['SUBMIT', 'EVALUATION', 'SOCCORSO'].includes(rowData.status)
|
{openDialogFn
|
||||||
? <Button severity="info"
|
? <Button severity="info"
|
||||||
onClick={() => openDialogFn(rowData.id)}
|
onClick={() => openDialogFn(rowData.id)}
|
||||||
label={__('Assegnare', 'gepafin')}
|
label={__('Assegnare', 'gepafin')}
|
||||||
icon="pi pi-pencil" size="small" iconPos="right"/>
|
icon="pi pi-pencil" size="small" iconPos="right"/>
|
||||||
: location.pathname !== '/domande'
|
: null}
|
||||||
|
{location.pathname !== '/domande'
|
||||||
? <Link to={'/domande'}>
|
? <Link to={'/domande'}>
|
||||||
<Button severity="info" label={__('Gestire', 'gepafin')} size="small"/>
|
<Button severity="info" label={__('Gestire', 'gepafin')} size="small"/>
|
||||||
</Link> : null}
|
</Link> : null}
|
||||||
@@ -126,7 +131,8 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
}
|
}
|
||||||
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) => {
|
||||||
@@ -159,7 +165,8 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
const renderHeader = () => {
|
const renderHeader = () => {
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-content-between">
|
<div className="flex justify-content-between">
|
||||||
<Button type="button" icon="pi pi-filter-slash" label={__('Pulisci', 'gepafin')} outlined onClick={clearFilter} />
|
<Button type="button" icon="pi pi-filter-slash" label={__('Pulisci', 'gepafin')} outlined
|
||||||
|
onClick={clearFilter}/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user