Files
solution-erp/fe-user
pqhuy1987 f4494cfefb
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m41s
[CLAUDE] FE-User: fix menu sang nham — click "Danh sach" lai highlight "Da duyet"
Bug UAT anh bao 2026-07-27 (anh chup man hinh): bam muc "Danh sach" thi menu lai
to sang muc "Da duyet".

Goc: `phase` vua la BO LOC trang thai tren trang danh sach (nen nam trong
TRANSIENT_QUERY_KEYS tu fix 2026-05-08 — de user loc/chon dong khong mat highlight),
vua VUA-MOI tro thanh DANH TINH dieu huong cua muc "Da duyet" (`?type=N&phase=7`,
dot 2 hom nay). `queryMatches` strip `phase` khoi CA HAI ve => "Danh sach" ([type])
va "Da duyet" ([type] sau khi mat phase) thanh KHONG PHAN BIET DUOC => URL `?type=1`
khop ca hai, muc render sau thang phan hien thi.

Cung mot tham so khong the vua la thu-bi-bo-qua vua la thu-dinh-danh.

2 sua, ca 2 app (Layout khong phai file mirror byte-identical nen sua rieng tung ben):
- `queryMatches`: transient chi duoc bo qua khi MENU DICH KHONG tu ghim key do
  (dich ghim => so khop NGHIEM; khong ghim => giu hanh vi cu).
- Route "Da duyet" them `&view=approved` = khoa DINH DANH rieng (trang bo qua no,
  chi `phase=7` loc that). Can thiet vi URL muc "Da duyet" TRUNG HET URL ma user tu
  loc trang thai tren Danh sach => khong the phan biet bang URL neu thieu khoa nay.

Kiem 4 ca duong di (khong chi ca anh bao):
  ?type=1                        -> Danh sach SANG, Da duyet TAT
  ?type=1&phase=7&view=approved  -> Da duyet SANG, Danh sach TAT
  ?type=1&phase=7 (user tu loc)  -> Danh sach VAN SANG (giu fix 2026-05-08)
  ?type=1&deleted=1              -> Da xoa SANG, con lai TAT

tsc 0 loi x2 · npm build PASS x2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 14:36:46 +07:00
..

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:

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...
    },
  },
])