Multiple resources support

Is there a way to work with multiple resources of different types? A simple use case could be people and rooms, for example, where an event could have one room assigned and multiple people.

Edit: to clarify a bit the question, child resources aren’t exactly the same, as they depend on the parent in some sort of hierarchy.

Hi @Guzman_Lopez

Sure, you can add any custom properties to your resource objects, and you can also customize the rendering of both resources and events as needed.

Could you share a bit more detail on how you’d like to differentiate between the resource types and what behavior you’re expecting?

Of course, I can expand a bit in the example! Imagine events have two types of resources: room and attendants. This would allow for a couple of interesting things:

  • You could prevent overlap of events that share a resource: no two events can be placed in the same room and time, or for the same attendant and time, but two different rooms can have simultaneous events with different users at the same time.
  • You could dynamically group the events by either rooms or users. This way, it would be easier to find an empty gap in a specific room schedule, or free time in a user/group of users’ schedule.
    In this situation the events can take the color of the non grouped resource in order to distinguish them easily.

You can use lifecycle events to prevent event overlaps (based on a custom resource propery for example) or you can explicitly set the eventOverlap property for every resource.
Regarding grouping, you can dynamically update the resources option to group by different resource fields. Would this approach work for your use case?

Yes, intercepting the life-cycle events and analyzing overlaps there would work for this functionality, although it seems to mirror a lot of the logic the Calendar does on the back for the simpler built-in use case.

Thanks!