Remove obsolete migration and workflow files; delete Site Builder Wizard references and related components. Update documentation to reflect the removal of the WorkflowState model and streamline the site building process.

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-21 00:59:34 +00:00
parent 6bb918bad6
commit c8adfe06d1
23 changed files with 1914 additions and 3493 deletions

View File

@@ -32,7 +32,6 @@ import {
} from "../../services/api";
import { useSiteStore } from "../../store/siteStore";
import { useSectorStore } from "../../store/sectorStore";
import Alert from "../../components/ui/alert/Alert";
interface DashboardStats {
keywords: {
@@ -73,7 +72,6 @@ export default function PlannerDashboard() {
const [stats, setStats] = useState<DashboardStats | null>(null);
const [loading, setLoading] = useState(true);
const [lastUpdated, setLastUpdated] = useState<Date>(new Date());
const [incompleteBlueprints, setIncompleteBlueprints] = useState<SiteBlueprint[]>([]);
// Fetch real data
const fetchDashboardData = async () => {
@@ -88,15 +86,6 @@ export default function PlannerDashboard() {
activeSite?.id ? fetchSiteBlueprints({ site_id: activeSite.id, page_size: 100 }) : Promise.resolve({ results: [] })
]);
// Check for incomplete blueprints
if (blueprintsRes.results) {
const incomplete = blueprintsRes.results.filter((bp: SiteBlueprint) => {
const workflow = bp.workflow_state;
return workflow && !workflow.completed && workflow.blocking_reason;
});
setIncompleteBlueprints(incomplete);
}
const keywords = keywordsRes.results || [];
const mappedKeywords = keywords.filter(k => k.cluster && k.cluster.length > 0);
const unmappedKeywords = keywords.filter(k => !k.cluster || k.cluster.length === 0);
@@ -472,37 +461,6 @@ export default function PlannerDashboard() {
onRefresh={fetchDashboardData}
/>
{/* Incomplete Blueprints Banner */}
{incompleteBlueprints.length > 0 && (
<Alert variant="warning" className="mb-6">
<div className="flex items-start justify-between">
<div className="flex-1">
<strong className="block mb-2">Incomplete Site Builder Workflows</strong>
<p className="text-sm mb-3">
{incompleteBlueprints.length} blueprint{incompleteBlueprints.length > 1 ? 's' : ''} {incompleteBlueprints.length > 1 ? 'have' : 'has'} incomplete workflows that need attention:
</p>
<ul className="list-disc list-inside space-y-1 text-sm mb-3">
{incompleteBlueprints.map((bp) => (
<li key={bp.id}>
<Link
to={`/sites/builder/workflow/${bp.id}`}
className="text-blue-600 dark:text-blue-400 hover:underline"
>
{bp.name}
</Link>
{bp.workflow_state?.blocking_reason && (
<span className="text-gray-600 dark:text-gray-400 ml-2">
- {bp.workflow_state.blocking_reason}
</span>
)}
</li>
))}
</ul>
</div>
</div>
</Alert>
)}
<div className="space-y-6">
{/* Key Metrics */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">