mpre ui fixes
This commit is contained in:
@@ -59,7 +59,7 @@ export function createApprovedPageConfig(params: {
|
||||
const columns: ColumnConfig[] = [
|
||||
{
|
||||
key: 'title',
|
||||
label: 'Title',
|
||||
label: 'Content Idea Title',
|
||||
sortable: true,
|
||||
sortField: 'title',
|
||||
render: (value: string, row: Content) => (
|
||||
@@ -92,7 +92,7 @@ export function createApprovedPageConfig(params: {
|
||||
},
|
||||
{
|
||||
key: 'wordpress_status',
|
||||
label: 'Site Status',
|
||||
label: 'Site Content Status',
|
||||
sortable: false,
|
||||
width: '120px',
|
||||
render: (_value: any, row: Content) => {
|
||||
|
||||
@@ -127,7 +127,7 @@ export const createClustersPageConfig = (
|
||||
}] : []),
|
||||
{
|
||||
key: 'keywords_count',
|
||||
label: 'Keywords',
|
||||
label: 'KW Count',
|
||||
sortable: true,
|
||||
sortField: 'keywords_count',
|
||||
width: '120px',
|
||||
@@ -141,17 +141,7 @@ export const createClustersPageConfig = (
|
||||
sortField: 'ideas_count',
|
||||
width: '120px',
|
||||
align: 'center' as const,
|
||||
render: (value: number) => (
|
||||
<Badge
|
||||
color={value > 0 ? 'success' : 'light'}
|
||||
size="xs"
|
||||
variant="soft"
|
||||
>
|
||||
<span className="text-[11px] font-normal">
|
||||
{value > 0 ? `${value.toLocaleString()} ideas` : 'No ideas'}
|
||||
</span>
|
||||
</Badge>
|
||||
),
|
||||
render: (value: number) => value.toLocaleString(),
|
||||
},
|
||||
{
|
||||
key: 'volume',
|
||||
@@ -244,7 +234,7 @@ export const createClustersPageConfig = (
|
||||
},
|
||||
{
|
||||
key: 'updated_at',
|
||||
label: 'Updated',
|
||||
label: 'Modified',
|
||||
sortable: false, // Backend doesn't support sorting by updated_at
|
||||
sortField: 'updated_at',
|
||||
defaultVisible: false,
|
||||
@@ -253,7 +243,7 @@ export const createClustersPageConfig = (
|
||||
// Generate Ideas action column - only shows button for status = 'new'
|
||||
{
|
||||
key: 'generate_action',
|
||||
label: 'Actions',
|
||||
label: 'Generate Ideas',
|
||||
sortable: false,
|
||||
width: '120px',
|
||||
render: (_value: any, row: Cluster) => {
|
||||
|
||||
@@ -97,6 +97,7 @@ export const createContentPageConfig = (
|
||||
columns: [
|
||||
{
|
||||
...titleColumn,
|
||||
label: 'Content Idea Title',
|
||||
sortable: true,
|
||||
sortField: 'title',
|
||||
render: (value: string, row: Content) => (
|
||||
@@ -385,7 +386,7 @@ export const createContentPageConfig = (
|
||||
// Optional columns - hidden by default
|
||||
{
|
||||
key: 'updated_at',
|
||||
label: 'Updated',
|
||||
label: 'Modified',
|
||||
sortable: true,
|
||||
sortField: 'updated_at',
|
||||
defaultVisible: false,
|
||||
|
||||
@@ -95,7 +95,7 @@ export const createIdeasPageConfig = (
|
||||
{
|
||||
...titleColumn,
|
||||
key: 'idea_title',
|
||||
label: 'Title',
|
||||
label: 'Content Idea Title',
|
||||
sortable: true,
|
||||
sortField: 'idea_title',
|
||||
toggleable: true, // Enable toggle for this column
|
||||
@@ -150,7 +150,7 @@ export const createIdeasPageConfig = (
|
||||
},
|
||||
{
|
||||
key: 'target_keywords',
|
||||
label: 'Target Keywords',
|
||||
label: 'Keywords',
|
||||
sortable: false,
|
||||
width: '250px',
|
||||
render: (value: string) => (
|
||||
@@ -215,7 +215,7 @@ export const createIdeasPageConfig = (
|
||||
// Optional columns - hidden by default
|
||||
{
|
||||
key: 'updated_at',
|
||||
label: 'Updated',
|
||||
label: 'Modified',
|
||||
sortable: false, // Backend doesn't support sorting by updated_at
|
||||
sortField: 'updated_at',
|
||||
defaultVisible: false,
|
||||
|
||||
@@ -245,56 +245,11 @@ export const createKeywordsPageConfig = (
|
||||
},
|
||||
{
|
||||
...createdColumn,
|
||||
label: 'Added',
|
||||
sortable: true,
|
||||
sortField: 'created_at',
|
||||
render: (value: string) => formatRelativeDate(value),
|
||||
},
|
||||
// Optional columns - hidden by default
|
||||
{
|
||||
key: 'updated_at',
|
||||
label: 'Updated',
|
||||
sortable: true,
|
||||
sortField: 'updated_at',
|
||||
defaultVisible: false,
|
||||
render: (value: string) => formatRelativeDate(value),
|
||||
},
|
||||
{
|
||||
key: 'volume_override',
|
||||
label: 'Volume Override',
|
||||
sortable: true,
|
||||
sortField: 'volume_override',
|
||||
defaultVisible: false,
|
||||
render: (value: number | null) => value ? value.toLocaleString() : '-',
|
||||
},
|
||||
{
|
||||
key: 'difficulty_override',
|
||||
label: 'Difficulty Override',
|
||||
sortable: true,
|
||||
sortField: 'difficulty_override',
|
||||
defaultVisible: false,
|
||||
align: 'center' as const,
|
||||
render: (value: number | null) => {
|
||||
if (value === null || value === undefined) return '-';
|
||||
const difficultyNum = getDifficultyNumber(value);
|
||||
return typeof difficultyNum === 'number' ? (
|
||||
<Badge
|
||||
color={
|
||||
difficultyNum === 1 || difficultyNum === 2
|
||||
? 'success'
|
||||
: difficultyNum === 3
|
||||
? 'warning'
|
||||
: 'error'
|
||||
}
|
||||
variant={difficultyNum === 5 ? 'solid' : 'light'}
|
||||
size="sm"
|
||||
>
|
||||
{difficultyNum}
|
||||
</Badge>
|
||||
) : (
|
||||
difficultyNum
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
filters: [
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ export function createReviewPageConfig(params: {
|
||||
const columns: ColumnConfig[] = [
|
||||
{
|
||||
key: 'title',
|
||||
label: 'Title',
|
||||
label: 'Content Idea Title',
|
||||
sortable: true,
|
||||
sortField: 'title',
|
||||
render: (value: string, row: Content) => (
|
||||
|
||||
@@ -101,6 +101,7 @@ export const createTasksPageConfig = (
|
||||
columns: [
|
||||
{
|
||||
...titleColumn,
|
||||
label: 'Content Idea Title',
|
||||
sortable: true,
|
||||
sortField: 'title',
|
||||
toggleable: true,
|
||||
@@ -295,7 +296,7 @@ export const createTasksPageConfig = (
|
||||
},
|
||||
{
|
||||
key: 'updated_at',
|
||||
label: 'Updated',
|
||||
label: 'Modified',
|
||||
sortable: true,
|
||||
sortField: 'updated_at',
|
||||
defaultVisible: false,
|
||||
|
||||
@@ -12,7 +12,7 @@ export const titleColumn = {
|
||||
|
||||
export const keywordColumn = {
|
||||
key: 'keyword',
|
||||
label: 'Search Term',
|
||||
label: 'Keyword',
|
||||
sortable: true,
|
||||
width: 'auto',
|
||||
};
|
||||
@@ -27,7 +27,7 @@ export const statusColumn = {
|
||||
|
||||
export const volumeColumn = {
|
||||
key: 'volume',
|
||||
label: 'Monthly Searches',
|
||||
label: 'Volume',
|
||||
sortable: true,
|
||||
numeric: true,
|
||||
width: '100px',
|
||||
@@ -35,7 +35,7 @@ export const volumeColumn = {
|
||||
|
||||
export const difficultyColumn = {
|
||||
key: 'difficulty',
|
||||
label: 'Competition Level',
|
||||
label: 'Difficulty',
|
||||
sortable: true,
|
||||
badge: true,
|
||||
width: '120px',
|
||||
@@ -43,7 +43,7 @@ export const difficultyColumn = {
|
||||
|
||||
export const countryColumn = {
|
||||
key: 'country',
|
||||
label: 'Target Location',
|
||||
label: 'Country',
|
||||
sortable: true,
|
||||
badge: true,
|
||||
width: '120px',
|
||||
@@ -51,7 +51,7 @@ export const countryColumn = {
|
||||
|
||||
export const clusterColumn = {
|
||||
key: 'cluster',
|
||||
label: 'Topic Group',
|
||||
label: 'Cluster',
|
||||
sortable: true,
|
||||
width: '200px',
|
||||
};
|
||||
@@ -66,7 +66,7 @@ export const createdColumn = {
|
||||
|
||||
export const updatedColumn = {
|
||||
key: 'updated_at',
|
||||
label: 'Updated',
|
||||
label: 'Modified',
|
||||
sortable: true,
|
||||
date: true,
|
||||
width: '150px',
|
||||
@@ -82,7 +82,7 @@ export const actionsColumn = {
|
||||
|
||||
export const wordCountColumn = {
|
||||
key: 'word_count',
|
||||
label: 'Word Count',
|
||||
label: 'Words',
|
||||
sortable: true,
|
||||
numeric: true,
|
||||
width: '120px',
|
||||
@@ -90,7 +90,7 @@ export const wordCountColumn = {
|
||||
|
||||
export const sectorColumn = {
|
||||
key: 'sector_name',
|
||||
label: 'Topic Area',
|
||||
label: 'Sector',
|
||||
sortable: false,
|
||||
width: '150px',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user