fixing redirect

This commit is contained in:
Warunee Tamkoo 2025-02-13 15:37:30 +07:00
parent 99095e293b
commit b60ca9df9b
3 changed files with 4 additions and 9 deletions

View file

@ -2,4 +2,5 @@ VITE_API_URI_CONFIG=VITE_API_URI_CONFIG
VITE_API_PUBLISH_URL=VITE_API_PUBLISH_URL
VITE_MANUAL_URL=VITE_MANUAL_URL
VITE_URL_SSO=VITE_URL_SSO
VITE_URL_LANDING=VITE_URL_LANDING
VITE_API_REPORT_URL=VITE_API_REPORT_URL

View file

@ -12,6 +12,7 @@ do
sed -i 's|VITE_API_PUBLISH_URL|'${VITE_API_PUBLISH_URL}'|g' $file
sed -i 's|VITE_MANUAL_URL|'${VITE_MANUAL_URL}'|g' $file
sed -i 's|VITE_URL_SSO|'${VITE_URL_SSO}'|g' $file
sed -i 's|VITE_URL_LANDING|'${VITE_URL_LANDING}'|g' $file
sed -i 's|VITE_API_REPORT_URL|'${VITE_API_REPORT_URL}'|g' $file

View file

@ -13,7 +13,7 @@ import { useDataStore } from "@/stores/data";
// landing page config url
const configParam = {
landingPageUrl: import.meta.env.VITE_URL_SSO,
landingPageUrl: import.meta.env.VITE_URL_LANDING,
};
const route = useRoute();
@ -234,14 +234,7 @@ function onInfo() {
}
// landing page redirect
const landingPageUrl = ref<string>(getLandingUrl());
function getLandingUrl() {
if (window.location.hostname === "bma-ehr-user.frappet.synology.me") {
return `${configParam.landingPageUrl}/e-hr`;
} else {
return configParam.landingPageUrl;
}
}
const landingPageUrl = ref<string>(configParam.landingPageUrl);
function onViewDetailNoti(url: string) {
window.open(url, "_blank");