Our state of the art Gantt chart


Post by erhanzeyrek »

Hello,

I am trying to integrate CRUD manager to my project developed with vue. I am calling
gantt.project.sync()
with a button click. When i click sync button without any changes on tasks, sync() request adds to request payload all of my tasks and treats they were updated. But nothing changed. What is causing this?
taskUpdate.png
taskUpdate.png (34.82 KiB) Viewed 949 times
Here is my ganttconfig;
var ganttConfig = {
        startDate: '2019-01-06 00:00',
        project: new ProjectModel({
          taskModelClass: Task,
          transport: {
            load: {
              url: Vue.http.options.root + '/api/Planlama/UretimPlanlama/GorevleriGetir',
              requestConfig: {
                fetchOptions: {
                  credentials: 'omit'
                }
              }
            },
            sync: {
              url: Vue.http.options.root + '/api/Planlama/UretimPlanlama/GorevleriGuncelle',
              requestConfig: {
                fetchOptions: {
                  credentials: 'omit',
                  headers: {
                    'Content-Type': 'application/json'                   
                  },
                }
              }
            }
          }
        }),

        columns: [
          { type: 'isemrino', field: 'isemrino', text: 'İŞ EMRİ NO'},
          { type: 'name', width: 250 },
          { type: 'startdate' },
          { type: 'enddate' },
          { type: 'duration' },
          { type: 'durum', field: 'durum', text: 'DURUM'},
          { type: 'kaynaklarkolonu', width: 200, text: 'KAYNAKLAR' },
          { type: 'addnew' }
        ], // eo columns

        subGridConfigs: {
          locked: {
            flex: 1
          },
          normal: {
            flex: 2
          }
        },
        columnLines: false,

        features: {
          filter: true,
          timeRanges: {
            showHeaderElements: true,
            showCurrentTimeLine: true
          },
          labels: {
            left: {
              field: 'name',
              editor: {
                type: 'textfield'
              }
            }
          },
          taskEdit: {
            tabsConfig: {
              hareketlertab: {type: 'hareketlertab'}
            }
          }

        }

      } // eo ganttConfig

Post by erhanzeyrek »

Okay i found the problem. Gantt is automatically sets project start date by my task data sent from server. When gantt fetches data, takes earliest task of the fetched data. After binding data to the gantt chart, other tasks start and end dates changing in the background (because of project start date changing). So sync action "normally" treats all tasks as updated.

I solved the problem by setting all tasks manuallyScheduled propery to true.

Post Reply