From 3b738e0d4cc65f314da7389d4542ec826ba0f454 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 5 Sep 2015 13:53:36 +0200 Subject: Using UserId instead of UserName to indentify users --- src/client/Model/View/PaymentView.elm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/client/Model/View') diff --git a/src/client/Model/View/PaymentView.elm b/src/client/Model/View/PaymentView.elm index bf5804f..93ab457 100644 --- a/src/client/Model/View/PaymentView.elm +++ b/src/client/Model/View/PaymentView.elm @@ -3,13 +3,15 @@ module Model.View.PaymentView , initPaymentView ) where +import Model.User exposing (Users, UserId) import Model.Payment exposing (Payments) import Model.Payers exposing (Payers) import Model.View.Payment.Add exposing (..) import Model.View.Payment.Edition exposing (..) type alias PaymentView = - { userName : String + { users : Users + , me : UserId , add : AddPayment , payments : Payments , paymentsCount : Int @@ -18,9 +20,10 @@ type alias PaymentView = , currentPage : Int } -initPaymentView : String -> Payments -> Int -> Payers -> PaymentView -initPaymentView userName payments paymentsCount payers = - { userName = userName +initPaymentView : Users -> UserId -> Payments -> Int -> Payers -> PaymentView +initPaymentView users me payments paymentsCount payers = + { users = users + , me = me , add = initAddPayment , payments = payments , paymentsCount = paymentsCount -- cgit v1.2.3