diff options
author | Joris | 2015-09-12 23:57:16 +0200 |
---|---|---|
committer | Joris | 2015-09-12 23:57:16 +0200 |
commit | a48e79e2f7c1ab1ffb52b86ef9e900c75c5d023b (patch) | |
tree | 05a613aef2d338f10bcdd394e520450656ed8f1c /src/client/Main.elm | |
parent | d87dbd1360c14df83552fd757438c23e5d7b9f9c (diff) |
Adding UI income read-only
Diffstat (limited to 'src/client/Main.elm')
-rw-r--r-- | src/client/Main.elm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/Main.elm b/src/client/Main.elm index 0b579d7..621fb97 100644 --- a/src/client/Main.elm +++ b/src/client/Main.elm @@ -66,7 +66,8 @@ goLoggedInView = Task.andThen getPayments <| \payments -> Task.andThen getPaymentsCount <| \paymentsCount -> Task.andThen getPayers <| \payers -> - Signal.send actions.address (GoLoggedInView users me monthlyPayments payments paymentsCount payers) + Task.andThen getIncome <| \income -> + Signal.send actions.address (GoLoggedInView users me monthlyPayments payments paymentsCount payers income) getUsers : Task Http.Error Users getUsers = Http.get usersDecoder "/users" @@ -86,6 +87,9 @@ getPaymentsCount = Http.get ("number" := Json.int) "/payments/count" getPayers : Task Http.Error Payers getPayers = Http.get payersDecoder "/payments/total" +getIncome : Task Http.Error (Maybe Int) +getIncome = Http.get (Json.maybe ("income" := Json.int)) "/income" + --------------------------------------- port serverCommunicationsPort : Signal (Task Http.RawError ()) |