1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

remove coupon from memory after payment

This commit is contained in:
Sylvain 2016-11-29 15:35:54 +01:00
parent 82fa5416ce
commit 852437ebf8
4 changed files with 5 additions and 0 deletions

View File

@ -675,6 +675,7 @@ Application.Controllers.controller "ShowEventController", ["$scope", "$state", "
$scope.event.nb_free_places = $scope.event.nb_free_places - reservation.total_booked_seats
resetEventReserve()
$scope.reserveSuccess = true
$scope.coupon.applied = null
$scope.reservations.push reservation
if $scope.currentUser.role == 'admin'
$scope.ctrl.member = null

View File

@ -950,6 +950,7 @@ Application.Controllers.controller "ReserveMachineController", ["$scope", "$stat
$scope.paidMachineSlots = $scope.eventsReserved
$scope.eventsReserved = []
$scope.coupon.applied = null
if $scope.selectedPlan
$scope.ctrl.member.subscribed_plan = angular.copy($scope.selectedPlan)

View File

@ -249,6 +249,7 @@ Application.Controllers.controller "PlansIndexController", ["$scope", "$rootScop
Auth._currentUser.subscribed_plan = angular.copy($scope.selectedPlan)
$scope.paid.plan = angular.copy($scope.selectedPlan)
$scope.selectedPlan = null
$scope.coupon.applied = null
@ -326,6 +327,7 @@ Application.Controllers.controller "PlansIndexController", ["$scope", "$rootScop
$scope.ctrl.member = null
$scope.paid.plan = angular.copy($scope.selectedPlan)
$scope.selectedPlan = null
$scope.coupon.applied = null

View File

@ -676,6 +676,7 @@ Application.Controllers.controller "ReserveTrainingController", ["$scope", "$sta
$scope.selectedTraining = null
$scope.trainingIsValid = false
$scope.coupon.applied = null
if $scope.selectedPlan
$scope.ctrl.member.subscribed_plan = angular.copy($scope.selectedPlan)