import { A, useParams } from "@solidjs/router"; import { Show, createMemo, lazy } from "solid-js"; const ApprovalManagementPage = lazy(() => import("./approval")); const VerificationManagementPage = lazy(() => import("./verification")); const UsersManagementPage = lazy(() => import("./users")); const ExternalDashboardManagementPage = lazy(() => import("./external-dashboard-management")); const InternalDashboardManagementPage = lazy(() => import("./internal-dashboard-management")); function toTitle(value: string): string { return value .split(/[-_/]/g) .filter(Boolean) .map((part) => part.charAt(0).toUpperCase() + part.slice(1)) .join(" "); } const LEGACY_ADMIN_ORIGIN = import.meta.env.VITE_LEGACY_ADMIN_ORIGIN || "http://localhost:9201"; function resolveLegacyPath(modulePath: string): string { switch (modulePath) { case "roles": return "/roles?scope=internal"; case "approval-management": case "approvals": return "/approval"; case "onboarding-management": return "/external-dashboard-management"; case "internal-dashboard-management": return "/internal-dashboard-management"; case "external-dashboard-management": return "/external-dashboard-management"; case "support": return "/help"; default: return `/${modulePath}`; } } export default function LegacyModuleShellPage() { const params = useParams(); const modulePath = String((params as any).module || "").trim(); if ( modulePath === "approval" || modulePath === "approval-management" || modulePath === "approvals" || modulePath === "approval-status" ) { return ; } if ( modulePath === "verification" || modulePath === "verification-status" || modulePath === "verification-management" ) { return ; } if ( modulePath === "users" || modulePath === "users-management" || modulePath === "user-management" ) { return ; } if (modulePath === "external-dashboard-management" || modulePath === "onboarding-management") { return ; } if (modulePath === "internal-dashboard-management") { return ; } const moduleName = createMemo(() => toTitle(modulePath || "Management")); const legacyPath = createMemo(() => resolveLegacyPath(modulePath)); const legacyUrl = createMemo(() => `${LEGACY_ADMIN_ORIGIN}${legacyPath()}`); const legacyOriginConfigured = createMemo( () => Boolean(import.meta.env.VITE_LEGACY_ADMIN_ORIGIN) || import.meta.env.DEV ); return (

{moduleName()}

Live legacy module embedded for exact design and functionality parity during migration.

This module isn’t available yet.

No legacy admin service is configured for this environment (VITE_LEGACY_ADMIN_ORIGIN is unset), so “{moduleName()}” can’t be embedded here.

} >