From f9d62257742c871e2b6f4d8c0b5251398c03de58 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 10 Oct 2023 18:08:27 +0700 Subject: [PATCH] .put --- .../components/AppointEmployee/Main.vue | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/modules/05_placement/components/AppointEmployee/Main.vue b/src/modules/05_placement/components/AppointEmployee/Main.vue index 74cd78ad9..bb605526d 100644 --- a/src/modules/05_placement/components/AppointEmployee/Main.vue +++ b/src/modules/05_placement/components/AppointEmployee/Main.vue @@ -457,23 +457,22 @@ const saveData = async () => { // บันทึกการกำหนดตำแหน่ง const savePosition = async () => { - clickClose(); - // showLoader(); - // const data = { - // organizationEmployeeId: selectedPosition.value[0].id, - // }; - // await http - // .put(config.API.organizationEmployeePositionId(id.value), data) - // .then((res) => { - // success($q, "บันทึกข้อมูลสำเร็จ"); - // }) - // .catch((e) => { - // messageError($q, e); - // }) - // .finally(async () => { - // await nodeTree(); - // clickClose(); - // }); + showLoader(); + const data = { + organizationEmployeeId: selectedPosition.value[0].id, + }; + await http + .put(config.API.appointEmployeePosition(personalId.value), data) + .then((res) => { + success($q, "บันทึกข้อมูลสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(async () => { + fecthlistappointment() + clickClose(); + }); }; // // ปิด dialog กำหนดตำแหน่ง @@ -756,6 +755,7 @@ const savePosition = async () => { +