1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

(feat) Ability to show all availabilities in calender for admin

This commit is contained in:
Du Peng 2023-07-06 15:31:24 +02:00
parent 751920893a
commit d7d996bc6d
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
- Fix a bug: unable to show project step image in markdown file
- Fix a bug: unable to update Store Order sub type in statistics
- Ability to show all availabilities in calender for admin
- [TODO DEPLOY] `rails fablab:maintenance:regenerate_statistics[2014,1]`
## v6.0.8 2023 July 03

View File

@ -22,7 +22,7 @@ class Availabilities::VisibilityService
# @return [Array<ActiveSupport::TimeWithZone,Date,Time>] as: [start,end]
def visibility(user, available_type, range_start, range_end)
if user&.privileged?
window_start = [range_start, 1.month.ago].max
window_start = range_start
window_end = range_end
else
end_at = @maximum_visibility[:other]