diff options
Diffstat (limited to 'src/client/Main.elm')
-rw-r--r-- | src/client/Main.elm | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/client/Main.elm b/src/client/Main.elm index 621fb97..de98809 100644 --- a/src/client/Main.elm +++ b/src/client/Main.elm @@ -10,11 +10,12 @@ import Http import Task exposing (..) import Time exposing (..) import Json.Decode as Json exposing ((:=)) +import Dict import Model exposing (Model, initialModel) import Model.User exposing (Users, usersDecoder, UserId, userIdDecoder) import Model.Payment exposing (Payments, paymentsDecoder, perPage) -import Model.Payers exposing (Payers, payersDecoder) +import Model.Payer exposing (Payers, payersDecoder) import Model.Translations exposing (..) import Update exposing (Action(..), actions, updateModel) @@ -32,7 +33,7 @@ model = Signal.foldp updateModel (initialModel initialTime translations) update update : Signal Action update = Signal.mergeMany - [ Signal.map UpdateTime (Time.every 30) + [ Signal.map UpdateTime (Time.every 1000) , actions.signal ] @@ -66,8 +67,7 @@ goLoggedInView = Task.andThen getPayments <| \payments -> Task.andThen getPaymentsCount <| \paymentsCount -> Task.andThen getPayers <| \payers -> - Task.andThen getIncome <| \income -> - Signal.send actions.address (GoLoggedInView users me monthlyPayments payments paymentsCount payers income) + Signal.send actions.address (GoLoggedInView users me monthlyPayments payments paymentsCount payers) getUsers : Task Http.Error Users getUsers = Http.get usersDecoder "/users" @@ -85,10 +85,7 @@ getPaymentsCount : Task Http.Error Int 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" +getPayers = Http.get payersDecoder "/payers" --------------------------------------- |