From 359f837511597354bc6462cfc4200f54d647d728 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Thu, 13 Aug 2015 22:55:41 +0200 Subject: Giving the payment id to the client --- src/client/Update/Payment.elm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/client/Update') diff --git a/src/client/Update/Payment.elm b/src/client/Update/Payment.elm index 2d558fd..7826098 100644 --- a/src/client/Update/Payment.elm +++ b/src/client/Update/Payment.elm @@ -15,7 +15,7 @@ import Update.Payment.Add exposing (..) type PaymentAction = UpdateAdd AddPaymentAction | UpdatePayments Payments - | AddPayment String Int + | AddPayment String String Int updatePayment : Model -> PaymentAction -> PaymentView -> PaymentView updatePayment model action paymentView = @@ -24,9 +24,10 @@ updatePayment model action paymentView = { paymentView | add <- updateAddPayment addPaymentAction paymentView.add } UpdatePayments payments -> { paymentView | payments <- payments } - AddPayment name cost -> + AddPayment id name cost -> let payment = - { creation = Date.fromTime model.currentTime + { id = id + , creation = Date.fromTime model.currentTime , name = name , cost = cost , userName = paymentView.userName -- cgit v1.2.3