diff --git a/src/client/src/routes/results/+page.svelte b/src/client/src/routes/results/+page.svelte index fe8ef6d..5ab7681 100644 --- a/src/client/src/routes/results/+page.svelte +++ b/src/client/src/routes/results/+page.svelte @@ -11,6 +11,8 @@ let sortBy = $state('price'); let sortAsc = $state(true); let filterText = $state(''); + let priceMin = $state(''); + let priceMax = $state(''); let excludedStores = $state(new Set()); // Per-store progress tracking @@ -105,6 +107,14 @@ if (excludedStores.size > 0) { items = items.filter(r => !excludedStores.has(r.storeName)); } + const min = priceMin !== '' ? parseFloat(priceMin) : null; + const max = priceMax !== '' ? parseFloat(priceMax) : null; + if (min !== null && !isNaN(min)) { + items = items.filter(r => r.price !== null && r.price >= min); + } + if (max !== null && !isNaN(max)) { + items = items.filter(r => r.price !== null && r.price <= max); + } items.sort((a, b) => { let cmp = 0; switch (sortBy) { @@ -309,6 +319,14 @@ class="w-full pl-10 pr-4 py-2.5 bg-surface-raised border border-surface-border rounded-lg text-sm text-text-primary placeholder-text-tertiary focus:border-accent/50 focus:ring-1 focus:ring-accent/20 focus:outline-none transition-all" /> +
+ Price: + + + +
{filteredAndSorted().length} of {results.length}