fixes but still nto fixed

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-15 04:13:54 +00:00
parent e02ba76451
commit 75785aa642
12 changed files with 1037 additions and 80 deletions

View File

@@ -86,6 +86,11 @@ export const createIdeasPageConfig = (
typeFilter: string;
setTypeFilter: (value: string) => void;
setCurrentPage: (page: number) => void;
// Dynamic filter options
statusOptions?: Array<{ value: string; label: string }>;
contentTypeOptions?: Array<{ value: string; label: string }>;
contentStructureOptions?: Array<{ value: string; label: string }>;
clusterOptions?: Array<{ value: string; label: string }>;
}
): IdeasPageConfig => {
const showSectorColumn = !handlers.activeSector; // Show when viewing all sectors
@@ -233,9 +238,14 @@ export const createIdeasPageConfig = (
type: 'select',
options: [
{ value: '', label: 'All Status' },
{ value: 'new', label: 'New' },
{ value: 'queued', label: 'Queued' },
{ value: 'completed', label: 'Completed' },
...(handlers.statusOptions && handlers.statusOptions.length > 0
? handlers.statusOptions
: [
{ value: 'new', label: 'New' },
{ value: 'queued', label: 'Queued' },
{ value: 'completed', label: 'Completed' },
]
),
],
},
{
@@ -244,24 +254,25 @@ export const createIdeasPageConfig = (
type: 'select',
options: [
{ value: '', label: 'All Structures' },
// Post
{ value: 'article', label: 'Article' },
{ value: 'guide', label: 'Guide' },
{ value: 'comparison', label: 'Comparison' },
{ value: 'review', label: 'Review' },
{ value: 'listicle', label: 'Listicle' },
// Page
{ 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' },
// Product
{ value: 'product_page', label: 'Product Page' },
// Taxonomy
{ value: 'category_archive', label: 'Category Archive' },
{ value: 'tag_archive', label: 'Tag Archive' },
{ value: 'attribute_archive', label: 'Attribute Archive' },
...(handlers.contentStructureOptions && handlers.contentStructureOptions.length > 0
? handlers.contentStructureOptions
: [
{ value: 'article', label: 'Article' },
{ 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' },
]
),
],
},
{
@@ -270,23 +281,29 @@ export const createIdeasPageConfig = (
type: 'select',
options: [
{ value: '', label: 'All Types' },
{ value: 'post', label: 'Post' },
{ value: 'page', label: 'Page' },
{ value: 'product', label: 'Product' },
{ value: 'taxonomy', label: 'Taxonomy' },
...(handlers.contentTypeOptions && handlers.contentTypeOptions.length > 0
? handlers.contentTypeOptions
: [
{ value: 'post', label: 'Post' },
{ value: 'page', label: 'Page' },
{ value: 'product', label: 'Product' },
{ value: 'taxonomy', label: 'Taxonomy' },
]
),
],
},
{
key: 'keyword_cluster_id',
label: 'Cluster',
type: 'select',
options: (() => {
return [
{ value: '', label: 'All Clusters' },
...handlers.clusters.map((c) => ({ value: c.id.toString(), label: c.name })),
];
})(),
dynamicOptions: 'clusters',
options: [
{ value: '', label: 'All Clusters' },
...(handlers.clusterOptions && handlers.clusterOptions.length > 0
? handlers.clusterOptions
: handlers.clusters.map((c) => ({ value: c.id.toString(), label: c.name }))
),
],
},
],
formFields: (clusters: Array<{ id: number; name: string }>) => [

View File

@@ -140,6 +140,7 @@ export const createKeywordsPageConfig = (
countryOptions?: Array<{ value: string; label: string }>;
statusOptions?: Array<{ value: string; label: string }>;
clusterOptions?: Array<{ value: string; label: string }>;
difficultyOptions?: Array<{ value: string; label: string }>;
}
): KeywordsPageConfig => {
const showSectorColumn = !handlers.activeSector; // Show when viewing all sectors
@@ -308,11 +309,16 @@ export const createKeywordsPageConfig = (
type: 'select',
options: [
{ value: '', label: 'All Difficulty' },
{ value: '1', label: '1 - Very Easy' },
{ value: '2', label: '2 - Easy' },
{ value: '3', label: '3 - Medium' },
{ value: '4', label: '4 - Hard' },
{ value: '5', label: '5 - Very Hard' },
...(handlers.difficultyOptions && handlers.difficultyOptions.length > 0
? handlers.difficultyOptions
: [
{ value: '1', label: '1 - Very Easy' },
{ value: '2', label: '2 - Easy' },
{ value: '3', label: '3 - Medium' },
{ value: '4', label: '4 - Hard' },
{ value: '5', label: '5 - Very Hard' },
]
),
],
},
{
@@ -448,19 +454,6 @@ export const createKeywordsPageConfig = (
</div>
),
},
{
key: 'cluster_id',
label: 'Cluster',
type: 'select',
options: (() => {
// Dynamically generate options from current clusters
return [
{ value: '', label: 'All Clusters' },
...handlers.clusters.map((c) => ({ value: c.id.toString(), label: c.name })),
];
})(),
className: 'w-40',
},
],
headerMetrics: [
{