diff --git a/src/views/MainView.vue b/src/views/MainView.vue index 6d80cf9..63e69de 100644 --- a/src/views/MainView.vue +++ b/src/views/MainView.vue @@ -16,6 +16,11 @@ const { date2Thai, hideLoader, messageError, dialogRemove, success } = mixin const router = useRouter() const $q = useQuasar() +// landing page config url +const configParam = { + landingPageUrl: import.meta.env.VITE_URL_SSO, +} + const fullName = ref('') //ชื่อผู้ใช้งาน const notiTrigger = ref(false) // เปิด,ปิดรายการ const notiList = ref([]) // รายการแจ้งเตือน @@ -129,13 +134,24 @@ function onLoad(index: number, done: Function) { (notiList.value.length == 0 && totalNotiList.value === 0) ) { page.value++ - setTimeout(() => { - fetchNotifications(page.value, 'NOMAL') - done() + setTimeout(async () => { + await fetchNotifications(page.value, 'NOMAL') + await done() }, 1500) } } +// landing page redirect +const landingPageUrl = () => { + if (window.location.hostname === 'bmasso.bma.go.th') { + return `${configParam.landingPageUrl}/landing?mode=dev` + } else if (window.location.hostname === 'bma-ehr.frappet.com') { + return `${configParam.landingPageUrl}/landing?mode=prod` + } else { + return `${configParam.landingPageUrl}/landing?mode=dev` + } +} + watch( () => notiTrigger.value, () => { @@ -311,7 +327,16 @@ onMounted(async () => { >
- +
+ + + + +
+ {{ fullName }} +
+
+ - - - - + + + + + + + + Landing Page + + + + + + ออกจากระบบ + -
+ +