Lista osp muestra status de guardado (borrador, publicado)
This commit is contained in:
@@ -22,18 +22,9 @@ export function columns({ apiUrl }: ColumnsProps): ColumnDef<TrainingSchema>[] {
|
||||
accessorKey: 'ospType',
|
||||
header: 'Tipo',
|
||||
},
|
||||
{
|
||||
accessorKey: 'created_at',
|
||||
header: 'Fecha de creación',
|
||||
cell: ({ row }) => {
|
||||
// console.log(row.getValue('created_at'));
|
||||
const date = row.getValue('created_at') as string;
|
||||
return date ? new Date(date).toLocaleString() : 'N/A';
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'currentStatus',
|
||||
header: 'Estatus',
|
||||
header: 'Estatus OSP',
|
||||
cell: ({ row }) => {
|
||||
const status = row.getValue('currentStatus') as string;
|
||||
return (
|
||||
@@ -43,6 +34,16 @@ export function columns({ apiUrl }: ColumnsProps): ColumnDef<TrainingSchema>[] {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'created_at',
|
||||
header: 'Fecha de creación',
|
||||
cell: ({ row }) => {
|
||||
// console.log(row.getValue('created_at'));
|
||||
const date = row.getValue('created_at') as string;
|
||||
return date ? new Date(date).toLocaleString() : 'N/A';
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
accessorKey: 'visitDate',
|
||||
header: 'Fecha Visita',
|
||||
@@ -51,6 +52,18 @@ export function columns({ apiUrl }: ColumnsProps): ColumnDef<TrainingSchema>[] {
|
||||
return date ? new Date(date).toLocaleString() : 'N/A';
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'surveyStatus',
|
||||
header: '',
|
||||
cell: ({ row }) => {
|
||||
const status = row.getValue('surveyStatus') as string;
|
||||
return (
|
||||
<Badge variant={status === 'PUBLICADO' ? 'default' : 'secondary'}>
|
||||
{status}
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
header: 'Acciones',
|
||||
|
||||
Reference in New Issue
Block a user