mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-11 05:54:15 +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
|
// indicates the state of the current view : calendar or plans information
|
||||||
$scope.plansAreShown = false;
|
$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;
|
$scope.selectedPlan = null;
|
||||||
|
|
||||||
// the moment when the plan selection changed for the last time, used to trigger changes in the cart
|
// 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
|
end
|
||||||
|
|
||||||
def availabilities(reservable, type, user)
|
def availabilities(reservable, type, user)
|
||||||
if user.admin?
|
if user.admin? || user.manager?
|
||||||
reservable.availabilities
|
reservable.availabilities
|
||||||
.includes(:tags)
|
.includes(:tags)
|
||||||
.where('end_at > ? AND available_type = ?', 1.month.ago, type)
|
.where('end_at > ? AND available_type = ?', 1.month.ago, type)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user