1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

fix book reservation+subscription

This commit is contained in:
Sylvain 2020-12-29 11:27:59 +01:00
parent feeed2f450
commit abe1619392
4 changed files with 10 additions and 0 deletions

View File

@ -758,6 +758,9 @@ Application.Controllers.controller('ReserveMachineController', ['$scope', '$stat
*/
const refetchCalendar = function () {
uiCalendarConfig.calendars.calendar.fullCalendar('refetchEvents');
setTimeout(() => {
uiCalendarConfig.calendars.calendar.fullCalendar('rerenderEvents');
}, 200);
};
// !!! MUST BE CALLED AT THE END of the controller

View File

@ -669,6 +669,9 @@ Application.Controllers.controller('ReserveSpaceController', ['$scope', '$stateP
*/
const refetchCalendar = function () {
uiCalendarConfig.calendars.calendar.fullCalendar('refetchEvents');
setTimeout(() => {
uiCalendarConfig.calendars.calendar.fullCalendar('rerenderEvents');
}, 200);
};
// !!! MUST BE CALLED AT THE END of the controller

View File

@ -462,6 +462,9 @@ Application.Controllers.controller('ReserveTrainingController', ['$scope', '$sta
*/
const refetchCalendar = function () {
uiCalendarConfig.calendars.calendar.fullCalendar('refetchEvents');
setTimeout(() => {
uiCalendarConfig.calendars.calendar.fullCalendar('rerenderEvents');
}, 200);
};
// !!! MUST BE CALLED AT THE END of the controller

View File

@ -31,6 +31,7 @@ class Reservations::Reserve
generate_invoice(reservation, operator_profile_id, payment_details, intent_id)
end
payment.save
reservation.save
WalletService.debit_user_wallet(payment, user, reservation)
reservation.post_save
end