mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +01:00
fix price range calculation
This commit is contained in:
parent
eb3e24c04d
commit
cc9458e544
1 changed files with 3 additions and 1 deletions
|
@ -21,9 +21,11 @@ elixir:
|
||||||
= render PhilomenaWeb.UserAttributionView, "_user.html", object: c, badges: true, conn: @conn
|
= render PhilomenaWeb.UserAttributionView, "_user.html", object: c, badges: true, conn: @conn
|
||||||
|
|
||||||
.commission__listing__body_text
|
.commission__listing__body_text
|
||||||
|
- {min, max} = Enum.min_max(c.items, & &1.base_price)
|
||||||
|
|
||||||
p
|
p
|
||||||
strong> Price Range:
|
strong> Price Range:
|
||||||
= :io_lib.format("$~.2f - $~.2f USD", [c.minimum_price, c.maximum_price])
|
= :io_lib.format("$~.2f - $~.2f USD", [min || 0.0, max || 0.0])
|
||||||
|
|
||||||
p
|
p
|
||||||
strong> Categories:
|
strong> Categories:
|
||||||
|
|
Loading…
Reference in a new issue