aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/View/LoggedIn
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/View/LoggedIn')
-rw-r--r--src/client/elm/View/LoggedIn/AddPayment.elm10
-rw-r--r--src/client/elm/View/LoggedIn/Paging.elm4
2 files changed, 5 insertions, 9 deletions
diff --git a/src/client/elm/View/LoggedIn/AddPayment.elm b/src/client/elm/View/LoggedIn/AddPayment.elm
index 0b39591..0149432 100644
--- a/src/client/elm/View/LoggedIn/AddPayment.elm
+++ b/src/client/elm/View/LoggedIn/AddPayment.elm
@@ -2,7 +2,6 @@ module View.LoggedIn.AddPayment
( addPayment
) where
-import Reads exposing (readInt)
import Result exposing (..)
import Signal exposing (Address)
@@ -31,13 +30,10 @@ addPayment address model loggedInView =
H.form
[ let update =
if loggedInView.add.waitingServer
- then Action.NoOp
+ then
+ Action.NoOp
else
- case (validateName loggedInView.add.name model.translations, validateCost loggedInView.add.cost model.translations) of
- (Ok name, Ok cost) ->
- UpdateLoggedIn <| LoggedInAction.AddPayment name cost loggedInView.add.frequency
- (resName, resCost) ->
- UpdateLoggedIn <| UpdateAdd <| AddError (toMaybeError resName) (toMaybeError resCost)
+ UpdateLoggedIn <| LoggedInAction.AddPayment loggedInView.add.name loggedInView.add.cost loggedInView.add.frequency
in onSubmitPrevDefault address update
, class "addPayment"
]
diff --git a/src/client/elm/View/LoggedIn/Paging.elm b/src/client/elm/View/LoggedIn/Paging.elm
index 154686a..b722ee7 100644
--- a/src/client/elm/View/LoggedIn/Paging.elm
+++ b/src/client/elm/View/LoggedIn/Paging.elm
@@ -8,7 +8,7 @@ import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
-import Model.Action exposing (..)
+import Model.Action as Action exposing (..)
import Model.Action.LoggedInAction exposing (..)
import Model.View.LoggedInView exposing (..)
import Model.Payment exposing (perPage)
@@ -94,6 +94,6 @@ paymentsPage address loggedInView page =
, ("current", onCurrentPage)
]
, onClick address <|
- if onCurrentPage then NoOp else UpdateLoggedIn (UpdatePage page)
+ if onCurrentPage then Action.NoOp else UpdateLoggedIn (UpdatePage page)
]
[ text (toString page) ]