Browse Source

fix: disabled false button report

pull/4/head
wahyun 4 months ago
parent
commit
e06fda69ef
  1. 8
      edit-mode/function/reportActivity.js

8
edit-mode/function/reportActivity.js

@ -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!");
}
}

Loading…
Cancel
Save