Premium support for our pure JavaScript UI components


Post by Jorge »

Hi!

I have a probleme with the scheduler pro calendar. I'm trying to build a SchedulerPro with a Project Calendar with some days off (isWorking=false) and several child calendars that override the sames days to be on (isWorking=true). The child calendars are affected to some ressources.

The behaviour expected is to allow set an event on a resource with a calendar with days flagged as isWorking=true. But the parent calendar is still taken into account.

I can do this with a project with inline data, but when i try to do the same thing with a remote server doesn't work. Even the render of the days off are different.

In my example i setted in the general calendar two days off (2021-04-17 to 2021-04-19) and in a child calendar (id=exeptionalweekend) i set the same days as available. then i affected to the resource "Bill".

if i try to affect an event to a resource different than "Bill" is not allowed. thats ok!

But the same action with a remote data is no performed.

Could you please tell me what im doing wrong please.

i'm already read all the documentation:
https://bryntum.com/docs/gantt/#guides/calendars.md
https://www.bryntum.com/docs/scheduler-pro/#guides/schedulerpro/calendars.md

Here are the use case:

Thank you for the answers

Last edited by Jorge on Tue Apr 20, 2021 9:48 am, edited 1 time in total.

Post by mats »

In your remote data scenario JSON, you have named assignments property incorrectly.

Change assignmentsData to assignments


Post by Jorge »

mats wrote: Tue Apr 20, 2021 9:39 am

In your remote data scenario JSON, you have named assignments property incorrectly.

Change assignmentsData to assignments

Oops! corrected! Thanks

But i'm still have the problem with the calendar.


Post by alex.l »

Thank you for your test cases, I was able to reproduce the problem, here is a ticket to track the status: https://github.com/bryntum/support/issues/2709

All the best,
Alex

All the best,
Alex


Post by saki »

This is not a bug in fact because the inline data and loaded data is different. The main difference is that the loaded data contains:

project : {
    calendar : 'general'
    // ...

while inline data does not. Events have no calendar in both cases, only resources have. The result is that if no calendar is specified then project creates the default one with 24/7 working time. However, if the data is loaded then the general calendar is used and because the event does not have a calendar the project calendar is used. Project calendar has non-working weekend specified.

The solution is to set the calendar also on the event. Then the logic starts to use intersection of resource and event calendars as described in https://bryntum.com/docs/scheduler-pro/#SchedulerPro/guides/basics/calendars.md#scheduling-logic-when-using-project%2C-event-and-resource-calenders


Post Reply