123
This commit is contained in:
@@ -108,8 +108,8 @@ export const createIdeasPageConfig = (
|
||||
...(showSectorColumn ? [{
|
||||
...sectorColumn,
|
||||
render: (value: string, row: ContentIdea) => (
|
||||
<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>
|
||||
),
|
||||
}] : []),
|
||||
@@ -118,24 +118,34 @@ export const createIdeasPageConfig = (
|
||||
label: 'Structure',
|
||||
sortable: true,
|
||||
sortField: 'content_structure',
|
||||
width: '150px',
|
||||
render: (value: string) => (
|
||||
<Badge color="info" size="sm" variant="light">
|
||||
{value?.replace('_', ' ') || '-'}
|
||||
</Badge>
|
||||
),
|
||||
width: '130px',
|
||||
render: (value: string) => {
|
||||
const label = value?.replace('_', ' ') || '-';
|
||||
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>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'content_type',
|
||||
label: 'Type',
|
||||
sortable: true,
|
||||
sortField: 'content_type',
|
||||
width: '120px',
|
||||
render: (value: string) => (
|
||||
<Badge color="info" size="sm" variant="light">
|
||||
{value?.replace('_', ' ') || '-'}
|
||||
</Badge>
|
||||
),
|
||||
width: '110px',
|
||||
render: (value: string) => {
|
||||
const label = value?.replace('_', ' ') || '-';
|
||||
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: 'target_keywords',
|
||||
@@ -161,17 +171,15 @@ export const createIdeasPageConfig = (
|
||||
sortable: true,
|
||||
sortField: 'status',
|
||||
render: (value: string) => {
|
||||
const statusColors: Record<string, 'success' | 'warning' | 'error'> = {
|
||||
'new': 'warning',
|
||||
const statusColors: Record<string, 'success' | 'amber' | 'info'> = {
|
||||
'new': 'amber',
|
||||
'scheduled': 'info',
|
||||
'published': 'success',
|
||||
};
|
||||
const properCase = value ? value.charAt(0).toUpperCase() + value.slice(1) : '-';
|
||||
return (
|
||||
<Badge
|
||||
color={statusColors[value] || 'warning'}
|
||||
size="sm"
|
||||
>
|
||||
{value}
|
||||
<Badge color={statusColors[value] || 'amber'} size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{properCase}</span>
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user