Premium support for our pure JavaScript UI components


Post by pmiklashevich »

Hi Mats! What do you think about moving CalendarModel class to basic Scheduler? It would be nice to give availability to different type of resources. Even though basic Scheduler cannot restrict its assignment, but showing the availability as a hint to the user is a nice to have feature. Correspondingly calendar field has to be moved to the ResourceModel of basic Scheduler.

Real life use case:
There are dancers in a ballet group. And there are different ballet shows. As a user who creates a schedule for the theatre, you want to assign a dancer to play a role in a show. But the dancer took a day off, or had a business trip to another country. So he is not available for a specific time interval due to specific reason. We want to show a warning to the user when he tries to assign a dancer which is not available.

Note, resources are the theatre's halls. Events are the ballet shows. Dancers live in a basic Store class and are assigned to the events as an array of records/ids. If the Calendar model existed in basic Scheduler, we would have moved the dancers to a Resource store (even without a project, corresponding event store, etc.) and used calendar to describe its availability.

To solve the task within current Scheduler version, I think I need to use a store of TimeSpans and link every time span to a dancer by ID. Then manually check if the time interval of the ballet show and one of the dancer's time intervals intersect.

Please let me know what you think.

Best regards,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by mats »

Wouldn't it be simpler to just use Scheduler Pro for this use case, where it's already supported?


Post by pmiklashevich »

It doesn't support recurring events :)

Pavlo Miklashevych
Sr. Frontend Developer


Post by mats »

It will in 5.3, will be in nightly builds as soon as 5.2 is out :)


Post by pmiklashevich »

So recurring events are going to be added to Scheduler Pro soon, great news! We will wait a bit then to see how it works. Have a good evening!

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply