mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
feat(vessel-registration): add vessel registration page with incident reporting and certificate download functionality
feat(waiver): implement waiver page with application tracking and letter download feature feat(ui): introduce AdvancedTable component for enhanced table functionality across the application chore: update package-lock.json to remove unnecessary dependencies
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { Badge } from '@mantine/core';
|
||||
import type { AdvancedTableColumn } from '@ema-platform/ui';
|
||||
import type { Item } from '../../api/item-api';
|
||||
|
||||
const STATUS_COLORS: Record<Item['status'], string> = {
|
||||
DRAFT: 'gray',
|
||||
ACTIVE: 'green',
|
||||
ARCHIVED: 'orange',
|
||||
};
|
||||
|
||||
export const itemColumns: AdvancedTableColumn<Item>[] = [
|
||||
{ key: 'name', header: 'Name' },
|
||||
{
|
||||
key: 'status',
|
||||
header: 'Status',
|
||||
render: (item) => <Badge color={STATUS_COLORS[item.status]}>{item.status}</Badge>,
|
||||
},
|
||||
{
|
||||
key: 'createdAt',
|
||||
header: 'Created',
|
||||
render: (item) => new Date(item.createdAt).toLocaleDateString(),
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user