瀏覽代碼

fix menus

Olivier Massot 3 年之前
父節點
當前提交
bb1ae000c4
共有 2 個文件被更改,包括 7 次插入5 次删除
  1. 3 3
      composables/layout/Menus/configurationMenu.ts
  2. 4 2
      composables/layout/Menus/websiteMenu.ts

+ 3 - 3
composables/layout/Menus/configurationMenu.ts

@@ -31,16 +31,16 @@ class ConfigurationMenu extends BaseMenu implements Menu {
 
     if (this.$ability.can('display', 'organization_page')) {
       // children.push(this.constructMenu('organization_page', undefined, `/main/organizations/${this.$store.state.profile.organization.id}/dashboard`, true))
-      children.push(this.constructMenu('organization_page', undefined, `/organization`, false))
+      children.push(this.constructMenu('organization_page', undefined, `/organization`, true))
     }
 
     if (this.$ability.can('display', 'cmf_licence_page')) {
-      children.push(this.constructMenu('cmf_licence_generate', undefined, '/cmf_licence/organization'))
+      children.push(this.constructMenu('cmf_licence_generate', undefined, '/cmf_licence/organization', true))
     }
 
     if (this.$ability.can('display', 'parameters_page')) {
       // children.push(this.constructMenu('parameters', undefined,`/main/edit/parameters/${this.$store.state.profile.organization.id}`, true))
-      children.push(this.constructMenu('parameters', undefined,`/parameters`, false))
+      children.push(this.constructMenu('parameters', undefined,`/parameters`, true))
     }
 
     if (this.$ability.can('display', 'place_page')) {

+ 4 - 2
composables/layout/Menus/websiteMenu.ts

@@ -28,8 +28,10 @@ class WebsiteMenu extends BaseMenu implements Menu {
    * @return {ItemMenu | null}
    */
   getMenu (): ItemMenu | null {
-    if (!this.$store.state.profile.organization.website && this.$store.state.profile.access.isAdminAccess) {
-      return this.constructMenu('advanced_modification', {name: 'fa-globe-americas'}, this.getWebsite(this.$store.state.profile.organization) + '/typo3', false, undefined, true)
+    const website = this.getWebsite(this.$store.state.profile.organization)
+
+    if (website && this.$store.state.profile.access.isAdminAccess) {
+      return this.constructMenu('advanced_modification', {name: 'fa-globe-americas'},  website+ '/typo3', false, undefined, true)
     }
     return null
   }