tasks to published refactor
This commit is contained in:
@@ -82,6 +82,7 @@ export const createContentPageConfig = (
|
||||
statusFilter: string;
|
||||
setStatusFilter: (value: string) => void;
|
||||
setCurrentPage: (page: number) => void;
|
||||
onViewContent?: (row: Content) => void;
|
||||
}
|
||||
): ContentPageConfig => {
|
||||
const showSectorColumn = !handlers.activeSector;
|
||||
@@ -103,9 +104,18 @@ export const createContentPageConfig = (
|
||||
toggleContentLabel: 'Generated Content',
|
||||
render: (value: string, row: Content) => (
|
||||
<div>
|
||||
<div className="font-medium text-gray-900 dark:text-white">
|
||||
{row.title || `Content #${row.id}`}
|
||||
</div>
|
||||
{handlers.onViewContent ? (
|
||||
<button
|
||||
onClick={() => handlers.onViewContent!(row)}
|
||||
className="font-medium text-blue-500 hover:text-blue-600 hover:underline text-left transition-colors"
|
||||
>
|
||||
{row.title || `Content #${row.id}`}
|
||||
</button>
|
||||
) : (
|
||||
<div className="font-medium text-gray-900 dark:text-white">
|
||||
{row.title || `Content #${row.id}`}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
@@ -197,6 +207,52 @@ export const createContentPageConfig = (
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'prompts_status',
|
||||
label: 'Prompts',
|
||||
sortable: false,
|
||||
width: '110px',
|
||||
render: (_value: any, row: Content) => {
|
||||
const hasPrompts = row.has_image_prompts;
|
||||
return (
|
||||
<Badge color={hasPrompts ? 'success' : 'warning'} size="sm" variant="light">
|
||||
{hasPrompts ? (
|
||||
<span className="flex items-center gap-1">
|
||||
<svg className="w-3 h-3" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" />
|
||||
</svg>
|
||||
Ready
|
||||
</span>
|
||||
) : (
|
||||
'No Prompts'
|
||||
)}
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'images_status',
|
||||
label: 'Images',
|
||||
sortable: false,
|
||||
width: '110px',
|
||||
render: (_value: any, row: Content) => {
|
||||
const hasImages = row.has_generated_images;
|
||||
return (
|
||||
<Badge color={hasImages ? 'success' : 'warning'} size="sm" variant="light">
|
||||
{hasImages ? (
|
||||
<span className="flex items-center gap-1">
|
||||
<svg className="w-3 h-3" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" />
|
||||
</svg>
|
||||
Generated
|
||||
</span>
|
||||
) : (
|
||||
'No Images'
|
||||
)}
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'source',
|
||||
label: 'Source',
|
||||
|
||||
Reference in New Issue
Block a user