Plan M Chunk M3 — UAT disconnect fix: bro UAT phát hiện label "Trả lại" + "Bản nháp" không phân biệt rõ với end-user → rename Phase=TraLai (98) display label sang "Cần chỉnh sửa lại" để self-descriptive. Scope HẸP — chỉ status display reference (KHÔNG đụng action verb): - types/purchaseEvaluation.ts × 2 app: PurchaseEvaluationPhaseLabel[98] + PeDisplayStatusLabel.TraLai = 2 const map rename - components/pe/PeWorkflowPanel.tsx × 2 app: 2 inline literal hardcode trong F1 dialog tooltip `Phase → "..."` + confirm message `Phiếu sẽ về "..."` — status reference, KHÔNG phải action verb KHÔNG đụng: - Action button label `← Trả lại` (verb, giữ nguyên) - F1 mode picker label `Trả về Người soạn thảo` (4 mode action, giữ nguyên) - Comments narrative giữ rationale dev (rule §6.5) - types/contracts.ts + types/budget.ts Phase 98 'Trả lại' — module Contract + Budget khác PE, ngoài scope M3 Mirror 2 app rule §3.9 strict applied. Verify: - npm run build fe-admin PASS clean (0 TS err, 9.40s) - npm run build fe-user PASS clean (0 TS err, 6.92s) Diff: +4/-4 LOC × 4 file = 8 LOC total 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...
},
},
])