From 8f3f2ba083fc360ce7e8bbd3d006377242f93107 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 5 Apr 2022 16:43:43 +0200 Subject: [PATCH] Fix a bug: unable to confirm modification of reservation for client --- CHANGELOG.md | 1 + app/frontend/src/javascript/controllers/machines.js.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08a63c734..d820ef415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog Fab-manager - Fix a bug: unable to show machine availability slot for admin +- Fix a bug: unable to confirm modification of reservation for client ## v5.3.9 2022 April 01 diff --git a/app/frontend/src/javascript/controllers/machines.js.erb b/app/frontend/src/javascript/controllers/machines.js.erb index 26f83c140..cacd5cd1a 100644 --- a/app/frontend/src/javascript/controllers/machines.js.erb +++ b/app/frontend/src/javascript/controllers/machines.js.erb @@ -499,7 +499,7 @@ Application.Controllers.controller('ReserveMachineController', ['$scope', '$tran slotId: $scope.events.modifiable.slot_id, borderColor: $scope.events.modifiable.borderColor, user: angular.copy($scope.events.modifiable.user), - title: $scope.currentUser.id === $scope.events.modifiable.user.id ? _t('app.logged.machines_reserve.i_ve_reserved') : _t('app.logged.machines_reserve.not_available') + title: (!$scope.events.modifiable.user || $scope.currentUser.id === $scope.events.modifiable.user.id) ? _t('app.logged.machines_reserve.i_ve_reserved') : _t('app.logged.machines_reserve.not_available') }; $scope.events.modifiable.backgroundColor = 'white';