From 79398fb41f9b96ed61b34d72defc5090281bb3a0 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Fri, 24 Apr 2026 11:13:29 +0700 Subject: [PATCH] [CLAUDE] FE: accordion mutex Pe_* + sidebar width w-72 + label nowrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2 fix user session 3: 1. Accordion mutex cho Pe_ groups (2 phieu Duyet NCC + Duyet NCC va Giai phap) — truoc chi Ct_ (7 HD) co mutex, Pe_ dung localOpen rieng → user click 1 Pe_ group xong click Pe_ khac → ca 2 expanded cung luc. Fix: extend AccordionContextValue + expandedPeCode + INT_TO_PE_CODE map. MenuGroup branch: isCtAccordion || isPeAccordion (families doc lap — user co the mo 1 Ct_ + 1 Pe_ cung luc). useEffect URL sync: /purchase-evaluations?type → Pe; /contracts* ?type → Ct. 2. Sidebar width w-64 (256px) → w-72 (288px) de label QUY TRINH CHON THAU PHU - NCC (30 char uppercase tracking-wide) fit single-line thay vi wrap 2 dong. Top-level group class: text-xs tracking-wider → text-[11px] tracking-wide + whitespace-nowrap Dong bo ca fe-admin + fe-user. --- fe-admin/src/components/Layout.tsx | 4 +- fe-user/src/components/Layout.tsx | 76 +++++++++++++++++++++++------- 2 files changed, 60 insertions(+), 20 deletions(-) diff --git a/fe-admin/src/components/Layout.tsx b/fe-admin/src/components/Layout.tsx index 203d595..6d87632 100644 --- a/fe-admin/src/components/Layout.tsx +++ b/fe-admin/src/components/Layout.tsx @@ -118,7 +118,7 @@ function MenuGroup({ node, depth }: { node: MenuNode; depth: number }) { className={cn( 'flex w-full items-center justify-between rounded-md transition', isTopLevel - ? 'px-3 py-2 text-xs font-semibold uppercase tracking-wider text-slate-500 hover:bg-slate-100' + ? 'px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-slate-500 hover:bg-slate-100 whitespace-nowrap' : 'px-3 py-1.5 text-[13px] font-medium text-slate-600 hover:bg-slate-100 hover:text-slate-900', )} > @@ -175,7 +175,7 @@ export function Layout() { return (
-