Page 1 of 2

Integrate Gantt with Sencha modern toolkit

Posted: Thu Dec 08, 2022 10:08 am
by pincherhgz

we have problems to integrate the gantt package into out EXT 7.6 app. The example for the sencha modern integration does not fit with the 7.6 structure. Is there an update example available, also needed entries for the app.json would be appreciated
Please also advise which of the minimized packages should be integrated


Re: Integrate Gantt with Sencha modern toolkit

Posted: Sun Dec 11, 2022 11:22 pm
by dongryphon

Looking at the Sencha 7.6 docs, this does not appear to be different than the extjsmodern example for Gantt.

What specifically are you using on the Sencha side?


Re: Integrate Gantt with Sencha modern toolkit

Posted: Mon Dec 12, 2022 8:09 am
by pincherhgz

first of all the structure inside app is different, see screenshot_1.
we did copy the Bryntum folder to app otherwise there are other errors, we should remove it from there
moving it into the new structure and changing the class names results in this error message of cmd, see screenshot_2 (please advice which minimized js we have to add to the app.json)
the complete app you can download from:
https://www.dropbox.com/s/km3h1t9dsdsqrgc/Scheduling.zip?dl=0
thanks


Re: Integrate Gantt with Sencha modern toolkit

Posted: Mon Dec 12, 2022 1:47 pm
by arcady

It looks you don't load Gantt bundle considering "bryntum is not defined" exception. Try adding it to your app.json ?

    "js": [
        {
            "path": "src/gantt/build/gantt.umd.js"
        },
        ........
    ],

And you of course need to load respective css-files too:

    "css": [
        {
            "path": "src/gantt/build/gantt.stockholm.css"
        },
        ....
    ],

Re: Integrate Gantt with Sencha modern toolkit

Posted: Mon Dec 12, 2022 2:04 pm
by pincherhgz

as you can see from the attached screenshot, the resources are loaded now but still we have the error:
Uncaught ReferenceError: bryntum is not defined


Re: Integrate Gantt with Sencha modern toolkit

Posted: Mon Dec 12, 2022 2:18 pm
by mats

Please attach call stack too?


Re: Integrate Gantt with Sencha modern toolkit

Posted: Mon Dec 12, 2022 2:33 pm
by pincherhgz

I assume that is not exactly what you expect, but thats all we have, see screenshot


Re: Integrate Gantt with Sencha modern toolkit

Posted: Mon Dec 12, 2022 2:42 pm
by arcady

Please provide a test application so we could reproduce the issue.


Re: Integrate Gantt with Sencha modern toolkit

Posted: Mon Dec 12, 2022 4:05 pm
by arcady

Ok I've got your test case ..I'm removing the post since it includes our sources.


Re: Integrate Gantt with Sencha modern toolkit

Posted: Mon Dec 12, 2022 4:26 pm
by arcady

Checked your test case.
After running sencha app watch in the application folder I saw a lot of closure compiler errors on gantt.wc.module.min.js that for some reason was at app\Bryntum folder which makes no sense since the folder is meant to be used for your application classes using Ext JS syntax.

So I removed the file and restarted the command.. This time the compiler showed a lot of errors on Bryntum/gantt.umd.js file.

To get rid of the errors I simply marked the file as not included to the final application bundle (you may try finding another way to resolve this issue ..I don't know Sencha Cmd compression setting that well).

    "js": [
        {
            "path": "Bryntum/gantt.umd.js",
            "includeInBundle": false
        },
        {
            "path": "${framework.dir}/build/ext-modern-all-debug.js"
        },
        {
            "path": "app.js",
            "bundle": true
        }
    ],

And after doing this the command started to work for me. Yet there were some missing files required by CSS-stylesheet but I suppose you can fix this yourself.