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:
|
2020-02-06 23:51:22 +01:00
|
|
|
- {min, max} = Enum.min_max_by(@user.commission.items, &Decimal.to_float(&1.base_price))
|
2019-12-06 00:11:15 +01:00
|
|
|
| $
|
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
|
2024-05-04 05:15:14 +02:00
|
|
|
= @commission_information
|
2019-12-06 00:11:15 +01:00
|
|
|
br
|
|
|
|
br
|
|
|
|
|
2024-06-06 22:28:35 +02:00
|
|
|
= link "More information", to: ~p"/profiles/#{@user}/commission"
|
2019-12-06 00:11:15 +01:00
|
|
|
|
|
|
|
- current?(@user, @conn.assigns.current_user) ->
|
2020-11-25 04:05:46 +01:00
|
|
|
= if Enum.any?(@conn.assigns.user.verified_links) do
|
|
|
|
em
|
|
|
|
' You don't have any commission information listed yet.
|
2024-06-06 22:28:35 +02:00
|
|
|
=> link "Click here", to: ~p"/profiles/#{@user}/commission/new"
|
2020-11-25 04:05:46 +01:00
|
|
|
' to set it up.
|
|
|
|
- else
|
|
|
|
em
|
|
|
|
' You must have a verified Artist Link to create a commission page.
|
2024-06-06 22:28:35 +02:00
|
|
|
=> link "Click here", to: ~p"/profiles/#{@user}/artist_links/new"
|
2020-11-25 04:05:46 +01:00
|
|
|
' to set one up.
|
2019-12-06 00:11:15 +01:00
|
|
|
|
2020-01-11 20:24:30 +01:00
|
|
|
- true ->
|