philomena/lib/philomena_web/templates/profile/_commission.html.slime

33 lines
917 B
Text
Raw Normal View History

2019-12-06 00:11:15 +01:00
.block__content.profile
= cond do
- @user.commission ->
strong> Status:
= commission_status(@user.commission)
br
= if Enum.any?(@user.commission.items) do
strong> Price Range:
- {min, max} = Enum.min_max_by(@user.commission.items, & &1.base_price)
| $
2020-01-11 20:24:30 +01:00
=> Decimal.round(min.base_price || 0, 2) |> Decimal.to_string()
2019-12-06 00:11:15 +01:00
| - $
2020-01-11 20:24:30 +01:00
=> Decimal.round(max.base_price || 0, 2) |> Decimal.to_string()
2019-12-06 00:11:15 +01:00
' USD
br
/ Lotta space here
br
== @commission_information
br
br
= link "More information", to: Routes.profile_commission_path(@conn, :show, @user)
- current?(@user, @conn.assigns.current_user) ->
em
' You don't have any commission information listed yet.
=> link "Click here", to: Routes.profile_commission_path(@conn, :new, @user)
' to set it up.
2020-01-11 20:24:30 +01:00
- true ->