mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
[bug] some reservation slots are not shown on the user calendars (#127)
This commit is contained in:
parent
746c0538e6
commit
6e89df045d
@ -1,6 +1,7 @@
|
||||
# Changelog Fab Manager
|
||||
|
||||
- Fix a bug: unable to run rails console
|
||||
- Fix a bug: some reservation slots are not shown on the user calendars (#127)
|
||||
|
||||
## v2.8.2 2019 January 22
|
||||
|
||||
|
@ -59,7 +59,7 @@ class Availabilities::AvailabilitiesService
|
||||
end
|
||||
end
|
||||
slots.each do |s|
|
||||
s.title = t('availabilities.not_available') if s.is_complete? && !s.is_reserved
|
||||
s.title = I18n.t('availabilities.not_available') if s.is_complete? && !s.is_reserved
|
||||
end
|
||||
slots
|
||||
end
|
||||
|
@ -17,13 +17,13 @@ class Availabilities::StatusService
|
||||
|
||||
slot.id = s.id
|
||||
slot.is_reserved = true
|
||||
slot.title = "#{slot.machine.name} - #{show_name ? r.user.profile.full_name : t('availabilities.not_available')}"
|
||||
slot.title = "#{slot.machine.name} - #{show_name ? r.user.profile.full_name : I18n.t('availabilities.not_available')}"
|
||||
slot.can_modify = true if @current_user_role == 'admin'
|
||||
slot.reservations.push r
|
||||
|
||||
next unless r.user == user
|
||||
|
||||
slot.title = "#{slot.machine.name} - #{t('availabilities.i_ve_reserved')}"
|
||||
slot.title = "#{slot.machine.name} - #{I18n.t('availabilities.i_ve_reserved')}"
|
||||
slot.can_modify = true
|
||||
slot.is_reserved_by_current_user = true
|
||||
end
|
||||
@ -45,7 +45,7 @@ class Availabilities::StatusService
|
||||
next unless r.user == user
|
||||
|
||||
slot.id = s.id
|
||||
slot.title = t('availabilities.i_ve_reserved')
|
||||
slot.title = I18n.t('availabilities.i_ve_reserved')
|
||||
slot.can_modify = true
|
||||
slot.is_reserved = true
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user