From ef219472503a542e18678b3a0f82ef973f42d60c Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Fri, 1 Dec 2023 09:11:36 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B8=94=E0=B8=B6=E0=B8=87=20month?= =?UTF-8?q?=20=E0=B9=80=E0=B9=80=E0=B8=A5=E0=B8=B0=20year=20=E0=B8=A1?= =?UTF-8?q?=E0=B8=B2=E0=B8=88=E0=B8=B2=E0=B8=81=E0=B8=A7=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B8=99=E0=B8=B5=E0=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/09_leave/stores/SpecialTimeStore.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/09_leave/stores/SpecialTimeStore.ts b/src/modules/09_leave/stores/SpecialTimeStore.ts index ecdd6ffd8..54230e6d7 100644 --- a/src/modules/09_leave/stores/SpecialTimeStore.ts +++ b/src/modules/09_leave/stores/SpecialTimeStore.ts @@ -40,8 +40,9 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => { const checkOutStatus = ref("ปกติ"); // paging - const year = ref(2023); - const month = ref(11); + const toDay = ref(new Date()); + const month = toDay.value.getMonth(); + const year = toDay.value.getFullYear(); const page = ref(1); const total = ref(0); const pageSize = ref(10); @@ -56,7 +57,7 @@ export const useSpecialTimeStore = defineStore("LeaveSpecialTime", () => { await http .get( config.API.specialTime() + - `?year=${year.value}&month=${month.value}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}` + `?year=${year}&month=${month}&page=${page.value}&pageSize=${pageSize.value}&keyword=${filter.value}` ) .then(async (res) => { let data = res.data.result.data;