From 2546c2c6b27560a7720f7f0ce21e14df7903bfe2 Mon Sep 17 00:00:00 2001 From: aarav Date: Sat, 29 Jun 2024 15:28:29 -0400 Subject: [PATCH] #2674 Checks if any statuses are denied --- src/frontend/src/pages/FinancePage/RefundsSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/pages/FinancePage/RefundsSection.tsx b/src/frontend/src/pages/FinancePage/RefundsSection.tsx index 9e579e3e7b..e50dcf2ce3 100644 --- a/src/frontend/src/pages/FinancePage/RefundsSection.tsx +++ b/src/frontend/src/pages/FinancePage/RefundsSection.tsx @@ -123,7 +123,7 @@ const Refunds = ({ userReimbursementRequests, allReimbursementRequests }: Refund const displayedReimbursements = allReimbursements && tabValue === 1 ? allReimbursements : userReimbursements; const displayedReimbursementRequests = ( allReimbursementRequests && tabValue === 1 ? allReimbursementRequests : userReimbursementRequests - ).filter((request: ReimbursementRequest) => request.reimbursementStatuses[0].type !== ReimbursementStatusType.DENIED); + ).filter((request: ReimbursementRequest) => !request.reimbursementStatuses.some(status => status.type === ReimbursementStatusType.DENIED)); const rows = displayedReimbursements.map(getRefundRowData).sort(getComparator(order, orderBy));