|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
let geom = []; |
|
|
|
|
gantt.ajax.get({ |
|
|
|
|
url: `${base_url}activity/${ganttId}/${proyekId}/get`, |
|
|
|
|
headers: { |
|
|
|
@ -19,6 +20,13 @@ gantt.ajax.get({
|
|
|
|
|
isBaselineSet = false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
geom = []; |
|
|
|
|
data.data.forEach(element => { |
|
|
|
|
geom.push({ |
|
|
|
|
"activity_id": element.id, |
|
|
|
|
"geom": element.geom |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
gantt.silent(function () { |
|
|
|
|
gantt.parse(data); |
|
|
|
|
}); |
|
|
|
@ -63,6 +71,13 @@ function refresData(id){
|
|
|
|
|
let obj = JSON.parse(response); |
|
|
|
|
data['data'] = obj.data.data; |
|
|
|
|
data['links'] = obj.data.links; |
|
|
|
|
geom = []; |
|
|
|
|
data.data.forEach(element => { |
|
|
|
|
geom.push({ |
|
|
|
|
"activity_id": element.id, |
|
|
|
|
"geom": element.geom |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
gantt.silent(function () { |
|
|
|
|
gantt.parse(data); |
|
|
|
|
}); |
|
|
|
@ -147,7 +162,7 @@ var dp = gantt.createDataProcessor(function(entity, action, data, id) {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
data['geom'] = geom.find(obj => obj.activity_id == id)?.geom; |
|
|
|
|
return gantt.ajax.put({ |
|
|
|
|
headers: { |
|
|
|
|
"Content-Type": "application/json", |
|
|
|
|