diff options
author | Guillermo Ramos | 2025-02-20 23:29:40 +0100 |
---|---|---|
committer | Guillermo Ramos | 2025-02-20 23:30:49 +0100 |
commit | dcfeabc173b6a98b438549b3cccc12c381c04564 (patch) | |
tree | 8e746043755eaf5704d34062c8889ba00dbc757c /front/src | |
parent | b4aed145923f5b70020a29acd0a960c4e53d10c7 (diff) | |
download | hiccup-dcfeabc173b6a98b438549b3cccc12c381c04564.tar.gz |
front: show full quota
Diffstat (limited to 'front/src')
-rw-r--r-- | front/src/Main.elm | 7 |
1 files changed, 6 insertions, 1 deletions
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 |