mejoras al formulario de registro organizaciones productivas
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
'use client';
|
||||
import { TrainingSchema } from '@/feactures/training/schemas/training';
|
||||
import { Badge } from '@repo/shadcn/badge';
|
||||
import { ColumnDef } from '@tanstack/react-table';
|
||||
import { CellAction } from './cell-action';
|
||||
|
||||
export const columns: ColumnDef<TrainingSchema>[] = [
|
||||
{
|
||||
accessorKey: 'ospName',
|
||||
header: 'Nombre OSP',
|
||||
},
|
||||
{
|
||||
accessorKey: 'ospRif',
|
||||
header: 'RIF',
|
||||
},
|
||||
{
|
||||
accessorKey: 'ospType',
|
||||
header: 'Tipo',
|
||||
},
|
||||
{
|
||||
accessorKey: 'currentStatus',
|
||||
header: 'Estatus',
|
||||
cell: ({ row }) => {
|
||||
const status = row.getValue('currentStatus') as string;
|
||||
return (
|
||||
<Badge variant={status === 'ACTIVA' ? 'default' : 'secondary'}>
|
||||
{status}
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'visitDate',
|
||||
header: 'Fecha Visita',
|
||||
cell: ({ row }) => {
|
||||
const date = row.getValue('visitDate') as string;
|
||||
return date ? new Date(date).toLocaleString() : 'N/A';
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
header: 'Acciones',
|
||||
cell: ({ row }) => <CellAction data={row.original} />,
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user