|
|
|
@ -460,10 +460,12 @@ $(document).ready(function () {
|
|
|
|
|
tableRaMaterialActual.draw(); |
|
|
|
|
} else { |
|
|
|
|
$('#btn_add_ra_material').html('Add'); |
|
|
|
|
$('#btn_add_ra_material').prop("disabled", false); |
|
|
|
|
throw new Error("Add report activity material failed."); |
|
|
|
|
} |
|
|
|
|
} catch (error) { |
|
|
|
|
$('#btn_add_ra_material').html('Add'); |
|
|
|
|
$('#btn_add_ra_material').prop("disabled", false); |
|
|
|
|
throw new Error("Image upload failed."); |
|
|
|
|
} |
|
|
|
|
} catch (error) { |
|
|
|
@ -480,7 +482,8 @@ $(document).ready(function () {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
resetFormAddRaMaterial(); |
|
|
|
|
$('#btn_add_ra_material').html('Add'); |
|
|
|
|
$('#btn_add_ra_material').prop("disabled", false); |
|
|
|
|
gantt.alert("Add report activity material failed."); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -493,12 +496,13 @@ $(document).ready(function () {
|
|
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
|
if (result && result.status == 200) { |
|
|
|
|
gantt.alert("Edit report activity Success!"); |
|
|
|
|
resetFormAddRaMaterial(); |
|
|
|
|
gantt.alert("Edit report activity Success!"); |
|
|
|
|
tableRaMaterialActual.draw(); |
|
|
|
|
} else { |
|
|
|
|
resetFormAddRaMaterial(); |
|
|
|
|
$('#btn_add_ra_material').html('Add'); |
|
|
|
|
$('#btn_add_ra_material').prop("disabled", false); |
|
|
|
|
gantt.alert("Edit report activity failed, try again later!"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|