Premium support for our pure JavaScript UI components


Post by rv3 »

I'm not sure if this is the expected behave or if i'm doing something wrong.

I have syncDataOnLoad: true on my resourcesStore. When I load the resources, the tasks also get rendered at the resources row, however, if i remove the resource and add it back 2 seconds later, the tasks won't render anymore. I've tried all possible refresh settings and functions that i've found on the documentation but no success to paint / render the tasks back again.

I'm adding the code for you to replicate on your side. I tested it under https://bryntum.com/products/scheduler/examples/localization/

At the end you can see the setTimeout to first, reduce the resources, and then add the original resources.
All ids match exactly with the dummy data from data.data.json

Bildschirmaufnahme 2025-02-04 um 10.13.29.mov
(4.56 MiB) Downloaded 5 times
import { Scheduler, LocaleManager, Localizable, StringHelper } from '../../build/scheduler.module.js?482861';
import shared from '../_shared/shared.module.js?482861';
// Importing custom locales

// Enable missing localization Error throwing here to show how it can be used in end-user apps
// All non-localized strings which are in `L{foo}` format will throw runtime error
LocaleManager.throwOnMissingLocale = true;

//region Data

const
    resources = [
        { id : 'r1', name : 'Mike', company : 'Big Fish inc' },
        { id : 'r2', name : 'Linda', company : 'Small rocket co' },
        { id : 'r3', name : 'Dan', company : 'Big Fish inc' },
        { id : 'r4', name : 'Celia', company : 'Big Fish inc' },
        { id : 'r5', name : 'Malik', company : 'Small rocket co' },
        { id : 'r6', name : 'Gloria', company : 'Small rocket co' }
    ],
    events    = [
        {
            id          : 1,
            resourceId  : 'r1',
            name        : 'Meeting',
            color       : 'green',
            percentDone : 60,
            startDate   : new Date(2017, 0, 1, 10),
            endDate     : new Date(2017, 0, 1, 12)
        },
        {
            id          : 2,
            resourceId  : 'r2',
            name        : 'Lunch',
            color       : 'blue',
            percentDone : 20,
            startDate   : new Date(2017, 0, 1, 12),
            endDate     : new Date(2017, 0, 1, 14)
        },
        {
            id          : 3,
            resourceId  : 'r3',
            name        : 'Meeting',
            color       : 'green',
            percentDone : 80,
            startDate   : new Date(2017, 0, 1, 14),
            endDate     : new Date(2017, 0, 1, 16)
        },
        {
            id          : 4,
            resourceId  : 'r4',
            name        : 'Meeting',
            color       : 'green',
            percentDone : 90,
            startDate   : new Date(2017, 0, 1, 8),
            endDate     : new Date(2017, 0, 1, 11)
        },
        {
            id          : 5,
            resourceId  : 'r5',
            name        : 'Phone',
            color       : 'red',
            percentDone : 40,
            startDate   : new Date(2017, 0, 1, 15),
            endDate     : new Date(2017, 0, 1, 17)
        },
        {
            id          : 6,
            resourceId  : 'r6',
            name        : 'Workout',
            color       : 'orange',
            percentDone : 70,
            startDate   : new Date(2017, 0, 1, 16),
            endDate     : new Date(2017, 0, 1, 18)
        }
    ];

//endregion

/**
 * Updates localizable properties after locale change
 */
function updateLocalization() {
    const title = Localizable().L('L{App.Localization demo}');
    document.querySelector('#title').innerHTML = `<h1>${title}</h1>`;
    document.title = title;
}

// Add listener to update contents when locale changes
LocaleManager.on('locale', updateLocalization);

new Scheduler({
    appendTo          : 'container',
    resourceImagePath : '../_shared/images/users/',
    resourceStore: {
        syncDataOnLoad: true,
    },
    features : {
        eventTooltip : true
    },

columns : [
    { type : 'resourceInfo', text : 'L{Name}', width : 150 },
    { text : 'L{Company}', field : 'company', width : 150 }
],

resources,
infiniteScroll: true,
events,

startDate  : new Date(2017, 0, 1, 6),
endDate    : new Date(2017, 0, 1, 20),
viewPreset : 'hourAndDay',

eventRenderer({ resourceRecord, renderData, eventRecord }) {
    Object.assign(renderData, {
        iconCls    : resourceRecord.company.startsWith('Big') ? 'b-fa b-fa-fish' : 'b-fa b-fa-rocket',
        eventColor : eventRecord.color
    });

    return StringHelper.xss`${eventRecord.name}`;
}
});

updateLocalization();

setTimeout(()=>{
    scheduler.resourceStore.loadDataAsync([
        { id : 'r1', name : 'Mike', company : 'Big Fish inc' },
        { id : 'r2', name : 'Linda', company : 'Small rocket co' },
        { id : 'r3', name : 'Dan', company : 'Big Fish inc' },
    ])
    setTimeout(()=>{
        scheduler.resourceStore.loadDataAsync([
        { id : 'r1', name : 'Mike', company : 'Big Fish inc' },
        { id : 'r2', name : 'Linda', company : 'Small rocket co' },
        { id : 'r3', name : 'Dan', company : 'Big Fish inc' },
        { id : 'r4', name : 'Celia', company : 'Big Fish inc' },
        { id : 'r5', name : 'Malik', company : 'Small rocket co' },
        { id : 'r6', name : 'Gloria', company : 'Small rocket co' }
    ])
    },2000)
},2000)

Post by ghulam.ghous »

This is happening because when you remove the resource, the assignments for that resource are also removed. And events assigned to that resource becomes unassigned. We have a config removeUnassignedEvent on eventStore which is set to true by default and because of this events are removed. Please set it to false on the eventStore:

crudManager:{
    eventStore:{
        removeUnassignedEvent : false
    }
},

https://bryntum.com/products/schedulerpro/docs/api/Scheduler/data/mixin/EventStoreMixin#config-removeUnassignedEvent


Post by rv3 »

Hi ghulam.ghous

Thank you for the tip,
I've tried it on my side but it didn't work.
I've also tried with the example on top, and also didn't work

{
    appendTo          : 'container',
    resourceImagePath : '../_shared/images/users/',
    resourceStore: {
        syncDataOnLoad: true,
    },
    eventStore:{
        removeUnassignedEvent: false
    },
    features : {
        eventTooltip : true
    },

This seams to only work with AssignmentStore, which is not the case. We are just using the legacy parentId .


Post by ghulam.ghous »

Hey,

Please wrap the eventStore in a crudManager.

{
    appendTo          : 'container',
    resourceImagePath : '../_shared/images/users/',
    resourceStore: {
        syncDataOnLoad: true,
    },
crudManager: {
    eventStore:{
        removeUnassignedEvent: false
    }},
    features : {
        eventTooltip : true
    },

Video Clip:

Screen Recording 2025-02-04 at 7.37.53 PM.mov
(4.74 MiB) Downloaded 4 times

Full example:

import { Scheduler, LocaleManager, Localizable, StringHelper } from '../../build/scheduler.module.js?482861';
import shared from '../_shared/shared.module.js?482861';
// Importing custom locales

// Enable missing localization Error throwing here to show how it can be used in end-user apps
// All non-localized strings which are in `L{foo}` format will throw runtime error
LocaleManager.throwOnMissingLocale = true;

//region Data

const
    resources = [
        { id : 'r1', name : 'Mike', company : 'Big Fish inc' },
        { id : 'r2', name : 'Linda', company : 'Small rocket co' },
        { id : 'r3', name : 'Dan', company : 'Big Fish inc' },
        { id : 'r4', name : 'Celia', company : 'Big Fish inc' },
        { id : 'r5', name : 'Malik', company : 'Small rocket co' },
        { id : 'r6', name : 'Gloria', company : 'Small rocket co' }
    ],
    events    = [
        {
            id          : 1,
            resourceId  : 'r1',
            name        : 'Meeting',
            color       : 'green',
            percentDone : 60,
            startDate   : new Date(2017, 0, 1, 10),
            endDate     : new Date(2017, 0, 1, 12)
        },
        {
            id          : 2,
            resourceId  : 'r2',
            name        : 'Lunch',
            color       : 'blue',
            percentDone : 20,
            startDate   : new Date(2017, 0, 1, 12),
            endDate     : new Date(2017, 0, 1, 14)
        },
        {
            id          : 3,
            resourceId  : 'r3',
            name        : 'Meeting',
            color       : 'green',
            percentDone : 80,
            startDate   : new Date(2017, 0, 1, 14),
            endDate     : new Date(2017, 0, 1, 16)
        },
        {
            id          : 4,
            resourceId  : 'r4',
            name        : 'Meeting',
            color       : 'green',
            percentDone : 90,
            startDate   : new Date(2017, 0, 1, 8),
            endDate     : new Date(2017, 0, 1, 11)
        },
        {
            id          : 5,
            resourceId  : 'r5',
            name        : 'Phone',
            color       : 'red',
            percentDone : 40,
            startDate   : new Date(2017, 0, 1, 15),
            endDate     : new Date(2017, 0, 1, 17)
        },
        {
            id          : 6,
            resourceId  : 'r6',
            name        : 'Workout',
            color       : 'orange',
            percentDone : 70,
            startDate   : new Date(2017, 0, 1, 16),
            endDate     : new Date(2017, 0, 1, 18)
        }
    ];

//endregion

/**
 * Updates localizable properties after locale change
 */
function updateLocalization() {
    const title = Localizable().L('L{App.Localization demo}');
    document.querySelector('#title').innerHTML = `<h1>${title}</h1>`;
    document.title = title;
}

// Add listener to update contents when locale changes
LocaleManager.on('locale', updateLocalization);

new Scheduler({
    appendTo          : 'container',
    resourceImagePath : '../_shared/images/users/',
    resourceStore: {
        syncDataOnLoad: true,
    },
    features : {
        eventTooltip : true
    },

columns : [
    { type : 'resourceInfo', text : 'L{Name}', width : 150 },
    { text : 'L{Company}', field : 'company', width : 150 }
],

resources,
infiniteScroll: true,
events,
crudManager:{
    eventStore:{
        removeUnassignedEvent : false
    }
}, 

startDate  : new Date(2017, 0, 1, 6),
endDate    : new Date(2017, 0, 1, 20),
viewPreset : 'hourAndDay',

eventRenderer({ resourceRecord, renderData, eventRecord }) {
    Object.assign(renderData, {
        iconCls    : resourceRecord.company.startsWith('Big') ? 'b-fa b-fa-fish' : 'b-fa b-fa-rocket',
        eventColor : eventRecord.color
    });

    return StringHelper.xss`${eventRecord.name}`;
}
});

updateLocalization();

setTimeout(()=>{
    scheduler.resourceStore.loadDataAsync([
        { id : 'r1', name : 'Mike', company : 'Big Fish inc' },
        { id : 'r2', name : 'Linda', company : 'Small rocket co' },
        { id : 'r3', name : 'Dan', company : 'Big Fish inc' },
    ])
    setTimeout(()=>{
        scheduler.resourceStore.loadDataAsync([
        { id : 'r1', name : 'Mike', company : 'Big Fish inc' },
        { id : 'r2', name : 'Linda', company : 'Small rocket co' },
        { id : 'r3', name : 'Dan', company : 'Big Fish inc' },
        { id : 'r4', name : 'Celia', company : 'Big Fish inc' },
        { id : 'r5', name : 'Malik', company : 'Small rocket co' },
        { id : 'r6', name : 'Gloria', company : 'Small rocket co' }
    ])
    },2000)
},2000)
Feb-04-2025 19-41-23.gif
Feb-04-2025 19-41-23.gif (504.27 KiB) Viewed 199 times

Post by rv3 »

Bildschirmfoto 2025-02-04 um 15.52.08.png
Bildschirmfoto 2025-02-04 um 15.52.08.png (63.91 KiB) Viewed 198 times

Great,
It does indeed work on this example, however on my side I'm getting some errors, that just appears when I use the crudManager.

_a5.invalidate is not a function

We are not using crudManager for our project nor lazyLoading.

const FacilitySchedulerProConfig = function () {
    return {
        crudManager: {
            eventStore: {
                modelClass: Event,
                removeUnassignedEvent: false,
            },
            resourceStore: {
                modelClass: Worker,
                tree: true,
                syncDataOnLoad: true,
            },
        },

    timeZone: stationTimeZone,
    ...

The events are loaded on the flow

 await scheduler.value.instance.value.eventStore.loadDataAsync(tasksTop);

Post by ghulam.ghous »

I see. I have looked further and found out that removeUnassignedEvent has no affect when being used with the legacy mode (event and resource assignment is done using a resourceId on an event). But still wonder what is different when a crudManager is being used. So before reaching a conclusion here, I am gonna need couple of things from your end. What data format you are using, are you using standalone assignments or assigning the events to resources using resourceId? And more importantly I would be glad if you can share how you are loading data without using the crudManager.


Post by rv3 »

Hi ghulam.ghous

Sure no problem.

So like mentioned before we dont make use of the crudManager.
Our event and resource store are configured inside the project property

project:{eventStore:{...}, resourceStore:{...}

We also make use of features like tree and treegroup which we use in the resourceStore

Once all the custom components have been loaded properly, I inject data to each of the stores directly by using xxxStore.loadDataAsync([payload]) for the event store and also for the resource. In between I also use the resourceTimeRangeStore, but I thinks this is not realy relevant to this topic.

Both stores are then "CRUDED" by a customised websocket. WS has been turned off to make sure it has nothing to do with this situation.

The data follows exactly the default structure from bryntum classes, {id, resourceId, startDate, endDate, etc...} for both stores (resourceId is only for the events), so we don't use a standalone assignment store.

UPDATE:: Added a payload for the resourceStore

[
    {
        "name": "TWS - Training",
        "id": "TWS - Training",
        "type": "team",
        "readOnly": true,
        "flex": 3,
        "expanded": true,
        "level": 0,
        "children": [
            {
                "doc_id": 1198,
                "first_name": "Dogan",
                "last_name": "Sirt",
                "avatar": null,
                "username": "51455@users.aisground.com",
                "password": "17f0756073ef88d386a7881675ef1f56:c5d12baba96016caef7f162f77f0aaa0",
                "password_changed_at": null,
                "is_active": true,
                "has_messages": 0,
                "pda_number": null,
                "is_online": false,
                "ping_at": "2025-01-31T10:22:47.702Z",
                "is_system_user": false,
                "device_doc_id": null,
                "company_doc_id": 2,
                "devicetoken": null,
                "parent_doc_id": null,
                "shift_function": "WSS3*@WAT-F",
                "dispo_has_message": 0,
                "default_parent_doc_id": null,
                "id": 1198,
                "name": "Dogan Sirt",
                "startDate": "2025-02-04T14:30:00.000Z",
                "endDate": "2025-02-04T22:30:00.000Z",
                "expanded": true,
                "team_name": "Main",
                "user_team_levels": [
                    "TWS - Training"
                ],
                "eventLayout": "none",
                "level": 1
            }
        ],
        "startDate": "2000-01-31T23:00:00.000Z",
        "endDate": "3000-01-31T23:00:00.000Z"
    },
    {
        "name": "Back office",
        "id": "Back office",
        "type": "team",
        "readOnly": true,
        "flex": 3,
        "expanded": true,
        "level": 0,
        "children": [
            {
                "doc_id": 1026,
                "first_name": "KUBLI",
                "last_name": "ROUVEN",
                "avatar": null,
                "username": "51419@users.aisground.com",
                "password": "f700e71c9188f0cd64f731b30b70ba9c:2ff224364caf0dca79db2a2eec20cd6a",
                "password_changed_at": null,
                "is_active": true,
                "has_messages": 0,
                "pda_number": null,
                "is_online": false,
                "ping_at": null,
                "is_system_user": false,
                "device_doc_id": null,
                "company_doc_id": 2,
                "devicetoken": null,
                "parent_doc_id": null,
                "shift_function": "D92@VADM-F",
                "dispo_has_message": 0,
                "default_parent_doc_id": null,
                "id": 1026,
                "name": "KUBLI ROUVEN",
                "startDate": "2025-02-04T12:30:00.000Z",
                "endDate": "2025-02-04T22:00:00.000Z",
                "expanded": true,
                "team_name": "Main",
                "user_team_levels": [
                    "Back office"
                ],
                "eventLayout": "none",
                "level": 1
            }
        ],
        "startDate": "2000-01-31T23:00:00.000Z",
        "endDate": "3000-01-31T23:00:00.000Z"
    },
    {
        "name": "TWS",
        "id": "TWS",
        "type": "team",
        "readOnly": true,
        "flex": 3,
        "expanded": true,
        "level": 0,
        "children": [
            {
                "doc_id": 1017,
                "first_name": "Nedo",
                "last_name": "Cvijanovic",
                "avatar": null,
                "username": "51400@users.aisground.com",
                "password": "06c18bb64d7f699c9e254459fdd9c519:09ec74a00d78eda41084f24930ecd2ed",
                "password_changed_at": null,
                "is_active": true,
                "has_messages": 0,
                "pda_number": null,
                "is_online": false,
                "ping_at": null,
                "is_system_user": false,
                "device_doc_id": null,
                "company_doc_id": 2,
                "devicetoken": null,
                "parent_doc_id": null,
                "shift_function": "TL3@TOI-F",
                "dispo_has_message": 0,
                "default_parent_doc_id": null,
                "id": 1017,
                "name": "Nedo Cvijanovic",
                "startDate": "2025-02-04T13:00:00.000Z",
                "endDate": "2025-02-04T22:30:00.000Z",
                "expanded": true,
                "team_name": "Main",
                "user_team_levels": [
                    "TWS"
                ],
                "eventLayout": "none",
                "level": 1
            },
            {
                "doc_id": 1020,
                "first_name": "Mohamed",
                "last_name": "Ibrahim",
                "avatar": null,
                "username": "85836@users.aisground.com",
                "password": "7e3188adc8dd46047aa9cb08c995f338:156733eaf4607dafbc8cea383179e30e",
                "password_changed_at": null,
                "is_active": true,
                "has_messages": 0,
                "pda_number": null,
                "is_online": false,
                "ping_at": null,
                "is_system_user": false,
                "device_doc_id": null,
                "company_doc_id": 2,
                "devicetoken": null,
                "parent_doc_id": null,
                "shift_function": "TS2@TOI-F",
                "dispo_has_message": 0,
                "default_parent_doc_id": null,
                "id": 1020,
                "name": "Mohamed Ibrahim",
                "startDate": "2025-02-04T13:45:00.000Z",
                "endDate": "2025-02-04T22:30:00.000Z",
                "expanded": true,
                "team_name": "Main",
                "user_team_levels": [
                    "TWS"
                ],
                "eventLayout": "none",
                "level": 1
            },
            {
                "doc_id": 1021,
                "first_name": "Savo",
                "last_name": "Jevtic",
                "avatar": null,
                "username": "51415@users.aisground.com",
                "password": "dbcf5dfa859382c4f57dfea45406bae2:4224c264fd4b34104b716ca4f3e4bde8",
                "password_changed_at": null,
                "is_active": true,
                "has_messages": 0,
                "pda_number": null,
                "is_online": false,
                "ping_at": "2025-01-23T10:43:01.987Z",
                "is_system_user": false,
                "device_doc_id": null,
                "company_doc_id": 2,
                "devicetoken": null,
                "parent_doc_id": null,
                "shift_function": "WS2@WAT-F",
                "dispo_has_message": 0,
                "default_parent_doc_id": null,
                "id": 1021,
                "name": "Savo Jevtic",
                "startDate": "2025-02-04T14:15:00.000Z",
                "endDate": "2025-02-04T22:45:00.000Z",
                "expanded": true,
                "team_name": "Main",
                "user_team_levels": [
                    "TWS"
                ],
                "eventLayout": "none",
                "level": 1
            }
        ],
        "startDate": "2000-01-31T23:00:00.000Z",
        "endDate": "3000-01-31T23:00:00.000Z"
    },
    {
        "name": "Cabin Cleaning",
        "id": "Cabin Cleaning",
        "type": "team",
        "readOnly": true,
        "flex": 3,
        "expanded": true,
        "level": 0,
        "children": [
            {
                "doc_id": 1132,
                "first_name": "Naumoska",
                "last_name": "Tamara",
                "avatar": null,
                "username": "90116@users.aisground.com",
                "password": "5144f26bb5daf609180f047d08c4828e:d1491aea49f6cc4d8c1df435273a45d2",
                "password_changed_at": null,
                "is_active": true,
                "has_messages": 0,
                "pda_number": null,
                "is_online": false,
                "ping_at": null,
                "is_system_user": false,
                "device_doc_id": null,
                "company_doc_id": 2,
                "devicetoken": null,
                "parent_doc_id": null,
                "shift_function": "S52@GL-F",
                "dispo_has_message": 0,
                "default_parent_doc_id": null,
                "id": 1132,
                "name": "Naumoska Tamara",
                "startDate": "2025-02-04T16:45:00.000Z",
                "endDate": "2025-02-04T23:30:00.000Z",
                "expanded": true,
                "team_name": "Main",
                "user_team_levels": [
                    "Cabin Cleaning"
                ],
                "eventLayout": "none",
                "level": 1,
                "children": [
                    {
                        "doc_id": 1064,
                        "first_name": "Hanen",
                        "last_name": "Khlifi-Ipek",
                        "avatar": null,
                        "username": "21171@users.aisground.com",
                        "password": "7e93626e52eda4d16d014356ed2a1773:b4c40e0a48795dda4ec87c49ed0b0e39",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 0,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1132,
                        "shift_function": "S54@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1132,
                        "id": 1064,
                        "name": "Hanen Khlifi-Ipek",
                        "startDate": "2025-02-03T17:00:00.000Z",
                        "endDate": "2025-02-03T20:00:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    },
                    {
                        "doc_id": 1127,
                        "first_name": "Clifton",
                        "last_name": "Clarke",
                        "avatar": null,
                        "username": "21170@users.aisground.com",
                        "password": "e3e6d97ee07c2b583fde4ee924566c01:a2186f6a3feaee99b44e4e8f19870fd6",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 0,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1132,
                        "shift_function": "S54@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1132,
                        "id": 1127,
                        "name": "Clifton Clarke",
                        "startDate": "2025-02-03T17:00:00.000Z",
                        "endDate": "2025-02-03T20:00:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    },
                    {
                        "doc_id": 1135,
                        "first_name": "Jetishi",
                        "last_name": "Fitore",
                        "avatar": null,
                        "username": "90118@users.aisground.com",
                        "password": "5cff5bb64d24e13cc5a188259feccd6e:d726b0cf8d727bdebb286f9f5ffe240d",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 0,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1132,
                        "shift_function": "S52@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1132,
                        "id": 1135,
                        "name": "Jetishi Fitore",
                        "startDate": "2025-02-04T16:45:00.000Z",
                        "endDate": "2025-02-04T21:30:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    }
                ]
            },
            {
                "doc_id": 1169,
                "first_name": "Ahmed",
                "last_name": "Sayed",
                "avatar": null,
                "username": "90176@users.aisground.com",
                "password": "63d41e5601fa5affc222815b6fd35e88:45c5e730e84ec1488056c8f2e253e542",
                "password_changed_at": null,
                "is_active": true,
                "has_messages": 0,
                "pda_number": null,
                "is_online": false,
                "ping_at": null,
                "is_system_user": false,
                "device_doc_id": null,
                "company_doc_id": 2,
                "devicetoken": null,
                "parent_doc_id": null,
                "shift_function": "S51@GL-F",
                "dispo_has_message": 0,
                "default_parent_doc_id": 1176,
                "id": 1169,
                "name": "Ahmed Sayed",
                "startDate": "2025-02-04T16:00:00.000Z",
                "endDate": "2025-02-05T01:00:00.000Z",
                "expanded": true,
                "team_name": "Main",
                "user_team_levels": [
                    "Cabin Cleaning"
                ],
                "eventLayout": "none",
                "level": 1,
                "children": [
                    {
                        "doc_id": 1056,
                        "first_name": "Valentine",
                        "last_name": "Berisha",
                        "avatar": null,
                        "username": "74794@users.aisground.com",
                        "password": "cd78c2059ed97d2161c6eba17d7546a2:1fbe0d6ee45f4d4b1f732e9b9979a761",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 0,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1169,
                        "shift_function": "S51@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1169,
                        "id": 1056,
                        "name": "Valentine Berisha",
                        "startDate": "2025-02-04T16:00:00.000Z",
                        "endDate": "2025-02-04T21:30:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    },
                    {
                        "doc_id": 1059,
                        "first_name": "AISE",
                        "last_name": "MEMET",
                        "avatar": null,
                        "username": "90065@users.aisground.com",
                        "password": "dc260ab185d28e2662eea9548b5acbde:e114bd628bf0b33855a606de0d75ddd0",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 0,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1169,
                        "shift_function": "S51@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1169,
                        "id": 1059,
                        "name": "AISE MEMET",
                        "startDate": "2025-02-04T17:00:00.000Z",
                        "endDate": "2025-02-04T21:30:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    }
                ]
            },
            {
                "doc_id": 1212,
                "first_name": "FREI",
                "last_name": "MILA",
                "avatar": null,
                "username": "51407@users.aisground.com",
                "password": "26e33d8f49346cbf075dade7402702e4:20e09d4f3dd694aa8abe3be792fffaa7",
                "password_changed_at": null,
                "is_active": true,
                "has_messages": 0,
                "pda_number": null,
                "is_online": false,
                "ping_at": null,
                "is_system_user": false,
                "device_doc_id": null,
                "company_doc_id": 2,
                "devicetoken": null,
                "parent_doc_id": null,
                "shift_function": "S51@GL-F",
                "dispo_has_message": 0,
                "default_parent_doc_id": 1132,
                "id": 1212,
                "name": "FREI MILA",
                "startDate": "2025-02-04T16:00:00.000Z",
                "endDate": "2025-02-05T01:00:00.000Z",
                "expanded": true,
                "team_name": "Main",
                "user_team_levels": [
                    "Cabin Cleaning"
                ],
                "eventLayout": "none",
                "level": 1
            },
            {
                "doc_id": 1248,
                "first_name": "Dayana",
                "last_name": "Cuesta",
                "avatar": null,
                "username": "90173@users.aisground.com",
                "password": "53229edf2a8a3b740d7759ec60b7bd35:ce884d9b6f05aac454473f9e1d6d4a82",
                "password_changed_at": null,
                "is_active": true,
                "has_messages": 0,
                "pda_number": null,
                "is_online": false,
                "ping_at": null,
                "is_system_user": false,
                "device_doc_id": null,
                "company_doc_id": 2,
                "devicetoken": null,
                "parent_doc_id": null,
                "shift_function": "S54@GL-F",
                "dispo_has_message": 0,
                "default_parent_doc_id": null,
                "id": 1248,
                "name": "Dayana Cuesta",
                "startDate": "2025-02-04T16:45:00.000Z",
                "endDate": "2025-02-04T23:30:00.000Z",
                "expanded": true,
                "team_name": "Main",
                "user_team_levels": [
                    "Cabin Cleaning"
                ],
                "eventLayout": "none",
                "level": 1,
                "children": [
                    {
                        "doc_id": 1112,
                        "first_name": "Tsige",
                        "last_name": "Tesfasilase",
                        "avatar": null,
                        "username": "21166@users.aisground.com",
                        "password": "d78f6fafc81b3085394ec717bdcb7af3:8a497cf64de1ca75a1d684bec759b219",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 0,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1248,
                        "shift_function": "S54@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1248,
                        "id": 1112,
                        "name": "Tsige Tesfasilase",
                        "startDate": "2025-02-04T15:45:00.000Z",
                        "endDate": "2025-02-04T19:30:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    },
                    {
                        "doc_id": 1148,
                        "first_name": "Ferreira",
                        "last_name": "Maria",
                        "avatar": null,
                        "username": "90128@users.aisground.com",
                        "password": "5c81fdf223930865c29a759c0a9f02ae:73ee66370f2eb437c99cb79e0d6926b3",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 0,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1248,
                        "shift_function": "S54@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1248,
                        "id": 1148,
                        "name": "Ferreira Maria",
                        "startDate": "2025-02-04T15:45:00.000Z",
                        "endDate": "2025-02-04T19:30:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    },
                    {
                        "doc_id": 1173,
                        "first_name": "Halili",
                        "last_name": "Irisha",
                        "avatar": null,
                        "username": "90186@users.aisground.com",
                        "password": "844bbbbabff0c8976914979bcb648a14:d239d926a7dc9c94f6b8d7cb29cf5bfc",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 0,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1248,
                        "shift_function": "S53@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1248,
                        "id": 1173,
                        "name": "Halili Irisha",
                        "startDate": "2025-02-03T17:00:00.000Z",
                        "endDate": "2025-02-03T20:00:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    },
                    {
                        "doc_id": 1181,
                        "first_name": "Mirlinda",
                        "last_name": "Azemi",
                        "avatar": null,
                        "username": "21178@users.aisground.com",
                        "password": "2df6b9ea3430221d1736eecd2db5ef72:3d775b1bb1c5340493853785e4d717a4",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 2,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": "2025-01-15T21:10:51.989Z",
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1248,
                        "shift_function": "S53@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1248,
                        "id": 1181,
                        "name": "Mirlinda Azemi",
                        "startDate": "2025-02-03T17:00:00.000Z",
                        "endDate": "2025-02-03T20:00:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    },
                    {
                        "doc_id": 1182,
                        "first_name": "Elisa",
                        "last_name": "Romano",
                        "avatar": null,
                        "username": "90196@users.aisground.com",
                        "password": "6d7c137712eca66bcd8eaa59df06911f:8f2ada4c93778b237fc8758a8fcf28f1",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 2,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1248,
                        "shift_function": "S53@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1248,
                        "id": 1182,
                        "name": "Elisa Romano",
                        "startDate": "2025-02-03T17:00:00.000Z",
                        "endDate": "2025-02-03T20:00:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    },
                    {
                        "doc_id": 1252,
                        "first_name": "Vanesa",
                        "last_name": "Bartolome",
                        "avatar": null,
                        "username": "90197@users.aisground.com",
                        "password": "65313a95cc226f96e45282c9d37b7440:7cfb450447f39bcb8bc263a3b67ab8ac",
                        "password_changed_at": null,
                        "is_active": true,
                        "has_messages": 0,
                        "pda_number": null,
                        "is_online": false,
                        "ping_at": null,
                        "is_system_user": false,
                        "device_doc_id": null,
                        "company_doc_id": 2,
                        "devicetoken": null,
                        "parent_doc_id": 1248,
                        "shift_function": "S53@CL-F",
                        "dispo_has_message": 0,
                        "default_parent_doc_id": 1248,
                        "id": 1252,
                        "name": "Vanesa Bartolome",
                        "startDate": "2025-02-03T17:00:00.000Z",
                        "endDate": "2025-02-03T20:00:00.000Z",
                        "expanded": true,
                        "team_name": "Main",
                        "user_team_levels": [
                            "Main"
                        ],
                        "eventLayout": "none",
                        "level": 2
                    }
                ]
            }
        ],
        "startDate": "2000-01-31T23:00:00.000Z",
        "endDate": "3000-01-31T23:00:00.000Z"
    }
]

Post by ghulam.ghous »

Thanks for sharing it. Really appreciate it. Everything is clear now. This is an issue with syncDataOnLoad configuration on resourceStore. I am able to reproduce the issue even with the crudManager now. For some reason the assignments are not being updated when resource store is configured with syncDataOnLoad to true. I have filed a ticket here to investigate the issue. https://github.com/bryntum/support/issues/10745. I have tried to figured out the workaround but was not able to find one. The only thing is setting syncDataOnLoad to false. But ofcourse that might mess up your use case. And apologies for suggesting removeUnassinedEvent config earlier. That does not suppose to work in legacy mode (when resource id is used) and also the event assignments were not being removed so that became irrelevant.


Post Reply