Unit view : coloring background problems

Hello,
I would like to put a different background image in my unit view if the ressource is available or not.
I have already began to work on my scheduler week view.
In the week view, the weekend days are in gray, where the others days are following the theme colors (light blue in my case)
I try to see what i can do in my unit view and I imediatly view that something is wrong.
In fact, I have 2 units that are in grey where the others are in light blue.
If I look at the column, the second and third are in grey. But I don’t have done anything to put color in the unit view. After a few test I saw that I am on a fraiday in the unit view. It seems to me that the first column is the friday, and so the second and thirs columns are in facte friday and sunday (but the 2 columns are named ater the ressource, and the content is also following the unit view). If I modify the week_date_class to dosable all coloring in the unit wiex, all is OK.

If I would like to modify the background color in the unit view for each ressource, how must I do it ? the week_class don’t have the unit as a parameter. I suppose that there is something I can check directly by the scheduler but I don’t find.

Thanks for your help

Unit view reuese week-rendering logic, and as result it copies the coloring rules from the week view - which can be unwanted behavior.

Unfortunately there is no easy way for unit-sections styling. You can use week_date_class - but it will require rather complicated logic. ( it uses styles of current date for the first column, and for each next column it takes styles of the next day )

You can consider usage of timeline view - it can show different units as well. And has templates which can be used to color each cell of the result table. ( template function will receive section id - so it will be pretty easy do define section specific colors )

I already use the timeline view, but I also enabled unit view to see the event for each ressource. I use the coloring possibilty of the timeline view. I hoped that I could do the same as it was also in a unit view… I really hope that you can do something about it in the future.

As I will use several units most of the time, i would like to present information per ressource. I know that the unit view can’t be done in week view, but do you have a workaround to see easily all event of several ressource in the week view but to see this by ressource ?
(my idea was to add a combo box somewhere, perhaps in the calendar bar, to select only one ressource and to switch between ressource in the week view)

Thanks for your help

but do you have a workaround to see easily all event of several ressource in the week view but to see this by ressource ?

You can define

scheduler.filter_week = function(ev){ if (some_logic(ev)) return true; return false; }

The logic in the method will need to return true - to make the event visible.