From bf8fb777cf9dc40a7dea8b18216f3b87f39e08f4 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Fri, 6 Oct 2023 11:13:07 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B9=80=E0=B8=87=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20=E0=B9=80=E0=B8=8A=E0=B9=87=E0=B8=84=E0=B8=AB?= =?UTF-8?q?=E0=B8=99=E0=B9=88=E0=B8=A7=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/02_organizational/views/MainTreeEmployee.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modules/02_organizational/views/MainTreeEmployee.vue b/src/modules/02_organizational/views/MainTreeEmployee.vue index 477442124..4f508331a 100644 --- a/src/modules/02_organizational/views/MainTreeEmployee.vue +++ b/src/modules/02_organizational/views/MainTreeEmployee.vue @@ -1394,7 +1394,12 @@ const clickSave = async () => { myForm.value!.validate().then(async (result: boolean) => { if (result) { if (modalEdit.value) { - await editData(); + if (selected.value == null) { + fails($q, "กรุณาเลือกหน่วยงาน"); + } else { + // console.log("save"); + await editData(); + } } else { if (selected.value == "") { fails($q, "กรุณาเลือกหน่วยงาน"); @@ -1402,7 +1407,6 @@ const clickSave = async () => { // console.log("save"); await saveData(); } - // await saveData(); } } }); @@ -1500,6 +1504,7 @@ const editData = async () => { isActive: isActive.value, isCondition: isCondition.value, conditionNote: conditionNote.value, + organizationId: organizationId.value, }) .then((res) => { success($q, "บันทึกข้อมูลร่างสำเร็จ");