@simitgroup/simpleapp-generator 1.0.32 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,19 +2,22 @@
2
2
  /**
3
3
  * This file was automatically generated by simpleapp generator during initialization.
4
4
  * You may modify it for your need
5
- * last change 2023-09-09
5
+ * last change 2023-09-20
6
6
  * author: Ks Tan
7
7
  */
8
+
8
9
  const menus = getMenus();
9
10
  </script>
10
11
  <template>
11
12
  <div>
12
-
13
-
14
13
  <div class="desktop-shortcut-link">
15
- <div v-for="menu in menus[1].items" class="">
16
- <NuxtLink :external="true" :to="menu.to">{{ menu.label }}</NuxtLink>
17
- </div>
14
+
15
+ <NuxtLink v-for="menu in menus[1].items" :external="true" :to="menu.to">
16
+ <div>
17
+ {{ camelCaseToWords(menu.label) }}
18
+ </div>
19
+ </NuxtLink>
20
+
18
21
  </div>
19
22
  </div>
20
23
  </template>
@@ -22,9 +22,7 @@ type tenantDataType = {
22
22
  const initialtenant: tenantDataType[] = [];
23
23
  const tenantlist = ref(initialtenant);
24
24
 
25
- doc
26
- .getApi()
27
- .getMyTenant()
25
+ doc.getApi().getMyTenants()
28
26
  .then((res: any) => {
29
27
  for (let i = 0; i < res.data.length; i++) {
30
28
  const x = res.data[i];
@@ -42,7 +40,6 @@ doc
42
40
  </script>
43
41
  <template>
44
42
  <div>
45
-
46
43
  <Panel header="Tenant List">
47
44
  <div>
48
45
  <NuxtLink
@@ -45,6 +45,14 @@ const emitter = mitt()
45
45
  export default defineNuxtPlugin((nuxtApp) => {
46
46
  //const { csrf } = useCsrf()
47
47
  //axios.defaults.headers.common = {"CSRF-TOKEN": csrf};
48
+ const myaxios = axios.create()
49
+ myaxios.interceptors.response.use((response) => response, (error) => {
50
+ if(error.response.status==401){
51
+ console.error("sso session expired, redirect to logout page")
52
+ const { signOut } = useAuth();
53
+ signOut({redirect:false});
54
+ }
55
+ });
48
56
  nuxtApp.vueApp.use(PrimeVue, { ripple: true });
49
57
  nuxtApp.vueApp
50
58
  .component("SimpleAppAutocomplete",SimpleAppAutocomplete)
@@ -81,7 +89,8 @@ export default defineNuxtPlugin((nuxtApp) => {
81
89
  return {
82
90
  provide: {
83
91
  event: emitter.emit, // Will emit an event
84
- listen: emitter.on // Will register a listener for an event
92
+ listen: emitter.on, // Will register a listener for an event
93
+ axios: myaxios
85
94
  }
86
95
  }
87
96
  //other components that you need