diff options
author | Joris Guyonvarch | 2015-08-13 22:55:41 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-08-13 22:55:41 +0200 |
commit | 359f837511597354bc6462cfc4200f54d647d728 (patch) | |
tree | 13d896bd1280a735945609e890faa606abd135fa /src/client/Update | |
parent | 35557ae09d10aa6388b79e2e19ee7702efb28bc6 (diff) |
Giving the payment id to the client
Diffstat (limited to 'src/client/Update')
-rw-r--r-- | src/client/Update/Payment.elm | 7 |
1 files changed, 4 insertions, 3 deletions
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 |