mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
(feat) Ability to show all availabilities in calender for admin
This commit is contained in:
parent
751920893a
commit
d7d996bc6d
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
- Fix a bug: unable to show project step image in markdown file
|
- Fix a bug: unable to show project step image in markdown file
|
||||||
- Fix a bug: unable to update Store Order sub type in statistics
|
- 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]`
|
- [TODO DEPLOY] `rails fablab:maintenance:regenerate_statistics[2014,1]`
|
||||||
|
|
||||||
## v6.0.8 2023 July 03
|
## v6.0.8 2023 July 03
|
||||||
|
@ -22,7 +22,7 @@ class Availabilities::VisibilityService
|
|||||||
# @return [Array<ActiveSupport::TimeWithZone,Date,Time>] as: [start,end]
|
# @return [Array<ActiveSupport::TimeWithZone,Date,Time>] as: [start,end]
|
||||||
def visibility(user, available_type, range_start, range_end)
|
def visibility(user, available_type, range_start, range_end)
|
||||||
if user&.privileged?
|
if user&.privileged?
|
||||||
window_start = [range_start, 1.month.ago].max
|
window_start = range_start
|
||||||
window_end = range_end
|
window_end = range_end
|
||||||
else
|
else
|
||||||
end_at = @maximum_visibility[:other]
|
end_at = @maximum_visibility[:other]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user