fixed user references
This commit is contained in:
parent
c47dc67a84
commit
d8ff3a84d9
5 changed files with 16 additions and 7 deletions
|
|
@ -2138,6 +2138,9 @@ export function FormGeneratorTable<T extends Record<string, any>>({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const columnFilterValues = getUniqueValuesForColumn(column.key);
|
||||||
|
const hasEmptyOption = columnFilterValues.some(v => v === null);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
|
|
@ -2146,12 +2149,14 @@ export function FormGeneratorTable<T extends Record<string, any>>({
|
||||||
>
|
>
|
||||||
({t('Alle')})
|
({t('Alle')})
|
||||||
</div>
|
</div>
|
||||||
<div
|
{hasEmptyOption && (
|
||||||
className={`${styles.filterOption} ${filters[column.key] === null ? styles.filterOptionSelected : ''}`}
|
<div
|
||||||
onClick={() => handleFilter(column.key, _EMPTY_FILTER_SENTINEL)}
|
className={`${styles.filterOption} ${filters[column.key] === null ? styles.filterOptionSelected : ''}`}
|
||||||
>
|
onClick={() => handleFilter(column.key, _EMPTY_FILTER_SENTINEL)}
|
||||||
({t('Leer')})
|
>
|
||||||
</div>
|
({t('Leer')})
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{filterValuesLoading[column.key] ? (
|
{filterValuesLoading[column.key] ? (
|
||||||
<div className={styles.filterOptionMore} style={{ textAlign: 'center', padding: '8px' }}>
|
<div className={styles.filterOptionMore} style={{ textAlign: 'center', padding: '8px' }}>
|
||||||
{t('Lade Filterwerte...')}
|
{t('Lade Filterwerte...')}
|
||||||
|
|
@ -2159,7 +2164,7 @@ export function FormGeneratorTable<T extends Record<string, any>>({
|
||||||
) : (
|
) : (
|
||||||
<FilterValuesList
|
<FilterValuesList
|
||||||
columnKey={column.key}
|
columnKey={column.key}
|
||||||
allValues={getUniqueValuesForColumn(column.key)}
|
allValues={columnFilterValues}
|
||||||
activeFilter={filters[column.key]}
|
activeFilter={filters[column.key]}
|
||||||
onSelect={(value) => handleFilter(column.key, value)}
|
onSelect={(value) => handleFilter(column.key, value)}
|
||||||
resolveLabel={column.filterLabelResolver}
|
resolveLabel={column.filterLabelResolver}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ export const RealEstateParcelsView: React.FC = () => {
|
||||||
width: attr.width || 150,
|
width: attr.width || 150,
|
||||||
minWidth: attr.minWidth || 100,
|
minWidth: attr.minWidth || 100,
|
||||||
maxWidth: attr.maxWidth || 400,
|
maxWidth: attr.maxWidth || 400,
|
||||||
|
displayField: (attr as any).displayField,
|
||||||
}));
|
}));
|
||||||
}, [attributes]);
|
}, [attributes]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ export const RealEstateProjectsView: React.FC = () => {
|
||||||
width: attr.width || 150,
|
width: attr.width || 150,
|
||||||
minWidth: attr.minWidth || 100,
|
minWidth: attr.minWidth || 100,
|
||||||
maxWidth: attr.maxWidth || 400,
|
maxWidth: attr.maxWidth || 400,
|
||||||
|
displayField: (attr as any).displayField,
|
||||||
}));
|
}));
|
||||||
}, [attributes]);
|
}, [attributes]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ export const TrusteeDocumentsView: React.FC = () => {
|
||||||
width: attr.width || 150,
|
width: attr.width || 150,
|
||||||
minWidth: attr.minWidth || 100,
|
minWidth: attr.minWidth || 100,
|
||||||
maxWidth: attr.maxWidth || 400,
|
maxWidth: attr.maxWidth || 400,
|
||||||
|
displayField: attr.displayField,
|
||||||
}));
|
}));
|
||||||
const byKey = new Map(allCols.map(c => [c.key, c]));
|
const byKey = new Map(allCols.map(c => [c.key, c]));
|
||||||
const ordered: typeof allCols = [];
|
const ordered: typeof allCols = [];
|
||||||
|
|
|
||||||
|
|
@ -292,6 +292,7 @@ export const TrusteePositionsView: React.FC = () => {
|
||||||
width: attr.width || 150,
|
width: attr.width || 150,
|
||||||
minWidth: attr.minWidth || 100,
|
minWidth: attr.minWidth || 100,
|
||||||
maxWidth: attr.maxWidth || 400,
|
maxWidth: attr.maxWidth || 400,
|
||||||
|
displayField: attr.displayField,
|
||||||
};
|
};
|
||||||
if (amountFields.has(attr.name)) {
|
if (amountFields.has(attr.name)) {
|
||||||
col.formatter = (v: unknown) => formatAmount(v);
|
col.formatter = (v: unknown) => formatAmount(v);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue