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