เพิ่มเมนูไปหน้า Landing Page
This commit is contained in:
parent
79f829fa3d
commit
ec0dd6c3ad
1 changed files with 54 additions and 6 deletions
|
|
@ -18,6 +18,11 @@ import type {
|
|||
} from "../interface/request/main/main";
|
||||
import { menuList } from "../interface/request/main/main";
|
||||
|
||||
// landing page config url
|
||||
const configParam = {
|
||||
landingPageUrl: import.meta.env.VITE_URL_SSO,
|
||||
};
|
||||
|
||||
const $q = useQuasar();
|
||||
const store = useDataStore();
|
||||
const route = useRoute();
|
||||
|
|
@ -304,7 +309,7 @@ function handleButtonClick() {
|
|||
const currentPath = route.name;
|
||||
const queryParams = { role: "admin" }; // Replace with your query parameters
|
||||
const queryString = new URLSearchParams(queryParams).toString();
|
||||
const findRole = role.value.includes('SUPER_ADMIN')
|
||||
const findRole = role.value.includes("SUPER_ADMIN");
|
||||
// Assuming config.generatePopupPath() returns a base URL
|
||||
const popupBasePath = config.generatePopupPath(findRole);
|
||||
|
||||
|
|
@ -316,6 +321,17 @@ function handleButtonClick() {
|
|||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
* เมื่อค่า notiTrigger เปลี่ยนเป็น false,
|
||||
|
|
@ -561,7 +577,7 @@ onUnmounted(() => {
|
|||
<div class="text-subtitle2 q-mt-md q-mb-xs text-center">
|
||||
{{ fullname }}
|
||||
</div>
|
||||
<div id="#logout">
|
||||
<!-- <div id="#logout">
|
||||
<q-btn
|
||||
color="primary"
|
||||
label="ออกจากระบบ"
|
||||
|
|
@ -569,17 +585,33 @@ onUnmounted(() => {
|
|||
size="sm"
|
||||
v-close-popup
|
||||
@click="doLogout"
|
||||
/><!-- -->
|
||||
</div>
|
||||
/>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="column col-12">
|
||||
<q-separator />
|
||||
<div class="column q-pb-md justify-center">
|
||||
<div class="text-overline text-grey q-px-md q-pt-sm">
|
||||
<!-- <div class="text-overline text-grey q-px-md q-pt-sm">
|
||||
เลือกโหมด
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <q-option-group v-model="group" :options="options" color="primary"/> -->
|
||||
<q-list dense>
|
||||
<q-item clickable :href="landingPageUrl">
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
color="blue"
|
||||
text-color="white"
|
||||
icon="home"
|
||||
size="20px"
|
||||
font-size="12px"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section class="q-py-sm">
|
||||
Landing Page
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list dense v-for="op in options" :key="op.label">
|
||||
<q-item clickable>
|
||||
<q-item-section avatar>
|
||||
|
|
@ -596,6 +628,22 @@ onUnmounted(() => {
|
|||
}}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list dense>
|
||||
<q-item clickable @click="doLogout">
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
color="red"
|
||||
text-color="white"
|
||||
icon="logout"
|
||||
size="20px"
|
||||
font-size="12px"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section class="q-py-sm">
|
||||
ออกจากระบบ
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue