Hi there.
Is there a way to configure break times(if possible, not only one) for calendar in schedulerPro?
Support Forum
If you are talking about non working time intervals, then here is the guide https://bryntum.com/docs/gantt/guide/Gantt/basics/calendars#availability-intervals
If not, we need more details what did you mean in "break times".
All the best,
Alex
Hello Bryntum ,
We have implemented according to what you have told us, and made the these changes to the Calendar.
But the breaks(Intervals) do not appear to be greyed out. Are we doing some thing wrong?
Our requirement is to have a maximum of 3 breaks (Intervals) in a day, and specify a working day also.
In the below image, even though the interval is from 13:15 to 13:45 (isWorking is false), I can schedule events at this time in the scheduler pro.
Is there a reason for this to happen?
Below is how we are configuring the resource and the calendar.
Thank You.
We didn't see grayed intervals even we zoom in.
We are applying this calendar to the resource, and added
resourceNonWorkingTime : true,
to he feature of the schedulerPro.
We thought that having multiple intervals with working and non-working time for the same time is conflicting, so we have made the 'isWorking' for all the intervals to be false.
We now get the error as the attached file.
So we now have two question.
1 ) We are not sure why this is error is coming up.
2) Can we have intervals with isWorking = true and isWorking = false together, by using both in the same intervals array , would that be an issue while displaying the breaking times(Intervals with isWorking = false).
- Attachments
-
- image (5).png (130.03 KiB) Viewed 430 times
I have attached the sample data. Please have a look at it.
Regarding your second question, there is no issue with having intervals with isWorking = false and isWorking = true in the same array.
thank you for informing us. We will also try implementing using this.
- Attachments
-
- data (1).json
- (15.12 KiB) Downloaded 34 times
So, a few points to make regarding the JSON file that you shared:
You need to format the assignments, dependencies, events and resources data following the right structure, with a rows property https://www.bryntum.com/docs/scheduler-pro/guide/Scheduler/data/crud_manager#load-response-structure
Example
"assignments": { "rows": [...your data] }
You can use validateResponse to check that structure https://www.bryntum.com/docs/scheduler-pro/api/Scheduler/crud/mixin/AbstractCrudManagerValidation#config-validateResponse
In the assignments data, all the ids are an empty string, which is not valid.
https://www.bryntum.com/docs/scheduler-pro/api/Scheduler/model/AssignmentModel#field-id
Also in the assignments data, the resource should not be a JSON, the valid values are string and number or a ResourceModel. The same applies to the resources data, in the id field (should be string or number).
Example
"assignments": [ { "event": "a1k0p000000kr20AAA", "id": "", "resource": "{\"umGanttPlanResult\":\"umGanttPlan\",\"snps_um__ResourceItem__r.snps_um__Resource__r.Name\":\"a1i0p000000bethAAA\",\"Name\":\"a1k0p000000kr20AAA\"}" }
Should be
"assignments": [ { "event": "a1k0p000000kr20AAA", "id": "", "resource": "a1i0p000000bethAAA" } ]
https://www.bryntum.com/docs/scheduler-pro/api/Scheduler/model/AssignmentModel#field-resource
https://www.bryntum.com/docs/scheduler-pro/api/Scheduler/model/ResourceModel#field-id
That was everything that I found related to that sample data that you shared, and I believe that will fix the error that you shared here. Please let me know if you have other questions.
Best regards,
Márcio
Hi Marcio, thank you for the reply.
We weren't getting the error, when we have configured the calendar like this, and the schedulerPro was working fine.
And about the assignments data, the resource looks like a JSON but is stringified, and it has been working fine, so we are not considering this a problem.
We are thinking of format the assignments, dependencies, events and resources data following the right structure, with a rows property. But it requires a lot of fixes going on, so we want to understand the error we got.
Can you tell us what the error meant, or why we got that?
Thank you for your support.