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) => {
const typeOption = typeOptions.find(
(option) => option.value === announcement.type
)
return (
{typeOption?.label}
)
},
},
{
id: 'extra',
header: t('Extra'),
cellClassName: 'text-muted-foreground max-w-xs truncate',
cell: (announcement) => announcement.extra || '-',
},
{
id: 'actions',
header: t('Actions'),
cell: (announcement) => (
handleEdit(announcement)}
onDelete={() => handleDelete(announcement)}
/>
),
},
]}
/>