File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed
personalization-webcomponents Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
1
VITE_NODE_ENV = development
2
+ VITE_VUE_APP_API_URL = http://localhost:8083
Original file line number Diff line number Diff line change 1
1
VITE_NODE_ENV = production
2
+ VITE_VUE_APP_API_URL =
Original file line number Diff line number Diff line change 19
19
<p >
20
20
<b >{{ service.serviceName }} (ID: {{ service.id }})</b ><br >
21
21
<span >{{ service.summary }}</span ><br ><br >
22
- <span >
23
- <b >Public URL</b >: <i >{{ service.publicUrl }}</i ><br >
24
- <b >Has Responsibilities</b >: {{ service.hasResponsibilities ? "✅" : "❌" }}<br >
25
- <b >Is External</b >: {{ service.isExternal ? "✅" : "❌" }}<br >
26
- </span >
27
22
<div v-if =" service.onlineServices" >
28
23
<b >Online-Services:</b >
29
24
<ul >
@@ -50,7 +45,7 @@ import customIconsSprite from "@muenchen/muc-patternlab-vue/assets/icons/custom-
50
45
import mucIconsSprite from " @muenchen/muc-patternlab-vue/assets/icons/muc-icons.svg?raw" ;
51
46
import SkeletonLoader from " @/components/common/skeleton-loader.vue" ;
52
47
import {onMounted , ref } from " vue" ;
53
- import {LOCALSTORAGE_KEY_SERVICENAVIGATOR_RESULT } from " @/util/constants.ts" ;
48
+ import {getAPIBaseURL , LOCALSTORAGE_KEY_SERVICENAVIGATOR_RESULT } from " @/util/constants.ts" ;
54
49
import type {ServiceNavigatorResult } from " @/api/servicenavigator/ServiceNavigatorResult.ts" ;
55
50
import type {SNService } from " @/api/servicenavigator/ServiceNavigatorLookup.ts" ;
56
51
@@ -66,7 +61,7 @@ onMounted(() => {
66
61
loading .value = false ;
67
62
} else {
68
63
const snResult = JSON .parse (serviceNavigatorResultString ) as ServiceNavigatorResult ;
69
- const url = " http://localhost:8083 /public/api/backend-service/servicenavigator?ids=" + snResult .services .join (" ," );
64
+ const url = getAPIBaseURL () + " /public/api/backend-service/servicenavigator?ids=" + snResult .services .join (" ," );
70
65
fetch (url )
71
66
.then (resp => {
72
67
if (resp .ok ) {
Original file line number Diff line number Diff line change @@ -16,3 +16,11 @@ export function getChecklistIconByTitle(checklistTitle: string) {
16
16
"https://stadt.muenchen.de/dam/Home/lhm_common/service-navigator/10483311.svg" ,
17
17
} [ checklistTitle ] ;
18
18
}
19
+
20
+ export function getAPIBaseURL ( ) : String {
21
+ if ( import . meta. env . VITE_VUE_APP_API_URL ) {
22
+ return import . meta. env . VITE_VUE_APP_API_URL ;
23
+ } else {
24
+ return new URL ( import . meta. url ) . origin ;
25
+ }
26
+ }
You can’t perform that action at this time.
0 commit comments