123
This commit is contained in:
@@ -116,8 +116,8 @@ export const createTasksPageConfig = (
|
||||
{displayTitle}
|
||||
</span>
|
||||
{isSiteBuilder && (
|
||||
<Badge color="purple" size="sm" variant="light">
|
||||
Site Builder
|
||||
<Badge color="purple" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">Site Builder</span>
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
@@ -128,8 +128,8 @@ export const createTasksPageConfig = (
|
||||
...(showSectorColumn ? [{
|
||||
...sectorColumn,
|
||||
render: (value: string, row: Task) => (
|
||||
<Badge color="info" size="sm" variant="light">
|
||||
{row.sector_name || '-'}
|
||||
<Badge color="info" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{row.sector_name || '-'}</span>
|
||||
</Badge>
|
||||
),
|
||||
}] : []),
|
||||
@@ -153,53 +153,60 @@ export const createTasksPageConfig = (
|
||||
return <span className="text-gray-400 dark:text-gray-500">-</span>;
|
||||
}
|
||||
return (
|
||||
<Badge color="purple" size="sm" variant="light">
|
||||
{taxonomyName}
|
||||
<Badge color="purple" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{taxonomyName}</span>
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'content_type',
|
||||
label: 'Content Type',
|
||||
label: 'Type',
|
||||
sortable: true,
|
||||
sortField: 'content_type',
|
||||
width: '120px',
|
||||
render: (value: string) => (
|
||||
<Badge color="primary" size="sm" variant="light">
|
||||
{TYPE_LABELS[value] || value || '-'}
|
||||
</Badge>
|
||||
),
|
||||
width: '110px',
|
||||
render: (value: string) => {
|
||||
const label = TYPE_LABELS[value] || value || '-';
|
||||
const properCase = label.charAt(0).toUpperCase() + label.slice(1);
|
||||
return (
|
||||
<Badge color="blue" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{properCase}</span>
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'content_structure',
|
||||
label: 'Structure',
|
||||
sortable: true,
|
||||
sortField: 'content_structure',
|
||||
width: '150px',
|
||||
render: (value: string) => (
|
||||
<Badge color="info" size="sm" variant="light">
|
||||
{STRUCTURE_LABELS[value] || value || '-'}
|
||||
</Badge>
|
||||
),
|
||||
width: '130px',
|
||||
render: (value: string) => {
|
||||
const label = STRUCTURE_LABELS[value] || value || '-';
|
||||
const properCase = label.split(/[_\s]+/).map(word =>
|
||||
word.charAt(0).toUpperCase() + word.slice(1)
|
||||
).join(' ');
|
||||
return (
|
||||
<Badge color="purple" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{properCase}</span>
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
...statusColumn,
|
||||
sortable: true,
|
||||
sortField: 'status',
|
||||
render: (value: string) => {
|
||||
const statusColors: Record<string, 'success' | 'warning'> = {
|
||||
queued: 'warning',
|
||||
const statusColors: Record<string, 'success' | 'amber'> = {
|
||||
queued: 'amber',
|
||||
completed: 'success',
|
||||
};
|
||||
const label = value ? value.replace('_', ' ') : '';
|
||||
const formatted = label ? label.charAt(0).toUpperCase() + label.slice(1) : '';
|
||||
return (
|
||||
<Badge
|
||||
color={statusColors[value] || 'warning'}
|
||||
size="sm"
|
||||
>
|
||||
{formatted}
|
||||
<Badge color={statusColors[value] || 'amber'} size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{formatted}</span>
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user