From 2f21c27121a50746327e743349c1fafb5900a3c0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 6 Mar 2025 17:26:31 +0700 Subject: [PATCH 1/5] position --- .../10_registry/02_Government/07_Position.vue | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/modules/10_registry/02_Government/07_Position.vue b/src/modules/10_registry/02_Government/07_Position.vue index 374a2b6..2e62377 100644 --- a/src/modules/10_registry/02_Government/07_Position.vue +++ b/src/modules/10_registry/02_Government/07_Position.vue @@ -508,6 +508,8 @@ function onSearch() { } async function fetchDataTenure() { + console.log(link.value); + await http .get(config.API.salaryTenurePosition(link.value)) .then((res) => { @@ -521,18 +523,26 @@ async function fetchDataTenure() { })); // แปลงข้อมูลจาก data - const position = formatData(data.position); //ระยะเวลาดำรงตำแหน่งในสายงาน - const posLevel = formatData(data.posLevel); //ระยะเวลาดำรงตำแหน่งตามระดับ - const posExecutive = formatData(data.posExecutive); //ระยะเวลาดำรงตำแหน่งทางการบริหาร + const position = data.position ? formatData(data.position) : []; //ระยะเวลาดำรงตำแหน่งในสายงาน + const posLevel = data.posLevel ? formatData(data.posLevel) : []; //ระยะเวลาดำรงตำแหน่งตามระดับ + const posExecutive = data.posExecutive + ? formatData(data.posExecutive) + : []; //ระยะเวลาดำรงตำแหน่งทางการบริหาร // นำข้อมูลไปใส่ใน cardData cardData.value[0].data = position; cardData.value[1].data = posLevel; - cardData.value[2].data = posExecutive; + if (link.value !== "-employee") { + cardData.value[2].data = posExecutive; + } //เช็คค่า ระยะเวลาดำรงตำแหน่งทางการบริหาร ถ้าไม่มีให้ลบออกจาก cardData - if (posExecutive.length === 0) { - cardData.value.splice(2, 2); + if ( + posExecutive.length === 0 && + link.value !== "-employee" && + cardData.value.length > 2 + ) { + cardData.value.splice(2, 1); } } }) @@ -543,6 +553,9 @@ async function fetchDataTenure() { onMounted(async () => { link.value = await dataPerson.getProFileType(); + if (link.value === "-employee") { + cardData.value.splice(2, 1); + } getData(); fetchDataTenure(); }); @@ -555,7 +568,7 @@ onMounted(async () => { ตำแหน่ง -
+
From 28989d1dbb49ed09c42fc74c866cfeb87f02af56 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 7 Mar 2025 16:46:34 +0700 Subject: [PATCH 2/5] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B8=9A=E0=B8=B1=E0=B8=87=E0=B8=84=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B8=AD=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/05_leave/components/FormLeave/01_SickForm.vue | 1 + src/modules/05_leave/components/FormLeave/03_Birth.vue | 1 + .../05_leave/components/FormLeave/04_HelpWifeBirthForm.vue | 1 + src/modules/05_leave/components/FormLeave/05_VacationForm.vue | 1 + src/modules/05_leave/components/FormLeave/06_OrdinationForm.vue | 1 + src/modules/05_leave/components/FormLeave/07_HajjForm.vue | 1 + src/modules/05_leave/components/FormLeave/08_MilitaryForm.vue | 1 + src/modules/05_leave/components/FormLeave/09_StudyForm.vue | 2 +- src/modules/05_leave/components/FormLeave/10_TrainForm.vue | 2 +- .../05_leave/components/FormLeave/11_WorkInternationalForm.vue | 1 + .../05_leave/components/FormLeave/12_FollowSpouseForm.vue | 1 + .../05_leave/components/FormLeave/13_RehabilitationForm.vue | 1 + 12 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/modules/05_leave/components/FormLeave/01_SickForm.vue b/src/modules/05_leave/components/FormLeave/01_SickForm.vue index 282e0d0..29bc524 100644 --- a/src/modules/05_leave/components/FormLeave/01_SickForm.vue +++ b/src/modules/05_leave/components/FormLeave/01_SickForm.vue @@ -375,6 +375,7 @@ onMounted(() => { : null " :label="`${'ลาถึงวันที่'}`" + :rules="[(val:string) => !!val || `${'กรุณาเลือกลาถึงวันที่'}`]" >