base con autenticacion, registro, modulo encuestas
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { Badge } from "@repo/shadcn/badge";
|
||||
|
||||
import { ColumnDef } from '@tanstack/react-table';
|
||||
import { CellAction } from './cell-action';
|
||||
import { SurveyTable } from '@/feactures/surveys/schemas/survey';
|
||||
|
||||
export const columns: ColumnDef<SurveyTable>[] = [
|
||||
{
|
||||
accessorKey: 'title',
|
||||
header: 'Título',
|
||||
},
|
||||
{
|
||||
accessorKey: "published",
|
||||
header: "Estado",
|
||||
cell: ({ row }) => {
|
||||
const published = row.getValue("published");
|
||||
return (
|
||||
<Badge variant={published == 'Publicada' ? "default" : "secondary"}>
|
||||
{published == 'Publicada' ? 'Publicada' : 'Borrador'}
|
||||
</Badge>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
header: 'Acciones',
|
||||
cell: ({ row }) => <CellAction data={row.original} />,
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user