Merge branch 'develop'

* develop:
  fixing redirect landing
This commit is contained in:
Warunee Tamkoo 2025-02-13 15:21:33 +07:00
commit 740a49b68f
3 changed files with 5 additions and 10 deletions

View file

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

View file

@ -12,6 +12,7 @@ do
sed -i 's|VITE_API_REPORT_URL|'${VITE_API_REPORT_URL}'|g' $file sed -i 's|VITE_API_REPORT_URL|'${VITE_API_REPORT_URL}'|g' $file
sed -i 's|VITE_MANUAL_URL|'${VITE_MANUAL_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_SSO|'${VITE_URL_SSO}'|g' $file
sed -i 's|VITE_URL_LANDING|'${VITE_URL_LANDING}'|g' $file
done done

View file

@ -21,7 +21,7 @@ import { menuList } from "../interface/request/main/main";
// landing page config url // landing page config url
const configParam = { const configParam = {
landingPageUrl: import.meta.env.VITE_URL_SSO, landingPageUrl: import.meta.env.VITE_URL_LANDING,
}; };
const $q = useQuasar(); const $q = useQuasar();
@ -323,14 +323,7 @@ function handleButtonClick() {
} }
// landing page redirect // landing page redirect
const landingPageUrl = ref<string>(getLandingUrl()); const landingPageUrl = ref<string>(configParam.landingPageUrl);
function getLandingUrl() {
if (window.location.hostname === "bma-ehr-admin.frappet.synology.me") {
return `${configParam.landingPageUrl}/e-hr`;
} else {
return configParam.landingPageUrl;
}
}
/** ฟังก์ชันเรียกข้อมูลผู้ใช่งาน*/ /** ฟังก์ชันเรียกข้อมูลผู้ใช่งาน*/
async function fetchKeycloakPosition() { async function fetchKeycloakPosition() {