This commit is contained in:
IGNY8 VPS (Salman)
2025-11-29 08:59:31 +00:00
parent 4bea79a76d
commit 4237c203b4
18 changed files with 507 additions and 52 deletions

View File

@@ -54,6 +54,7 @@ export function createPublishedPageConfig(params: {
setPublishStatusFilter: (value: string) => void;
setCurrentPage: (page: number) => void;
activeSector: { id: number; name: string } | null;
onRowClick?: (row: Content) => void;
}): PublishedPageConfig {
const showSectorColumn = !params.activeSector;
@@ -63,14 +64,20 @@ export function createPublishedPageConfig(params: {
label: 'Title',
sortable: true,
sortField: 'title',
toggleable: true,
toggleContentKey: 'content_html',
toggleContentLabel: 'Generated Content',
render: (value: string, row: Content) => (
<div className="flex items-center gap-2">
<span className="font-medium text-gray-900 dark:text-white">
{value || `Content #${row.id}`}
</span>
{params.onRowClick ? (
<button
onClick={() => params.onRowClick!(row)}
className="text-base font-light text-blue-500 hover:text-blue-600 hover:underline text-left transition-colors"
>
{value || `Content #${row.id}`}
</button>
) : (
<span className="text-base font-light text-gray-900 dark:text-white">
{value || `Content #${row.id}`}
</span>
)}
{row.external_url && (
<a
href={row.external_url}