From 47327cff40da971446dc834e4739f6d7c9afcba4 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Thu, 18 Jan 2024 13:11:49 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20comment=20=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2=20edit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/05_leave/views/EditPage.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modules/05_leave/views/EditPage.vue b/src/modules/05_leave/views/EditPage.vue index 4fd5e76..62768d3 100644 --- a/src/modules/05_leave/views/EditPage.vue +++ b/src/modules/05_leave/views/EditPage.vue @@ -26,6 +26,9 @@ import { useLeaveStore } from "@/modules/05_leave/store"; const route = useRoute(); const router = useRouter(); +/** + * ตัวแปรที่ใช้ + */ const personalId = ref(route.params.id as string); const leaveId = ref(""); const dataStore = useLeaveStore(); @@ -202,12 +205,12 @@ async function fetchDataDetail(id: string) { }); } +/**modal */ const model = computed(() => { return ( dataStore.options.find((x) => x.id == formData.leaveTypeId)?.code ?? "" ); }); - const modelSpecific = computed(() => { const code = dataStore.options.find( (x) => x.id == formData.leaveTypeId @@ -226,6 +229,11 @@ const modelSpecific = computed(() => { } }); +/** + * function บันทึกข้อมูล + * @param formData ข้อมูลใน formdata + * @param isLeave ตัวแปรเช็คว่าใช้หน้า edit หรือไม่ + */ function onSubmit(formData: FormData, isLeave: boolean = true) { if (isLeave) { dialogConfirm($q, async () => { @@ -248,6 +256,10 @@ function onSubmit(formData: FormData, isLeave: boolean = true) { } } +/** + * funciotn ยื่นใบลา + * @param id id ของใบลา + */ function onConfirm(id: string) { dialogConfirm( $q,