From 937201023c45684e053099678ef6a08bc9cb5e3e Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 28 Oct 2024 10:36:11 +0700 Subject: [PATCH 1/3] VITE_URL_SSO --- .env | 1 + .env.production | 1 + entrypoint.sh | 1 + src/views/HomeView.vue | 4 ++-- src/views/MainView.vue | 6 +++++- src/views/MapView.vue | 4 ++-- 6 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..0de4755 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VITE_URL_SSO: "https://bma-sso.frappet.synology.me" \ No newline at end of file diff --git a/.env.production b/.env.production index 8d73df3..442ba05 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,7 @@ VITE_REALM_KEYCLOAK=VITE_REALM_KEYCLOAK VITE_CLIENTID_KEYCLOAK=VITE_CLIENTID_KEYCLOAK VITE_URL_KEYCLOAK=VITE_URL_KEYCLOAK VITE_API_URI_CONFIG=VITE_API_URI_CONFIG +VITE_URL_SSO: VITE_URL_SSO # VITE_REALM_KEYCLOAK: "bma-ehr" # VITE_CLIENTID_KEYCLOAK: "bma-ehr-exam-vue3" diff --git a/entrypoint.sh b/entrypoint.sh index 7f8e2db..3eda4ed 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,6 +12,7 @@ do sed -i 's|VITE_CLIENTID_KEYCLOAK|'${VITE_CLIENTID_KEYCLOAK}'|g' $file sed -i 's|VITE_URL_KEYCLOAK|'${VITE_URL_KEYCLOAK}'|g' $file sed -i 's|VITE_API_URI_CONFIG|'${VITE_API_URI_CONFIG}'|g' $file + sed -i 's|VITE_URL_SSO|'${VITE_URL_SSO}'|g' $file done diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index ec75625..140feda 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -384,7 +384,7 @@ onMounted(async () => { v-model="model" :options="options" prefix="ระบุสถานที่ :" - :rules="[(val) => !!val || 'กรุณาระบุสถานที่']" + :rules="[(val:string) => !!val || 'กรุณาระบุสถานที่']" lazy-rules @update:model-value="selectLocation()" hide-bottom-space @@ -401,7 +401,7 @@ onMounted(async () => { outlined v-model="useLocation" label="ระบุสถานที่" - :rules="[(val) => !!val || 'กรุณาระบุสถานที่']" + :rules="[(val:string) => !!val || 'กรุณาระบุสถานที่']" lazy-rules /> diff --git a/src/views/MainView.vue b/src/views/MainView.vue index 3dbd8d5..152208a 100644 --- a/src/views/MainView.vue +++ b/src/views/MainView.vue @@ -15,6 +15,10 @@ const { date2Thai, hideLoader, messageError, dialogRemove, success } = mixin const router = useRouter() const $q = useQuasar() +const key_C_Config = { + url_Logout: import.meta.env.VITE_URL_SSO, +}; + const notiTrigger = ref(false) const notiList = ref([]) const totalNotiList = ref(0) @@ -101,7 +105,7 @@ function onClickLogout() { // authen with keycloak client await deleteCookie('BMAHRIS_KEYCLOAK_IDENTITY') await deleteCookie('BMAHRIS_KEYCLOAK_REFRESH') - window.location.href = '/login' + window.location.href = key_C_Config.url_Logout }) } diff --git a/src/views/MapView.vue b/src/views/MapView.vue index 3478e83..79dcc81 100644 --- a/src/views/MapView.vue +++ b/src/views/MapView.vue @@ -574,7 +574,7 @@ onMounted(async () => { v-model="model" :options="options" prefix="ระบุสถานที่ :" - :rules="[(val) => !!val || 'กรุณาระบุสถานที่']" + :rules="[(val:string) => !!val || 'กรุณาระบุสถานที่']" lazy-rules @update:model-value="selectLocation()" /> @@ -590,7 +590,7 @@ onMounted(async () => { outlined v-model="useLocation" label="ระบุสถานที่" - :rules="[(val) => !!val || 'กรุณาระบุสถานที่']" + :rules="[(val:string) => !!val || 'กรุณาระบุสถานที่']" lazy-rules /> From 350802b493663a12a364994e4ee75e1d508bc501 Mon Sep 17 00:00:00 2001 From: "Warunee.T" Date: Mon, 28 Oct 2024 13:15:03 +0700 Subject: [PATCH 2/3] Delete .env --- .env | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 0de4755..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -VITE_URL_SSO: "https://bma-sso.frappet.synology.me" \ No newline at end of file From 933b1b4679b2d8c5d0f6d085a75dd5b3e0f5f78a Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Mon, 28 Oct 2024 13:25:47 +0700 Subject: [PATCH 3/3] no message --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index af75793..638ad49 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,5 @@ pnpm-debug.log* *.sln *.sw? -package-lock.json \ No newline at end of file +package-lock.json +.env \ No newline at end of file