diff --git a/frontend/src/pages/History/History.js b/frontend/src/pages/History/History.js index 7931dff..8df2fb4 100644 --- a/frontend/src/pages/History/History.js +++ b/frontend/src/pages/History/History.js @@ -125,6 +125,12 @@ const History = () => { } }; + // Get application type from first product in productDetails + const getApplicationType = (app) => { + if (!app.productDetails || app.productDetails.length === 0) return null; + return app.productDetails[0].type; // granular or liquid + }; + // Get unique values for filter options - dynamically filter based on other applied filters const getFilteredApplicationsForOptions = () => { return completedApplications.filter(app => { @@ -176,12 +182,6 @@ const History = () => { app.productDetails ? app.productDetails.map(p => p.name) : [] ) )].filter(Boolean).sort(); - - // Get application type from first product in productDetails - const getApplicationType = (app) => { - if (!app.productDetails || app.productDetails.length === 0) return null; - return app.productDetails[0].type; // granular or liquid - }; // Filter applications based on all filters const filteredApplications = completedApplications.filter(app => {