Our pure JavaScript Scheduler component


Post by andre den hamer »

Hi,

We use schedulerPro with nested events. We have implemented non-working time with a toggle button to hide or show the non-working time. In case of events that are registered in non-working time, we cannot seem to get the event rendered properly. It looks like the events (both parent event and nested events) are rendered as milestones. I have attached 2 files:

  1. Screenshot...png:
    problem rendering is marked in blue
  2. steltix-issue.zip:
    archive with sources to enable reproduction

The reproduction sample will generate the mentioned screenshot. It is based on schedulerpro-5.3.5-trial/examples/frameworks/react/javascript/non-working-time.

Attachments
steltix-issue.zip
sources for reproduction
(2.1 MiB) Downloaded 19 times
wrong rendered event marked blue
wrong rendered event marked blue
Screenshot 2023-05-24 at 14.46.35.png (98.82 KiB) Viewed 137 times

Post by alex.l »

When task set as https://bryntum.com/products/gantt/docs/api/Gantt/model/TaskModel#field-manuallyScheduled its startDate won't be changed by auto-scheduling, but if calendar used, it will affect on task duration.
You can add another calendar that will have this period as working time and apply to parent and children tasks, it will allow you to see the result you expected.

    "calendars": {
        "rows": [
            {
                "id": "workhours",
                "name": "Working hours",
                "unspecifiedTimeIsWorking": true,
                "intervals": [
                    {
                        "recurrentStartDate": "at 19:00",
                        "recurrentEndDate": "at 05:00",
                        "isWorking": false,
                        "name": "Non working time"
                    }
                ]
            },
            {
                "id": "full",
                "name": "Working hours",
                "unspecifiedTimeIsWorking": true,
                "intervals": [

            ]
        }
            {
                "id": "BEV_00164_U1_81773",
                "children": [
                    {
                        "id": "BEV_00164_U1_81773_1",
                        "childType": "U",
                        "endDate": "2023-05-05T03:00",
                        "eventColor": "green",
                        "eventStyle": "border",
                        
"calendar" : "full", "manuallyScheduled": true, "number": 81773, "startDate": "2023-05-05T02:30", "type": "U1", "locationDescription": "09D" }, { "id": "BEV_00164_U1_81773_2", "childType": "L", "endDate": "2023-05-05T01:30", "eventColor": "teal", "calendar" : "full", "eventStyle": "border", "manuallyScheduled": true, "number": 81773, "startDate": "2023-05-05T01:00", "type": "U1", "locationDescription": "CSL" } ], "endDate": "2023-05-05T03:00", "eventColor": "green", "calendar" : "full", "iconClass": "b-fa b-fa-truck", "manuallyScheduled": true, "modalityType": "truck", "number": 81773, "startDate": "2023-05-05T01:00", "type": "U1", "vehicle": "BEVERTRANS03", "carrierCode": "BEV" },

All the best,
Alex


Post by andre den hamer »

Thanks a lot. This works perfectly!


Post Reply