From ddb4b494ad9f3ed44bb950cf156536a76fa1bee3 Mon Sep 17 00:00:00 2001 From: Thanit Konmek Date: Tue, 22 Aug 2023 18:02:46 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=A5=E0=B8=B0=E0=B9=80=E0=B8=AD=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=94=E0=B8=95=E0=B8=A3=E0=B8=87=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=82=E0=B8=AD=E0=B8=A5?= =?UTF-8?q?=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=88=E0=B8=B2=E0=B8=81?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/resign/ResignByid.vue | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 1b4ad5313..521812b44 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -99,13 +99,13 @@
-
+
สถานที่ยื่นขอลาออกจากราชการ
{{ dataDetail.location }}
-
+
วันที่ยื่นขอลาออกจากราชการ
@@ -113,18 +113,33 @@
-
+
เหตุผลที่ลาออกจากราชการ
{{ dataDetail.reason }}
-
+
วันที่ขอลาออกจากราชการ
-
+
{{ date2Thai(dataDetail.activeDate) }}
+
+ {{ diffDate() ? "(ยื่นขอลาออกน้อยกว่า 30 วัน)" : "" }} +
@@ -563,6 +578,20 @@ onMounted(() => { fetchData(id.value); }); +const diffDate = () => { + if (date.value !== null && dateLeave.value !== null) { + const time = dateLeave.value.getTime() - date.value.getTime(); + //วันที่ขอลาออกจากราชการ - วันที่ยื่นขอลาออกจากราชการ + const day = time / (1000 * 3600 * 24); + + if (day < 30) { + return true; + } + return false; + } + return false; +}; + const fetchData = async (id: string) => { showLoader(); await http