From d250ae4e71180f85cb19b763e19291a7b6376bf9 Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Fri, 8 May 2026 15:37:03 +0700 Subject: [PATCH] =?UTF-8?q?[CLAUDE]=20PE=20Inbox:=20nh=E1=BA=ADn=20filter?= =?UTF-8?q?=20approvalWorkflowId=20+=20show=20dropdown=20c=E1=BA=A3=202=20?= =?UTF-8?q?view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User báo: - Filter "Tất cả quy trình duyệt" hiện chỉ ở Danh sách → muốn ở cả 2 - Filter chọn quy trình → không thấy phiếu V2 trong Duyệt (Inbox) BE — wire filter vào Inbox: - GetMyPurchaseEvaluationInboxQuery +ApprovalWorkflowId? param - Handler thêm filter `q.Where(x => x.e.ApprovalWorkflowId == awId)` - PurchaseEvaluationsController.Inbox +approvalWorkflowId query param FE (cả 2 app mirror): - PurchaseEvaluationsListPage: bỏ điều kiện `!pendingMe` ở Select dropdown → hiển thị filter quy trình duyệt CẢ Duyệt + Danh sách - Inbox API call: pass approvalWorkflowId từ URL param Verify: BE 0 error · 2 FE builds OK. Test luồng eoffice: 1. Vào "Duyệt NCC > Duyệt" → 2 dropdown filter hiện đầy đủ 2. Chọn 1 quy trình V2 từ dropdown → list filter chỉ phiếu pin quy trình đó 3. Vào "Duyệt NCC > Danh sách" → 2 dropdown vẫn show, filter cũng work --- .../pages/pe/PurchaseEvaluationsListPage.tsx | 26 ++++++++++--------- .../pages/pe/PurchaseEvaluationsListPage.tsx | 26 ++++++++++--------- .../PurchaseEvaluationsController.cs | 6 +++-- .../PurchaseEvaluationFeatures.cs | 7 +++-- 4 files changed, 37 insertions(+), 28 deletions(-) diff --git a/fe-admin/src/pages/pe/PurchaseEvaluationsListPage.tsx b/fe-admin/src/pages/pe/PurchaseEvaluationsListPage.tsx index 57a9147..cbbaca0 100644 --- a/fe-admin/src/pages/pe/PurchaseEvaluationsListPage.tsx +++ b/fe-admin/src/pages/pe/PurchaseEvaluationsListPage.tsx @@ -55,7 +55,10 @@ export function PurchaseEvaluationsListPage() { queryFn: async () => { if (pendingMe) { const res = await api.get('/purchase-evaluations/inbox', { - params: { type: typeFilter ?? undefined }, + params: { + type: typeFilter ?? undefined, + approvalWorkflowId: approvalWorkflowId || undefined, + }, }) return { items: res.data, total: res.data.length, page: 1, pageSize: res.data.length } } @@ -135,17 +138,16 @@ export function PurchaseEvaluationsListPage() { className="pl-8" /> - {/* Mig 23 — 2 dropdown tách: Quy trình duyệt + Trạng thái */} - {!pendingMe && ( - - )} + {/* Mig 23 — 2 dropdown tách: Quy trình duyệt + Trạng thái. + Hiển thị cả 2 view (Duyệt + Danh sách) — user feedback. */} + setParam('awId', e.target.value)}> - - {approvalWorkflows.data?.map(w => ( - - ))} - - )} + {/* Mig 23 — 2 dropdown tách: Quy trình duyệt + Trạng thái. + Hiển thị cả 2 view (Duyệt + Danh sách) — user feedback. */} +