Page 1 of 2

How to use the GanttCrudManager?

Posted: Thu Aug 15, 2019 1:42 pm
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)

Re: How to use the GanttCrudManager?

Posted: Thu Aug 15, 2019 2:43 pm
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

Re: How to use the GanttCrudManager?

Posted: Fri Aug 16, 2019 3:11 pm
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.

Re: How to use the GanttCrudManager?

Posted: Fri Aug 16, 2019 4:13 pm
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'
        }
    },

Re: How to use the GanttCrudManager?

Posted: Mon Aug 26, 2019 1:36 pm
by bjork
Will this be in the next Gantt release?

Re: How to use the GanttCrudManager?

Posted: Tue Aug 27, 2019 10:28 am
by pmiklashevich
It's going to be available in a nightly build later this week. Stay tuned!

Re: How to use the GanttCrudManager?

Posted: Wed Sep 11, 2019 2:26 pm
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..

Re: How to use the GanttCrudManager?

Posted: Wed Sep 11, 2019 8:35 pm
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.

Re: How to use the GanttCrudManager?

Posted: Thu Sep 12, 2019 9:46 am
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 :)

Re: How to use the GanttCrudManager?

Posted: Thu Sep 12, 2019 10:53 am
by mats
Sorry for that typo, I've corrected it now:
if (!('credentitiaiaiiaiaitals' in options)) {

}
😄