From a740d984eefcd6847fbc5bffa0662cf84048dc90 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Mon, 2 Jan 2023 16:08:47 +0100 Subject: [PATCH] (bug) unable to update title of availability after admin remove a machine/plan in calendar --- CHANGELOG.md | 1 + app/frontend/src/javascript/controllers/admin/calendar.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aff54e79e..d1ea2bfc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - Fix a bug: feature tour in admin/settings is broken - Fix a bug: clearing the new expiration date field in the offer days modal result in errors - Fix a bug: low stock notification is always sent if one of the stocks has reached the threshold +- Fix a bug: unable to update title of availability after admin remove a machine/plan in calendar - Updated react-modal to 3.16.1 - Updated tiptap editor and its dependencies to 2.0.0-beta.204 - [TODO DEPLOY] `rails db:seed` diff --git a/app/frontend/src/javascript/controllers/admin/calendar.js b/app/frontend/src/javascript/controllers/admin/calendar.js index 23deadeba..36565d417 100644 --- a/app/frontend/src/javascript/controllers/admin/calendar.js +++ b/app/frontend/src/javascript/controllers/admin/calendar.js @@ -166,7 +166,7 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state // update the machine_ids attribute $scope.availability.machine_ids = data.machine_ids; $scope.availability.title = data.title; - uiCalendarConfig.calendars.calendar.fullCalendar('rerenderEvents'); + uiCalendarConfig.calendars.calendar.fullCalendar('refetchEvents'); // notify the admin return growl.success(_t('app.admin.calendar.the_machine_was_successfully_removed_from_the_slot')); } @@ -203,7 +203,7 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state // update the plan_ids attribute $scope.availability.plan_ids = data.plan_ids; $scope.availability.plans = availabilityPlans(); - uiCalendarConfig.calendars.calendar.fullCalendar('rerenderEvents'); + uiCalendarConfig.calendars.calendar.fullCalendar('refetchEvents'); // notify the admin return growl.success(_t('app.admin.calendar.the_plan_was_successfully_removed_from_the_slot')); }