|
|
|
@ -60,6 +60,7 @@ $(document).ready(function () {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function deleteexpenseAssign(id) { |
|
|
|
|
searchReport(id); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: `${base_url}assign-material/delete/${id}`, |
|
|
|
|
type: "DELETE", |
|
|
|
@ -74,6 +75,37 @@ $(document).ready(function () {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function searchReport(id) { |
|
|
|
|
var payload = { |
|
|
|
|
"columns": [ |
|
|
|
|
{ |
|
|
|
|
"name": "assign_material_id", |
|
|
|
|
"logic_operator": "=", |
|
|
|
|
"value": id, |
|
|
|
|
"operator": "AND" |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
// "joins": [{ "name": "m_proyek", "column_join": "proyek_id", "column_results": ["kode_sortname", "nama"] }],
|
|
|
|
|
} |
|
|
|
|
$.ajax({ |
|
|
|
|
data: JSON.stringify(payload), |
|
|
|
|
url: `${base_url}report-activity-material/search`, |
|
|
|
|
type: "POST", |
|
|
|
|
success: function (data) { |
|
|
|
|
data.data.forEach(element => { |
|
|
|
|
let activityId = element.activity_id; |
|
|
|
|
let task = gantt.getTask(activityId); |
|
|
|
|
task.actual_start = null; |
|
|
|
|
task.actual_end = null; |
|
|
|
|
}); |
|
|
|
|
actionHappen = true; |
|
|
|
|
}, |
|
|
|
|
error: function (data) { |
|
|
|
|
// gantt.alert("Failed to get the data.");
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$("#modal-expense").on("click", "#show-form-expense", function () { |
|
|
|
|
$(this).hide(); |
|
|
|
|
$("#hide-form-expense").show(); |
|
|
|
|