[CLAUDE] PE Inbox: nhận filter approvalWorkflowId + show dropdown cả 2 view
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m3s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m3s
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
This commit is contained in:
@ -333,8 +333,9 @@ public class ListPurchaseEvaluationsQueryHandler(
|
||||
|
||||
// ========== INBOX ==========
|
||||
|
||||
public record GetMyPurchaseEvaluationInboxQuery(PurchaseEvaluationType? Type = null)
|
||||
: IRequest<List<PurchaseEvaluationListItemDto>>;
|
||||
public record GetMyPurchaseEvaluationInboxQuery(
|
||||
PurchaseEvaluationType? Type = null,
|
||||
Guid? ApprovalWorkflowId = null) : IRequest<List<PurchaseEvaluationListItemDto>>;
|
||||
|
||||
public class GetMyPurchaseEvaluationInboxQueryHandler(
|
||||
IApplicationDbContext db,
|
||||
@ -374,6 +375,8 @@ public class GetMyPurchaseEvaluationInboxQueryHandler(
|
||||
select new { e, p, s };
|
||||
|
||||
if (request.Type is not null) q = q.Where(x => x.e.Type == request.Type);
|
||||
if (request.ApprovalWorkflowId is not null)
|
||||
q = q.Where(x => x.e.ApprovalWorkflowId == request.ApprovalWorkflowId);
|
||||
|
||||
return await q
|
||||
.OrderBy(x => x.e.SlaDeadline ?? DateTime.MaxValue)
|
||||
|
||||
Reference in New Issue
Block a user