433
This commit is contained in:
@@ -111,27 +111,7 @@ export function createPublishedPageConfig(params: {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'wordpress_status',
|
||||
label: 'WordPress',
|
||||
sortable: false,
|
||||
width: '140px',
|
||||
render: (_value: any, row: Content) => {
|
||||
if (row.external_id && row.external_url) {
|
||||
return (
|
||||
<Badge color="success" size="xs" variant="soft">
|
||||
<CheckCircleIcon className="w-3 h-3 mr-1" />
|
||||
<span className="text-[11px] font-normal">Published</span>
|
||||
</Badge>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Badge color="amber" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">Not Published</span>
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
key: 'content_type',
|
||||
label: 'Type',
|
||||
@@ -166,6 +146,71 @@ export function createPublishedPageConfig(params: {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'cluster_name',
|
||||
label: 'Cluster',
|
||||
sortable: false,
|
||||
width: '130px',
|
||||
render: (_value: any, row: Content) => {
|
||||
const clusterName = row.cluster_name;
|
||||
if (!clusterName) {
|
||||
return <span className="text-gray-400 dark:text-gray-500 text-[11px]">-</span>;
|
||||
}
|
||||
return (
|
||||
<Badge color="indigo" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{clusterName}</span>
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'tags',
|
||||
label: 'Tags',
|
||||
sortable: false,
|
||||
width: '150px',
|
||||
render: (_value: any, row: Content) => {
|
||||
const tags = row.tags || [];
|
||||
if (!tags || tags.length === 0) {
|
||||
return <span className="text-gray-400 dark:text-gray-500 text-[11px]">-</span>;
|
||||
}
|
||||
return (
|
||||
<div className="flex flex-wrap gap-1">
|
||||
{tags.slice(0, 2).map((tag, index) => (
|
||||
<Badge key={`${tag}-${index}`} color="pink" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{tag}</span>
|
||||
</Badge>
|
||||
))}
|
||||
{tags.length > 2 && (
|
||||
<span className="text-[11px] text-gray-500">+{tags.length - 2}</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'categories',
|
||||
label: 'Categories',
|
||||
sortable: false,
|
||||
width: '150px',
|
||||
render: (_value: any, row: Content) => {
|
||||
const categories = row.categories || [];
|
||||
if (!categories || categories.length === 0) {
|
||||
return <span className="text-gray-400 dark:text-gray-500 text-[11px]">-</span>;
|
||||
}
|
||||
return (
|
||||
<div className="flex flex-wrap gap-1">
|
||||
{categories.slice(0, 2).map((category, index) => (
|
||||
<Badge key={`${category}-${index}`} color="blue" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{category}</span>
|
||||
</Badge>
|
||||
))}
|
||||
{categories.length > 2 && (
|
||||
<span className="text-[11px] text-gray-500">+{categories.length - 2}</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'word_count',
|
||||
label: 'Words',
|
||||
|
||||
@@ -85,18 +85,23 @@ export function createReviewPageConfig(params: {
|
||||
sortable: false,
|
||||
width: '180px',
|
||||
render: (_value: any, row: Content) => {
|
||||
const categories = row.taxonomy_terms_data?.filter((t: any) => t.taxonomy_type === 'category') || [];
|
||||
if (!categories.length) return <span className="text-gray-400 dark:text-gray-500">-</span>;
|
||||
const categories = row.categories || [];
|
||||
if (!categories || categories.length === 0) {
|
||||
return <span className="text-gray-400 dark:text-gray-500 text-[11px]">-</span>;
|
||||
}
|
||||
return (
|
||||
<div className="flex flex-wrap gap-1">
|
||||
{categories.map((cat: any) => (
|
||||
<span key={cat.id} className="px-2 py-0.5 bg-purple-50 dark:bg-purple-900/20 text-purple-700 dark:text-purple-300 rounded-full text-xs font-medium">{cat.name}</span>
|
||||
{categories.slice(0, 2).map((category, index) => (
|
||||
<Badge key={`${category}-${index}`} color="blue" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{category}</span>
|
||||
</Badge>
|
||||
))}
|
||||
{categories.length > 2 && (
|
||||
<span className="text-[11px] text-gray-500">+{categories.length - 2}</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
toggleable: true,
|
||||
defaultVisible: true,
|
||||
},
|
||||
{
|
||||
key: 'tags',
|
||||
@@ -104,18 +109,23 @@ export function createReviewPageConfig(params: {
|
||||
sortable: false,
|
||||
width: '180px',
|
||||
render: (_value: any, row: Content) => {
|
||||
const tags = row.taxonomy_terms_data?.filter((t: any) => t.taxonomy_type === 'tag') || [];
|
||||
if (!tags.length) return <span className="text-gray-400 dark:text-gray-500">-</span>;
|
||||
const tags = row.tags || [];
|
||||
if (!tags || tags.length === 0) {
|
||||
return <span className="text-gray-400 dark:text-gray-500 text-[11px]">-</span>;
|
||||
}
|
||||
return (
|
||||
<div className="flex flex-wrap gap-1">
|
||||
{tags.map((tag: any) => (
|
||||
<span key={tag.id} className="px-2 py-0.5 bg-brand-50 dark:bg-brand-900/20 text-brand-700 dark:text-brand-300 rounded-full text-xs font-medium">{tag.name}</span>
|
||||
{tags.slice(0, 2).map((tag, index) => (
|
||||
<Badge key={`${tag}-${index}`} color="pink" size="xs" variant="soft">
|
||||
<span className="text-[11px] font-normal">{tag}</span>
|
||||
</Badge>
|
||||
))}
|
||||
{tags.length > 2 && (
|
||||
<span className="text-[11px] text-gray-500">+{tags.length - 2}</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
toggleable: true,
|
||||
defaultVisible: true,
|
||||
},
|
||||
{
|
||||
key: 'content_type',
|
||||
|
||||
Reference in New Issue
Block a user