diff options
author | Joris | 2015-09-05 14:14:25 +0200 |
---|---|---|
committer | Joris | 2015-09-05 14:14:25 +0200 |
commit | cc6a51b5ca03ee1a3b5de7c32dd1324e1053f42a (patch) | |
tree | fe60948b87993908f73659c9dbd7ffd96498b7f8 /src/client/View/Payments/Add.elm | |
parent | 3b738e0d4cc65f314da7389d4542ec826ba0f454 (diff) |
Renaming PaymentView to LoggedView
Diffstat (limited to 'src/client/View/Payments/Add.elm')
-rw-r--r-- | src/client/View/Payments/Add.elm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/View/Payments/Add.elm b/src/client/View/Payments/Add.elm index 32233ed..77d40ea 100644 --- a/src/client/View/Payments/Add.elm +++ b/src/client/View/Payments/Add.elm @@ -17,7 +17,7 @@ import Update.Payment.Add exposing (..) import Model exposing (Model) import Model.View.Payment.Add exposing (..) import Model.Translations exposing (getMessage) -import Model.View.PaymentView exposing (PaymentView) +import Model.View.LoggedView exposing (LoggedView) import View.Events exposing (onSubmitPrevDefault) import View.Icon exposing (renderIcon) @@ -25,18 +25,18 @@ import View.Icon exposing (renderIcon) import Utils.Maybe exposing (isJust) import Utils.Either exposing (toMaybeError) -addPayment : Model -> PaymentView -> Html -addPayment model paymentView = +addPayment : Model -> LoggedView -> Html +addPayment model loggedView = H.form [ class "add" - , case (validateName paymentView.add.name model.translations, validateCost paymentView.add.cost model.translations) of + , case (validateName loggedView.add.name model.translations, validateCost loggedView.add.cost model.translations) of (Ok name, Ok cost) -> - onSubmitPrevDefault serverCommunications.address (SC.AddPayment paymentView.me name cost) + onSubmitPrevDefault serverCommunications.address (SC.AddPayment loggedView.me name cost) (resName, resCost) -> onSubmitPrevDefault actions.address (UpdatePayment <| UpdateAdd <| AddError (toMaybeError resName) (toMaybeError resCost)) ] - [ addPaymentName paymentView.add - , addPaymentCost model paymentView.add + [ addPaymentName loggedView.add + , addPaymentCost model loggedView.add , button [ type' "submit" ] [ text (getMessage "Add" model.translations)] |