We'd have to nail down some requirements. Please post whether you agree with this analysis.
I think that would be actual days blocked out most of the time. With a background colour which depends on a resource.
So. For a MonthView (And CalendarRow which is also a series of day cells) , whole cells might get a CSS class, but what if multiple ones overlapped? Multiple CSS classes won't work. So cells would have to get extra full-sized elements for each ResourceTimeRange which intersects that cell. OK. They would then overly one another. Their background colours (which would have a transparency channel obv) would add up. That's possible.
Then what if the time range was not midnight to midnight? I suggest that if it intersects, the cell gets a regular full-sized element. MonthViews and CalendarRows are not time-granular.
DayViews (WeekView isa DayView). These are time-granular, so these would show elements which could take into account accurate start time and end time.
YearView has no way of doing this. It's already a coloured heat map of event density.
ListView. Not affected, each row is an event.
AgendaView. Similar to MonthView. If a range intersects a day, then that cell gets a full sized element added which carries the rendition.
So this would be a parallel rendering pathway with event rendering. Also the collection of these would be a parallel path to event collection. The DayCell
blocks collected, in addition to containing the day's intersecting events would also contain the intersecting ResourceTimeRanges.
To enable collection of intersecting ranges by date, ResourceTimeRanges
store would also have to mix in GetEventsMixin
and for that to work, DayIndexMixin
. In that way, collection of ResourceTimeRanges would work in the same way.
So maybe it would like this. I mocked it up using the debugger:
:
- Screenshot 2022-03-24 at 07.33.34.png (159.15 KiB) Viewed 1208 times
- Screenshot 2022-03-24 at 07.34.04.png (174.94 KiB) Viewed 1208 times
- Screenshot 2022-03-24 at 07.34.18.png (210.69 KiB) Viewed 1208 times