Browse Source

Fix lag

pull/1/head
Wahyu Ramadhan 1 year ago
parent
commit
1cfc7038e4
  1. 12
      edit-mode/function/restActivityLink.js

12
edit-mode/function/restActivityLink.js

@ -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: {

Loading…
Cancel
Save