|
|
@ -14,7 +14,7 @@ function getUrlParameter(sParam) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function searchReport(id) { |
|
|
|
function searchReport(id, updateActual = true) { |
|
|
|
var payload = { |
|
|
|
var payload = { |
|
|
|
"columns": [ |
|
|
|
"columns": [ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -31,12 +31,21 @@ function getUrlParameter(sParam) { |
|
|
|
url: `${base_url}report-activity-material/search`, |
|
|
|
url: `${base_url}report-activity-material/search`, |
|
|
|
type: "POST", |
|
|
|
type: "POST", |
|
|
|
success: function (data) { |
|
|
|
success: function (data) { |
|
|
|
data.data.forEach(element => { |
|
|
|
if (updateActual) { |
|
|
|
let activityId = element.activity_id; |
|
|
|
data.data.forEach(element => { |
|
|
|
let task = gantt.getTask(activityId); |
|
|
|
let activityId = element.activity_id; |
|
|
|
task.actual_start = null; |
|
|
|
let task = gantt.getTask(activityId); |
|
|
|
task.actual_end = null; |
|
|
|
task.actual_start = null; |
|
|
|
}); |
|
|
|
task.actual_end = null; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (data.data.length == 1) { |
|
|
|
|
|
|
|
let activityId = data.data[0].activity_id; |
|
|
|
|
|
|
|
let task = gantt.getTask(activityId); |
|
|
|
|
|
|
|
task.actual_start = null; |
|
|
|
|
|
|
|
task.actual_end = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
actionHappen = true; |
|
|
|
actionHappen = true; |
|
|
|
}, |
|
|
|
}, |
|
|
|
error: function (data) { |
|
|
|
error: function (data) { |
|
|
|