From 63a9f8bf95b530e106b5f0d10c2de10395c01504 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 30 Aug 2016 12:45:35 +0200 Subject: [PATCH] update nummber of free places after event reservation payment --- app/assets/javascripts/controllers/events.coffee.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/controllers/events.coffee.erb b/app/assets/javascripts/controllers/events.coffee.erb index e64229556..899b70b99 100644 --- a/app/assets/javascripts/controllers/events.coffee.erb +++ b/app/assets/javascripts/controllers/events.coffee.erb @@ -464,7 +464,7 @@ Application.Controllers.controller "ShowEventController", ["$scope", "$state", " # @param member {Object} User as retreived from the API: current user / selected user if current is admin # @param reserve {Object} Reservation parameters (places...) # @param event {Object} Current event - # @return {{user_id:Number, reservable_id:Number, reservable_type:String, slots_attributes:Array, nb_reserve_places:Number, nb_reserve_reduced_places:Number}} + # @return {{user_id:number, reservable_id:number, reservable_type:string, slots_attributes:Array, nb_reserve_places:number}} ## mkReservation = (member, reserve, event) -> reservation = @@ -663,7 +663,7 @@ Application.Controllers.controller "ShowEventController", ["$scope", "$state", " # @param resveration {Object} booked reservation ## afterPayment = (reservation)-> - $scope.event.nb_free_places = $scope.event.nb_free_places - reservation.nb_reserve_places - reservation.nb_reserve_reduced_places + $scope.event.nb_free_places = $scope.event.nb_free_places - reservation.total_booked_seats resetEventReserve() $scope.reserveSuccess = true $scope.reservations.push reservation