|
|
|
@ -23,15 +23,6 @@ gantt.ajax.get({
|
|
|
|
|
gantt.parse(data); |
|
|
|
|
}); |
|
|
|
|
if (Date.now() < timestamp) { |
|
|
|
|
expandTask(); |
|
|
|
|
var allTasks = []; |
|
|
|
|
var taskCount = gantt.getTaskCount(); |
|
|
|
|
|
|
|
|
|
for (var i = 0; i < taskCount; i++) { |
|
|
|
|
var task = gantt.getTaskByIndex(i); |
|
|
|
|
allTasks.push(task); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
gantt.ajax.post({ |
|
|
|
|
headers: { |
|
|
|
|
"Content-Type": "application/json", |
|
|
|
@ -134,12 +125,6 @@ var dp = gantt.createDataProcessor(function(entity, action, data, id) {
|
|
|
|
|
let startDate = moment(data.start_date, "YYYY-MM-DD"); |
|
|
|
|
// data['start_date'] = startDate.format("YYYY-MM-DD")+" 00:00:00+07";
|
|
|
|
|
let endDate = moment(data.end_date, "YYYY-MM-DD"); |
|
|
|
|
data['end_date'] = endDate.format("YYYY-MM-DD")+" 23:59:59+07"; |
|
|
|
|
let newDuration = gantt.calculateDuration({ |
|
|
|
|
start_date: new Date(data['start_date']), |
|
|
|
|
end_date: new Date(data['end_date']) |
|
|
|
|
}) |
|
|
|
|
data['duration'] = newDuration; |
|
|
|
|
|
|
|
|
|
if(startDate > endDate){ |
|
|
|
|
gantt.alert({ |
|
|
|
@ -176,11 +161,13 @@ var dp = gantt.createDataProcessor(function(entity, action, data, id) {
|
|
|
|
|
let responseText = JSON.parse(response.responseText) |
|
|
|
|
let resData = responseText |
|
|
|
|
let updateBobot = resData.update_bobot || false |
|
|
|
|
if(parent && parent > 0){ |
|
|
|
|
if (updateBobot) { |
|
|
|
|
if (parent && parent > 0) { |
|
|
|
|
updateActivity(parent); |
|
|
|
|
} |
|
|
|
|
if(updateBobot){ |
|
|
|
|
refresData(id); |
|
|
|
|
} |
|
|
|
|
refresData(id); |
|
|
|
|
} else if (parent && parent > 0) { |
|
|
|
|
updateActivity(parent); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|