fixes sync and ai tree
This commit is contained in:
parent
843b481c36
commit
be8757e15e
3 changed files with 5 additions and 3 deletions
|
|
@ -195,7 +195,7 @@ export function FormGeneratorTable<T extends Record<string, any>>({
|
|||
actionButtons = [],
|
||||
customActions = [],
|
||||
onDelete,
|
||||
onDeleteMultiple,
|
||||
onDeleteMultiple: onDeleteMultipleProp,
|
||||
batchActions = [],
|
||||
onRefresh,
|
||||
className = '',
|
||||
|
|
@ -210,6 +210,8 @@ export function FormGeneratorTable<T extends Record<string, any>>({
|
|||
groupActions
|
||||
}: FormGeneratorTableProps<T>) {
|
||||
const { t, currentLanguage: contextLanguage } = useLanguage();
|
||||
// When only onDelete is provided, use it for multi-delete too so Delete stays visible with 2+ selected
|
||||
const onDeleteMultiple = onDeleteMultipleProp ?? (onDelete ? (rows: T[]) => rows.forEach((r) => onDelete(r)) : undefined);
|
||||
// Map frontend language codes (de/en/fr) to backend codes (ge/en/fr) for multilingual field resolution
|
||||
const currentLanguage = useMemo(() => {
|
||||
const langMap: Record<string, string> = { 'de': 'ge', 'en': 'en', 'fr': 'fr', 'it': 'it' };
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ export const TrusteeDocumentsView: React.FC = () => {
|
|||
searchable={true}
|
||||
filterable={true}
|
||||
sortable={true}
|
||||
selectable={false}
|
||||
selectable={true}
|
||||
actionButtons={[
|
||||
...(canUpdate ? [{
|
||||
type: 'edit' as const,
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ export const TrusteePositionsView: React.FC = () => {
|
|||
batchActions={[
|
||||
{
|
||||
label: 'Buchhaltung synchronisieren',
|
||||
icon: <FaSync />,
|
||||
icon: FaSync,
|
||||
loading: syncingPositionIds.size > 0,
|
||||
onClick: handleBatchSyncToAccounting,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue