From 0b63da0876bc8e166e04a844cf17bfd10331f9ee Mon Sep 17 00:00:00 2001 From: lizerk Date: Tue, 18 Aug 2026 09:53:16 +0300 Subject: [PATCH] Include archived products in catalog search --- frontend/src/app/products/page.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/products/page.tsx b/frontend/src/app/products/page.tsx index b8a21ae7..0d2e06fe 100644 --- a/frontend/src/app/products/page.tsx +++ b/frontend/src/app/products/page.tsx @@ -9,6 +9,7 @@ import { ArrowDownAZ, ArrowLeft, ArrowRight, + Archive, Boxes, ChevronDown, ChevronRight, @@ -69,11 +70,14 @@ export default function ProductsPage() { setLoading(true); setError(null); try { + const normalizedSearch = search.trim(); const response = await apiClient.getCommerceProducts({ - search: search.trim() || undefined, + search: normalizedSearch || undefined, kind: kind || undefined, ordering, - is_active: true, + // The normal catalog stays compact, but a deliberate search must also + // find archived source cards so users do not mistake them for missing. + is_active: normalizedSearch ? undefined : true, page, page_size: PAGE_SIZE, }); @@ -291,6 +295,11 @@ function ProductListItem({ product }: { product: CommerceProduct }) { {kindLabels[product.kind]} + {!product.is_active ? ( + + Архив + + ) : null} Артикул: {product.sku || "—"}