From bfecec80a8a47863e3d77af2dfba34a1d080b3d4 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 11 Sep 2023 15:57:00 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A5=E0=B8=9A=20=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=20=E0=B8=9B=E0=B8=B1=E0=B8=88=E0=B8=B8=E0=B8=9A?= =?UTF-8?q?=E0=B8=B1=E0=B8=99=20=E0=B8=AD=E0=B8=AD=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/08_registryEmployee/views/information.vue | 10 ++++++++-- src/views/Dashboard.vue | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/modules/08_registryEmployee/views/information.vue b/src/modules/08_registryEmployee/views/information.vue index ce2f3c9ed..964556bf1 100644 --- a/src/modules/08_registryEmployee/views/information.vue +++ b/src/modules/08_registryEmployee/views/information.vue @@ -97,7 +97,7 @@ autoApply :enableTimePicker="false" week-start="0" - :max-date="new Date()" + :max-date="calculateMaxDate()" :disabled="!edit" @update:model-value="handleDate" > @@ -1020,8 +1020,14 @@ const fetchDataComponent = async (modelData: Date) => { await props.fetchDataProfile(); await fetchData(); }; - +const calculateMaxDate = () => { + const today = new Date(); + + today.setDate(today.getDate() - 1); + return today; + } const calRetire = async (birth: Date) => { + console.log(birth) const body = { birthDate: dateToISO(birth), }; diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 6f573b28d..fbffd5e59 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -91,13 +91,13 @@ const getData = async () => { let list: DataInbox[] = []; response.map((e: ResponseInbox) => { list.push({ - no: e.id ?? "", + no: e.receiverUserId ?? "", sender: e.createdFullName == "" || e.createdFullName == null ? "เจ้าหน้าที่" : e.createdFullName, subject: e.subject ?? "", - timereceive: new Date(e.createdAt), + timereceive: new Date(e.receiveDate), body: e.body ?? "", payload: e.payload, ratingModel: 0, @@ -199,7 +199,7 @@ await http /> -->