aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/View
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/View')
-rw-r--r--src/client/elm/View/Header.elm3
-rw-r--r--src/client/elm/View/LoggedIn/Account.elm3
-rw-r--r--src/client/elm/View/LoggedIn/AddPayment.elm5
-rw-r--r--src/client/elm/View/LoggedIn/Monthly.elm5
-rw-r--r--src/client/elm/View/LoggedIn/Table.elm3
-rw-r--r--src/client/elm/View/SignIn.elm2
6 files changed, 8 insertions, 13 deletions
diff --git a/src/client/elm/View/Header.elm b/src/client/elm/View/Header.elm
index 9d57c05..b8a5bf1 100644
--- a/src/client/elm/View/Header.elm
+++ b/src/client/elm/View/Header.elm
@@ -10,7 +10,6 @@ import Html.Events exposing (..)
import Model exposing (Model)
import Model.Translations exposing (getMessage)
-import Model.Communication as Communication
import Model.Action exposing (..)
import Model.View exposing (..)
@@ -27,7 +26,7 @@ renderHeader address model =
LoggedInView _ ->
button
[ class "icon"
- , onClick address (ServerCommunication Communication.SignOut)
+ , onClick address SignOut
]
[ renderIcon "power-off" ]
_ ->
diff --git a/src/client/elm/View/LoggedIn/Account.elm b/src/client/elm/View/LoggedIn/Account.elm
index 9459740..a7c20d5 100644
--- a/src/client/elm/View/LoggedIn/Account.elm
+++ b/src/client/elm/View/LoggedIn/Account.elm
@@ -17,7 +17,6 @@ import Model.Translations exposing (getParamMessage, getMessage)
import Model.Action exposing (..)
import Model.Action.LoggedInAction exposing (..)
import Model.Action.AccountAction exposing (..)
-import Model.Communication as Communication
import Model.View.LoggedInView exposing (LoggedInView)
import Model.View.LoggedIn.Account exposing (..)
@@ -95,7 +94,7 @@ incomeEdition address model account edition =
H.form
[ case validateIncome edition.income model.translations of
Ok validatedAmount ->
- onSubmitPrevDefault address (ServerCommunication <| Communication.SetIncome model.currentTime validatedAmount)
+ onSubmitPrevDefault address (SetIncome model.currentTime validatedAmount)
Err error ->
onSubmitPrevDefault address (UpdateLoggedIn << UpdateAccount << UpdateEditionError <| error)
, class "income"
diff --git a/src/client/elm/View/LoggedIn/AddPayment.elm b/src/client/elm/View/LoggedIn/AddPayment.elm
index 283d392..0b39591 100644
--- a/src/client/elm/View/LoggedIn/AddPayment.elm
+++ b/src/client/elm/View/LoggedIn/AddPayment.elm
@@ -13,10 +13,9 @@ import Html.Events exposing (..)
import Model exposing (Model)
import Model.Payment exposing (PaymentFrequency(..))
import Model.Translations exposing (getMessage)
-import Model.Action exposing (..)
+import Model.Action as Action exposing (..)
import Model.Action.LoggedInAction as LoggedInAction exposing (..)
import Model.Action.AddPaymentAction exposing (..)
-import Model.Communication as Communication
import Model.View.LoggedIn.AddPayment exposing (..)
import Model.View.LoggedInView exposing (LoggedInView)
@@ -32,7 +31,7 @@ addPayment address model loggedInView =
H.form
[ let update =
if loggedInView.add.waitingServer
- then NoOp
+ then Action.NoOp
else
case (validateName loggedInView.add.name model.translations, validateCost loggedInView.add.cost model.translations) of
(Ok name, Ok cost) ->
diff --git a/src/client/elm/View/LoggedIn/Monthly.elm b/src/client/elm/View/LoggedIn/Monthly.elm
index c0294d7..2e9ff1e 100644
--- a/src/client/elm/View/LoggedIn/Monthly.elm
+++ b/src/client/elm/View/LoggedIn/Monthly.elm
@@ -13,9 +13,8 @@ import Model exposing (Model)
import Model.Payment as Payment exposing (Payments, Payment)
import Model.Translations exposing (getMessage, getParamMessage)
import Model.Action exposing (..)
-import Model.Action.LoggedInAction exposing (..)
+import Model.Action.LoggedInAction as LoggedInAction exposing (..)
import Model.Action.MonthlyAction exposing (..)
-import Model.Communication as Communication
import Model.View.LoggedIn.Monthly exposing (Monthly)
import Model.View.LoggedInView exposing (LoggedInView)
@@ -81,7 +80,7 @@ paymentLine address model loggedInView payment =
[ text (price model payment.cost) ]
, div
[ class "cell delete"
- , onClick address (ServerCommunication <| Communication.DeletePayment payment Payment.Monthly)
+ , onClick address (UpdateLoggedIn <| LoggedInAction.DeletePayment payment Payment.Monthly)
]
[ button [] [ renderIcon "times" ]
]
diff --git a/src/client/elm/View/LoggedIn/Table.elm b/src/client/elm/View/LoggedIn/Table.elm
index cb3969b..ca5680f 100644
--- a/src/client/elm/View/LoggedIn/Table.elm
+++ b/src/client/elm/View/LoggedIn/Table.elm
@@ -17,7 +17,6 @@ import Model.Payment exposing (..)
import Model.Translations exposing (getMessage)
import Model.Action exposing (..)
import Model.Action.LoggedInAction exposing (..)
-import Model.Communication as Communication
import Model.View.LoggedInView exposing (LoggedInView)
import View.Icon exposing (renderIcon)
@@ -88,7 +87,7 @@ paymentLine address model loggedInView payment =
div
[ class "cell delete" ]
[ button
- [ onClick address (ServerCommunication <| Communication.DeletePayment payment Punctual)]
+ [ onClick address (UpdateLoggedIn <| DeletePayment payment Punctual)]
[ renderIcon "times" ]
]
else
diff --git a/src/client/elm/View/SignIn.elm b/src/client/elm/View/SignIn.elm
index 4b9f2bb..c21c16c 100644
--- a/src/client/elm/View/SignIn.elm
+++ b/src/client/elm/View/SignIn.elm
@@ -26,7 +26,7 @@ renderSignIn address model signInView =
[ class "signIn" ]
[ button
( if signInView.waitingServer
- then []
+ then [ class "waitingServer" ]
else [ onClick operations.address Persona.SignIn ]
)
[ span [] [ text (getMessage "SignIn" model.translations) ]