Skip to content

Commit

Permalink
(bug) unable to hide the slot of event deleted in agenda
Browse files Browse the repository at this point in the history
  • Loading branch information
gnepud committed Apr 29, 2024
1 parent 5f917ec commit 170b1fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Fix a bug: availability slot date error in calendar when user pc timezone is different from server timezone
- Fix a bug: expiration_date of a subscription is not correct in the OpenAPI
- Fix a bug: unable to filter by date in the Subscription OpenAPI
- Fix a bug: unable to hide the slot of event deleted in agenda

## v6.3.20 2024 Avril 15

Expand Down
2 changes: 1 addition & 1 deletion app/services/availabilities/availabilities_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def index(window, ids, events: false)
spaces_availabilities = Setting.get('spaces_module') ? spaces(Space.where(id: ids[:spaces]), @current_user, window) : []
trainings_availabilities = Setting.get('trainings_module') ? trainings(Training.where(id: ids[:trainings]), @current_user, window) : []
events_availabilities = if events && Setting.get('events_in_calendar')
events(Event.all, @current_user, window)
events(Event.where(deleted_at: nil), @current_user, window)
else
[]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def public_availabilities(window, ids, events: false)
else
[]
end
events_slots = events ? service.events(Event.all, @current_user, window) : []
events_slots = events ? service.events(Event.where(deleted_at: nil), @current_user, window) : []

[].concat(trainings_slots).concat(events_slots).concat(machines_slots).concat(spaces_slots)
end
Expand Down

0 comments on commit 170b1fd

Please sign in to comment.