From 09bfad5cd0621d389ad33ae0dc2f581efc908088 Mon Sep 17 00:00:00 2001 From: Malini Date: Tue, 3 Mar 2026 16:27:02 +0530 Subject: [PATCH] bg fixed --- .../src/components/survey/ProductData/ProductData.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipi-survey-platform/src/components/survey/ProductData/ProductData.jsx b/ipi-survey-platform/src/components/survey/ProductData/ProductData.jsx index b4b6fac..b2bc4c7 100644 --- a/ipi-survey-platform/src/components/survey/ProductData/ProductData.jsx +++ b/ipi-survey-platform/src/components/survey/ProductData/ProductData.jsx @@ -1267,7 +1267,10 @@ useEffect(() => { // Ensure we're working with an array and handle the response structure const productsList = Array.isArray(apiResponse) ? apiResponse : (apiResponse?.data || []); - const formattedProducts = productsList.map(product => { + // Filter only active products where is_active === 1 + const activeProductsList = productsList.filter(product => product.is_active === 1); + + const formattedProducts = activeProductsList.map(product => { // Handle nested properties with dot notation const productName = product['product.product_name'] || product.product_name || product.product?.product_name || ''; const hsCode = product['product.hs_code'] || product.hs_code || product.product?.hs_code || '';