feat(registry): integrate delete API

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-02-18 16:15:55 +07:00
parent 04a76b3025
commit 64489162ae
17 changed files with 252 additions and 180 deletions

View file

@ -26,6 +26,7 @@ const {
pathRegistryEmp,
onSearchDataTable,
convertDateToAPI,
dialogRemove,
} = mixin;
const id = ref<string>("");
@ -243,18 +244,20 @@ function serchDataTable() {
}
function handleDelete(rowId: string) {
// dialogRemove($q, async () => {
// showLoader();
// try {
// await http.delete(config.API.profileChangeNameUpdate + `${rowId}`);
// await getData();
// success($q, "");
// } catch (err) {
// messageError($q, err);
// } finally {
// hideLoader();
// }
// });
dialogRemove($q, async () => {
showLoader();
try {
await http.patch(
config.API.profileOtherUpdateDelete(empType.value) + `${rowId}`
);
await getData();
success($q, "ลบข้อมูลสำเร็จ");
} catch (err) {
messageError($q, err);
} finally {
hideLoader();
}
});
}
onMounted(() => {