Our state of the art Gantt chart


Post by erhanzeyrek »

Hi,

I am trying to integrate CRUD manager to my gantt and i didn't succeeded with it. When i send sync request to my server, the returning response was doesn't update client's data store.

Here's my sync request and response;

request;
{
    "type": "sync",
    "requestId": "15784059162812",
    "tasks": {
        "updated": [
            {
                "endDate": "2019-09-18T18:00:00.000Z",
                "duration": 43.541666666666664,
                "id": "d6ebd601-31aa-e911-80ec-000c29e68256"
            },
            {
                "startDate": "2019-08-21T21:00:00.000Z",
                "endDate": "2019-09-18T18:00:00.000Z",
                "id": "daebd601-31aa-e911-80ec-000c29e68256"
            }
        ]
    }
}
response;
{
    "success": true,
    "requestId": "15784059162812",
    "tasks": {
        "rows": [
            {
                "id": "d6ebd601-31aa-e911-80ec-000c29e68256"
            },
            {
                "id": "daebd601-31aa-e911-80ec-000c29e68256"
            }
        ]
    }
}
Also, i want information about how data syncing lifecycle goes. I changed a task's start date and I write taskStore.data to the console before sync and after sync. I see the state of taskStore.data has no changes with my selected date after synchronization. I am doing this operation on Vue mounted event with this code:
panel.tbar.widgetMap.saveAllButton.on('click', function() {
        console.log("store before sync")
        console.log(project.taskStore.data)
        vueBase.$store.commit('ataYuklemeEkrani', true)
        project.sync().then(
          () => {
            console.log("store after sync")
            console.log(project.taskStore.data)
            //stm.resetQueue()
            Toast.show('Bilgiler kaydedildi...')
            vueBase.$store.commit('ataYuklemeEkrani', false)
          },
          ({ response, cancelled }) => {
            Toast.show(
              'Bilgiler kaydedilirken bir hata oluştu: ' +
                response.response.message
            )
            vueBase.$store.commit('ataYuklemeEkrani', false)
          }
        )
      })

Post by mats »

Did you our CrudManager data integration guide? https://bryntum.com/docs/gantt/#guides/crud_manager.md

Post by erhanzeyrek »

Hi Mats.

I read the guide and i think my request and response is correct according the CRUD guide. What is your opinion about my sync request and responses that i shared above?

Post by sergey.maltsev »

Hi!

Server request/response processing depends on Task models which is used in your application.
This also affects data format which should be used.
It is hard to say what's wrong with your response/request while we have no sample app to check.

I suggest you to check this examples/php demo within distribution zip package which shows how server back-end can be used with CRUD Manager.
This demo is not viewable online so you should prepare your local environment to use it.
Please see examples/php/readme.md for instructions.

You could enable additional logging and/or check Network tab in Browser's development console to see requests and responses.

Post by erhanzeyrek »

Hi Sergey,

How can i obtain php demo? I can't see clickable links in your answer.

Post by sergey.maltsev »

Hi!

Demo is available within distribution zip package you downloaded (trial or full).
See examples/php folder.

Post Reply