mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
fix price listing inconsistency
This commit is contained in:
parent
cdab7a5a61
commit
8cb8e303a7
3 changed files with 4 additions and 4 deletions
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
| - $
|
||||
|
|
|
@ -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()
|
||||
| - $
|
||||
|
@ -89,4 +89,4 @@
|
|||
a href="#" data-click-copy="#commission_url"
|
||||
i.fa.fa-clipboard>
|
||||
' Copy
|
||||
= text_input :commission, :commission_url, value: url, class: "input input--wide input--separate-top", readonly: true
|
||||
= text_input :commission, :commission_url, value: url, class: "input input--wide input--separate-top", readonly: true
|
||||
|
|
Loading…
Reference in a new issue