[CLAUDE] FE-Admin+FE-User: Plan CA Chunk C — Sidebar filter 2 app (admin HIDE + user SHOW)
fe-admin/src/components/Layout.tsx: - Add ADMIN_HIDDEN_MASTER_KEYS Set với 9 menu key danh mục - Extend isAdminHidden predicate: hide Ct_* + ADMIN_HIDDEN_MASTER_KEYS - Master/Suppliers/Projects/Departments/Catalogs/4 sub-catalogs giờ ẩn khỏi admin sidebar fe-user/src/components/Layout.tsx: - Remove `Master, Suppliers, Projects, Departments` khỏi USER_HIDDEN_KEYS - Catalogs (root + 4 leaf) auto-visible qua tree-inherit từ Master - Giữ ẩn `System, Users, Roles, Permissions, Forms, Reports` (admin tools) Verify: - npm run build × 2 app PASS 0 TS err - fe-admin bundle `index-BQidGwKU.js` 1,404 KB gz 357 KB (rotate) - fe-user bundle `index-Co8LTtad.js` 1,317 KB gz 342 KB (rotate) - Pattern 5 (mirror 2 app §3.9) applied — cùng 1 plan touch 2 file Layout Plan CA chain: - Chunk A80d39a0BE Role + Seed (em main solo) - Chunk B06a441cFE move 4 pages (Implementer Case 2) - Chunk C (this) sidebar filter (em main solo) - Pending Chunk D: smoke verify + tạo demo user catalog.manager@solutions.com.vn Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -96,8 +96,12 @@ function resolvePath(key: string): string | null {
|
||||
|
||||
// Menu entries not applicable to user app — filtered out client-side so the
|
||||
// sidebar only shows what matters to a contract drafter/approver.
|
||||
// [Plan CA S29 2026-05-22] REMOVED `Master, Suppliers, Projects, Departments`
|
||||
// khỏi hidden set — "Cấu hình danh mục dùng chung" giờ ở fe-user/eoffice cho
|
||||
// role CatalogManager (admin tạo + gán qua Permission Matrix). Catalogs (root
|
||||
// + 4 leaf) tree-inherit từ Master nên auto-visible. Forms/Reports/System/
|
||||
// Users/Roles/Permissions vẫn ẩn (admin tools only).
|
||||
const USER_HIDDEN_KEYS = new Set([
|
||||
'Master', 'Suppliers', 'Projects', 'Departments',
|
||||
'System', 'Users', 'Roles', 'Permissions',
|
||||
'Forms', 'Reports',
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user