เพิ่ม comment หน้า edit
This commit is contained in:
parent
35c63aa361
commit
47327cff40
1 changed files with 13 additions and 1 deletions
|
|
@ -26,6 +26,9 @@ import { useLeaveStore } from "@/modules/05_leave/store";
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
/**
|
||||
* ตัวแปรที่ใช้
|
||||
*/
|
||||
const personalId = ref<string>(route.params.id as string);
|
||||
const leaveId = ref<string>("");
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue