Our powerful JS Calendar component


Post by tripti.v »

Hi, I am trying to create a shift with a break in Bryntum Calendar. But for some reason I keep getting Id Collision error on the Console. Screenshot of the error below.
While debugging, the system keeps breaking at 'isFiltered' parameter in Bryntum files. It goes into an if block even though the parameter value is false. Screenshot attached for this as well.

I am not sure how this is connected to the Id collision issue, but could you please help me create a break successfully please.

Attachments
ShiftWithBreak.png
ShiftWithBreak.png (13.93 KiB) Viewed 106 times
isFilteredBryntumIssue.png
isFilteredBryntumIssue.png (82.18 KiB) Viewed 106 times
IdCollisionIssue.png
IdCollisionIssue.png (47.34 KiB) Viewed 106 times

Post by alex.l »

Hi,

Hard to say what exactly is going wrong. It might be a race condition problem with data update.
Please share runnable demo, we need to debug it at runtime.
Make sure you set all store data together and not one by one in a loop. Make sure you doesn't have same ids, maybe it just shows correct problem. I am out of ideas, need to run and debug it.

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post by Animal »

Are you loading two events with the same id?

What does the events data block look like that you are loading?


Post by tripti.v »

Hi, thank you for getting back to me. you both are right. Upon more investigation, it looks like the shift with break is actually being considered as 3 events with same Id. Any ideas how we can create breaks in shifts without the issue of them being considered as different events please? The grey event of 1 hour in the screenshot is the break in the shift

Attachments
ShiftWithBreak.png
ShiftWithBreak.png (13.93 KiB) Viewed 94 times

Post by Animal »

If these are shifts, not events, should they not be TimeRanges?

And then events are then in the foreground above that.

Like "Morning sessions" and "Afternoon sessions" in this example: https://bryntum.com/products/calendar/examples/timeranges/


Post Reply