Add Linker and Optimizer modules with API integration and frontend components
- Added Linker and Optimizer apps to `INSTALLED_APPS` in `settings.py`. - Configured API endpoints for Linker and Optimizer in `urls.py`. - Implemented `OptimizeContentFunction` for content optimization in the AI module. - Created prompts for content optimization and site structure generation. - Updated `OptimizerService` to utilize the new AI function for content optimization. - Developed frontend components including dashboards and content lists for Linker and Optimizer. - Integrated new routes and sidebar navigation for Linker and Optimizer in the frontend. - Enhanced content management with source and sync status filters in the Writer module. - Comprehensive test coverage added for new features and components.
This commit is contained in:
@@ -15,6 +15,8 @@ import Badge from '../../components/ui/badge/Badge';
|
||||
import { formatRelativeDate } from '../../utils/date';
|
||||
import { Content } from '../../services/api';
|
||||
import { FileIcon, MoreDotIcon } from '../../icons';
|
||||
import { SourceBadge, ContentSource } from '../../components/content/SourceBadge';
|
||||
import { SyncStatusBadge, SyncStatus } from '../../components/content/SyncStatusBadge';
|
||||
|
||||
export interface ColumnConfig {
|
||||
key: string;
|
||||
@@ -192,6 +194,26 @@ export const createContentPageConfig = (
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'source',
|
||||
label: 'Source',
|
||||
sortable: true,
|
||||
sortField: 'source',
|
||||
width: '120px',
|
||||
render: (_value: any, row: Content) => (
|
||||
<SourceBadge source={(row.source as ContentSource) || 'igny8'} />
|
||||
),
|
||||
},
|
||||
{
|
||||
key: 'sync_status',
|
||||
label: 'Sync Status',
|
||||
sortable: true,
|
||||
sortField: 'sync_status',
|
||||
width: '120px',
|
||||
render: (_value: any, row: Content) => (
|
||||
<SyncStatusBadge status={(row.sync_status as SyncStatus) || 'native'} />
|
||||
),
|
||||
},
|
||||
{
|
||||
...createdColumn,
|
||||
sortable: true,
|
||||
@@ -327,6 +349,29 @@ export const createContentPageConfig = (
|
||||
{ value: 'publish', label: 'Publish' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'source',
|
||||
label: 'Source',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ value: '', label: 'All Sources' },
|
||||
{ value: 'igny8', label: 'IGNY8' },
|
||||
{ value: 'wordpress', label: 'WordPress' },
|
||||
{ value: 'shopify', label: 'Shopify' },
|
||||
{ value: 'custom', label: 'Custom' },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'sync_status',
|
||||
label: 'Sync Status',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ value: '', label: 'All Sync Status' },
|
||||
{ value: 'native', label: 'Native' },
|
||||
{ value: 'imported', label: 'Imported' },
|
||||
{ value: 'synced', label: 'Synced' },
|
||||
],
|
||||
},
|
||||
],
|
||||
headerMetrics: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user