fix/modo-lectura-activo-fijo
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user