From dcfeabc173b6a98b438549b3cccc12c381c04564 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Thu, 20 Feb 2025 23:29:40 +0100 Subject: front: show full quota --- front/src/Main.elm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'front/src/Main.elm') diff --git a/front/src/Main.elm b/front/src/Main.elm index 4d39cb3..4c8fc94 100644 --- a/front/src/Main.elm +++ b/front/src/Main.elm @@ -35,6 +35,11 @@ capitalDecoder = (field "interest" float) +capitalSumStr : Capital -> String +capitalSumStr { principal, interest } = + Round.round 2 (principal + interest) + + capitalStr : Capital -> String capitalStr { principal, interest } = String.concat [ "{principal=", Round.round 2 principal, ", interest=", Round.round 2 interest, "}" ] @@ -270,7 +275,7 @@ specsView { principal, i1, years } = quotaView : Quota -> Html Msg quotaView { period, payed, pending_principal } = - div [] [ text (String.join "\t" [ String.fromInt period, capitalStr payed, Round.round 2 pending_principal ]) ] + div [] [ text (String.join "\t" [ String.fromInt period, capitalSumStr payed, capitalStr payed, Round.round 2 pending_principal ]) ] historyView : List Quota -> Html Msg -- cgit v1.2.3