浏览代码

Merge branch 'hotfix/basicompta' into release/2.5

# Conflicts:
#	nuxt.config.ts
Vincent 7 月之前
父节点
当前提交
75ba73e835

+ 4 - 1
components/Layout/SubHeader/Breadcrumbs.vue

@@ -15,10 +15,13 @@ const router = useRouter()
 
 const items: ComputedRef<Array<AnyJson>> = computed(() => {
   const crumbs: Array<AnyJson> = []
+  const baseUrl =
+    runtimeConfig.baseUrlAdminLegacy ??
+    runtimeConfig.public.baseUrlAdminLegacy
 
   crumbs.push({
     title: i18n.t('welcome'),
-    href: UrlUtils.join(runtimeConfig.baseUrlAdminLegacy, '#', 'dashboard'),
+    href: UrlUtils.join(baseUrl, '#', 'dashboard'),
   })
 
   const pathPart: Array<string> = UrlUtils.split(router.currentRoute.value.path)

+ 0 - 2
nuxt.config.ts

@@ -48,7 +48,6 @@ export default defineNuxtConfig({
     baseUrlMercure: '',
     fileStorageBaseUrl: '',
     supportUrl: '',
-    basicomptaUrl: '',
     // Config within public will be also exposed to the client
     public: {
       env: '',
@@ -59,7 +58,6 @@ export default defineNuxtConfig({
       baseUrlMercure: '',
       fileStorageBaseUrl: '',
       supportUrl: '',
-      basicomptaUrl: '',
     },
   },
 

+ 2 - 3
services/layout/menuBuilder/basicomptaMenuBuilder.ts

@@ -18,9 +18,8 @@ export default class BasicomptaMenuBuilder extends AbstractMenuBuilder {
       return this.createItem(
         'basicompta_admin',
         { name: 'fas fa-suitcase' },
-        this.runtimeConfig.public.basicomptaUrl,
-        MENU_LINK_TYPE.EXTERNAL,
-        true,
+        '/basicompta',
+        MENU_LINK_TYPE.V1
       )
     }
 

+ 6 - 9
tests/units/services/layout/menuBuilder/basicomptaMenuBuilder.ts

@@ -49,10 +49,9 @@ describe('build', () => {
     expect(menuBuilder.build()).toEqual({
       label: 'basicompta_admin',
       icon: { name: 'fas fa-suitcase' },
-      to: 'https://app.basicompta.fr/',
-      type: MENU_LINK_TYPE.EXTERNAL,
+      to: 'https://mydomain.com/#/basicompta',
+      type: MENU_LINK_TYPE.V1,
       active: false,
-      target: '_blank',
     })
   })
 
@@ -62,10 +61,9 @@ describe('build', () => {
     expect(menuBuilder.build()).toEqual({
       label: 'basicompta_admin',
       icon: { name: 'fas fa-suitcase' },
-      to: 'https://app.basicompta.fr/',
-      type: MENU_LINK_TYPE.EXTERNAL,
+      to: 'https://mydomain.com/#/basicompta',
+      type: MENU_LINK_TYPE.V1,
       active: false,
-      target: '_blank',
     })
   })
 
@@ -76,10 +74,9 @@ describe('build', () => {
     expect(menuBuilder.build()).toEqual({
       label: 'basicompta_admin',
       icon: { name: 'fas fa-suitcase' },
-      to: 'https://app.basicompta.fr/',
-      type: MENU_LINK_TYPE.EXTERNAL,
+      to: 'https://mydomain.com/#/basicompta',
+      type: MENU_LINK_TYPE.V1,
       active: false,
-      target: '_blank',
     })
   })
 })