Files
emaui/apps/backoffice/src/app/features/configuration/pages/ConfigurationPage/actions.tsx
Nati 220ed2d018 Merge branch 'dev' of github.com:Tria-plc/emaui into Refactor
Resolved by unifying on the lib/data AdvancedTable (PR #10) as the canonical
table component: kept its API plus teammate i18n/feature work, kept the
folder-per-table structure (index.tsx + columns.tsx + actions.tsx) across all
27 tables, removed the parallel lib/table implementation, and fixed
pre-existing compile breaks in ExamDetailPage/QuestionAssigner/RecordResultModal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 11:31:27 +00:00

35 lines
940 B
TypeScript

import { ActionIcon, Group } from "@mantine/core";
import { IconEdit, IconTrash } from "@tabler/icons-react";
import type { AdvancedColumn } from "@ema-platform/ui";
import type { Profession } from "../../types/configuration";
export function professionActionsColumn(handlers: {
onEdit: (prof: Profession) => void;
onDelete: (prof: Profession) => void;
}): AdvancedColumn<Profession> {
return {
header: "actions",
size: 90,
cell: ({ row }) => (
<Group gap="xs">
<ActionIcon
variant="subtle"
color="blue"
size="sm"
onClick={() => handlers.onEdit(row.original)}
>
<IconEdit size={14} />
</ActionIcon>
<ActionIcon
variant="subtle"
color="red"
size="sm"
onClick={() => handlers.onDelete(row.original)}
>
<IconTrash size={14} />
</ActionIcon>
</Group>
),
};
}