aboutsummaryrefslogtreecommitdiff
path: root/src/client/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Model')
-rw-r--r--src/client/Model/Payment.elm1
-rw-r--r--src/client/Model/View/LoggedView.elm9
-rw-r--r--src/client/Model/View/Payment/Monthly.elm17
3 files changed, 23 insertions, 4 deletions
diff --git a/src/client/Model/Payment.elm b/src/client/Model/Payment.elm
index 313c6be..1f1c4ed 100644
--- a/src/client/Model/Payment.elm
+++ b/src/client/Model/Payment.elm
@@ -4,6 +4,7 @@ module Model.Payment
, Payment
, PaymentId
, paymentsDecoder
+ , paymentIdDecoder
) where
import Date exposing (..)
diff --git a/src/client/Model/View/LoggedView.elm b/src/client/Model/View/LoggedView.elm
index 34a55a2..264fdf5 100644
--- a/src/client/Model/View/LoggedView.elm
+++ b/src/client/Model/View/LoggedView.elm
@@ -8,16 +8,17 @@ import Model.Payment exposing (Payments)
import Model.Payers exposing (Payers)
import Model.View.Payment.Add exposing (..)
import Model.View.Payment.Edition exposing (..)
+import Model.View.Payment.Monthly exposing (..)
type alias LoggedView =
{ users : Users
, me : UserId
, add : AddPayment
- , monthlyPayments : Payments
+ , monthly : Monthly
, payments : Payments
, paymentsCount : Int
, payers : Payers
- , edition : Maybe Edition
+ , paymentEdition : Maybe Edition
, currentPage : Int
}
@@ -26,10 +27,10 @@ initLoggedView users me monthlyPayments payments paymentsCount payers =
{ users = users
, me = me
, add = initAddPayment Punctual
- , monthlyPayments = monthlyPayments
+ , monthly = initMonthly monthlyPayments
, payments = payments
, paymentsCount = paymentsCount
, payers = payers
- , edition = Nothing
+ , paymentEdition = Nothing
, currentPage = 1
}
diff --git a/src/client/Model/View/Payment/Monthly.elm b/src/client/Model/View/Payment/Monthly.elm
new file mode 100644
index 0000000..15a5f2e
--- /dev/null
+++ b/src/client/Model/View/Payment/Monthly.elm
@@ -0,0 +1,17 @@
+module Model.View.Payment.Monthly
+ ( Monthly
+ , initMonthly
+ ) where
+
+import Model.Payment exposing (Payments)
+
+type alias Monthly =
+ { payments : Payments
+ , visibleDetail : Bool
+ }
+
+initMonthly : Payments -> Monthly
+initMonthly payments =
+ { payments = payments
+ , visibleDetail = False
+ }