toggleSelectOne(announcement.id, checked as boolean)
}
/>
),
},
{
id: 'content',
header: t('Content'),
cellClassName: 'max-w-xs truncate',
cell: (announcement) => announcement.content,
},
{
id: 'publish-date',
header: t('Publish Date'),
cell: (announcement) => (
{getRelativeTime(announcement.publishDate)}
{dayjs(announcement.publishDate).format(
'YYYY-MM-DD HH:mm:ss'
)}
),
},
{
id: 'type',
header: t('Type'),
cell: (announcement) => (
opt.value === announcement.type)
?.label
}
variant={
typeOptions.find((opt) => opt.value === announcement.type)
?.badgeVariant ?? 'neutral'
}
copyable={false}
/>
),
},
{
id: 'extra',
header: t('Extra'),
cellClassName: 'text-muted-foreground max-w-xs truncate',
cell: (announcement) => announcement.extra || '-',
},
{
id: 'actions',
header: t('Actions'),
className: 'w-32',
cell: (announcement) => (
handleEdit(announcement)}
size='sm'
variant='ghost'
>
handleDelete(announcement)}
size='sm'
variant='ghost'
>
),
},
]}
/>