From 9bacaf4fe4b88c556fac67bdaaa22c30c2da4727 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sun, 28 May 2023 21:06:19 +0200 Subject: [PATCH] Fix budget brand filtering, fix order of stores. --- site/utils.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/site/utils.js b/site/utils.js index bf7ef4b..f5ee078 100644 --- a/site/utils.js +++ b/site/utils.js @@ -4,10 +4,10 @@ const stores = { budgetBrands: ["clever"], color: "rgb(255 255 225)", }, - dm: { - name: "DM", - budgetBrands: [], - color: "rgb(255 240 230)", + spar: { + name: "Spar", + budgetBrands: ["s-budget"], + color: "rgb(225 244 225)", }, hofer: { name: "Hofer", @@ -24,10 +24,10 @@ const stores = { budgetBrands: [], color: "rgb(255 230 230)", }, - spar: { - name: "Spar", - budgetBrands: ["s-budget"], - color: "rgb(225 244 225)", + dm: { + name: "DM", + budgetBrands: [], + color: "rgb(255 240 230)", }, }; @@ -222,8 +222,8 @@ function searchItems(items, query, checkedStores, budgetBrands, minPrice, maxPri if (item.price < minPrice) continue; if (item.price > maxPrice) continue; if ( - budgetBrands && - !BUDGET_BRANDS.some(budgetBrand => name.indexOf(budgetBrand)) + budgetBrands && + !BUDGET_BRANDS.some(budgetBrand => name.indexOf(budgetBrand) >= 0) ) continue; if (bio && !item.bio) continue; hits.push(item);