This commit is contained in:
2025-11-06 10:06:10 -03:00
parent bb667b6636
commit e885f04303
27 changed files with 376 additions and 284 deletions

View File

@@ -13,6 +13,7 @@ import {
import { Avatar, AvatarFallback } from '@repo/ui/components/ui/avatar'
import { Badge } from '@repo/ui/components/ui/badge'
import { Checkbox } from '@repo/ui/components/ui/checkbox'
import { Progress } from '@repo/ui/components/ui/progress'
import { cn, initials } from '@repo/ui/lib/utils'
@@ -83,6 +84,26 @@ const statusTranslate: Record<string, string> = {
}
export const columns: ColumnDef<Enrollment>[] = [
{
id: 'select',
header: ({ table }) => (
<Checkbox
checked={
table.getIsAllPageRowsSelected() ||
(table.getIsSomePageRowsSelected() && 'indeterminate')
}
onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
aria-label="Selecionar tudo"
/>
),
cell: ({ row }) => (
<Checkbox
checked={row.getIsSelected()}
onCheckedChange={(value) => row.toggleSelected(!!value)}
aria-label="Selecionar linha"
/>
)
},
{
header: 'Colaborador',
enableHiding: false,
@@ -145,30 +166,35 @@ export const columns: ColumnDef<Enrollment>[] = [
{
accessorKey: 'created_at',
header: 'Matriculado em',
enableSorting: true,
enableHiding: true,
cell: cellDate
},
{
accessorKey: 'started_at',
header: 'Iniciado em',
enableSorting: true,
enableHiding: true,
cell: cellDate
},
{
accessorKey: 'completed_at',
header: 'Aprovado em',
enableSorting: true,
enableHiding: true,
cell: cellDate
},
{
accessorKey: 'failed_at',
header: 'Reprovado em',
enableSorting: true,
enableHiding: true,
cell: cellDate
},
{
accessorKey: 'canceled_at',
header: 'Cancelado em',
enableSorting: true,
enableHiding: true,
cell: cellDate
}