fix/modo-lectura-activo-fijo

This commit is contained in:
2026-04-17 11:03:28 -06:00
parent db6c5a3372
commit 20bcb7797e
4 changed files with 16 additions and 19 deletions

View File

@@ -10,7 +10,7 @@ export type State = {
ame_key?: string | null;
};
export function createColumns(onSuccess?: () => void): ColumnDef<State>[] {
export function createColumns(onSuccess?: () => void, readOnly = false): ColumnDef<State>[] {
return [
{
accessorKey: "m3_key",
@@ -74,11 +74,11 @@ export function createColumns(onSuccess?: () => void): ColumnDef<State>[] {
{
id: "actions",
cell: ({ row }) => {
return renderComponent(DataTableActions, { item: row.original, onSuccess });
return renderComponent(DataTableActions, { item: row.original, onSuccess, readOnly });
}
}
];
}
// Mantener compatibilidad hacia atrás
export const columns = createColumns();
export const columns = createColumns(undefined, true);