- updated tables, checked filters;

This commit is contained in:
Vitalii Kiiko
2025-04-07 11:12:37 +02:00
parent 9acf1c2041
commit 44ba9036cb
30 changed files with 75 additions and 63 deletions

View File

@@ -120,7 +120,10 @@ const InstructorManagerSoccorsiTable = () => {
};
const statusFilterTemplate = (options) => {
return <Dropdown value={options.value} options={statuses} onChange={(e) => options.filterCallback(e.value, options.index)} itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel} className="p-column-filter" showClear />;
return <Dropdown value={options.value} options={statuses}
onChange={(e) => options.filterCallback(e.value, options.index)}
itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel}
className="p-column-filter"/>;
};
const statusItemTemplate = (option) => {

View File

@@ -42,9 +42,17 @@ const SoccorsiInstructorManagerMioTableAsync = ({ userId = null }) => {
status: { value: null, matchMode: 'equals' }
}
});
const statuses = [];
const statuses = ['AWAITING', 'RESPONSE_RECEIVED', 'CLOSE', 'EXPIRED'];
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'applicationId'), [lazyState]);
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(
lazyState,
statuses,
'applicationId',
{
personalRecords: true
}
),
[lazyState]);
const onPage = (event) => {
setLazyState(event);
@@ -113,8 +121,7 @@ const SoccorsiInstructorManagerMioTableAsync = ({ userId = null }) => {
setLazyState({ ...lazyState, filters, first: 0 });
}}
itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel}
className="p-column-filter"
showClear/>;
className="p-column-filter"/>;
};
const dateFilterTemplate = (options) => {
@@ -149,7 +156,7 @@ const SoccorsiInstructorManagerMioTableAsync = ({ userId = null }) => {
<Column field="applicationId" header={__('ID domanda', 'gepafin')}
sortable
filterField="applicationId" filter
filterMatchModeOptions={translationStrings.textFilterOptions}
filterMatchModeOptions={translationStrings.numberFilterOptions}
filterPlaceholder={__('Cerca', 'gepafin')}
style={{ minWidth: '6rem' }}/>
<Column field="protocolNumber" header={__('Protocollo', 'gepafin')}