Refactor content status terminology and enhance cluster serializers with idea and content counts

This commit is contained in:
Desktop
2025-11-11 18:51:32 +05:00
parent b321c99089
commit a7880c3818
10 changed files with 118 additions and 39 deletions

View File

@@ -8,7 +8,7 @@ import HTMLContentRenderer from '../../components/common/HTMLContentRenderer';
const statusColors: Record<string, 'warning' | 'info' | 'success' | 'primary'> = {
draft: 'warning',
review: 'info',
published: 'success',
publish: 'success',
};
export default function Content() {
@@ -176,7 +176,7 @@ export default function Content() {
size="sm"
variant="light"
>
{item.status?.replace('_', ' ') || 'draft'}
{(item.status || 'draft').replace('_', ' ').replace(/^\w/, (c) => c.toUpperCase())}
</Badge>
</td>
<td className="px-5 py-4 align-top text-gray-600 dark:text-gray-400">