Greetings, currently I want to view gantt based on project id. I manage to do it. I have updated latest version of dhtmlxGantt. This is my source code in GanttController.php. By the way, I am using Laravel Connector. But the current problem is I am trying to save new changes made in the gantt html page. It seems not working. I have read Gantt API,but I am so confused right now. Please guide. Which method should i use onAfterTaskUpdate or onBeforeTaskUpdate.? or need to use dataprocessor API? Below is the source code and screenshot of error.
$connector->render_links(
GanttLink::where('project_id','=',2)->get(),
"id",
"source,target,type,project_id"
);
$connector->render_table(
GanttTask::where('project_id','=',2)->get(),
"id",
"start_date,duration,text,progress,parent,project_id"
);
Gantt.html
<div id="gantt_here" style='width:100%; height:250px;margin-top:50px;'></div>
<script type="text/javascript">
//gantt.config.xml_date = "%Y-%m-%d %H:%i:%s";
gantt.config.xml_date="%Y-%m-%d %H:%i";
gantt.config.step = 1;
gantt.config.scale_unit= "day";
gantt.init("gantt_here", new Date(2010,7,1), new Date(2010,8,1));
gantt.load("./gantt_data", "xml");
gantt.attachEvent("onAfterTaskUpdate", function(id,item){
gantt.updateTask(id);
});
var dp = new dataProcessor("./gantt_data");
dp.init(gantt);
</script>
Google Chrome Console