From 61b5c4bdb1fff4b57faf985917f8ecb1079eb745 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 23 Jan 2024 16:34:34 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20?= =?UTF-8?q?=E0=B8=A5=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2=20checki?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/MapView.vue | 163 ++++++++---------------------------------- 1 file changed, 29 insertions(+), 134 deletions(-) diff --git a/src/views/MapView.vue b/src/views/MapView.vue index d4db139..3478e83 100644 --- a/src/views/MapView.vue +++ b/src/views/MapView.vue @@ -61,20 +61,20 @@ async function fetchNotifications() { await http .get(config.API.msgNotificate) .then((res) => { - const response = res.data.result - const list: notiType[] = [] - response.map((e: any) => { - list.push({ - id: e.id, - sender: - e.createdFullName == '' || e.createdFullName == null - ? 'เจ้าหน้าที่'[0] - : e.createdFullName[0], - body: e.body ?? '', - timereceive: new Date(e.receiveDate), - }) - }) - notiList.value = list + // const response = res.data.result + // const list: notiType[] = [] + // response.map((e: any) => { + // list.push({ + // id: e.id, + // sender: + // e.createdFullName == '' || e.createdFullName == null + // ? 'เจ้าหน้าที่'[0] + // : e.createdFullName[0], + // body: e.body ?? '', + // timereceive: new Date(e.receiveDate), + // }) + // }) + // notiList.value = list }) .catch((err) => { messageError($q, err) @@ -299,6 +299,12 @@ function onClickLogout() { }) } +function updateWorkplace() { + if (workplace.value === 'in-place') { + useLocation.value = '' + } +} + // class const getClass = (val: boolean) => { return { @@ -325,7 +331,7 @@ onMounted(async () => {
- { :label="$q.screen.gt.xs ? 'ประวัติการลงเวลา' : ''" :class="$q.screen.gt.xs ? 'q-px-md' : ''" @click="router.push('/history')" - /> + /> --> ลงเวลาเข้างาน ลงเวลาออกงาน - { - - + --> + - - -
@@ -658,6 +551,7 @@ onMounted(async () => { unchecked-icon="panorama_fish_eye" val="in-place" label="ในสถานที่" + @update:model-value="updateWorkplace" /> { unchecked-icon="panorama_fish_eye" val="off-site" label="นอกสถานที่" + @update:model-value="updateWorkplace" />
{ width: 100%; height: 100%; } - \ No newline at end of file +