diff options
Diffstat (limited to 'frontend/src/Catalog.elm')
-rw-r--r-- | frontend/src/Catalog.elm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/frontend/src/Catalog.elm b/frontend/src/Catalog.elm index 6882c73..d00cb92 100644 --- a/frontend/src/Catalog.elm +++ b/frontend/src/Catalog.elm | |||
@@ -188,13 +188,13 @@ viewFilters : Model -> Html Msg | |||
188 | viewFilters model = | 188 | viewFilters model = |
189 | let | 189 | let |
190 | priceRange = | 190 | priceRange = |
191 | range 0 50000 5000 | 191 | range 0 55000 5000 |
192 | 192 | ||
193 | ratingRange = | 193 | ratingRange = |
194 | List.range 1 5 | 194 | range 1 6 1 |
195 | 195 | ||
196 | viewRange = | 196 | viewRange default scale = |
197 | List.map (\i -> option [] [ text <| String.fromInt i ]) | 197 | List.map (\i -> option [ selected (i == default) ] [ text <| String.fromInt i ]) scale |
198 | 198 | ||
199 | inp = | 199 | inp = |
200 | Maybe.withDefault 0 << String.toFloat | 200 | Maybe.withDefault 0 << String.toFloat |
@@ -202,15 +202,15 @@ viewFilters model = | |||
202 | div [] | 202 | div [] |
203 | [ div [] | 203 | [ div [] |
204 | [ text "Price" | 204 | [ text "Price" |
205 | , select [ onInput (ChangePriceLower << inp) ] (viewRange priceRange) | 205 | , select [ onInput (ChangePriceLower << inp) ] (viewRange 0 priceRange) |
206 | , text "to" | 206 | , text "to" |
207 | , select [ onInput (ChangePriceUpper << inp) ] (viewRange priceRange) | 207 | , select [ onInput (ChangePriceUpper << inp) ] (viewRange 50000 priceRange) |
208 | ] | 208 | ] |
209 | , div [] | 209 | , div [] |
210 | [ text "Rating" | 210 | [ text "Rating" |
211 | , select [ onInput (ChangeRatingLower << inp) ] (viewRange ratingRange) | 211 | , select [ onInput (ChangeRatingLower << inp) ] (viewRange 1 ratingRange) |
212 | , text "to" | 212 | , text "to" |
213 | , select [ onInput (ChangeRatingUpper << inp) ] (viewRange ratingRange) | 213 | , select [ onInput (ChangeRatingUpper << inp) ] (viewRange 5 ratingRange) |
214 | ] | 214 | ] |
215 | ] | 215 | ] |
216 | 216 | ||