|
|
|
@ -162,10 +162,14 @@ var dp = gantt.createDataProcessor(function(entity, action, data, id) {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
data['duration'] = gantt.calculateDuration({ |
|
|
|
|
start_date: new Date(data['start_date']), |
|
|
|
|
end_date: new Date(data['end_date']) |
|
|
|
|
}); |
|
|
|
|
let newStart = new Date(data['start_date']); |
|
|
|
|
let newEnd = new Date(data['end_date']); |
|
|
|
|
if (data['start_date'] && data['end_date']) { |
|
|
|
|
data['duration'] = gantt.calculateDuration({ |
|
|
|
|
start_date: newStart, |
|
|
|
|
end_date: newEnd |
|
|
|
|
});
|
|
|
|
|
} |
|
|
|
|
data['geom'] = geom.find(obj => obj.activity_id == id)?.geom; |
|
|
|
|
return gantt.ajax.put({ |
|
|
|
|
headers: { |
|
|
|
|