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>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])