Our state of the art Gantt chart


Post by shaveta »

alex.l wrote: Wed Sep 09, 2020 10:10 am

Hi shaveta,

An example, mentioned above does have this implemented. Please, review it to see how it can be done.
Shortly, revision behaviour should be implemented by yourself on server side.

All best,
Alex

i have reviewed, in that example from client side revision id is passed automatically with data, do i need to enable it by making some changes in my code for client side?


Post by saki »

Yes your server side needs to check the revision and reject outdated requests. In the aforementioned example it is this PHP code:

    public function checkRevision($revision)
    {
        if ($revision && $this->getRevision() > intval($revision)) {
            throw new Exception('Client data snapshot is outdated please reload you stores before.', E_APP_OUTDATED_REVISION);
        }
    }

Note: You could ignore the revision whatsoever but it is not recommended.


Post by shaveta »

saki wrote: Wed Sep 09, 2020 4:05 pm

Yes your server side needs to check the revision and reject outdated requests. In the aforementioned example it is this PHP code:

    public function checkRevision($revision)
    {
        if ($revision && $this->getRevision() > intval($revision)) {
            throw new Exception('Client data snapshot is outdated please reload you stores before.', E_APP_OUTDATED_REVISION);
        }
    }

Note: You could ignore the revision whatsoever but it is not recommended.

Thanks!! but my question is from client side i don't see revision sent to server..
In your example it is sending revision from front end at start

gnt.png
gnt.png (46.26 KiB) Viewed 844 times

Post by fabio.mazza »

shaveta, you can check informations about revision here: https://www.bryntum.com/docs/scheduler/#Scheduler/crud/AbstractCrudManager#property-revision

Also the blog post that explain about crud manager: https://www.bryntum.com/blog/introducing-the-crud-manager/

But basically the revision was sent on parameter, because it come from server.

  1. You load the data on launch app
  2. Your server data come with revision field with a revision number
  3. On sync, gantt will send data and also send this revision number received by server

Try to send revision by your server when load the data always on load and on save, then you will see it coming together with data on parameters when you call the request by project.sync method.

Best regards,
Fabio


Post by shaveta »

fabio.policeno wrote: Wed Sep 09, 2020 7:40 pm

shaveta, you can check informations about revision here: https://www.bryntum.com/docs/scheduler/#Scheduler/crud/AbstractCrudManager#property-revision

Also the blog post that explain about crud manager: https://www.bryntum.com/blog/introducing-the-crud-manager/

But basically the revision was sent on parameter, because it come from server.

  1. You load the data on launch app
  2. Your server data come with revision field with a revision number
  3. On sync, gantt will send data and also send this revision number received by server

Try to send revision by your server when load the data always on load and on save, then you will see it coming together with data on parameters when you call the request by project.sync method.

Thanks!!


Post Reply