From 1d99705b651cec37be47e12ded423c465d9dafbd Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 24 Mar 2026 10:01:34 +0700 Subject: [PATCH] fix(registry-officer): add field leaveSubTypeName and coupleDayLevelCountry form leave --- .../detail/GovernmentInformation/03_Leave.vue | 59 ++++++++++++++++++- .../interface/index/leave.ts | 3 + 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/03_Leave.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/03_Leave.vue index 726ed821a..721542aba 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/03_Leave.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/03_Leave.vue @@ -202,6 +202,17 @@ const pagination = ref({ const columnsHistory = ref(baseColumns.value); const visibleColumnsHistory = ref(baseVisibleColumns.value); +/** รายการประเภทการลาของ ลาไปศึกษา ฝึกอบรม ปฎิบัติการวิจัย หรือดูงาน*/ +const leaveSubTypeName = ref(""); +const optionSubTypeName = ref([ + "ศึกษาต่อ", + "ฝึกอบรม", + "ปฎิบัติการวิจัย", + "ดูงาน", +]); + +const coupleDayLevelCountry = ref(""); + /** function fetch ข้อมูลรายการลา*/ async function getData() { showLoader(); @@ -213,6 +224,7 @@ async function getData() { ...item, id: item.id, typeLeave: item.leaveType.name, + codeLeave: item.leaveType.code, code: item.leaveType.refCommandDate, dateStartLeave: item.dateLeaveStart, dateEndLeave: item.dateLeaveEnd, @@ -292,8 +304,10 @@ function openDialogEdit(props: DetailData) { typeLeave.value = { id: props.typeLeaveId, name: props.typeLeave, - code: props.code, + code: props.codeLeave, }; + leaveSubTypeName.value = props.leaveSubTypeName; + coupleDayLevelCountry.value = props.coupleDayLevelCountry; statLeave.value = props.status; reason.value = props.reason; dateRange.value = [ @@ -316,6 +330,10 @@ function onSubmit() { const body = { leaveTypeId: typeLeave.value?.id, + leaveSubTypeName: + typeLeave.value?.code === "LV-008" ? leaveSubTypeName.value : undefined, + coupleDayLevelCountry: + typeLeave.value?.code === "LV-010" ? coupleDayLevelCountry.value : undefined, dateLeaveStart: dateToISO(dateRange.value[0]), dateLeaveEnd: dateToISO(dateRange.value[1]), leaveDays: numLeave.value, @@ -451,6 +469,8 @@ function closeDialog() { dateRange.value = [new Date(), new Date()]; numLeave.value = 1; numUsedLeave.value = 0; + leaveSubTypeName.value = ""; + coupleDayLevelCountry.value = ""; } function statusLeave(val: string) { @@ -741,6 +761,43 @@ onMounted(() => { ) " /> + +
+ + +