From 0ae3fe2f39d8918ecf3e65c2d253f85cf1949321 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Thu, 7 May 2026 15:43:52 +0700 Subject: [PATCH] =?UTF-8?q?[CLAUDE]=20FE-Admin+FE-User:=20hotfix=20CI=20bu?= =?UTF-8?q?ild=20TS=20errors=20=E2=80=94=20forcedPhase=20rename=20+=20unus?= =?UTF-8?q?ed=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI run #125 + #126 fail (red ❌ Gitea Actions) do TS compile errors trong commit `18ebfa1` + `0c5db13` không catch local (UAT skip-verify rule). Errors: PeListPanel.tsx:41 — Property 'forcedPhase' does not exist (renamed to editableOnly nhưng quên xóa khỏi destructuring args list) PeListPanel.tsx:81,106 — Cannot find name 'editableOnly' (do destructuring vẫn dùng forcedPhase cũ → editableOnly không được declare ở scope) PeWorkspaceCreateView.tsx:20 — 'PurchaseEvaluationType' declared but never read (sau khi đổi chỉ dùng PurchaseEvaluationTypeLabel, không cần enum value nữa) Fix: ~ PeListPanel × 2 app: destructuring `forcedPhase,` → `editableOnly = false,` ~ PeWorkspaceCreateView × 2 app: bỏ `PurchaseEvaluationType` khỏi import Verify: npm run build fe-admin + fe-user pass · 0 TS error · dotnet test 83 vẫn pass (Migration 17 + TraLai phase enum đã verify trước). UAT mode rule: vẫn skip verify cho task FE-only nhỏ — nhưng phát hiện multi-rename refactor + bỏ import nên check `npm run build` 1 lần trước commit. TODO update memory feedback_uat_skip_verify.md thêm exception khi prop rename hoặc remove unused import. Co-Authored-By: Claude Opus 4.7 (1M context) --- fe-admin/src/components/pe/PeListPanel.tsx | 2 +- fe-admin/src/components/pe/PeWorkspaceCreateView.tsx | 5 +---- fe-user/src/components/pe/PeListPanel.tsx | 2 +- fe-user/src/components/pe/PeWorkspaceCreateView.tsx | 5 +---- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/fe-admin/src/components/pe/PeListPanel.tsx b/fe-admin/src/components/pe/PeListPanel.tsx index 7ed33b1..f7bea17 100644 --- a/fe-admin/src/components/pe/PeListPanel.tsx +++ b/fe-admin/src/components/pe/PeListPanel.tsx @@ -38,7 +38,7 @@ export function PeListPanel({ showCreateButton = false, onCreate, onEditClick, - forcedPhase, + editableOnly = false, }: { typeFilter: number | null pendingMe?: boolean diff --git a/fe-admin/src/components/pe/PeWorkspaceCreateView.tsx b/fe-admin/src/components/pe/PeWorkspaceCreateView.tsx index 3d13fde..2c6feee 100644 --- a/fe-admin/src/components/pe/PeWorkspaceCreateView.tsx +++ b/fe-admin/src/components/pe/PeWorkspaceCreateView.tsx @@ -16,10 +16,7 @@ import { Label } from '@/components/ui/Label' import { Select } from '@/components/ui/Select' import { api } from '@/lib/api' import { getErrorMessage } from '@/lib/apiError' -import { - PurchaseEvaluationType, - PurchaseEvaluationTypeLabel, -} from '@/types/purchaseEvaluation' +import { PurchaseEvaluationTypeLabel } from '@/types/purchaseEvaluation' import { BudgetPhase, type BudgetListItem } from '@/types/budget' import type { Paged, Project } from '@/types/master' diff --git a/fe-user/src/components/pe/PeListPanel.tsx b/fe-user/src/components/pe/PeListPanel.tsx index 7ed33b1..f7bea17 100644 --- a/fe-user/src/components/pe/PeListPanel.tsx +++ b/fe-user/src/components/pe/PeListPanel.tsx @@ -38,7 +38,7 @@ export function PeListPanel({ showCreateButton = false, onCreate, onEditClick, - forcedPhase, + editableOnly = false, }: { typeFilter: number | null pendingMe?: boolean diff --git a/fe-user/src/components/pe/PeWorkspaceCreateView.tsx b/fe-user/src/components/pe/PeWorkspaceCreateView.tsx index 3d13fde..2c6feee 100644 --- a/fe-user/src/components/pe/PeWorkspaceCreateView.tsx +++ b/fe-user/src/components/pe/PeWorkspaceCreateView.tsx @@ -16,10 +16,7 @@ import { Label } from '@/components/ui/Label' import { Select } from '@/components/ui/Select' import { api } from '@/lib/api' import { getErrorMessage } from '@/lib/apiError' -import { - PurchaseEvaluationType, - PurchaseEvaluationTypeLabel, -} from '@/types/purchaseEvaluation' +import { PurchaseEvaluationTypeLabel } from '@/types/purchaseEvaluation' import { BudgetPhase, type BudgetListItem } from '@/types/budget' import type { Paged, Project } from '@/types/master'