aboutsummaryrefslogtreecommitdiff
path: root/src/client/View/Payments/Add.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/View/Payments/Add.elm')
-rw-r--r--src/client/View/Payments/Add.elm14
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)]