diff --git a/fe-admin/src/components/Layout.tsx b/fe-admin/src/components/Layout.tsx index 9c20c85..569f4e9 100644 --- a/fe-admin/src/components/Layout.tsx +++ b/fe-admin/src/components/Layout.tsx @@ -6,6 +6,7 @@ import { useAuth } from '@/contexts/AuthContext' import { TopBar } from '@/components/TopBar' import type { MenuNode } from '@/types/menu' import { cn } from '@/lib/cn' +import { findContractWfByTypeCode } from '@/lib/contractWorkflowFamily' function getIcon(name: string | null): LucideIcon { if (!name) return Circle @@ -186,6 +187,12 @@ function resolvePath(key: string): string | null { // — fe-admin cố ý KHÔNG có `WorkflowMatrixViewPage` (xem ghi chú khối `Pe_*` // bên trên); nới ở đó = đẻ leaf chết rơi vào catch-all "chưa được build". if (/^KhkkN[1-8]$/.test(code)) return `/system/approval-workflows-v2/${code}` + // [W4 S190 · YC-029] Họ MỚI `AwV2_Hd*` — 7 quy trình duyệt HĐ per-LOẠI (seed @S188, + // sidebar Order 11..17). Vẫn là "chỗ thứ 4" Pattern 16-bis: BE seed leaf mà thiếu nhánh + // này thì `resolvePath` trả null ⇒ MenuLeaf DROP IM LẶNG khỏi sidebar (gotcha #50). + // 🔴 Tra bằng BẢNG (`lib/contractWorkflowFamily.ts`, mirror BE `ContractApprovalWorkflowFamily.cs`), + // KHÔNG regex đoán ngược: `HdNTNCC` chẻ ra `NT-NCC` hay `N-TNCC` là hai mã khác nhau. + if (findContractWfByTypeCode(code)) return `/system/approval-workflows-v2/${code}` } return null