fix price listing inconsistency

This commit is contained in:
byte[] 2020-02-06 17:51:22 -05:00
parent cdab7a5a61
commit 8cb8e303a7
3 changed files with 4 additions and 4 deletions

View file

@ -30,7 +30,7 @@ elixir:
= render PhilomenaWeb.UserAttributionView, "_user.html", object: c, badges: true, conn: @conn
.commission__listing__body_text
- {min, max} = Enum.min_max_by(c.items, & &1.base_price)
- {min, max} = Enum.min_max_by(c.items, &Decimal.to_float(&1.base_price))
p
strong> Price Range:

View file

@ -7,7 +7,7 @@
= if Enum.any?(@user.commission.items) do
strong> Price Range:
- {min, max} = Enum.min_max_by(@user.commission.items, & &1.base_price)
- {min, max} = Enum.min_max_by(@user.commission.items, &Decimal.to_float(&1.base_price))
| $
=> Decimal.round(min.base_price || 0, 2) |> Decimal.to_string()
| - $

View file

@ -14,7 +14,7 @@
= if Enum.any?(@commission.items) do
strong> Price Range:
- {min, max} = Enum.min_max_by(@commission.items, & &1.base_price)
- {min, max} = Enum.min_max_by(@commission.items, &Decimal.to_float(&1.base_price))
| $
=> Decimal.round(min.base_price, 2) |> Decimal.to_string()
| - $