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