|
|
|
@ -470,6 +470,30 @@ $(document).ready(function () {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$("#table_activity_material_actual").on("click", ".btn-ram-image", function () { |
|
|
|
|
let id = $(this).data('id'); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: `${base_url}image/${id}/report_activity`, |
|
|
|
|
type:"GET", |
|
|
|
|
success: function (result) { |
|
|
|
|
let data = result.data; |
|
|
|
|
if (!data) { |
|
|
|
|
gantt.alert({type: "error", text: "Failed to get report image"}); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (data && data.image) { |
|
|
|
|
$("#report-image").html(`<img src="${base_url_image}${data.image}" class="img-responsive" style="height: 75vh;" />`); |
|
|
|
|
$('#modal-report-image').modal('show'); |
|
|
|
|
} |
|
|
|
|
// kalo gambarnya banyak belum di handle...
|
|
|
|
|
}, |
|
|
|
|
error: function (data) { |
|
|
|
|
gantt.alert({type: "error", text: "Failed to get report image"}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$("#btn-close-material").on("click", function () { |
|
|
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
@ -579,7 +603,7 @@ $(document).ready(function () {
|
|
|
|
|
url: `${base_url}report-activity/edit/${id}`, |
|
|
|
|
type: "get", |
|
|
|
|
success: function (data) { |
|
|
|
|
console.log("data", data); |
|
|
|
|
// console.log("data report-activity edit", data);
|
|
|
|
|
if (data && data.code == 200) { |
|
|
|
|
let dataRes = data.data |
|
|
|
|
// console.log("dataRes", dataRes);
|
|
|
|
|