From c5744701d1ba2bc461193d6a9bc6c6e50649e2b5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 08:34:54 +0000 Subject: [PATCH 1/7] chore: initial progress report - plan for ManageProducts rework Agent-Logs-Url: https://github.com/boxwise/boxtribute/sessions/73a33b69-6133-459d-b956-71436ee4065a Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com> --- pnpm-lock.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 14f5ab6be..8588bd7a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -214,8 +214,8 @@ importers: specifier: 2.5.1 version: 2.5.1(@types/emscripten@1.41.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) jotai: - specifier: ^2.19.1 - version: 2.19.1(@babel/core@7.28.4)(@babel/template@7.27.2)(@types/react@18.3.14)(react@18.3.1) + specifier: ^2.20.0 + version: 2.20.0(@babel/core@7.28.4)(@babel/template@7.27.2)(@types/react@18.3.14)(react@18.3.1) react-big-calendar: specifier: ^1.19.4 version: 1.19.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -3511,8 +3511,8 @@ packages: jose@6.2.2: resolution: {integrity: sha512-d7kPDd34KO/YnzaDOlikGpOurfF0ByC2sEV4cANCtdqLlTfBlw2p14O/5d/zv40gJPbIQxfES3nSx1/oYNyuZQ==} - jotai@2.19.1: - resolution: {integrity: sha512-sqm9lVZiqBHZH8aSRk32DSiZDHY3yUIlulXYn9GQj7/LvoUdYXSMti7ZPJGo+6zjzKFt5a25k/I6iBCi43PJcw==} + jotai@2.20.0: + resolution: {integrity: sha512-b5GAqgmXmXzB4WPaTH26ppk9Sl7AA9WSQX7yfdM+gJ1rFROiWcVbi97gFuN/yVCojOcbcvop2sfLL+fjxW0JVg==} engines: {node: '>=12.20.0'} peerDependencies: '@babel/core': '>=7.0.0' @@ -8984,7 +8984,7 @@ snapshots: jose@6.2.2: {} - jotai@2.19.1(@babel/core@7.28.4)(@babel/template@7.27.2)(@types/react@18.3.14)(react@18.3.1): + jotai@2.20.0(@babel/core@7.28.4)(@babel/template@7.27.2)(@types/react@18.3.14)(react@18.3.1): optionalDependencies: '@babel/core': 7.28.4 '@babel/template': 7.27.2 From b90e4c8c26e4a98a614cd97cc53fc5b673874fc3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 08:41:01 +0000 Subject: [PATCH 2/7] feat: rework ManageProducts page - split ProductsView, add ASSORT route, add toggle Agent-Logs-Url: https://github.com/boxwise/boxtribute/sessions/73a33b69-6133-459d-b956-71436ee4065a Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com> --- front/src/App.tsx | 12 ++++ front/src/views/Products/ProductsView.tsx | 67 +++++++------------ .../views/Products/StandardProductsView.tsx | 38 +++++++++++ .../Products/components/ProductsTable.tsx | 25 ++++++- 4 files changed, 99 insertions(+), 43 deletions(-) create mode 100644 front/src/views/Products/StandardProductsView.tsx diff --git a/front/src/App.tsx b/front/src/App.tsx index 1c89cd1bb..47c17b035 100644 --- a/front/src/App.tsx +++ b/front/src/App.tsx @@ -13,6 +13,7 @@ import CreateShipmentView from "views/Transfers/CreateShipment/CreateShipmentVie import ShipmentsOverviewView from "views/Transfers/ShipmentsOverview/ShipmentsOverviewView"; import ShipmentView from "views/Transfers/ShipmentView/ShipmentView"; import Products from "views/Products/ProductsView"; +import StandardProductsView from "views/Products/StandardProductsView"; import EnableStandardProductView from "views/EnableStandardProduct/EnableStandardProductView"; import QrReaderView from "views/QrReader/QrReaderView"; import NotFoundView from "views/NotFoundView/NotFoundView"; @@ -280,6 +281,17 @@ function App() { /> } /> + } + redirectPath={prevLocation} + requiredAbps={["manage_products"]} + minBeta={4} + /> + } + /> - - Manage Products - - - - - {baseName ? baseName?.toUpperCase() : }{" "} - PRODUCTS - - - ASSORT STANDARD PRODUCTS - - - - - - } - > - }> - - - - - - - } - > - - - - - + + + Manage Products + + + Check ASSORT Standard Products > + + + + } + > + }> + + + ); } diff --git a/front/src/views/Products/StandardProductsView.tsx b/front/src/views/Products/StandardProductsView.tsx new file mode 100644 index 000000000..573ca39e7 --- /dev/null +++ b/front/src/views/Products/StandardProductsView.tsx @@ -0,0 +1,38 @@ +import { Button, Heading } from "@chakra-ui/react"; +import { useNavigate } from "react-router-dom"; +import { useAtomValue } from "jotai"; +import { selectedBaseIdAtom } from "stores/globalPreferenceStore"; +import { ChevronLeftIcon } from "@chakra-ui/icons"; +import StandardProductsContainer from "./components/StandardProductsContainer"; +import { ErrorBoundary } from "@sentry/react"; +import { AlertWithoutAction } from "components/Alerts"; + +function StandardProductsView() { + const navigate = useNavigate(); + const baseId = useAtomValue(selectedBaseIdAtom); + + return ( + <> + + + ASSORT Standard Products + + + } + > + + + + ); +} + +export default StandardProductsView; diff --git a/front/src/views/Products/components/ProductsTable.tsx b/front/src/views/Products/components/ProductsTable.tsx index 1cb6d20f7..1e2d78d01 100644 --- a/front/src/views/Products/components/ProductsTable.tsx +++ b/front/src/views/Products/components/ProductsTable.tsx @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useMemo } from "react"; +import { useCallback, useEffect, useMemo, useState } from "react"; import { Column, Filters, @@ -21,6 +21,9 @@ import { Button, HStack, useDisclosure, + FormControl, + FormLabel, + Switch, } from "@chakra-ui/react"; import { Link } from "react-router-dom"; import { AddIcon, ChevronRightIcon, ChevronLeftIcon } from "@chakra-ui/icons"; @@ -58,6 +61,13 @@ function ProductsTable({ genderOptions, sizeRangeOptions, }: ProductTableProps) { + const [showOnlyAssort, setShowOnlyAssort] = useState(false); + + const filteredData = useMemo( + () => (showOnlyAssort ? tableData.filter((row) => row.isStandard) : tableData), + [showOnlyAssort, tableData], + ); + // Add custom filter function to filter objects in a column https://react-table-v7.tanstack.com/docs/examples/filtering const filterTypes = useMemo( () => ({ @@ -83,7 +93,7 @@ function ProductsTable({ } = useTable( { columns, - data: tableData, + data: filteredData, filterTypes, initialState: { hiddenColumns: tableConfig.getHiddenColumns(), @@ -145,6 +155,17 @@ function ProductsTable({ + + setShowOnlyAssort(e.target.checked)} + mr={2} + /> + + Show only ASSORT products + + column.id !== "actionButton")} /> From 072c78f3931f2e090f9622d86621981cfcfa403b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 08:44:20 +0000 Subject: [PATCH 3/7] fix: replace > HTML entity with JSX expression in ProductsView link Agent-Logs-Url: https://github.com/boxwise/boxtribute/sessions/73a33b69-6133-459d-b956-71436ee4065a Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com> --- front/src/views/Products/ProductsView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/views/Products/ProductsView.tsx b/front/src/views/Products/ProductsView.tsx index 287e745dc..92e1ddc37 100644 --- a/front/src/views/Products/ProductsView.tsx +++ b/front/src/views/Products/ProductsView.tsx @@ -23,7 +23,7 @@ function Products() { color="blue.500" fontWeight="semibold" > - Check ASSORT Standard Products > + Check ASSORT Standard Products {">"} Date: Tue, 12 May 2026 12:00:29 +0200 Subject: [PATCH 4/7] Use MobileBreadcrumbButton --- .../views/Products/StandardProductsView.tsx | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/front/src/views/Products/StandardProductsView.tsx b/front/src/views/Products/StandardProductsView.tsx index 573ca39e7..7b6a9103e 100644 --- a/front/src/views/Products/StandardProductsView.tsx +++ b/front/src/views/Products/StandardProductsView.tsx @@ -1,26 +1,13 @@ -import { Button, Heading } from "@chakra-ui/react"; -import { useNavigate } from "react-router-dom"; -import { useAtomValue } from "jotai"; -import { selectedBaseIdAtom } from "stores/globalPreferenceStore"; -import { ChevronLeftIcon } from "@chakra-ui/icons"; +import { Heading } from "@chakra-ui/react"; import StandardProductsContainer from "./components/StandardProductsContainer"; +import { MobileBreadcrumbButton } from "components/BreadcrumbNavigation"; import { ErrorBoundary } from "@sentry/react"; import { AlertWithoutAction } from "components/Alerts"; function StandardProductsView() { - const navigate = useNavigate(); - const baseId = useAtomValue(selectedBaseIdAtom); - return ( <> - + ASSORT Standard Products From 667d920d72f29111ed0ffc16e34ac31fe9f4c56c Mon Sep 17 00:00:00 2001 From: Philipp Metzner Date: Tue, 12 May 2026 12:33:26 +0200 Subject: [PATCH 5/7] add-text --- front/src/views/Products/StandardProductsView.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/front/src/views/Products/StandardProductsView.tsx b/front/src/views/Products/StandardProductsView.tsx index 7b6a9103e..5a4381048 100644 --- a/front/src/views/Products/StandardProductsView.tsx +++ b/front/src/views/Products/StandardProductsView.tsx @@ -1,4 +1,4 @@ -import { Heading } from "@chakra-ui/react"; +import { Heading, Text } from "@chakra-ui/react"; import StandardProductsContainer from "./components/StandardProductsContainer"; import { MobileBreadcrumbButton } from "components/BreadcrumbNavigation"; import { ErrorBoundary } from "@sentry/react"; @@ -9,8 +9,13 @@ function StandardProductsView() { <> - ASSORT Standard Products + Explore ASSORT + + ASSORT is a standardized inventory classification system developed in partnership with IHA, + HERMINE, and DistributeAid in full compliance with SPHERE and CHS standards for easy and + effective use even by small volunteer teams. + From 90b49fcf924a6baa81f22595392f261b350d880f Mon Sep 17 00:00:00 2001 From: Philipp Metzner Date: Tue, 12 May 2026 12:49:56 +0200 Subject: [PATCH 6/7] normal-fontweight --- front/src/views/Products/components/ProductsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/views/Products/components/ProductsTable.tsx b/front/src/views/Products/components/ProductsTable.tsx index 1e2d78d01..b039d84ee 100644 --- a/front/src/views/Products/components/ProductsTable.tsx +++ b/front/src/views/Products/components/ProductsTable.tsx @@ -162,7 +162,7 @@ function ProductsTable({ onChange={(e) => setShowOnlyAssort(e.target.checked)} mr={2} /> - + Show only ASSORT products From 44a563afabe0e8b0e5c25e889b29115dd294baaa Mon Sep 17 00:00:00 2001 From: Philipp Metzner Date: Tue, 12 May 2026 13:02:51 +0200 Subject: [PATCH 7/7] relative-link --- front/src/views/Products/ProductsView.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/front/src/views/Products/ProductsView.tsx b/front/src/views/Products/ProductsView.tsx index 92e1ddc37..b02115133 100644 --- a/front/src/views/Products/ProductsView.tsx +++ b/front/src/views/Products/ProductsView.tsx @@ -1,6 +1,4 @@ import { Flex, Heading, Link } from "@chakra-ui/react"; -import { useAtomValue } from "jotai"; -import { selectedBaseIdAtom } from "stores/globalPreferenceStore"; import { Link as RouterLink } from "react-router-dom"; import ProductsContainer from "./components/ProductsContainer"; import { ErrorBoundary } from "@sentry/react"; @@ -9,20 +7,13 @@ import { TableSkeleton } from "components/Skeletons"; import { Suspense } from "react"; function Products() { - const baseId = useAtomValue(selectedBaseIdAtom); - return ( <> Manage Products - + Check ASSORT Standard Products {">"}