mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
(bug) space reservations count in availabilities export (#415)
This commit is contained in:
commit
2cc1988e8d
@ -1,5 +1,7 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
|
- Fix a bug: wrong reservations count for spaces in availabilities export (#415)
|
||||||
|
|
||||||
## v5.5.7 2022 December 13
|
## v5.5.7 2022 December 13
|
||||||
|
|
||||||
- Fix a bug: unable to update/delete a space
|
- Fix a bug: unable to update/delete a space
|
||||||
|
@ -88,7 +88,7 @@ if Setting.get('spaces_module')
|
|||||||
((a.end_at - a.start_at) / slot_duration.minutes).to_i.times do |i|
|
((a.end_at - a.start_at) / slot_duration.minutes).to_i.times do |i|
|
||||||
start_at = a.start_at + (i * slot_duration).minutes
|
start_at = a.start_at + (i * slot_duration).minutes
|
||||||
end_at = a.start_at + (i * slot_duration).minutes + slot_duration.minutes
|
end_at = a.start_at + (i * slot_duration).minutes + slot_duration.minutes
|
||||||
reservations = a.slots.where(start_at: start_at).count
|
reservations = a.slots_reservations.where(slots: { start_at: start_at }).count
|
||||||
|
|
||||||
data = [
|
data = [
|
||||||
start_at.to_date,
|
start_at.to_date,
|
||||||
|
Loading…
Reference in New Issue
Block a user