Our state of the art Gantt chart


Post by jhunnie20 »

Hi,

I had configured the gantt chart with server side saving of data to database, The problem is when I try to click "Create" it saves new data, and then when I edit this row created then I try to refresh to refetch the data I get to different record: the one which has a label "New Task" and another which contains my last edit to it?

Did I misconfigure something ? or it might be a bug to the application ?

Looking forward..

Thanks

J

Post by pmiklashevich »

Can you reproduce with our PHP demo locally? In examples/php/app.js please add
const project = window.project = new ProjectModel({
    autoSync : true, // to sync automatically
    ...

Pavlo Miklashevych
Sr. Frontend Developer


Post by jhunnie20 »

I already set autoSync to `true`. Id like to describe the scenario: so after page load of brynthum gantt chart I now click "Create" then it was saved on our database, How are you identifying that this data was already added in database ? so that the next time I do changes it will update it.. What happens in my end is when I create new then edit the data immediately then refresh it shows 2 new row added on db.

Post by pmiklashevich »

Hello,

I cannot reproduce your issue. Please make sure you're using the latest product, get PHP demo running, set "autoSync : true" on ProjectModel and run examples/php/sql/setup.sql script to get the data reset. Now open PHP demo in a browser tab and click Create button.
2019-07-11_1115.png
2019-07-11_1115.png (244.8 KiB) Viewed 1487 times
See a new line is added and a cell editor is opened. Rename new event name to "test" and click Enter.
2019-07-11_1117.png
2019-07-11_1117.png (16.62 KiB) Viewed 1487 times
Please see 2 ajax requests have been sent. The first one is to create a new event, and the second one is to update the newly created event.
2019-07-11_1120.png
2019-07-11_1120.png (132.34 KiB) Viewed 1487 times
How are you identifying that this data was already added in database?
I get an access to the database and see what data is in a specific table. Please see there is only one line added.
2019-07-11_1122.png
2019-07-11_1122.png (39.35 KiB) Viewed 1487 times
And now when you reload the page only "test" event is there except of the default records of course.
2019-07-11_1123.png
2019-07-11_1123.png (194.92 KiB) Viewed 1487 times
Please repeat the steps above and let me know if it works for you the same way.

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by pmiklashevich »

Most likely your server response format is not correct. Please check out this guide to make sure your server response fits the requirements: https://www.bryntum.com/docs/gantt/#guides/crud_manager.md

You can also compare your response with what we have in our demo. Cheers!

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply