ui improvements

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-27 06:08:29 +00:00
parent 726d945bda
commit 302af6337e
14 changed files with 219 additions and 211 deletions

View File

@@ -405,15 +405,13 @@ export default function Clusters() {
volumeMin: volumeMin,
volumeMax: volumeMax,
}}
nextAction={selectedIds.length > 0 ? {
primaryAction={{
label: 'Generate Ideas',
message: `${selectedIds.length} selected`,
onClick: () => handleBulkAction('generate_ideas', selectedIds),
} : clusters.length > 0 ? {
label: 'Generate Ideas',
href: '/planner/ideas',
message: `${clusters.length} clusters`,
} : undefined}
icon: <BoltIcon className="w-4 h-4" />,
onClick: () => handleBulkAction('auto_generate_ideas', selectedIds),
variant: 'success',
}}
getRowClassName={(row) => (row.ideas_count || 0) > 0 ? 'bg-success-50 dark:bg-success-500/10' : ''}
onFilterChange={(key, value) => {
const stringValue = value === null || value === undefined ? '' : String(value);
if (key === 'search') {

View File

@@ -23,7 +23,7 @@ import FormModal from '../../components/common/FormModal';
import ProgressModal from '../../components/common/ProgressModal';
import { useProgressModal } from '../../hooks/useProgressModal';
import { useToast } from '../../components/ui/toast/ToastContainer';
import { BoltIcon, PlusIcon, DownloadIcon, ListIcon, GroupIcon } from '../../icons';
import { BoltIcon, PlusIcon, DownloadIcon, ListIcon, GroupIcon, ArrowRightIcon } from '../../icons';
import { LightBulbIcon } from '@heroicons/react/24/outline';
import { createIdeasPageConfig } from '../../config/pages/ideas.config';
import { useSectorStore } from '../../store/sectorStore';
@@ -316,15 +316,13 @@ export default function Ideas() {
content_structure: structureFilter,
content_type: typeFilter,
}}
nextAction={selectedIds.length > 0 ? {
primaryAction={{
label: 'Queue to Writer',
message: `${selectedIds.length} selected`,
icon: <ArrowRightIcon className="w-4 h-4" />,
onClick: () => handleBulkAction('queue_to_writer', selectedIds),
} : ideas.filter(i => i.status === 'approved').length > 0 ? {
label: 'Start Writing',
href: '/writer/queue',
message: `${ideas.filter(i => i.status === 'approved').length} approved`,
} : undefined}
variant: 'success',
}}
getRowClassName={(row) => row.status === 'queued' || row.status === 'completed' ? 'bg-success-50 dark:bg-success-500/10' : ''}
onFilterChange={(key, value) => {
const stringValue = value === null || value === undefined ? '' : String(value);
if (key === 'search') {

View File

@@ -597,19 +597,13 @@ export default function Keywords() {
volumeMin: volumeMin,
volumeMax: volumeMax,
}}
nextAction={selectedIds.length > 0 ? {
label: 'Auto-Cluster Selected',
message: `${selectedIds.length} selected`,
onClick: handleAutoCluster,
} : workflowStats.unclustered >= 5 ? {
label: 'Auto-Cluster All',
message: `${workflowStats.unclustered} unclustered`,
onClick: handleAutoCluster,
} : workflowStats.clustered > 0 ? {
label: 'Generate Ideas',
href: '/planner/ideas',
message: `${workflowStats.clustered} clustered`,
} : undefined}
primaryAction={{
label: 'Auto-Cluster',
icon: <BoltIcon className="w-4 h-4" />,
onClick: () => handleBulkAction('auto_cluster', selectedIds),
variant: 'success',
}}
getRowClassName={(row) => row.cluster_id ? 'bg-success-50 dark:bg-success-500/10' : ''}
onFilterChange={(key, value) => {
// Normalize value to string, preserving empty strings
const stringValue = value === null || value === undefined ? '' : String(value);