Merge branch 'develop' into new-role-director

This commit is contained in:
Vitalii Kiiko
2025-11-12 11:15:38 +01:00
30 changed files with 56 additions and 19 deletions

View File

@@ -110,6 +110,7 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
const statusFilterTemplate = (options) => {
return <Dropdown value={options.value} options={statuses}
valueTemplate={getBandoLabel(options.value)}
onChange={(e) => options.filterCallback(e.value, options.index)}
itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel} className="p-column-filter"/>;
};

View File

@@ -43,7 +43,10 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '', disableActions
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]);
@@ -65,7 +68,8 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '', disableActions
const getCallback = (resp) => {
if (resp.status === 'SUCCESS') {
const { body, totalRecords,
const {
body, totalRecords,
//currentPage, totalPages, pageSize
} = resp.data;
setTotalRecordsNum(totalRecords);
@@ -89,15 +93,16 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '', disableActions
const actionsBodyTemplate = (rowData) => {
return <div className="appPageSection__tableActions lessGap">
{openDialogFn && ['SUBMIT', 'EVALUATION', 'SOCCORSO'].includes(rowData.status)
{openDialogFn
? <Button severity="info"
onClick={() => openDialogFn(rowData.id)}
label={__('Assegnare', 'gepafin')}
icon="pi pi-pencil" size="small" iconPos="right"/>
: location.pathname !== '/domande'
? <Link to={'/domande'}>
<Button severity="info" label={__('Gestire', 'gepafin')} size="small"/>
</Link> : null}
: null}
{location.pathname !== '/domande'
? <Link to={'/domande'}>
<Button severity="info" label={__('Gestire', 'gepafin')} size="small"/>
</Link> : null}
<Link to={`/domande/${rowData.id}/preview`}>
<Button severity="info" label={__('Anteprima', 'gepafin')} icon="pi pi-eye" size="small"
iconPos="right"/>
@@ -115,6 +120,7 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '', disableActions
const statusFilterTemplate = (options) => {
return <Dropdown value={options.value} options={statuses}
valueTemplate={getBandoLabel(options.value)}
onChange={(e) => {
options.filterCallback(e.value, options.index)
const filters = { ...lazyState.filters };
@@ -125,7 +131,8 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '', disableActions
}
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) => {
@@ -158,7 +165,8 @@ const AllDomandeTableAsync = ({ openDialogFn, updaterString = '', disableActions
const renderHeader = () => {
return (
<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>
);
};