From a1665ee9d0f104ddf5a09cdc2f89d4a0f3faecf9 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Thu, 7 May 2026 15:12:52 +0700 Subject: [PATCH] =?UTF-8?q?[CLAUDE]=20FE-User:=20PE=20Danh=20s=C3=A1ch=20d?= =?UTF-8?q?isable=20interactions=20mirror=20fe-admin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirror commit `7dfeb1a` cho fe-user (rule §3.9 duplicate có chủ đích). PurchaseEvaluationsListPage readOnly=true cho PeDetailTabs + readOnly={!pendingMe} cho PeWorkflowPanel. PeWorkflowPanel thêm prop readOnly hide Chuyển tiếp. UAT mode: skip verify, push ngay. Co-Authored-By: Claude Opus 4.7 (1M context) --- fe-user/src/components/pe/PeWorkflowPanel.tsx | 16 ++++++++++++++-- .../src/pages/pe/PurchaseEvaluationsListPage.tsx | 6 ++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/fe-user/src/components/pe/PeWorkflowPanel.tsx b/fe-user/src/components/pe/PeWorkflowPanel.tsx index a3eebf6..02e3ee9 100644 --- a/fe-user/src/components/pe/PeWorkflowPanel.tsx +++ b/fe-user/src/components/pe/PeWorkflowPanel.tsx @@ -22,7 +22,14 @@ import { } from '@/types/purchaseEvaluation' import { PeApprovalsSection, PeHistorySection } from './PeDetailTabs' -export function PeWorkflowPanel({ evaluation }: { evaluation: PeDetailBundle }) { +export function PeWorkflowPanel({ + evaluation, + readOnly = false, +}: { + evaluation: PeDetailBundle + /** true = ẩn Chuyển tiếp + Dialog transition (dùng cho Danh sách, không dùng Duyệt). */ + readOnly?: boolean +}) { const [target, setTarget] = useState(null) const [comment, setComment] = useState('') const qc = useQueryClient() @@ -92,7 +99,7 @@ export function PeWorkflowPanel({ evaluation }: { evaluation: PeDetailBundle }) })} - {next.length > 0 && ( + {next.length > 0 && !readOnly && (
@@ -113,6 +120,11 @@ export function PeWorkflowPanel({ evaluation }: { evaluation: PeDetailBundle })
)} + {readOnly && next.length > 0 && ( +
+ Vào menu “Duyệt” để chuyển phase. +
+ )} {target !== null && ( setParam('id', null)} onDelete={() => del.mutate(detail.data!.id)} - readOnly={pendingMe} + readOnly={true} /> )} {/* Panel 3: Workflow + history */} + {/* Danh sách (pendingMe=false) → readOnly=true → ẩn Chuyển tiếp transition. + Duyệt (pendingMe=true) → readOnly=false → cho approver chuyển phase. */}