diff options
author | Guillermo Ramos | 2025-03-23 16:01:20 +0100 |
---|---|---|
committer | Guillermo Ramos | 2025-03-23 16:30:36 +0100 |
commit | e618dc6979f0a1eb11776640f6a3700e31d20159 (patch) | |
tree | aa943fa7675477b25d286ed621df4b37c63f1b0d /front/src/Main.elm | |
parent | 91ba3ed002dcba0b570f954b592d6705659b9ef2 (diff) | |
download | hiccup-e618dc6979f0a1eb11776640f6a3700e31d20159.tar.gz |
Aesthetics
Diffstat (limited to 'front/src/Main.elm')
-rw-r--r-- | front/src/Main.elm | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/front/src/Main.elm b/front/src/Main.elm index 4ff3dab..696bc71 100644 --- a/front/src/Main.elm +++ b/front/src/Main.elm @@ -111,6 +111,9 @@ make_t lang str = "Saved: " -> "Ahorro: " + "% of early payed)" -> + "% de anticipado)" + "Initial payment: " -> "Pago inicial: " @@ -135,11 +138,11 @@ make_t lang str = "Interest:" -> "Interés:" - "Period:" -> - "Periodo:" + "Period: " -> + "Periodo: " - "To:" -> - "Hasta:" + "To: " -> + "Hasta: " "Cancel" -> "Cancelar" @@ -1383,7 +1386,7 @@ simUpdateView m periodic onRemove upd = ( m.t "New interest rate" , i1Attrs , [ text (m.t "Interest: ") - , text <| String.fromFloat (f * 100) + , text <| Round.round 2 (f * 100) , text "%" ] ) @@ -1517,16 +1520,14 @@ quotaView m { updates } { month, payed, pending_principal } = [ text "⟳" ] , div [ class "flex flex-col" ] [ div [] - [ text <| m.t "Period:" - , text " " + [ text <| m.t "Period: " , txtInput [ class "w-[40px] border" ] (\newTxt -> setUpdate { au | periodic = Just { period = newTxt, to = to } }) period ] , div [] - [ text <| m.t "To:" - , text " " + [ text <| m.t "To: " , txtInput [ class "w-[40px] border" ] (\newTxt -> setUpdate { au | periodic = Just { period = period, to = newTxt } }) @@ -1670,6 +1671,9 @@ simView m ( rawSpecs, sim ) = fee = total * parseFloat rawSpecs.fee / 100 + saved = + sim.payed_noprepays.interest - sim.payed.interest + overview title financed extraLis = div [ class "my-2 p-1 border-2 rounded-md border-gray-400" ] [ p [] @@ -1726,7 +1730,10 @@ simView m ( rawSpecs, sim ) = ] , li [] [ text <| t "Saved: " - , amountView [] currency (sim.payed_noprepays.interest - sim.payed.interest) + , amountView [] currency saved + , text " (" + , text <| Round.round 2 <| 100 * (saved / sim.payed_amortized) + , text <| m.t "% of early payed)" ] ] |