From 02a155e7af9fae1577755eef7bf4b9af808e42ad Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 11 Oct 2017 15:23:42 +0200 Subject: [PATCH] prevent create availability for disabled space --- app/assets/javascripts/controllers/admin/calendar.coffee.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/controllers/admin/calendar.coffee.erb b/app/assets/javascripts/controllers/admin/calendar.coffee.erb index 9747a547b..a69cbf5fe 100644 --- a/app/assets/javascripts/controllers/admin/calendar.coffee.erb +++ b/app/assets/javascripts/controllers/admin/calendar.coffee.erb @@ -309,13 +309,13 @@ Application.Controllers.controller 'CreateEventModalController', ["$scope", "$ui $scope.end = end ## machines list - $scope.machines = machinesPromise.filter (t) -> !t.disabled + $scope.machines = machinesPromise.filter (m) -> !m.disabled ## trainings list $scope.trainings = trainingsPromise.filter (t) -> !t.disabled ## spaces list - $scope.spaces = spacesPromise + $scope.spaces = spacesPromise.filter (s) -> !s.disabled ## machines associated with the created slot $scope.selectedMachines = []