sd
This commit is contained in:
@@ -111,6 +111,40 @@ export function createPublishedPageConfig(params: {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'wordpress_status',
|
||||
label: 'WP Status',
|
||||
sortable: false,
|
||||
width: '120px',
|
||||
render: (_value: any, row: Content) => {
|
||||
// Check if content has been published to WordPress
|
||||
if (!row.external_id) {
|
||||
return (
|
||||
<Badge color="gray" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">Not Published</span>
|
||||
</Badge>
|
||||
);
|
||||
}
|
||||
|
||||
// WordPress status badge - use external_status if available, otherwise show 'Published'
|
||||
const wpStatus = (row as any).wordpress_status || 'publish';
|
||||
const statusConfig: Record<string, { color: 'success' | 'amber' | 'blue' | 'gray' | 'red'; label: string }> = {
|
||||
publish: { color: 'success', label: 'Published' },
|
||||
draft: { color: 'gray', label: 'Draft' },
|
||||
pending: { color: 'amber', label: 'Pending' },
|
||||
future: { color: 'blue', label: 'Scheduled' },
|
||||
private: { color: 'amber', label: 'Private' },
|
||||
trash: { color: 'red', label: 'Trashed' },
|
||||
};
|
||||
const config = statusConfig[wpStatus] || { color: 'success' as const, label: 'Published' };
|
||||
|
||||
return (
|
||||
<Badge color={config.color} size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{config.label}</span>
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
key: 'content_type',
|
||||
|
||||
Reference in New Issue
Block a user