mirror of
https://github.com/badlogic/heissepreise.git
synced 2024-06-30 12:27:15 +02:00
Fix budget brand filtering, fix order of stores.
This commit is contained in:
parent
c10f91e4b4
commit
9bacaf4fe4
|
@ -4,10 +4,10 @@ const stores = {
|
||||||
budgetBrands: ["clever"],
|
budgetBrands: ["clever"],
|
||||||
color: "rgb(255 255 225)",
|
color: "rgb(255 255 225)",
|
||||||
},
|
},
|
||||||
dm: {
|
spar: {
|
||||||
name: "DM",
|
name: "Spar",
|
||||||
budgetBrands: [],
|
budgetBrands: ["s-budget"],
|
||||||
color: "rgb(255 240 230)",
|
color: "rgb(225 244 225)",
|
||||||
},
|
},
|
||||||
hofer: {
|
hofer: {
|
||||||
name: "Hofer",
|
name: "Hofer",
|
||||||
|
@ -24,10 +24,10 @@ const stores = {
|
||||||
budgetBrands: [],
|
budgetBrands: [],
|
||||||
color: "rgb(255 230 230)",
|
color: "rgb(255 230 230)",
|
||||||
},
|
},
|
||||||
spar: {
|
dm: {
|
||||||
name: "Spar",
|
name: "DM",
|
||||||
budgetBrands: ["s-budget"],
|
budgetBrands: [],
|
||||||
color: "rgb(225 244 225)",
|
color: "rgb(255 240 230)",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ function searchItems(items, query, checkedStores, budgetBrands, minPrice, maxPri
|
||||||
if (item.price > maxPrice) continue;
|
if (item.price > maxPrice) continue;
|
||||||
if (
|
if (
|
||||||
budgetBrands &&
|
budgetBrands &&
|
||||||
!BUDGET_BRANDS.some(budgetBrand => name.indexOf(budgetBrand))
|
!BUDGET_BRANDS.some(budgetBrand => name.indexOf(budgetBrand) >= 0)
|
||||||
) continue;
|
) continue;
|
||||||
if (bio && !item.bio) continue;
|
if (bio && !item.bio) continue;
|
||||||
hits.push(item);
|
hits.push(item);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user