refactor-migration again
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
import Badge from '../../components/ui/badge/Badge';
|
||||
import { formatRelativeDate } from '../../utils/date';
|
||||
import { Content } from '../../services/api';
|
||||
import { CONTENT_TYPE_OPTIONS, STRUCTURE_LABELS, TYPE_LABELS } from '../structureMapping';
|
||||
|
||||
export interface ColumnConfig {
|
||||
key: string;
|
||||
@@ -122,21 +123,11 @@ export const createContentPageConfig = (
|
||||
sortable: true,
|
||||
sortField: 'content_type',
|
||||
width: '120px',
|
||||
render: (value: string) => {
|
||||
const typeLabels: Record<string, string> = {
|
||||
'post': 'Post',
|
||||
'page': 'Page',
|
||||
'product': 'Product',
|
||||
'service': 'Service',
|
||||
'category': 'Category',
|
||||
'tag': 'Tag',
|
||||
};
|
||||
return (
|
||||
<Badge color="primary" size="sm" variant="light">
|
||||
{typeLabels[value] || value || '-'}
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
render: (value: string) => (
|
||||
<Badge color="primary" size="sm" variant="light">
|
||||
{TYPE_LABELS[value] || value || '-'}
|
||||
</Badge>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: 'content_structure',
|
||||
@@ -144,20 +135,11 @@ export const createContentPageConfig = (
|
||||
sortable: true,
|
||||
sortField: 'content_structure',
|
||||
width: '150px',
|
||||
render: (value: string) => {
|
||||
const structureLabels: Record<string, string> = {
|
||||
'article': 'Article',
|
||||
'listicle': 'Listicle',
|
||||
'guide': 'Guide',
|
||||
'comparison': 'Comparison',
|
||||
'product_page': 'Product Page',
|
||||
};
|
||||
return (
|
||||
<Badge color="info" size="sm" variant="light">
|
||||
{structureLabels[value] || value || '-'}
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
render: (value: string) => (
|
||||
<Badge color="info" size="sm" variant="light">
|
||||
{STRUCTURE_LABELS[value] || value || '-'}
|
||||
</Badge>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: 'cluster_name',
|
||||
@@ -332,12 +314,7 @@ export const createContentPageConfig = (
|
||||
type: 'select',
|
||||
options: [
|
||||
{ value: '', label: 'All Types' },
|
||||
{ value: 'post', label: 'Post' },
|
||||
{ value: 'page', label: 'Page' },
|
||||
{ value: 'product', label: 'Product' },
|
||||
{ value: 'service', label: 'Service' },
|
||||
{ value: 'category', label: 'Category' },
|
||||
{ value: 'tag', label: 'Tag' },
|
||||
...CONTENT_TYPE_OPTIONS,
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -347,10 +324,19 @@ export const createContentPageConfig = (
|
||||
options: [
|
||||
{ value: '', label: 'All Structures' },
|
||||
{ value: 'article', label: 'Article' },
|
||||
{ value: 'listicle', label: 'Listicle' },
|
||||
{ value: 'guide', label: 'Guide' },
|
||||
{ value: 'comparison', label: 'Comparison' },
|
||||
{ value: 'review', label: 'Review' },
|
||||
{ value: 'listicle', label: 'Listicle' },
|
||||
{ value: 'landing_page', label: 'Landing Page' },
|
||||
{ value: 'business_page', label: 'Business Page' },
|
||||
{ value: 'service_page', label: 'Service Page' },
|
||||
{ value: 'general', label: 'General' },
|
||||
{ value: 'cluster_hub', label: 'Cluster Hub' },
|
||||
{ value: 'product_page', label: 'Product Page' },
|
||||
{ value: 'category_archive', label: 'Category Archive' },
|
||||
{ value: 'tag_archive', label: 'Tag Archive' },
|
||||
{ value: 'attribute_archive', label: 'Attribute Archive' },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user