Our state of the art Gantt chart


Post by rahulranjan »

Hi
I want to implement curd manager to update, retrieve , delete and insert into db
I tried but not getting through docs.
here is the code
const crudManager = new CrudManager({
      transport: {
        sync: {
          url: 'php/save.php'
        }
      }
    });
    crudManager.sync().
      // no load errors occurred
      then((response) => {
        console.log('Curd' + response);
      }).
      // loading failed
      catch(response => {
        // show notification with error message
        Toast.show(response && response.message || 'Unknown error occurred');
      });
    const project = new ProjectModel({
      tasksData: info.data.tasks.rows,
      resourcesData: info.data.resources.rows,
      assignmentsData: info.data.assignments.rows,
      dependenciesData: info.data.dependencies.rows,
      //eventModelClass: Task,
    });
    // let [button1, button2] = WidgetHelper.append([
    //   {
    //     type: 'button', icon: 'user',
    //     text: 'Data Summarize'
    //   },
    //   {
    //     type: 'button', icon: 'user',
    //     text: 'Schedule Check'
    //   },
    // ], { appendTo: this.elementRef.nativeElement.firstElementChild });
    const gantt = new Gantt({
      project: project,
      ...ganttConfig,
      crudManager,
      responsiveLevels: {
        small: {
          levelWidth: 600,
          rowHeight: 30,
          barMargin: 0
        },
        normal: {
          levelWidth: '*',
          rowHeight: 50,
          barMargin: 10
        }
      }
    }),
      tbar = ganttToolbar(gantt)
    let config = {
      appendTo: this.elementRef.nativeElement.firstElementChild,
      widgets: [gantt],
      tbar,
      listeners: {
        hasListener(eventName) {
          console.log(eventName);
        },
        catchAll(event) {
          console.log('TEST00');
          console.log(event);
          console.log('Test001')
        }

      }
    };
    // panel renders to this component's element
    new Panel(config);
  }

Post by mats »

1. Please always use CODE tags when posting code.
2. Please explain what this means. " I tried but not getting through docs. "

Post by rahulranjan »

mats wrote: Sun May 19, 2019 3:33 pm 1. Please always use CODE tags when posting code.
2. Please explain what this means. " I tried but not getting through docs. "
Hi mats
I am trying to implement curd manger . How can i achieve that . Can you please let me know with sample code thanks.

Post Reply