feature/seed-digitalizacion
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
if (docTypes.length === 0) {
|
||||
docTypesLoading = true;
|
||||
documentTypesDigitizationApi
|
||||
.getAll(companyId, true)
|
||||
.getAll(companyId)
|
||||
.then((res) => {
|
||||
docTypes = res.data?.items || [];
|
||||
})
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
tiposDocumentos = [];
|
||||
return;
|
||||
}
|
||||
const response = await documentTypesDigitizationApi.getAll(companyId, true);
|
||||
const response = await documentTypesDigitizationApi.getAll(companyId);
|
||||
tiposDocumentos = response.data?.items || [];
|
||||
} catch (error) {
|
||||
console.error('Error al cargar tipos de documentos:', error);
|
||||
|
||||
@@ -34,25 +34,6 @@ export function createColumns(): ColumnDef<DocumentTypeDigitization>[] {
|
||||
return renderSnippet(descriptionSnippet, { description: row.original.description });
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorKey: 'active',
|
||||
header: 'Estatus',
|
||||
cell: ({ row }) => {
|
||||
const activeSnippet = createRawSnippet<[{ active: boolean }]>((getActive) => {
|
||||
const { active } = getActive();
|
||||
const className = active
|
||||
? 'border-emerald-200 bg-emerald-50 text-emerald-700'
|
||||
: 'border-slate-200 bg-slate-50 text-slate-600';
|
||||
const label = active ? 'Activo' : 'Inactivo';
|
||||
return {
|
||||
render: () =>
|
||||
`<span class="inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium ${className}">${label}</span>`
|
||||
};
|
||||
});
|
||||
|
||||
return renderSnippet(activeSnippet, { active: row.original.active });
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user