feat(registry): integrate delete API
This commit is contained in:
parent
04a76b3025
commit
64489162ae
17 changed files with 252 additions and 180 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue