test if works or revert

This commit is contained in:
alorig
2025-11-29 11:23:42 +05:00
parent 0b3830c891
commit e9e0de40d0
10 changed files with 422 additions and 85 deletions

View File

@@ -83,8 +83,10 @@ export const createContentPageConfig = (
setStatusFilter: (value: string) => void;
setCurrentPage: (page: number) => void;
onViewContent?: (row: Content) => void;
enableToggleContent?: boolean; // If false, do not add toggleable content column behavior
}
): ContentPageConfig => {
const enableToggle = handlers.enableToggleContent !== false;
const showSectorColumn = !handlers.activeSector;
const statusColors: Record<string, 'warning' | 'info' | 'success' | 'primary'> = {
@@ -99,9 +101,9 @@ export const createContentPageConfig = (
...titleColumn,
sortable: true,
sortField: 'title',
toggleable: true,
toggleContentKey: 'content_html',
toggleContentLabel: 'Generated Content',
toggleable: enableToggle,
toggleContentKey: enableToggle ? 'content_html' : undefined,
toggleContentLabel: enableToggle ? 'Generated Content' : undefined,
render: (value: string, row: Content) => (
<div>
{handlers.onViewContent ? (