1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

fixed slots display in space reservation calendar

This commit is contained in:
Sylvain 2017-02-27 16:35:41 +01:00
parent 847a0ba140
commit 6a132948af
2 changed files with 4 additions and 4 deletions

View File

@ -318,7 +318,7 @@ Application.Controllers.controller "ReserveSpaceController", ["$scope", '$stateP
# When modifying an already booked reservation, callback when the modification was successfully done.
##
$scope.modifyTrainingSlot = ->
$scope.events.placable.title = if $scope.currentUser.role isnt 'admin' then _t('space_reserve.i_ve_reserved') else ''
$scope.events.placable.title = _t('space_reserve.i_ve_reserved')
$scope.events.placable.backgroundColor = 'white'
$scope.events.placable.borderColor = $scope.events.modifiable.borderColor
$scope.events.placable.id = $scope.events.modifiable.id
@ -343,8 +343,8 @@ Application.Controllers.controller "ReserveSpaceController", ["$scope", '$stateP
$scope.cancelModifyTrainingSlot = ->
if $scope.events.placable
$scope.events.placable.backgroundColor = 'white'
$scope.events.placable.title = $scope.events.placable.training.name
$scope.events.modifiable.title = if $scope.currentUser.role isnt 'admin' then _t('i_ve_reserved') else ''
$scope.events.placable.title = ''
$scope.events.modifiable.title = _t('space_reserve.i_ve_reserved')
$scope.events.modifiable.backgroundColor = 'white'
updateCalendar()

View File

@ -183,7 +183,7 @@ class API::AvailabilitiesController < API::ApiController
end
end
@slots.each do |s|
if s.is_complete?
if s.is_complete? and not s.is_reserved
s.title = t('availabilities.not_available')
end
end