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,