Our state of the art Gantt chart


Post by tikhonov.a.p »

Good afternoon, there is the following situation.

  1. The backend returns a response to load with slightly inconsistent data, incorrect dates
  2. After downloading, gantt fixes them, which is true.
  3. However, an attempt to save the corrected data (sync()) does not lead to anything.

Can you tell me if it is possible to force the entire store to be resaved? To correct the "wrongness" of the data


Post by mats »

That should happen automatically, any chance you can drop us a small test case with data so we can debug it?


Post by tikhonov.a.p »

Yes, on the UI it happens automatically.
However, these changes are not considered changes (an empty array is returned if gantt.project.changes is requested)

As a consequence gantt.project.sync does nothing

I need fixes that become visible on the UI to be written to the backend


Post by marcio »

Hey tikhonov.a.p,

Perhaps a possible approach would be to listen to dataReady event (when all the calculations are done) https://www.bryntum.com/docs/gantt/api/Gantt/model/ProjectModel#event-dataReady

And then use the sync method here https://www.bryntum.com/docs/gantt/api/Scheduler/crud/AbstractCrudManagerMixin#function-sync

Also, a good place to look would be the autosync config https://www.bryntum.com/docs/gantt/api/Scheduler/crud/AbstractCrudManagerMixin#config-autoSync

But as Mats suggested, a sample project with sample data would be really nice and would make it easier for us to assist you.

Best regards,
Márcio


Post Reply