1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

show all availabilities to managers

This commit is contained in:
Sylvain 2020-05-06 12:56:12 +02:00
parent be23cf27c3
commit 47a0fca481
2 changed files with 2 additions and 2 deletions

View File

@ -428,7 +428,7 @@ Application.Controllers.controller('ReserveMachineController', ['$scope', '$stat
// indicates the state of the current view : calendar or plans information
$scope.plansAreShown = false;
// will store the user's plan if he choosed to buy one
// will store the user's plan if he chose to buy one
$scope.selectedPlan = null;
// the moment when the plan selection changed for the last time, used to trigger changes in the cart

View File

@ -101,7 +101,7 @@ class Availabilities::AvailabilitiesService
end
def availabilities(reservable, type, user)
if user.admin?
if user.admin? || user.manager?
reservable.availabilities
.includes(:tags)
.where('end_at > ? AND available_type = ?', 1.month.ago, type)