From 33c2b338a20d50ea9f177425fb88a5eacdfac533 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 21 Sep 2023 13:13:32 +0700 Subject: [PATCH 1/2] active Dashbord --- src/views/Dashboard.vue | 156 ++++++++++++++++++++++++++-------------- 1 file changed, 102 insertions(+), 54 deletions(-) diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 3ba13fe3a..f986e4c5c 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -16,40 +16,16 @@ const mixin = useCounterMixin(); //เรียกฟังก์ชันกล const { showLoader, hideLoader, - dialogMessage, success, messageError, date2Thai, dialogRemove, } = mixin; -const iteminbox = ref([]); const splitterModel = ref(30); const link = ref("0"); const inboxList = ref([]); const data = ref([]); -const payLoadtext = ref(); -const btnReply = ref(true); -const listpayload = ref([]); -const listpayloadNolink = ref([]); -const smgreplaytitle = ref(""); -const smgreplay = ref(""); -const userName = ref(localStorage.getItem("userName")); -const thumbStyle = ref({ - right: "4px", - borderRadius: "5px", - backgroundColor: "#a8bbbf", - width: "5px", - opacity: 0.5, -}); - -const barStyle = ref({ - right: "2px", - borderRadius: "9px", - backgroundColor: "#d6dee1", - width: "9px", - opacity: 0.2, -}); onMounted(async () => { await getData(); @@ -78,12 +54,12 @@ const getData = async () => { }); }); inboxList.value = list; - console.log("🚀 ~ file: Dashboard.vue:82 ~ .then ~ inboxList:", inboxList.value) - } - ) - + if (inboxList.value) { + selectInbox(inboxList.value[0].no); + } + }) .catch((e) => { - // messageError($q, e); + messageError($q, e); }) .finally(() => { hideLoader(); @@ -116,27 +92,48 @@ const removeData = async (id: string) => { }); }; const fileOpen = (url: string) => { - window.open(url, '_blank'); -} + window.open(url, "_blank"); +};