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:
parent
be23cf27c3
commit
47a0fca481
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user