|
|
|
@ -426,8 +426,19 @@ $(document).ready(function () {
|
|
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
|
// console.log("cek result", result);
|
|
|
|
|
let reportId = result.data.data.report_id; |
|
|
|
|
let imageFormData = new FormData(); |
|
|
|
|
let image = formData.get("files"); |
|
|
|
|
imageFormData.append("ref_id",reportId); |
|
|
|
|
imageFormData.append("category", "report_activity"); |
|
|
|
|
imageFormData.append("files", image, image.name); |
|
|
|
|
|
|
|
|
|
const resultImage = await axiosInstanceMultipart |
|
|
|
|
.post(`${base_url}image/upload`, imageFormData) |
|
|
|
|
.then(res => res) |
|
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
|
if (result && result.status == 200) { |
|
|
|
|
if (result && result.status == 200 && resultImage && resultImage.status == 200) { |
|
|
|
|
gantt.alert("Add report activity material Success!"); |
|
|
|
|
resetFormAddRaMaterial(); |
|
|
|
|
tableRaMaterialActual.draw(); |
|
|
|
|