From 1cc16a2db339a0567e8cf6a94ab76a720874d5d1 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Wed, 12 Aug 2026 18:55:25 +0700 Subject: [PATCH] =?UTF-8?q?[CLAUDE]=20FE-Admin:=20YC-029=20W4=20=E2=80=94?= =?UTF-8?q?=20sidebar=20Designer=207=20leaf=20QT=20Duy=E1=BB=87t=20H=C4=90?= =?UTF-8?q?=20(resolvePath=20AwV2=5FHd*)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- fe-admin/src/components/Layout.tsx | 7 +++++++ 1 file changed, 7 insertions(+) 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