Our pure JavaScript Scheduler component


Post by zvondic »

I have EXTJS DEMO modern application created with ext-gen app -i command. I add implementation of bryntum scheduler for two panel. When i show first all is ok. When i click to second an error appears.
Can you help me ?

Thanks Josef.

WIN10, Chrome,NODEJS v10.16.3, npm 6.9.0. EXTJS 7.0.0.156

Step to reproduce:
1. Download zip from https://www.prosoft.cz/down/extjsmodern.zip
2. Unzip
3. Run npm start in extjsmodern directory
4. App is started in default browser.
5. Click on Home and Bryntum scheduler will be shown.
6. Click on Personnel and error apearrs:
TypeError: Cannot set property 'eventStore' of undefined
    at constructor.proto.<computed> [as setEventStore] (https://localhost:1962/app/desktop/src/view/Bryntum/SchedulerPanel.js?_dc=1572957536466:301:35)
    at Ext.Configurator.configure (https://localhost:1962/node_modules/@sencha/ext-core/src/class/Configurator.js?_dc=1572957536468:652:44)
    at constructor.initConfig (https://localhost:1962/node_modules/@sencha/ext-core/src/class/Base.js?_dc=1572957536467:1650:17)
    at constructor (https://localhost:1962/node_modules/@sencha/ext-core/src/mixin/Observable.js?_dc=1572957536467:437:20)
    at constructor (https://localhost:1962/node_modules/@sencha/ext-core/src/Widget.js?_dc=1572957536467:617:42)
    at constructor.callParent (https://localhost:1962/node_modules/@sencha/ext-core/src/class/Base.js?_dc=1572957536467:1479:32)
    at constructor (https://localhost:1962/node_modules/@sencha/ext-modern/src/Component.js?_dc=1572957536467:1010:12)
    at constructor.callParent (https://localhost:1962/node_modules/@sencha/ext-core/src/class/Base.js?_dc=1572957536467:1479:32)
    at constructor (https://localhost:1962/node_modules/@sencha/ext-modern/src/Container.js?_dc=1572957536466:474:12)
    at new Bryntum.SchedulerPanel (https://localhost:1962/node_modules/@sencha/ext-core/src/class/Class.js?_dc=1572957536467:44:37)

Post by pmiklashevich »

Hello,

Your testcase is not runnable. I see lots of errors when I run "npm start" (though I fixed some of them related to permissions). Debugging user applications cannot be done in scope of the forum support, only as a part of professional services: https://www.bryntum.com/services/

Back to your issue (having 2 schedulers on the same page), first please try to reproduce the issue with our demos. Please modify provided extjsmodern example and add the second instance of the scheduler there. Let us know how it works for you. For example:
// examples/extjsmodern/App/view/Main.js line 106
// copy-paste scheduler component definition and rename the title
{
            title     : 'Second Scheduler',
            xtype     : 'schedulerpanel',
            reference : 'schedulerPanel',
            flex      : 1,
            barMargin : 0,
            header    : {
                items: [{
                    xtype    : 'spinnerfield',
                    label    : 'Row height',
                    width    : '12.5em',
                    bind     : '{rowHeight}',
                    minValue : 20
                }, {
                    xtype   : 'button',
                    iconCls : 'b-fa b-fa-plus',
                    text    : 'Add Task',
                    ui      : 'action',
                    handler : 'addTask'
                }, {
                    xtype   : 'button',
                    iconCls : 'b-fa b-fa-plus',
                    text    : 'Add Time Range',
                    ui      : 'action',
                    handler : 'addTimeRange'
                }]
            },

            bind : {
                rowHeight : '{rowHeight}'
            },

            eventStore : {
                readUrl  : 'data/events.json',
                autoLoad : true
            },

            resourceStore : {
                readUrl  : 'data/resources.json',
                autoLoad : true
            },

            // features : {
            //     eventTooltip : true
            // },

            columns : [
                { text : 'Name', field : 'name', width : 130, locked : true }
            ],

            startDate  : new Date(2018, 3, 1, 6),
            endDate    : new Date(2018, 3, 1, 20),
            viewPreset : 'hourAndDay',

            eventRenderer : 'eventRenderer'
        }
Please see there is no errors in console, 2 schedulers are on the screen.
Снимок экрана 2019-11-05 в 18.08.13.png
Снимок экрана 2019-11-05 в 18.08.13.png (250.68 KiB) Viewed 2447 times
It would be nice if you try to use sencha bundles (i.e. ext-modern-all.js) in your future testcases like we do in our examples. Sencha cmd application adds complexity and instead of debugging the issue we have to deal with the whole application. Test case should be as simple as possible and has minimal code to reproduce the issue.

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by zvondic »

Hi Pavel,
sorry for my incompetence :-).
So next attempt.
I have a ViewPort with center container which has layout='card' and schedulers can be switched in this container by buttons in header.
I have two scheduler's panels !!! Main.js and Main1.js
1. When i click to 1. button 1. scheduler appears.
2. You have to reload application and click to 2. button and 2. scheduler appears.
It means both scheduler panels are working right.
3. To invoke error you have to click to 2. button when is 1. scheduler is shown and conversely.

I modified your example extjsmodern.

Thanks for your help.
Josef
Attachments
extjsmodern.zip
(6.34 MiB) Downloaded 121 times

Post by pmiklashevich »

Thank you for the report! Ticket here: https://app.assembla.com/spaces/bryntum/tickets/9449-extjs-modern-demo--not-possible-to-create-more-than-one-instance-dynamically/details

That's a demo issue, the bug is in the wrapper. We will contact as soon as we have a solution for you. Stay tuned!

Pavlo Miklashevych
Sr. Frontend Developer


Post by zvondic »

Any news on this?

Post by zvondic »

Any news on this? :-)

Post by Maxim Gorkovsky »

Hello.
No, there are no news yet on this, I'm afraid.

Post by zvondic »

Hi Maxim,

thanks for response.

And is any time frame when will integration BRCH 2.3 with EXTJS MODERN correctly working ?
Now it is unusable.
Thanks Josef.

Post by zvondic »

Any news on this?

Post by mats »

We'll look into this for the 3.0.2 release!

Post Reply