Our state of the art Gantt chart


Post by bjork »

Hello!

I'm wondering how I initialize the ganttcrudmanager? I can't even seem to find the class under the Bryntum namespace.. A guide of how to work with the ganttcrudmanager would be very helpful..

(I'm using ExtJs modern and BOTH scheduler and gantt components)

Post by pmiklashevich »

Hello,

Please see the guides here:
https://www.bryntum.com/docs/gantt/#guides/project_data.md
https://www.bryntum.com/docs/gantt/#guides/crud_manager.md

You can also refer to our demos, for example PHP demo shows how to work with data.

If you have some more specific questions, feel free to create a thread and we will try to help you asap

Cheers,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by bjork »

Thank you. I've gotten pretty much everything to work with crud but I'm still having some troubles configuring the fetchOptions. How would you edit the php-demo to change the fetchOptions (specifically the credentials part)? Can it be done on the transport object itself or do you have to access each individual store and change it there? If you could give an example with the php-demo as base that would be very helpful.

Post by pmiklashevich »

It's not supported at the moment. Ticket here: https://app.assembla.com/spaces/bryntum/tickets/9067-crud-manager-should-support-fetchoptions/details
Thanks for the report!

When ticket is done it should be possible to configure transport like:
    transport      : {
        load : {
            requestConfig : {
                fetchOptions : {
                    credentials: 'include'
                }
            },
            url : 'php/load.php'
        }
    },

Pavlo Miklashevych
Sr. Frontend Developer


Post by bjork »

Will this be in the next Gantt release?

Post by pmiklashevich »

It's going to be available in a nightly build later this week. Stay tuned!

Pavlo Miklashevych
Sr. Frontend Developer


Post by bjork »

Is it available in the Gantt 1.1.5? I see that it is added in the scheduler 2.2.4 but am specifically wondering about the Gantt..

Post by pmiklashevich »

Sure, Scheduler.data.CrudManager implements Scheduler.crud.transport.AjaxTransport abstract class, please see https://www.bryntum.com/docs/gantt/#Scheduler/data/CrudManager#config-transport
So yes, it's available in Gantt now. To use it please set up requestConfig for load/sync as shown on the code snippet above.

Pavlo Miklashevych
Sr. Frontend Developer


Post by bjork »

Ok, I think I found the issue (a misspelled key). In your class AjaxHelper the following lines of code can be found:
    static fetch(url, options = {}) {
        const
            controller = new AbortController();
        options.signal = controller.signal;

        if (!('credentitals' in options)) {
            options.credentials = 'include';
        }
Since 'credentitals' is never found in the object the last thing the fetch-option does is to add credentials:include on the request. Took me good while to find this bug :)

Post by mats »

Sorry for that typo, I've corrected it now:
if (!('credentitiaiaiiaiaitals' in options)) {

}
😄

Post Reply