aboutsummaryrefslogtreecommitdiff
path: root/front/src
diff options
context:
space:
mode:
authorGuillermo Ramos2025-03-08 16:34:12 +0100
committerGuillermo Ramos2025-03-08 16:45:38 +0100
commit60f037e68466f2ba2137285cfa8e88782dcd905f (patch)
tree8ba37a889421a25429d500f2214a79e6f924ab0d /front/src
parent07abf01ff0ab3a706f7e3783ed613cd2d9eb4cd7 (diff)
downloadhiccup-60f037e68466f2ba2137285cfa8e88782dcd905f.tar.gz
Style
Diffstat (limited to 'front/src')
-rw-r--r--front/src/Main.elm46
1 files changed, 29 insertions, 17 deletions
diff --git a/front/src/Main.elm b/front/src/Main.elm
index 4c70e37..baa76d3 100644
--- a/front/src/Main.elm
+++ b/front/src/Main.elm
@@ -88,7 +88,7 @@ make_t lang str =
"IVA/ITP: "
"Agent fee: " ->
- "Honorarios de agencia: "
+ "Honorarios agencia: "
"Simulate" ->
"Simular"
@@ -353,8 +353,8 @@ currencyFromString curr =
USD
-currencyPP : Currency -> String
-currencyPP curr =
+currencySymbol : Currency -> String
+currencySymbol curr =
case curr of
EUR ->
"€"
@@ -763,10 +763,10 @@ amountToString currency amount =
String.join "" <|
case currencyOrder currency of
Prefix ->
- [ currencyPP currency ] ++ strs
+ [ currencySymbol currency ] ++ strs
Postfix ->
- strs ++ [ currencyPP currency ]
+ strs ++ [ currencySymbol currency ]
_ ->
amountStr
@@ -790,10 +790,10 @@ amountView currency amount =
span [] <|
case currencyOrder currency of
Prefix ->
- [ text (currencyPP currency) ] ++ els
+ [ text (currencySymbol currency) ] ++ els
Postfix ->
- els ++ [ text (currencyPP currency) ]
+ els ++ [ text (currencySymbol currency) ]
_ ->
text amountStr
@@ -831,6 +831,7 @@ specsView { t, settings, rawSpecs } =
, txtInput [ class "w-[100px]", Html.Attributes.min "0" ]
(UpdateSpecs TotalValue)
total
+ , text <| currencySymbol settings.currency
]
, div [ class "flex my-1" ]
[ div []
@@ -838,6 +839,7 @@ specsView { t, settings, rawSpecs } =
, txtInput [ class "w-[100px]", Html.Attributes.min "0", Html.Attributes.max total ]
(UpdateSpecs Initial)
initial
+ , text <| currencySymbol settings.currency
]
, div [ class "ml-4" ]
[ text " ("
@@ -883,7 +885,7 @@ specsView { t, settings, rawSpecs } =
[ button (secondaryButAttrs ++ [ class "mr-1", onClick (UpdateSettings ToggleLang) ])
[ text <| langToString settings.lang ]
, button (secondaryButAttrs ++ [ class "mr-1", onClick (UpdateSettings ToggleCurrency) ])
- [ text <| currencyPP settings.currency ]
+ [ text <| currencySymbol settings.currency ]
]
]
]
@@ -1009,24 +1011,34 @@ simView m ( rawSpecs, { history, topay, payed } ) =
div []
[ hr [ class "my-5" ] []
, pre [ class "leading-none" ]
- [ text <| t "Total to pay: "
- , amountView currency (topay.principal + topay.interest + initial + vat + fee)
- , text "\n├ "
- , text <| t "Initial payment: "
+ [ text <| t "Initial payment: "
, amountView currency (initial + vat + fee)
- , text "\n│ ├ "
+ , text "\n├ "
, text <| t "Property: "
, amountView currency initial
- , text "\n│ ├ "
+ , text "\n├ "
, text <| t "Agent fee: "
, amountView currency fee
- , text "\n│ └ "
+ , text "\n└ "
, text <| t "VAT: "
, amountView currency vat
- , text "\n└ "
- , text <| t "Financed (mortgage): "
+ ]
+ , pre []
+ [ text <| t "Financed (mortgage): "
, capitalSumView m topay
]
+ , pre []
+ [ text <| t "Total to pay: "
+ , span [ class "font-bold" ]
+ [ amountView currency
+ (topay.principal
+ + topay.interest
+ + initial
+ + vat
+ + fee
+ )
+ ]
+ ]
-- , div [] [ text "payed: ", capitalSumView m payed ]
, historyView m history