aboutsummaryrefslogtreecommitdiff
path: root/src/client/Update
diff options
context:
space:
mode:
authorJoris2015-09-06 16:46:59 +0200
committerJoris2015-09-06 16:46:59 +0200
commit3853811450d4fe801da996eb48825049c3541030 (patch)
treeb483c6152f55b6fe87d23108d2d0346a593e51ac /src/client/Update
parent0b6f0fa29075178b45cb17d2932003ab4b342280 (diff)
Renaming PaymentView to LoggedInView
Diffstat (limited to 'src/client/Update')
-rw-r--r--src/client/Update/LoggedIn.elm (renamed from src/client/Update/LoggedView.elm)44
-rw-r--r--src/client/Update/LoggedIn/Add.elm (renamed from src/client/Update/LoggedView/Add.elm)4
-rw-r--r--src/client/Update/LoggedIn/Monthly.elm (renamed from src/client/Update/LoggedView/Monthly.elm)4
3 files changed, 26 insertions, 26 deletions
diff --git a/src/client/Update/LoggedView.elm b/src/client/Update/LoggedIn.elm
index cf6bcb2..03eb137 100644
--- a/src/client/Update/LoggedView.elm
+++ b/src/client/Update/LoggedIn.elm
@@ -1,6 +1,6 @@
-module Update.LoggedView
+module Update.LoggedIn
( LoggedAction(..)
- , updateLoggedView
+ , updateLoggedIn
) where
import Date
@@ -10,11 +10,11 @@ import Model exposing (Model)
import Model.User exposing (UserId)
import Model.Payment exposing (..)
import Model.Payers exposing (..)
-import Model.View.LoggedView exposing (..)
-import Model.View.Payment.Add exposing (..)
+import Model.View.LoggedInView exposing (..)
+import Model.View.LoggedIn.Add exposing (..)
-import Update.LoggedView.Add exposing (..)
-import Update.LoggedView.Monthly as UM
+import Update.LoggedIn.Add exposing (..)
+import Update.LoggedIn.Monthly as UM
type LoggedAction =
UpdateAdd AddPaymentAction
@@ -26,40 +26,40 @@ type LoggedAction =
| UpdatePage Int Payments
| UpdateMonthly UM.MonthlyAction
-updateLoggedView : Model -> LoggedAction -> LoggedView -> LoggedView
-updateLoggedView model action loggedView =
+updateLoggedIn : Model -> LoggedAction -> LoggedInView -> LoggedInView
+updateLoggedIn model action loggedInView =
case action of
UpdateAdd addPaymentAction ->
- { loggedView | add <- updateAddPayment addPaymentAction loggedView.add }
+ { loggedInView | add <- updateAddPayment addPaymentAction loggedInView.add }
UpdatePayments payments ->
- { loggedView | payments <- payments }
+ { loggedInView | payments <- payments }
AddPayment userId name cost payments ->
- { loggedView
+ { loggedInView
| payments <- payments
, currentPage <- 1
, add <- initAddPayment Punctual
- , payers <- updatePayers loggedView.payers userId cost
- , paymentsCount <- loggedView.paymentsCount + 1
+ , payers <- updatePayers loggedInView.payers userId cost
+ , paymentsCount <- loggedInView.paymentsCount + 1
}
AddMonthlyPayment id name cost ->
- { loggedView
+ { loggedInView
| add <- initAddPayment Monthly
, monthly <-
- let payment = Payment id (Date.fromTime model.currentTime) name cost loggedView.me
- in UM.updateMonthly (UM.AddPayment payment) loggedView.monthly
+ let payment = Payment id (Date.fromTime model.currentTime) name cost loggedInView.me
+ in UM.updateMonthly (UM.AddPayment payment) loggedInView.monthly
}
ToggleEdit id ->
- { loggedView | paymentEdition <- if loggedView.paymentEdition == Just id then Nothing else Just id }
+ { loggedInView | paymentEdition <- if loggedInView.paymentEdition == Just id then Nothing else Just id }
DeletePayment userId cost payments ->
- { loggedView
+ { loggedInView
| payments <- payments
- , payers <- updatePayers loggedView.payers userId -cost
- , paymentsCount <- loggedView.paymentsCount - 1
+ , payers <- updatePayers loggedInView.payers userId -cost
+ , paymentsCount <- loggedInView.paymentsCount - 1
}
UpdatePage page payments ->
- { loggedView
+ { loggedInView
| currentPage <- page
, payments <- payments
}
UpdateMonthly monthlyAction ->
- { loggedView | monthly <- UM.updateMonthly monthlyAction loggedView.monthly }
+ { loggedInView | monthly <- UM.updateMonthly monthlyAction loggedInView.monthly }
diff --git a/src/client/Update/LoggedView/Add.elm b/src/client/Update/LoggedIn/Add.elm
index 05c2c30..1f28997 100644
--- a/src/client/Update/LoggedView/Add.elm
+++ b/src/client/Update/LoggedIn/Add.elm
@@ -1,9 +1,9 @@
-module Update.LoggedView.Add
+module Update.LoggedIn.Add
( AddPaymentAction(..)
, updateAddPayment
) where
-import Model.View.Payment.Add exposing (..)
+import Model.View.LoggedIn.Add exposing (..)
type AddPaymentAction =
UpdateName String
diff --git a/src/client/Update/LoggedView/Monthly.elm b/src/client/Update/LoggedIn/Monthly.elm
index 567025f..1379323 100644
--- a/src/client/Update/LoggedView/Monthly.elm
+++ b/src/client/Update/LoggedIn/Monthly.elm
@@ -1,10 +1,10 @@
-module Update.LoggedView.Monthly
+module Update.LoggedIn.Monthly
( MonthlyAction(..)
, updateMonthly
) where
import Model.Payment exposing (Payment, PaymentId)
-import Model.View.Payment.Monthly exposing (..)
+import Model.View.LoggedIn.Monthly exposing (..)
type MonthlyAction =
ToggleDetail