From 131e1386d9039885b0bee9853f9ab8f5710f0164 Mon Sep 17 00:00:00 2001 From: Samandar Turg'unboev Date: Mon, 30 Jun 2025 11:42:44 +0500 Subject: [PATCH] filter --- src/routes/private/boxes/DashboardBoxesPage.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/routes/private/boxes/DashboardBoxesPage.tsx b/src/routes/private/boxes/DashboardBoxesPage.tsx index 2840110..feeca9b 100644 --- a/src/routes/private/boxes/DashboardBoxesPage.tsx +++ b/src/routes/private/boxes/DashboardBoxesPage.tsx @@ -372,11 +372,20 @@ const DashboardBoxesPage = (props: Props) => { // Calculate completion statistics const boxOptions = (inputValue: string) => { - return box_requests.getAll({ cargoId: inputValue }).then(res => { - return res.data.data.data.map(p => ({ label: p.name, value: p.id })); - }); + return box_requests + .getAll({ + cargoId: inputValue, + partyId: partyFilter?.value, // Bu qatorni qo'shing + }) + .then(res => { + return res.data.data.data.map(p => ({ label: p.name, value: p.id })); + }); }; + useEffect(() => { + setBoxFilter(undefined); + }, [partyFilter]); + const columns: ColumnData[] = [ { label: t('No'),