瀏覽代碼

website and configuration menu

Vincent GUFFON 4 年之前
父節點
當前提交
6594d5e43c
共有 51 個文件被更改,包括 1414 次插入895 次删除
  1. 17 0
      assets/css/global.scss
  2. 1 0
      assets/css/variables.scss
  3. 0 1
      components/Form/DataTableComponent.vue
  4. 57 11
      components/Layout/HeaderComponent.vue
  5. 71 0
      components/Layout/HeaderMenuComponent.vue
  6. 23 20
      components/Layout/MenuComponent.vue
  7. 48 0
      components/Layout/NotificationComponent.vue
  8. 1 7
      components/List/ListComponent.vue
  9. 1 1
      config/abilities/pages/addressBook.yaml
  10. 0 36
      config/abilities/pages/admin2ios.yaml
  11. 103 0
      config/abilities/pages/parameters.yaml
  12. 1 0
      config/nuxtConfig/env.js
  13. 1 0
      config/nuxtConfig/head.js
  14. 1 1
      config/nuxtConfig/plugins.js
  15. 3 0
      config/nuxtConfig/vuetify.js
  16. 0 24
      data/accessesData.js
  17. 0 26
      data/personActivitiesData.js
  18. 16 0
      lang/layout/fr-FR.js
  19. 16 6
      layouts/default.vue
  20. 1 0
      layouts/login.vue
  21. 0 1
      pages/accesses/_id.vue
  22. 2 1
      pages/index.vue
  23. 15 0
      pages/organization/edit.vue
  24. 0 0
      plugins/Syncfusion/grid.js
  25. 24 12
      services/profile/organizationProfile.ts
  26. 17 1
      store/profile/access.ts
  27. 13 1
      store/profile/organization.ts
  28. 1 1
      test/use/layout/menu.spec.js
  29. 8 2
      types/types.d.ts
  30. 8 8
      use/layout/Menus/accessMenu.ts
  31. 29 0
      use/layout/Menus/accountMenu.ts
  32. 54 0
      use/layout/Menus/admin2iosMenu.ts
  33. 4 4
      use/layout/Menus/agendaMenu.ts
  34. 2 2
      use/layout/Menus/baseMenu.ts
  35. 10 10
      use/layout/Menus/billingMenu.ts
  36. 5 5
      use/layout/Menus/communicationMenu.ts
  37. 73 0
      use/layout/Menus/configurationMenu.ts
  38. 94 0
      use/layout/Menus/cotisationsMenu.ts
  39. 2 2
      use/layout/Menus/donorsMenu.ts
  40. 8 8
      use/layout/Menus/educationalMenu.ts
  41. 2 2
      use/layout/Menus/equipmentMenu.ts
  42. 2 2
      use/layout/Menus/medalsMenu.ts
  43. 29 0
      use/layout/Menus/myAccessesMenu.ts
  44. 29 0
      use/layout/Menus/myFamilyMenu.ts
  45. 5 5
      use/layout/Menus/statsMenu.ts
  46. 19 7
      use/layout/Menus/websiteMenu.ts
  47. 138 0
      use/layout/menu.ts
  48. 0 78
      use/template/Menus/admin2iosMenu.ts
  49. 0 94
      use/template/Menus/cotisationsMenu.ts
  50. 0 87
      use/template/menu.ts
  51. 460 429
      yarn.lock

+ 17 - 0
assets/css/global.scss

@@ -0,0 +1,17 @@
+header .v-toolbar__content{
+  padding-right: 0px;
+}
+
+.e-grid .e-gridheader {
+  position: -webkit-sticky;
+  position: sticky;
+  top: 58px; /* The height of top nav menu. */
+  z-index: 1;
+}
+
+.no-decoration{
+  text-decoration: none;
+}
+
+.dropdown_header{
+}

+ 1 - 0
assets/css/variables.scss

@@ -2,3 +2,4 @@
 //
 // The variables you want to modify
 // $font-size-root: 20px;
+$btn-text-transform: none;

+ 0 - 1
components/Form/DataTableComponent.vue

@@ -17,7 +17,6 @@
 <script lang="ts">
   import {defineComponent, ref, useContext, useFetch} from '@nuxtjs/composition-api'
   import {Collection, Model, Repository} from "@vuex-orm/core";
-  import personActivitiesData from '@/data/personActivitiesData'
   import {AnyJson} from "~/types/types";
 
   export default defineComponent({

+ 57 - 11
components/Layout/HeaderComponent.vue

@@ -1,46 +1,92 @@
 <template>
   <v-app-bar
-    :clipped-left="properties.clipped"
+    clipped-left
+    elevate-on-scroll
+    dense
     fixed
     app
     class="ot_green ot_white--text"
   >
     <v-btn
+      v-if="properties.displayedMiniVariant"
       class="menu-btn"
       icon
-      @click.stop="properties.miniVariant = !properties.miniVariant"
+      @click.stop="displayedMenu()"
     >
       <v-icon class="ot_white--text">mdi-menu{{ `${properties.miniVariant ? '' : '-open'}` }}</v-icon>
     </v-btn>
 
-    <v-toolbar-title v-text="properties.title" />
+    <v-toolbar-title v-text="properties.title"/>
 
-    <v-spacer />
+    <v-spacer/>
+
+    <v-btn
+      elevation="2"
+      color="ot_warning ot_white--text"
+    >{{$t('create')}}</v-btn>
+
+    <v-btn icon>
+      <a class="no-decoration" :href="properties.homeUrl + '/'"><v-icon class="ot_white--text" small>fa-home</v-icon></a>
+    </v-btn>
+
+    <HeaderMenuComponent :menu="properties.webSiteMenu"></HeaderMenuComponent>
+
+    <HeaderMenuComponent :menu="properties.myAccessesMenu" v-if="properties.hasAccessesMenu"></HeaderMenuComponent>
+
+    <HeaderMenuComponent :menu="properties.myFamilyMenu" v-if="properties.hasFamilyMenu"></HeaderMenuComponent>
+
+    <NotificationComponent></NotificationComponent>
+
+    <HeaderMenuComponent :menu="properties.configurationMenu" v-if="properties.hasConfigurationMenu"></HeaderMenuComponent>
+
+    <HeaderMenuComponent :menu="properties.accountMenu" :avatar="true"></HeaderMenuComponent>
+
+    <a class="help ot_dark_grey ot_menu_color--text" href="https://support.opentalent.fr/" target="_blank">{{$t('help_access')}}</a>
 
   </v-app-bar>
 </template>
 
 <script lang="ts">
   import {defineComponent, reactive, useContext} from '@nuxtjs/composition-api'
+  import {$useMenu} from "~/use/layout/menu";
 
   export default defineComponent({
-    setup() {
-      const {store} = useContext();
+    setup(props, {emit}) {
+      const {store, $config} = useContext();
 
       const properties = reactive({
-        clipped: true,
-        fixed: true,
         miniVariant: false,
-        title: store.state.profile.organization.name
+        displayedMiniVariant: store.state.profile.access.hasLateralMenu,
+        hasConfigurationMenu: store.state.profile.access.hasConfigurationMenu,
+        hasAccessesMenu: store.state.profile.access.hasAccessesMenu,
+        hasFamilyMenu: store.state.profile.access.hasFamilyMenu,
+        title: store.state.profile.organization.name,
+        homeUrl : $config.baseURL_adminLegacy,
+        webSiteMenu: $useMenu.setUpContext().useWebSiteMenuConstruct(),
+        myAccessesMenu : $useMenu.setUpContext().useMyAccessesMenuConstruct(),
+        myFamilyMenu : $useMenu.setUpContext().useMyFamilyMenuConstruct(),
+        configurationMenu: $useMenu.setUpContext().useConfigurationMenuConstruct(),
+        accountMenu : $useMenu.setUpContext().useAccountMenuConstruct()
       })
 
+      const displayedMenu = () => {
+        properties.miniVariant = !properties.miniVariant
+        emit('handle-open-menu-click', properties.miniVariant)
+      }
+
       return {
-        properties
+        properties,
+        displayedMenu
       }
     }
   })
 </script>
 
 <style scoped>
-
+  .help {
+    padding: 14px;
+    padding-bottom: 13px;
+    font-size: 14px;
+    text-decoration: none;
+  }
 </style>

+ 71 - 0
components/Layout/HeaderMenuComponent.vue

@@ -0,0 +1,71 @@
+<template>
+  <v-menu offset-y left max-height="300">
+    <template v-slot:activator="{ on, attrs }">
+      <v-avatar v-if="avatar"
+             size="30"
+             v-bind="attrs"
+             v-on="on"
+      >
+        <img
+          src="https://cdn.vuetifyjs.com/images/john.jpg"
+          alt="John"
+        >
+      </v-avatar>
+      <v-btn v-else
+             icon
+             v-bind="attrs"
+             v-on="on"
+             color=""
+      >
+        <v-icon class="ot_white--text" small>{{menu.icon}}</v-icon>
+      </v-btn>
+    </template>
+    <v-list dense :subheader="true">
+      <v-list-item dense class="ot_light_grey">
+        <v-list-item-title v-text="$t(menu.title)"></v-list-item-title>
+      </v-list-item>
+      <template v-for="(item, index) in menu.children">
+        <v-list-item
+          :key="item.title"
+          :href="item.isExternalLink ? item.to : undefined"
+          :to="!item.isExternalLink ? item.to : undefined"
+          router
+          exact
+        >
+          <v-list-item-title v-text="$t(item.title)"></v-list-item-title>
+        </v-list-item>
+        <v-divider
+          v-if="index < menu.length - 1"
+          :key="index"
+        ></v-divider>
+      </template>
+
+    </v-list>
+  </v-menu>
+</template>
+
+<script lang="ts">
+  import {defineComponent} from '@nuxtjs/composition-api'
+
+  export default defineComponent({
+    props: {
+      menu: {
+        type: Object,
+        required: true
+      },
+      avatar: {
+        type: Boolean,
+        required: false
+      }
+    },
+
+    setup() {
+      return {
+      }
+    }
+  })
+</script>
+
+<style scoped>
+
+</style>

+ 23 - 20
components/Layout/MenuComponent.vue

@@ -1,13 +1,13 @@
 <template>
   <v-navigation-drawer
-    :mini-variant="miniVariant"
-    :clipped="clipped"
+    :mini-variant.sync="miniVariant"
+    clipped
     class="ot_dark_grey ot_menu_color--text"
     fixed
     app
   >
     <v-list>
-      <div v-for="(item, i) in menu" :key="i">
+      <div v-for="(item, i) in properties.menu" :key="i">
         <v-list-item
           v-if="!item.children"
           :href="item.isExternalLink ? item.to : undefined"
@@ -16,7 +16,7 @@
           exact
         >
           <v-list-item-action>
-            <v-icon class="ot_menu_color--text">{{ item.icon }}</v-icon>
+            <v-icon class="ot_menu_color--text" small>{{ item.icon }}</v-icon>
           </v-list-item-action>
           <v-list-item-content>
             <v-list-item-title class="ot_menu_color--text" v-text="$t(item.title)"/>
@@ -30,7 +30,7 @@
         >
           <template v-slot:activator>
             <v-list-item-action>
-              <v-icon class="ot_menu_color--text">{{ item.icon }}</v-icon>
+              <v-icon class="ot_menu_color--text" small>{{ item.icon }}</v-icon>
             </v-list-item-action>
             <v-list-item-content>
               <v-list-item-title class="ot_menu_color--text" v-text="$t(item.title)"/>
@@ -46,7 +46,7 @@
             exact
           >
             <v-list-item-action>
-              <v-icon class="ot_menu_color--text">{{ child.icon }}</v-icon>
+              <v-icon class="ot_menu_color--text" small>{{ child.icon }}</v-icon>
             </v-list-item-action>
             <v-list-item-content>
               <v-list-item-title class="ot_menu_color--text" v-text="$t(child.title)"/>
@@ -61,26 +61,23 @@
 </template>
 
 <script lang="ts">
-  import {$useMenu} from '@/use/template/menu'
-  import {defineComponent} from '@nuxtjs/composition-api'
-  import {AnyJson} from "~/types/types";
+  import {$useMenu} from '@/use/layout/menu'
+  import {defineComponent, reactive} from '@nuxtjs/composition-api'
 
   export default defineComponent({
     props: {
       miniVariant: {
         type: Boolean,
         required: true
-      },
-      clipped: {
-        type: Boolean,
-        required: true
       }
     },
     setup() {
-      const menu: AnyJson = $useMenu.setUpContext().useLateralMenuConstruct()
+      const properties = reactive({
+        menu: $useMenu.setUpContext().useLateralMenuConstruct()
+      })
 
       return {
-        menu
+        properties
       }
     }
   })
@@ -90,22 +87,28 @@
   .v-list-item__action, .v-list-group__header__prepend-icon {
     margin-right: 10px !important;
   }
+
   .v-application--is-ltr .v-list-group--no-action > .v-list-group__items > .v-list-item {
     padding-left: 30px;
   }
-  .v-list-item__title{
+
+  .v-list-item__title {
     font-size: 14px;
   }
-  .v-icon.v-icon{
-    font-size: 16px;
-  }
-  .v-list-item{
+
+  .v-list-item {
     min-height: 10px !important;
   }
+
   .v-list-item__action {
     margin: 10px 0;
   }
+
   .v-list-item__content {
     padding: 8px 0;
   }
+
+  .home_menu {
+    font-size: 23px;
+  }
 </style>

+ 48 - 0
components/Layout/NotificationComponent.vue

@@ -0,0 +1,48 @@
+<template>
+  <v-menu offset-y>
+    <template v-slot:activator="{ on, attrs }">
+      <v-btn icon
+             v-bind="attrs"
+             v-on="on"
+      >
+        <v-icon class="ot_white--text" small>fa-bell</v-icon>
+      </v-btn>
+    </template>
+    <v-list dense>
+      <template v-for="(item, index) in properties.menu">
+        <v-list-item :key="item.title">
+          <v-list-item-title v-text="$t(item.title)"></v-list-item-title>
+        </v-list-item>
+        <v-divider
+          v-if="index < properties.menu.length - 1"
+          :key="index"
+        ></v-divider>
+      </template>
+
+    </v-list>
+  </v-menu>
+</template>
+
+<script lang="ts">
+  import {$useMenu} from '@/use/layout/menu'
+  import {defineComponent, reactive} from '@nuxtjs/composition-api'
+  import {AnyJson} from "~/types/types";
+
+  export default defineComponent({
+    setup() {
+      const menu: AnyJson = $useMenu.setUpContext().useConfigurationMenuConstruct()
+
+      const properties = reactive({
+        menu: menu
+      })
+
+      return {
+        properties
+      }
+    }
+  })
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 7
components/List/ListComponent.vue

@@ -40,11 +40,5 @@
   })
 </script>
 
-<style>
-  .e-grid .e-gridheader {
-    position: -webkit-sticky;
-    position: sticky;
-    top: 58px; /* The height of top nav menu. */
-    z-index: 1;
-  }
+<style scoped>
 </style>

+ 1 - 1
config/abilities/pages/addressBook.yaml

@@ -2,7 +2,7 @@
     action: 'display'
     services:
       access :
-        - {function: hasAbility, parameters: [{action: 'read', subject: 'user'}]}
+        - {function: hasAbility, parameters: [{action: 'read', subject: 'users'}]}
       organization  :
         - {function: hasModule, parameters: ['Users']}
 

+ 0 - 36
config/abilities/pages/admin2ios.yaml

@@ -22,42 +22,6 @@
       organization  :
         - {function: hasModule, parameters: ['CorePremium']}
 
-  actions_lead_page:
-    action: 'display'
-    services:
-      organization  :
-        - {function: hasModule, parameters: ['Admin2IOS']}
-
-  renewall_list_page:
-    action: 'display'
-    services:
-      organization  :
-        - {function: hasModule, parameters: ['Admin2IOS']}
-
-  settlements_page:
-    action: 'display'
-    services:
-      organization  :
-        - {function: hasModule, parameters: ['Admin2IOS']}
-
-  pendings_settlements_page:
-    action: 'display'
-    services:
-      organization  :
-        - {function: hasModule, parameters: ['Admin2IOS']}
-
-  outages_notice_page:
-    action: 'display'
-    services:
-      organization  :
-        - {function: hasModule, parameters: ['Admin2IOS']}
-
-  degraded_page:
-    action: 'display'
-    services:
-      organization  :
-        - {function: hasModule, parameters: ['Admin2IOS']}
-
   dgv_page:
     action: 'display'
     services:

+ 103 - 0
config/abilities/pages/parameters.yaml

@@ -0,0 +1,103 @@
+  organization_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'read', subject: 'organization'}]}
+      organization:
+        - {function: hasModule, parameters: ['GeneralConfig']}
+
+  cmf_licence_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'read', subject: 'organization'}]}
+      organization:
+        - {function: hasModule, parameters: ['GeneralConfig']}
+        - {function: isCmf}
+
+  parameters_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'read', subject: 'general-config'}]}
+      organization:
+        - {function: hasModule, parameters: ['GeneralConfig']}
+
+  place_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'read', subject: 'place'}]}
+      organization:
+        - {function: hasModule, parameters: ['GeneralConfig']}
+
+  education_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'read', subject: 'pedagogics-administration'}]}
+      organization:
+        - {function: hasModule, parameters: ['PedagogicsAdministation']}
+
+  tag_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'manage', subject: 'tagg'}]}
+      organization:
+        - {function: hasModule, parameters: ['TaggAdvanced']}
+
+  activities_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'read', subject: 'activity'}]}
+      organization:
+        - {function: hasModule, parameters: ['GeneralConfig']}
+
+  billing_settings_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'read', subject: 'billings-administration'}]}
+      organization:
+        - {function: hasModule, parameters: ['BillingAdministration']}
+
+  online_registration_settings_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'read', subject: 'onlineregistration-administration'}]}
+      organization:
+        - {function: hasModule, parameters: ['IEL']}
+        - {function: isSchool}
+
+  transition_next_year_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'manage', subject: 'pedagogics-administration'}]}
+      organization:
+        - {function: hasModule, parameters: ['PedagogicsAdministation']}
+
+  course_duplication_page:
+    action: 'display'
+    services:
+      access:
+        - {function: hasAbility, parameters: [{action: 'manage', subject: 'pedagogics-administration'}]}
+      organization:
+        - {function: hasModule, parameters: ['PedagogicsAdministation']}
+
+  import_page:
+    action: 'display'
+    services:
+      access:
+        - function: hasAbility
+          parameters:
+            - {action: 'manage', subject: 'user'}
+            - {action: 'manage', subject: 'equipments'}
+      organization:
+        - function: hasModule
+          parameters:
+            - 'Users'
+            - 'Equipments'

+ 1 - 0
config/nuxtConfig/env.js

@@ -5,6 +5,7 @@ export default {
     artist_product: 'artist',
     artist_premium_product: 'artist-premium',
     manager_product: 'manager',
+    cmf_network: 'CMF',
   },
   publicRuntimeConfig: {
     http: {

+ 1 - 0
config/nuxtConfig/head.js

@@ -16,6 +16,7 @@ export default {
   // Global CSS (https://go.nuxtjs.dev/config-css)
   css: [
     '@/assets/css/import.scss',
+    '@/assets/css/global.scss',
     '@fortawesome/fontawesome-free/css/all.css'
   ]
 }

+ 1 - 1
config/nuxtConfig/plugins.js

@@ -1,7 +1,7 @@
 export default {
   // Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
   plugins: [
-    '~/plugins/grid',
+    '~/plugins/Syncfusion/grid',
     '~/plugins/Rights/ability',
     './plugins/Rights/casl.js',
     '~/plugins/Queries/http',

+ 3 - 0
config/nuxtConfig/vuetify.js

@@ -7,6 +7,8 @@ export default {
       iconfont: 'fa' || 'mdi',
     },
     customVariables: ['~/assets/css/variables.scss'],
+    customProperties: true,
+    treeShake: true,
     theme: {
       dark: false,
       themes: {
@@ -31,6 +33,7 @@ export default {
           ot_warning: '#f39c12',
           ot_info: '#3c8dbc',
           ot_menu_color: '#b8c7ce',
+          ot_content_color: '#ecf0f4',
           ot_white: '#ffffff'
         },
       }

+ 0 - 24
data/accessesData.js

@@ -1,24 +0,0 @@
-export default async function accessesData() {
-  return {
-    "@context": "\/api\/contexts\/Access",
-    "@id": "\/api\/accesses\/64",
-    "@type": "Access",
-    "id": 64,
-    "person": {
-      "@type": "Person",
-      "@id": "_:771",
-      "id": 552581,
-      "username": "",
-      "roles": [
-        "ROLE_USER"
-      ],
-      "name": "BLONDAZ PIEDIGROS",
-      "givenName": "Sylvie",
-      "__isInitialized__": true
-    },
-    "personActivity": [
-      "\/api\/person_activities\/58",
-      "\/api\/person_activities\/59"
-    ]
-  }
-}

+ 0 - 26
data/personActivitiesData.js

@@ -1,26 +0,0 @@
-export default async function personActivitiesData(){
-  return {
-    "@context": "\/api\/contexts\/PersonActivity",
-    "@id": "\/api\/accesses\/64\/person_activities",
-    "@type": "hydra:Collection",
-    "hydra:member": [
-      {
-        "@id": "\/api\/person_activities\/58",
-        "@type": "PersonActivity",
-        "id": 58,
-        "complementSpeciality": "Trompette",
-        "startDate": "1977-09-01T00:00:00+00:00",
-        "access": "\/api\/accesses\/64"
-      },
-      {
-        "@id": "\/api\/person_activities\/59",
-        "@type": "PersonActivity",
-        "id": 59,
-        "complementSpeciality": "Guitare",
-        "startDate": "2015-09-02T00:00:00+00:00",
-        "access": "\/api\/accesses\/64"
-      }
-    ],
-    "hydra:totalItems": 2
-  }
-}

+ 16 - 0
lang/layout/fr-FR.js

@@ -71,5 +71,21 @@ export default (context, locale) => {
     tree_menu: 'Gestion de l\'arbre',
     website: 'Site internet',
     advanced_modification: 'Modifications avancées',
+    simple_modification: 'Modifications simplifiées',
+    create: 'Créer',
+    help_access: 'Accès aide',
+    configuration: 'Configuration',
+    organization_page: 'Fiche de la structure',
+    cmf_licence_generate: 'Générer la licence CMF de la structure',
+    parameters: 'Préférences',
+    place: 'Lieux',
+    education: 'Enseignements',
+    tag: 'Tags',
+    activities: 'Sections',
+    billing_settings: 'Facturation',
+    online_registration_settings: 'Pré-inscription(s) en ligne',
+    transition_next_year: 'Passage à l\'année suivante',
+    course_duplication: 'Dupliquer les cours hebdomadaires',
+    import: 'Importer',
   })
 }

+ 16 - 6
layouts/default.vue

@@ -4,11 +4,12 @@
     </client-only>
 
     <v-app dark>
-      <MenuComponent :miniVariant="properties.miniVariant" :clipped="properties.clipped"></MenuComponent>
 
-      <HeaderComponent></HeaderComponent>
+      <MenuComponent  v-if="properties.displayedMenu" :miniVariant="properties.miniVariant"></MenuComponent>
 
-      <v-main class="ot_super_light_grey">
+      <HeaderComponent v-on:handle-open-menu-click="handleOpenMenu"></HeaderComponent>
+
+      <v-main class="ot_content_color">
         <v-container>
           <nuxt/>
         </v-container>
@@ -18,17 +19,26 @@
 </template>
 
 <script lang="ts">
-  import {defineComponent, reactive, useContext} from '@nuxtjs/composition-api'
+  import {defineComponent, reactive, ref, useContext, computed} from '@nuxtjs/composition-api'
 
   export default defineComponent({
+    name: 'defaultLayout',
     setup() {
+      const {store} = useContext()
+
       const properties = reactive({
-        clipped: true,
+        clipped: false,
         miniVariant: false,
+        displayedMenu:  store.state.profile.access.hasLateralMenu
       })
 
+      const handleOpenMenu = (miniVariant:boolean) => {
+        properties.miniVariant = miniVariant
+      }
+
       return {
-        properties
+        properties,
+        handleOpenMenu
       }
     },
     middleware: ['auth']

+ 1 - 0
layouts/login.vue

@@ -10,6 +10,7 @@
 
 <script>
   export default {
+    name: 'loginLayout',
     data () {
       return {
 

+ 0 - 1
pages/accesses/_id.vue

@@ -29,7 +29,6 @@
   import {Access} from '@/models/Access/Access'
   import {Person} from '@/models/Person/Person'
   import {PersonActivity} from '@/models/Person/PersonActivity'
-  import accessesData from '@/data/accessesData'
 
   export default defineComponent({
     setup() {

+ 2 - 1
pages/index.vue

@@ -8,9 +8,10 @@
 
 
 <script lang="ts">
-  import {defineComponent, useContext} from '@nuxtjs/composition-api'
+  import {defineComponent} from '@nuxtjs/composition-api'
 
   export default defineComponent({
+    name: 'index',
     setup() {
       return {
 

+ 15 - 0
pages/organization/edit.vue

@@ -0,0 +1,15 @@
+<template>
+    <main>
+      Fiche de l'organisation
+    </main>
+</template>
+
+<script>
+    export default {
+        name: "edit"
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 0 - 0
plugins/grid.js → plugins/Syncfusion/grid.js


+ 24 - 12
services/profile/organizationProfile.ts

@@ -21,13 +21,24 @@ class OrganizationProfile{
    * @param {Array<string>} modules Modules à tester
    * @return {boolean}
    */
-  hasModule(modules:Array<string>) {
+  hasModule(modules:Array<string>):boolean {
     let hasModule = false;
     modules.map((module) => {
       if (this.organizationProfile.modules && this.organizationProfile.modules.indexOf(module) > -1)
-        hasModule = true;
+        hasModule = true
     });
-    return hasModule;
+    return hasModule
+  }
+
+  /**
+   * L'organization fait-elle partie du réseau CMF ?
+   * @return {boolean}
+   */
+  isCmf():boolean {
+    const networks = this.organizationProfile.networks.filter( (network:string) => {
+      return network == process.env.cmf_network
+    });
+    return networks.length > 0;
   }
 
   /**
@@ -35,7 +46,7 @@ class OrganizationProfile{
    * @return {boolean}
    */
   isSchool():boolean {
-    return this.isSchoolProduct() || this.isSchoolPremiumProduct();
+    return this.isSchoolProduct() || this.isSchoolPremiumProduct()
   }
 
   /**
@@ -43,14 +54,14 @@ class OrganizationProfile{
    * @return {boolean}
    */
   isArtist():boolean {
-    return this.isArtistProduct() || this.isArtistPremiumProduct();
+    return this.isArtistProduct() || this.isArtistPremiumProduct()
   }
 
   /**
    * L'organization possède t'elle un produit school
    * @return {boolean}
    */
-  isSchoolProduct() {
+  isSchoolProduct():boolean {
     return this.organizationProfile.product === process.env.school_product
   }
 
@@ -58,7 +69,7 @@ class OrganizationProfile{
    * L'organization possède t'elle un produit school premium
    * @return {boolean}
    */
-  isSchoolPremiumProduct() {
+  isSchoolPremiumProduct():boolean {
     return this.organizationProfile.product === process.env.school_premium_product
   }
 
@@ -66,7 +77,7 @@ class OrganizationProfile{
    * L'organization possède t'elle un produit premium
    * @return {boolean}
    */
-  isArtistProduct() {
+  isArtistProduct():boolean {
     return this.organizationProfile.product === process.env.artist_product
   }
 
@@ -74,7 +85,7 @@ class OrganizationProfile{
    * L'organization possède t'elle un produit artiste premium
    * @return {boolean}
    */
-  isArtistPremiumProduct() {
+  isArtistPremiumProduct():boolean {
     return this.organizationProfile.product === process.env.artist_premium_product
   }
 
@@ -82,7 +93,7 @@ class OrganizationProfile{
    * L'organization possède t'elle un produit manager
    * @return {boolean}
    */
-  isManagerProduct() {
+  isManagerProduct():boolean {
     return this.organizationProfile.product === process.env.manager_product
   }
 
@@ -90,7 +101,7 @@ class OrganizationProfile{
    * L'organization possède t'elledes enfants
    * @return {boolean}
    */
-  isOrganizationWithChildren(){
+  isOrganizationWithChildren():any{
     return this.organizationProfile.hasChildren;
   }
 
@@ -104,7 +115,8 @@ class OrganizationProfile{
       isSchool: this.isSchool.bind(this),
       isArtist: this.isArtist.bind(this),
       isManagerProduct: this.isManagerProduct.bind(this),
-      isOrganizationWithChildren: this.isOrganizationWithChildren.bind(this)
+      isOrganizationWithChildren: this.isOrganizationWithChildren.bind(this),
+      isCmf: this.isCmf.bind(this),
     }
   }
 }

+ 17 - 1
store/profile/access.ts

@@ -16,7 +16,11 @@ export const state = () => ({
   isStudent: false,
   isTeacher: false,
   isMember: false,
-  isOther: false
+  isOther: false,
+  hasLateralMenu: true,
+  hasConfigurationMenu: true,
+  hasAccessesMenu: true,
+  hasFamilyMenu: true
 })
 
 export const mutations = {
@@ -67,6 +71,18 @@ export const mutations = {
   },
   setIsOther(state:accessState, isRole:boolean){
     state.isOther = isRole
+  },
+  setHasLateralMenu(state:accessState, hasLateralMenu:boolean){
+    state.hasLateralMenu = hasLateralMenu
+  },
+  setHasConfigurationMenu(state:accessState, hasConfigurationMenu:boolean){
+    state.hasConfigurationMenu = hasConfigurationMenu
+  },
+  setHasAccessesMenu(state:accessState, hasAccessesMenu:boolean){
+    state.hasAccessesMenu = hasAccessesMenu
+  },
+  setHasFamilyMenu(state:accessState, hasFamilyMenu:boolean){
+    state.hasFamilyMenu = hasFamilyMenu
   }
 }
 

+ 13 - 1
store/profile/organization.ts

@@ -2,16 +2,21 @@ import {organizationState} from "~/types/types";
 import * as _ from "lodash";
 
 export const state = () => ({
+  id: null,
   name: '',
   product: '',
   modules: [],
   hasChildren: false,
+  networks: [],
   website: '',
   subDomain: '',
   parents: []
 })
 
 export const mutations = {
+  setId(state:organizationState, id:number){
+    state.id = id
+  },
   setName(state:organizationState, name:string){
     state.name = name
   },
@@ -24,6 +29,9 @@ export const mutations = {
   setHasChildren(state:organizationState, hasChildren:boolean) {
     state.hasChildren = hasChildren
   },
+  setNetworks(state:organizationState, networks:Array<string>) {
+    state.networks = networks
+  },
   setParents(state:organizationState, parents:Array<organizationState>) {
     state.parents = parents
   },
@@ -40,19 +48,23 @@ export const mutations = {
 
 export const actions = {
   setProfile(context:any, profile:any){
+    context.commit('setId', profile.id)
     context.commit('setName', profile.name)
     context.commit('setProduct', profile.product)
     context.commit('setWebsite', profile.website)
     context.commit('setSubDomain', profile.subDomain)
     context.commit('setModules', profile.modules)
     context.commit('setHasChildren', profile.hasChildren)
+    context.commit('setNetworks', profile.networks)
 
     _.each(profile.parents, parent => {
       const p:organizationState = {
+        id: parent.id,
         name: parent.name,
         website: parent.website,
         subDomain: parent.subDomain,
-        parents: []
+        parents: [],
+        networks: [],
       }
       context.commit('addParent', p)
     });

+ 1 - 1
test/use/template/menu.spec.js → test/use/layout/menu.spec.js

@@ -1,4 +1,4 @@
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 test('test constructMenu', () => {
   const menuWithoutChildren = new BaseMenu({'baseURL_adminLegacy': 'base_url'}).constructMenu('icon', 'children', '/url', false)

+ 8 - 2
types/types.d.ts

@@ -13,8 +13,8 @@ declare module '@nuxt/types' {
 }
 
 interface ItemMenu {
-  icon: string,
   title: string,
+  icon?: string,
   to?: string,
   children?: ItemsMenu,
   isExternalLink?: boolean,
@@ -49,15 +49,21 @@ interface accessState {
   isStudent: boolean,
   isTeacher: boolean,
   isMember: boolean,
-  isOther: boolean
+  isOther: boolean,
+  hasLateralMenu: boolean,
+  hasConfigurationMenu: boolean,
+  hasAccessesMenu: boolean,
+  hasFamilyMenu: boolean
 }
 interface AccessStore extends Store<{profile:{access:accessState}}> {}
 
 interface organizationState {
+  id: number,
   name: string,
   product?: string,
   modules?: Array<string>,
   hasChildren?: boolean,
+  networks: Array<string>,
   website?: string,
   subDomain?: string,
   parents: Array<organizationState>,

+ 8 - 8
use/template/Menus/accessMenu.ts → use/layout/Menus/accessMenu.ts

@@ -1,6 +1,6 @@
 import {ItemMenu, ItemsMenu} from "~/types/types";
 import {$organizationProfile} from "~/services/profile/organizationProfile";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 class AccessMenu extends BaseMenu{
   private $ability:any;
@@ -22,33 +22,33 @@ class AccessMenu extends BaseMenu{
     if (this.$ability().can('display', 'accesses_page')) {
       const organization = $organizationProfile(this.$store)
       let to = organization.isSchool() ? `/students/list/` : `/adherent/list/`
-      children.push(this.constructMenu('fa-user', 'person', to, true))
+      children.push(this.constructMenu('person', 'fa-user',  to, true))
     }
 
     if (this.$ability().can('display', 'student_registration_page')) {
-      children.push(this.constructMenu('fa-users', 'family_view', '/student_registration/new', true))
+      children.push(this.constructMenu('family_view', 'fa-users', '/student_registration/new', true))
     }
 
     if (this.$ability().can('display', 'education_student_next_year_page')) {
-      children.push(this.constructMenu('fa-list-alt', 'education_student_next_year', '/education_student_next_year/list/', true))
+      children.push(this.constructMenu('education_student_next_year', 'fa-list-alt', '/education_student_next_year/list/', true))
     }
 
     if (this.$ability().can('display', 'commissions_page')) {
-      children.push(this.constructMenu('fa-street-view', 'commissions', '/commissions/list/', true))
+      children.push(this.constructMenu('commissions', 'fa-street-view', '/commissions/list/', true))
     }
 
     if (this.$ability().can('display', 'network_children_page')) {
-      children.push(this.constructMenu('fa-sitemap', 'network', 'networks/list/', true))
+      children.push(this.constructMenu('network', 'fa-sitemap', 'networks/list/', true))
     }
 
     if (this.$ability().can('display', 'network_parents_page')) {
-      children.push(this.constructMenu('fa-sitemap', 'my_network', '/network_artist_schools/list/', true))
+      children.push(this.constructMenu('my_network', 'fa-sitemap', '/network_artist_schools/list/', true))
     }
 
     if(children.length === 1){
       return children[0];
     }
-    return children.length > 0 ? this.constructMenu('fa-address-book', 'address_book', undefined, undefined, children) : null;
+    return children.length > 0 ? this.constructMenu('address_book', 'fa-address-book', undefined, undefined, children) : null;
   }
 }
 

+ 29 - 0
use/layout/Menus/accountMenu.ts

@@ -0,0 +1,29 @@
+import {ItemMenu, ItemsMenu} from "~/types/types";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
+
+class AccountMenu extends BaseMenu{
+  private $ability:any;
+  private $store:any;
+
+  constructor($config:any, $ability:any, $store: any) {
+    super($config)
+    this.$ability = $ability
+    this.$store = $store
+  }
+
+  /**
+   * Construit le menu Header Configuration ou null si aucune page accessible
+   * @return {ItemMenu | null}
+   */
+  getHeaderMenu():ItemMenu | null {
+    const children:ItemsMenu = [];
+
+    if (this.$ability().can('display', 'organization_page')) {
+      children.push(this.constructMenu('organization_page', undefined,'/organization/edit'))
+    }
+
+    return children.length > 0 ? this.constructMenu('configuration', 'fa-user', undefined, undefined, children) : null;
+  }
+}
+
+export const getAccountMenu = ($config:any, $ability:any, $store:any) => new AccountMenu($config, $ability, $store).getHeaderMenu()

+ 54 - 0
use/layout/Menus/admin2iosMenu.ts

@@ -0,0 +1,54 @@
+import {ItemMenu, ItemsMenu} from "~/types/types";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
+
+class Admin2iosMenu extends BaseMenu{
+  private $ability:any;
+
+  constructor($config:any, $ability:any) {
+    super($config)
+    this.$ability = $ability
+  }
+
+  /**
+   * Construit le menu Administration 2ios ou null si aucune page accessible
+   * @return {ItemMenu | null}
+   */
+  getMenu():ItemMenu | null {
+    const children:ItemsMenu = [];
+
+    if (this.$ability().can('display', 'all_accesses_page')) {
+      children.push(this.constructMenu('all_accesses', 'fa-users',  '/all_accesses/list/', true))
+    }
+
+    if (this.$ability().can('display', 'all_organizations_page')) {
+      children.push(this.constructMenu('all_organizations', 'fa-building',  '/organization_params/list/', true))
+    }
+
+    if (this.$ability().can('display', 'tips_page')) {
+      children.push(this.constructMenu('tips', 'fa-info-circle',  '/tips/list/', true))
+    }
+
+    if (this.$ability().can('display', 'dgv_page')) {
+      children.push(this.constructMenu('dgv', 'fa-house-damage',  '/admin2ios/dgv', true))
+    }
+
+    if (this.$ability().can('display', 'cmf_cotisation_page')) {
+      children.push(this.constructMenu('cmf_cotisation', 'fa-info-circle',  '/admin2ios/cotisationcmf', true))
+    }
+
+    if (this.$ability().can('display', 'right_page')) {
+      children.push(this.constructMenu('right_menu', 'fa-balance-scale-right',  '/admin2ios/right', true))
+    }
+
+    if (this.$ability().can('display', 'tree_page')) {
+      children.push(this.constructMenu('tree_menu', 'fa-sitemap',  '/admin2ios/tree', true))
+    }
+
+    if(children.length === 1){
+      return children[0];
+    }
+    return children.length > 0 ? this.constructMenu('admin2ios', 'fa-sitemap', undefined, undefined, children) : null;
+  }
+}
+
+export const getAdmin2iosMenu = ($config:any, $ability:any) => new Admin2iosMenu($config, $ability).getMenu()

+ 4 - 4
use/template/Menus/agendaMenu.ts → use/layout/Menus/agendaMenu.ts

@@ -1,5 +1,5 @@
 import {ItemMenu, ItemsMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 class AgendaMenu extends BaseMenu{
   private $ability:any;
@@ -17,17 +17,17 @@ class AgendaMenu extends BaseMenu{
     const children:ItemsMenu = [];
 
     if (this.$ability().can('display', 'agenda_page')) {
-      children.push(this.constructMenu('fa-calendar-alt', 'schedule', '/calendar', true))
+      children.push(this.constructMenu('schedule', 'fa-calendar-alt',  '/calendar', true))
     }
 
     if (this.$ability().can('display', 'attendance_page')) {
-      children.push(this.constructMenu('fa-calendar-check', 'attendances', '/attendances/list/', true))
+      children.push(this.constructMenu('attendances', 'fa-calendar-check',  '/attendances/list/', true))
     }
 
     if(children.length === 1){
       return children[0];
     }
-    return children.length > 0 ? this.constructMenu('fa-calendar-alt', 'schedule', undefined, undefined, children) : null;
+    return children.length > 0 ? this.constructMenu('schedule', 'fa-calendar-alt',  undefined, undefined, children) : null;
   }
 }
 

+ 2 - 2
use/template/Menus/baseMenu.ts → use/layout/Menus/baseMenu.ts

@@ -17,10 +17,10 @@ class BaseMenu{
    * @param {boolean} isExternalLink est-ce un lien renvoyant vers l'extérieur?
    * @return {ItemMenu}
    */
-  constructMenu(icon: string, title: string, link?: string, isOldLink?: boolean, children?: Array<ItemMenu>, isExternalLink?: boolean): ItemMenu{
+  constructMenu(title: string, icon?: string, link?: string, isOldLink?: boolean, children?: Array<ItemMenu>, isExternalLink?: boolean): ItemMenu{
     return children ? {
-      icon: icon,
       title: title,
+      icon: icon,
       children: children,
     } : {
       icon: icon,

+ 10 - 10
use/template/Menus/billingMenu.ts → use/layout/Menus/billingMenu.ts

@@ -1,5 +1,5 @@
 import {ItemMenu, ItemsMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 class BillingMenu extends BaseMenu{
   private $ability:any;
@@ -17,41 +17,41 @@ class BillingMenu extends BaseMenu{
     const children:ItemsMenu = [];
 
     if (this.$ability().can('display', 'billing_product_page')) {
-      children.push(this.constructMenu('fa-cube', 'billing_product', '/intangibles/list/', true))
+      children.push(this.constructMenu('billing_product', 'fa-cube',  '/intangibles/list/', true))
     }
 
     if (this.$ability().can('display', 'billing_products_by_student_page')) {
-      children.push(this.constructMenu('fa-cubes', 'billing_products_by_student', '/access_intangibles/list/', true))
+      children.push(this.constructMenu('billing_products_by_student', 'fa-cubes',  '/access_intangibles/list/', true))
     }
 
     if (this.$ability().can('display', 'billing_edition_page')) {
-      children.push(this.constructMenu('fa-copy', 'billing_edition', '/billing_edition', true))
+      children.push(this.constructMenu('billing_edition', 'fa-copy',  '/billing_edition', true))
     }
 
     if (this.$ability().can('display', 'billing_accounting_page')) {
-      children.push(this.constructMenu('fa-file-alt', 'billing_accounting', '/bill_accountings/list/', true))
+      children.push(this.constructMenu('billing_accounting', 'fa-file-alt',  '/bill_accountings/list/', true))
     }
 
     if (this.$ability().can('display', 'billing_payment_list_page')) {
-      children.push(this.constructMenu('fa-credit-card', 'billing_payment_list', '/bill_payments_list/list/', true))
+      children.push(this.constructMenu('billing_payment_list', 'fa-credit-card',  '/bill_payments_list/list/', true))
     }
 
     if (this.$ability().can('display', 'pes_page')) {
-      children.push(this.constructMenu('fa-align-justify', 'pes_export', '/pes/list/', true))
+      children.push(this.constructMenu('pes_export', 'fa-align-justify',  '/pes/list/', true))
     }
 
     if (this.$ability().can('display', 'berger_levrault_page')) {
-      children.push(this.constructMenu('fa-align-justify', 'berger_levrault_export', '/berger_levraults/list/', true))
+      children.push(this.constructMenu('berger_levrault_export', 'fa-align-justify',  '/berger_levraults/list/', true))
     }
 
     if (this.$ability().can('display', 'jvs_page')) {
-      children.push(this.constructMenu('fa-align-justify', 'jvs_export', '/jvs/list/', true))
+      children.push(this.constructMenu('jvs_export', 'fa-align-justify',  '/jvs/list/', true))
     }
 
     if(children.length === 1){
       return children[0];
     }
-    return children.length > 0 ? this.constructMenu('fa-euro-sign', 'billing', undefined, undefined, children) : null;
+    return children.length > 0 ? this.constructMenu('billing', 'fa-euro-sign',  undefined, undefined, children) : null;
   }
 }
 

+ 5 - 5
use/template/Menus/communicationMenu.ts → use/layout/Menus/communicationMenu.ts

@@ -1,5 +1,5 @@
 import {ItemMenu, ItemsMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 class CommunicationMenu extends BaseMenu{
   private $ability:any;
@@ -17,21 +17,21 @@ class CommunicationMenu extends BaseMenu{
     const children:ItemsMenu = [];
 
     if (this.$ability().can('display', 'inbox_page')) {
-      children.push(this.constructMenu('fa-inbox', 'inbox', '/messages/list/', true))
+      children.push(this.constructMenu('inbox', 'fa-inbox',  '/messages/list/', true))
     }
 
     if (this.$ability().can('display', 'message_send_page')) {
-      children.push(this.constructMenu('fa-paper-plane', 'message_send', '/messagessends/list/', true))
+      children.push(this.constructMenu('message_send', 'fa-paper-plane',  '/messagessends/list/', true))
     }
 
     if (this.$ability().can('display', 'message_templates_page')) {
-      children.push(this.constructMenu('fa-edit', 'message_templates', '/templates/list/', true))
+      children.push(this.constructMenu('message_templates', 'fa-edit',  '/templates/list/', true))
     }
 
     if(children.length === 1){
       return children[0];
     }
-    return children.length > 0 ? this.constructMenu('fa-comments', 'communication', undefined, undefined, children) : null;
+    return children.length > 0 ? this.constructMenu('communication', 'fa-comments',  undefined, undefined, children) : null;
   }
 }
 

+ 73 - 0
use/layout/Menus/configurationMenu.ts

@@ -0,0 +1,73 @@
+import {ItemMenu, ItemsMenu} from "~/types/types";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
+
+class ConfigurationMenu extends BaseMenu{
+  private $ability:any;
+  private $store:any;
+
+  constructor($config:any, $ability:any, $store: any) {
+    super($config)
+    this.$ability = $ability
+    this.$store = $store
+  }
+
+  /**
+   * Construit le menu Header Configuration ou null si aucune page accessible
+   * @return {ItemMenu | null}
+   */
+  getHeaderMenu():ItemMenu | null {
+    const children:ItemsMenu = [];
+
+    if (this.$ability().can('display', 'organization_page')) {
+      children.push(this.constructMenu('organization_page', undefined,'/organization/edit'))
+    }
+
+    if (this.$ability().can('display', 'cmf_licence_page')) {
+      children.push(this.constructMenu('cmf_licence_generate', undefined,'/attendances/list/', true))
+    }
+
+    if (this.$ability().can('display', 'parameters_page')) {
+      children.push(this.constructMenu('parameters', undefined,'/main/edit/parameters/' + this.$store.state.profile.organization.id, true))
+    }
+
+    if (this.$ability().can('display', 'place_page')) {
+      children.push(this.constructMenu('place', undefined,'/places/list/', true))
+    }
+
+    if (this.$ability().can('display', 'education_page')) {
+      children.push(this.constructMenu('education', undefined,'/educations/list/', true))
+    }
+
+    if (this.$ability().can('display', 'tag_page')) {
+      children.push(this.constructMenu('tag', undefined,'/taggs/list/', true))
+    }
+
+    if (this.$ability().can('display', 'activities_page')) {
+      children.push(this.constructMenu('activities', undefined,'/activities/list/', true))
+    }
+
+    if (this.$ability().can('display', 'billing_settings_page')) {
+      children.push(this.constructMenu('billing_settings', undefined,'/billing_settings/' + this.$store.state.profile.organization.id, true))
+    }
+
+    if (this.$ability().can('display', 'online_registration_settings_page')) {
+      children.push(this.constructMenu('online_registration_settings', undefined,'/online_registration_settings/' + this.$store.state.profile.organization.id, true))
+    }
+
+    if (this.$ability().can('display', 'transition_next_year_page')) {
+      children.push(this.constructMenu('transition_next_year', undefined,'/attendances/list/', true))
+    }
+
+    if (this.$ability().can('display', 'course_duplication_page')) {
+      children.push(this.constructMenu('course_duplication', undefined,'/duplicate_courses/', true))
+    }
+
+    if (this.$ability().can('display', 'import_page')) {
+      children.push(this.constructMenu('import', undefined,'/import/all/', true))
+    }
+
+    return children.length > 0 ? this.constructMenu('configuration', 'fa-cogs', undefined, undefined, children) : null;
+  }
+}
+
+export const getConfigurationMenu = ($config:any, $ability:any, $store:any) => new ConfigurationMenu($config, $ability, $store).getHeaderMenu()

+ 94 - 0
use/layout/Menus/cotisationsMenu.ts

@@ -0,0 +1,94 @@
+import {ItemMenu, ItemsMenu} from "~/types/types";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
+
+class CotisationsMenu extends BaseMenu{
+  private $ability:any;
+
+  constructor($config:any, $ability:any) {
+    super($config)
+    this.$ability = $ability
+  }
+
+  /**
+   * Construit le menu Cotisations ou null si aucune page accessible
+   * @return {ItemMenu | null}
+   */
+  getMenu():ItemMenu | null {
+    const children:ItemsMenu = [];
+
+    if (this.$ability().can('display', 'rate_cotisation_page')) {
+      children.push(this.constructMenu('rate_cotisation', 'fa-euro-sign',  '/cotisation/rate', true))
+    }
+
+    if (this.$ability().can('display', 'parameters_cotisation_page')) {
+      children.push(this.constructMenu('parameters_cotisation', 'fa-euro-sign',  '/cotisation/parameter', true))
+    }
+
+    if (this.$ability().can('display', 'send_cotisation_page')) {
+      children.push(this.constructMenu('send_cotisation', 'fa-euro-sign',  '/cotisation/send', true))
+    }
+
+    if (this.$ability().can('display', 'state_cotisation_page')) {
+      children.push(this.constructMenu('state_cotisation', 'fa-euro-sign',  '/cotisation/state', true))
+    }
+
+    if (this.$ability().can('display', 'pay_cotisation_page')) {
+      children.push(this.constructMenu('pay_cotisation', 'fa-euro-sign',  '/cotisation/pay', true))
+    }
+
+    if (this.$ability().can('display', 'check_cotisation_page')) {
+      children.push(this.constructMenu('check_cotisation', 'fa-euro-sign',  '/cotisation/check', true))
+    }
+
+    if (this.$ability().can('display', 'ledger_cotisation_page')) {
+      children.push(this.constructMenu('ledger_cotisation', 'fa-euro-sign',  '/cotisation/ledger', true))
+    }
+
+    if (this.$ability().can('display', 'magazine_cotisation_page')) {
+      children.push(this.constructMenu('magazine_cotisation', 'fa-euro-sign',  '/cotisation/magazine', true))
+    }
+
+    if (this.$ability().can('display', 'ventilated_cotisation_page')) {
+      children.push(this.constructMenu('ventilated_cotisation', 'fa-euro-sign',  '/cotisation/ventilated', true))
+    }
+
+    if (this.$ability().can('display', 'pay_erase_cotisation_page')) {
+      children.push(this.constructMenu('pay_erase_cotisation', 'fa-euro-sign',  '/cotisation/payerase', true))
+    }
+
+    if (this.$ability().can('display', 'resume_cotisation_page')) {
+      children.push(this.constructMenu('resume_cotisation', 'fa-euro-sign',  '/cotisation/resume', true))
+    }
+
+    if (this.$ability().can('display', 'history_cotisation_page')) {
+      children.push(this.constructMenu('history_cotisation', 'fa-euro-sign',  '/cotisation/history', true))
+    }
+
+    if (this.$ability().can('display', 'call_cotisation_page')) {
+      children.push(this.constructMenu('call_cotisation', 'fa-euro-sign',  '/cotisation/call', true))
+    }
+
+    if (this.$ability().can('display', 'history_struture_cotisation_page')) {
+      children.push(this.constructMenu('history_struture_cotisation', 'fa-euro-sign',  '/cotisation/historystructure', true))
+    }
+
+    if (this.$ability().can('display', 'insurance_cotisation_page')) {
+      children.push(this.constructMenu('insurance_cotisation', 'fa-euro-sign',  '/cotisation/insurance', true))
+    }
+
+    if (this.$ability().can('display', 'resume_all_cotisation_page')) {
+      children.push(this.constructMenu('resume_all_cotisation', 'fa-euro-sign',  '/cotisation/resumeall', true))
+    }
+
+    if (this.$ability().can('display', 'resume_pay_cotisation_page')) {
+      children.push(this.constructMenu('resume_pay_cotisation', 'fa-euro-sign',  '/cotisation/resumepay', true))
+    }
+
+    if(children.length === 1){
+      return children[0];
+    }
+    return children.length > 0 ? this.constructMenu('cotisations', 'fa-money-bill',  undefined, undefined, children) : null;
+  }
+}
+
+export const getCotisationsMenu = ($config:any, $ability:any) => new CotisationsMenu($config, $ability).getMenu()

+ 2 - 2
use/template/Menus/donorsMenu.ts → use/layout/Menus/donorsMenu.ts

@@ -1,5 +1,5 @@
 import {ItemMenu, ItemsMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 class DonorsMenu extends BaseMenu{
   private $ability:any;
@@ -15,7 +15,7 @@ class DonorsMenu extends BaseMenu{
    */
   getMenu():ItemMenu | null {
     if (this.$ability().can('display', 'donors_page')) {
-      return this.constructMenu('far fa-handshake', 'donors', '/donors/list/', true)
+      return this.constructMenu('donors', 'far fa-handshake',  '/donors/list/', true)
     }
     return null;
   }

+ 8 - 8
use/template/Menus/educationalMenu.ts → use/layout/Menus/educationalMenu.ts

@@ -1,5 +1,5 @@
 import {ItemMenu, ItemsMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 class EducationalMenu extends BaseMenu{
   private $ability:any;
@@ -17,33 +17,33 @@ class EducationalMenu extends BaseMenu{
     const children:ItemsMenu = [];
 
     if (this.$ability().can('display', 'criteria_notations_page')) {
-      children.push(this.constructMenu('fa-bars', 'criteria_notations', '/criteria_notations/list/', true))
+      children.push(this.constructMenu('criteria_notations', 'fa-bars',  '/criteria_notations/list/', true))
     }
 
     if (this.$ability().can('display', 'seizure_period_page')) {
-      children.push(this.constructMenu('fa-calendar-alt', 'seizure_period', '/education_teachers/list/', true))
+      children.push(this.constructMenu('seizure_period', 'fa-calendar-alt',  '/education_teachers/list/', true))
     }
 
     if (this.$ability().can('display', 'test_seizure_page')) {
-      children.push(this.constructMenu('fa-pencil-alt', 'test_seizure', '/education_input/list/', true))
+      children.push(this.constructMenu('test_seizure', 'fa-pencil-alt',  '/education_input/list/', true))
     }
 
     if (this.$ability().can('display', 'test_validation_page')) {
-      children.push(this.constructMenu('fa-check', 'test_validation', '/education_notations/list/', true))
+      children.push(this.constructMenu('test_validation', 'fa-check',  '/education_notations/list/', true))
     }
 
     if (this.$ability().can('display', 'examen_results_page')) {
-      children.push(this.constructMenu('fa-graduation-cap', 'examen_results', '/examen_convocations/list/', true))
+      children.push(this.constructMenu('examen_results', 'fa-graduation-cap',  '/examen_convocations/list/', true))
     }
 
     if (this.$ability().can('display', 'education_by_student_validation_page')) {
-      children.push(this.constructMenu('fa-check-square', 'education_by_student_validation', '/education_by_student/list/', true))
+      children.push(this.constructMenu('education_by_student_validation', 'fa-check-square',  '/education_by_student/list/', true))
     }
 
     if(children.length === 1){
       return children[0];
     }
-    return children.length > 0 ? this.constructMenu('fa-graduation-cap', 'education_state', undefined, undefined, children) : null;
+    return children.length > 0 ? this.constructMenu('education_state', 'fa-graduation-cap',  undefined, undefined, children) : null;
   }
 }
 

+ 2 - 2
use/template/Menus/equipmentMenu.ts → use/layout/Menus/equipmentMenu.ts

@@ -1,5 +1,5 @@
 import {ItemMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 class EquipmentMenu extends BaseMenu{
   private $ability:any;
@@ -15,7 +15,7 @@ class EquipmentMenu extends BaseMenu{
    */
   getMenu():ItemMenu | null {
     if (this.$ability().can('display', 'equipment_page')) {
-      return this.constructMenu('fa-cube', 'equipment', '/equipment/list', true)
+      return this.constructMenu('equipment', 'fa-cube',  '/equipment/list', true)
     }
     return null;
   }

+ 2 - 2
use/template/Menus/medalsMenu.ts → use/layout/Menus/medalsMenu.ts

@@ -1,5 +1,5 @@
 import {ItemMenu, ItemsMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 class MedalsMenu extends BaseMenu{
   private $ability:any;
@@ -15,7 +15,7 @@ class MedalsMenu extends BaseMenu{
    */
   getMenu():ItemMenu | null {
     if (this.$ability().can('display', 'medals_page')) {
-      return this.constructMenu('fa-trophy', 'medals', '/medals/list/', true)
+      return this.constructMenu('medals', 'fa-trophy',  '/medals/list/', true)
     }
     return null;
   }

+ 29 - 0
use/layout/Menus/myAccessesMenu.ts

@@ -0,0 +1,29 @@
+import {ItemMenu, ItemsMenu} from "~/types/types";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
+
+class MyAccessesMenu extends BaseMenu{
+  private $ability:any;
+  private $store:any;
+
+  constructor($config:any, $ability:any, $store: any) {
+    super($config)
+    this.$ability = $ability
+    this.$store = $store
+  }
+
+  /**
+   * Construit le menu Header Configuration ou null si aucune page accessible
+   * @return {ItemMenu | null}
+   */
+  getHeaderMenu():ItemMenu | null {
+    const children:ItemsMenu = [];
+
+    if (this.$ability().can('display', 'organization_page')) {
+      children.push(this.constructMenu('organization_page', undefined,'/organization/edit'))
+    }
+
+    return children.length > 0 ? this.constructMenu('configuration', 'fa-building', undefined, undefined, children) : null;
+  }
+}
+
+export const getMyAccessesMenu = ($config:any, $ability:any, $store:any) => new MyAccessesMenu($config, $ability, $store).getHeaderMenu()

+ 29 - 0
use/layout/Menus/myFamilyMenu.ts

@@ -0,0 +1,29 @@
+import {ItemMenu, ItemsMenu} from "~/types/types";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
+
+class MyFamilyMenu extends BaseMenu{
+  private $ability:any;
+  private $store:any;
+
+  constructor($config:any, $ability:any, $store: any) {
+    super($config)
+    this.$ability = $ability
+    this.$store = $store
+  }
+
+  /**
+   * Construit le menu Header Configuration ou null si aucune page accessible
+   * @return {ItemMenu | null}
+   */
+  getHeaderMenu():ItemMenu | null {
+    const children:ItemsMenu = [];
+
+    if (this.$ability().can('display', 'organization_page')) {
+      children.push(this.constructMenu('organization_page', undefined,'/organization/edit'))
+    }
+
+    return children.length > 0 ? this.constructMenu('configuration', 'fa-users', undefined, undefined, children) : null;
+  }
+}
+
+export const getMyFamilyMenu = ($config:any, $ability:any, $store:any) => new MyFamilyMenu($config, $ability, $store).getHeaderMenu()

+ 5 - 5
use/template/Menus/statsMenu.ts → use/layout/Menus/statsMenu.ts

@@ -1,5 +1,5 @@
 import {ItemMenu, ItemsMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 
 class StatsMenu extends BaseMenu{
   private $ability:any;
@@ -17,21 +17,21 @@ class StatsMenu extends BaseMenu{
     const children:ItemsMenu = [];
 
     if (this.$ability().can('display', 'report_activity_page')) {
-      children.push(this.constructMenu('fa-chart-bar', 'report_activity', '/report_activity', true))
+      children.push(this.constructMenu('report_activity', 'fa-chart-bar',  '/report_activity', true))
     }
 
     if (this.$ability().can('display', 'fede_stats_page')) {
-      children.push(this.constructMenu('fa-chart-bar', 'fede_stats', '/statistic/membersfedeonly', true))
+      children.push(this.constructMenu('fede_stats', 'fa-chart-bar',  '/statistic/membersfedeonly', true))
     }
 
     if (this.$ability().can('display', 'structure_stats_page')) {
-      children.push(this.constructMenu('fa-chart-bar', 'structure_stats', '/statistic/membersfedeassos', true))
+      children.push(this.constructMenu('structure_stats', 'fa-chart-bar',  '/statistic/membersfedeassos', true))
     }
 
     if(children.length === 1){
       return children[0];
     }
-    return children.length > 0 ? this.constructMenu('fa-chart-bar', 'stats', undefined, undefined, children) : null;
+    return children.length > 0 ? this.constructMenu('stats', 'fa-chart-bar',  undefined, undefined, children) : null;
   }
 }
 

+ 19 - 7
use/template/Menus/websiteMenu.ts → use/layout/Menus/websiteMenu.ts

@@ -1,5 +1,5 @@
 import {ItemMenu, ItemsMenu, organizationState} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
+import BaseMenu from "~/use/layout/Menus/baseMenu";
 import *  as _ from "lodash"
 
 class WebsiteMenu extends BaseMenu{
@@ -19,16 +19,28 @@ class WebsiteMenu extends BaseMenu{
   getMenu():ItemMenu | null {
     const children:ItemsMenu = [];
 
-    children.push(this.constructMenu('fa-globe-europe', this.$store.state.profile.organization.name, this.getWebsite(this.$store.state.profile.organization), false, undefined, true))
-
-    if(!this.$store.state.profile.organization.website && this.$store.state.profile.access.isAdminAccess)
+    if(!this.$store.state.profile.organization.website && this.$store.state.profile.access.isAdminAccess){
+      children.push(this.constructMenu('fa-globe-europe', 'simple_modification', this.getWebsite(this.$store.state.profile.organization), false, undefined, true))
       children.push(this.constructMenu('fa-globe-europe', 'advanced_modification', this.getWebsite(this.$store.state.profile.organization) + '/typo3', false, undefined, true))
+    }
+
+    return children.length > 0 ? this.constructMenu('fa-globe-europe', 'website', undefined, undefined, children) : null;
+  }
+
+  /**
+   * Construit le menu Header des Sites internet ou null si aucune page accessible
+   * @return {ItemMenu | null}
+   */
+  getHeaderMenu():ItemMenu | null {
+    const children:ItemsMenu = [];
+
+    children.push(this.constructMenu(this.$store.state.profile.organization.name, undefined, this.getWebsite(this.$store.state.profile.organization), false, undefined, true))
 
     _.each(this.$store.state.profile.organization.parents, parent => {
-      children.push(this.constructMenu('fa-globe-europe', parent.name, this.getWebsite(parent), false, undefined, true))
+      children.push(this.constructMenu(parent.name, undefined, this.getWebsite(parent), false))
     })
 
-    return children.length > 0 ? this.constructMenu('fa-globe-europe', 'website', undefined, undefined, children) : null;
+    return children.length > 0 ? this.constructMenu('website', 'fa-globe-europe',  undefined, undefined, children) : null;
   }
 
   getWebsite(organization:organizationState):string{
@@ -36,4 +48,4 @@ class WebsiteMenu extends BaseMenu{
   }
 }
 
-export const getWebsiteMenu = ($config:any, $ability:any, $store:any) => new WebsiteMenu($config, $ability, $store).getMenu()
+export const getWebsiteMenu = ($config:any, $ability:any, $store:any) => new WebsiteMenu($config, $ability, $store)

+ 138 - 0
use/layout/menu.ts

@@ -0,0 +1,138 @@
+import {ref, useContext} from "@nuxtjs/composition-api";
+import {ItemMenu, ItemsMenu} from "~/types/types";
+import {getAccessMenu} from "~/use/layout/Menus/accessMenu";
+import {getAgendaMenu} from "~/use/layout/Menus/agendaMenu";
+import {getEquipmentMenu} from "~/use/layout/Menus/equipmentMenu";
+import {getEducationalMenu} from "~/use/layout/Menus/educationalMenu";
+import {getBillingMenu} from "~/use/layout/Menus/billingMenu";
+import {getCommunicationMenu} from "~/use/layout/Menus/communicationMenu";
+import {getDonorsMenu} from "~/use/layout/Menus/donorsMenu";
+import {getMedalsMenu} from "~/use/layout/Menus/medalsMenu";
+import {getStatsMenu} from "~/use/layout/Menus/statsMenu";
+import {getCotisationsMenu} from "~/use/layout/Menus/cotisationsMenu";
+import {getAdmin2iosMenu} from "~/use/layout/Menus/admin2iosMenu";
+import {getWebsiteMenu} from "~/use/layout/Menus/websiteMenu";
+import {getConfigurationMenu} from "~/use/layout/Menus/configurationMenu";
+import {getMyFamilyMenu} from "~/use/layout/Menus/myFamilyMenu";
+import {getMyAccessesMenu} from "~/use/layout/Menus/myAccessesMenu";
+import {getAccountMenu} from "~/use/layout/Menus/accountMenu";
+
+/**
+ * @category Use/template
+ * @class Menu
+ * Use Classe pour la construction du Menu
+ */
+class Menu{
+  private $ability:any;
+  private $config:any;
+  private $store:any;
+
+  /**
+   * @constructor
+   * Initialisation des services issues du context
+   */
+  constructor() {
+  }
+
+  setUpContext(){
+    const {$ability, $config, store} = useContext();
+    this.$ability = $ability;
+    this.$config = $config;
+    this.$store = store;
+    return this;
+  }
+
+  /**
+   * Construit le menu et mets à jour le state du profile d'access
+   */
+  useLateralMenuConstruct(){
+    let menu:ItemsMenu = []
+
+    const accessMenu = getAccessMenu(this.$config,this.$ability,this.$store)
+    if(accessMenu) menu.push(accessMenu)
+
+    const agendaMenu = getAgendaMenu(this.$config,this.$ability)
+    if(agendaMenu) menu.push(agendaMenu)
+
+    const equipmentMenu = getEquipmentMenu(this.$config,this.$ability)
+    if(equipmentMenu) menu.push(equipmentMenu)
+
+    const educationalMenu = getEducationalMenu(this.$config,this.$ability)
+    if(educationalMenu) menu.push(educationalMenu)
+
+    const billingMenu = getBillingMenu(this.$config,this.$ability)
+    if(billingMenu) menu.push(billingMenu)
+
+    const communicationMenu = getCommunicationMenu(this.$config,this.$ability)
+    if(communicationMenu) menu.push(communicationMenu)
+
+    const donorsMenu = getDonorsMenu(this.$config,this.$ability)
+    if(donorsMenu) menu.push(donorsMenu)
+
+    const medalsMenu = getMedalsMenu(this.$config,this.$ability)
+    if(medalsMenu) menu.push(medalsMenu)
+
+    const websiteMenu = getWebsiteMenu(this.$config,this.$ability,this.$store).getMenu()
+    if(websiteMenu) menu.push(websiteMenu)
+
+    const cotisationsMenu = getCotisationsMenu(this.$config,this.$ability)
+    if(cotisationsMenu) menu.push(cotisationsMenu)
+
+    const statsMenu = getStatsMenu(this.$config,this.$ability)
+    if(statsMenu) menu.push(statsMenu)
+
+    const admin2iosMenu = getAdmin2iosMenu(this.$config,this.$ability)
+    if(admin2iosMenu) menu.push(admin2iosMenu)
+
+    //Si l'utilisateur possède au moins un menu alors le menu latéral sera accessible
+    this.$store.commit('profile/access/setHasLateralMenu', menu.length > 0)
+
+    return ref(menu)
+  }
+
+  /**
+   * Construit le menu configuration et mets à jour le state du profile d'access
+   */
+  useConfigurationMenuConstruct() {
+    const menu = getConfigurationMenu(this.$config,this.$ability,this.$store);
+    //Si l'utilisateur possède au moins un menu alors le menu configuration sera accessible
+    this.$store.commit('profile/access/setHasConfigurationMenu', menu != null)
+    return ref(menu)
+  }
+
+  /**
+   * Construit le menu Mon Compte
+   */
+  useAccountMenuConstruct() {
+    return ref(getAccountMenu(this.$config,this.$ability,this.$store))
+  }
+
+  /**
+   * Construit le menu Mes structure et mets à jour le state du profile d'access
+   */
+  useMyAccessesMenuConstruct() {
+    const menu = getMyAccessesMenu(this.$config,this.$ability,this.$store);
+    //Si l'utilisateur possède au moins un menu alors le menu mes structures sera accessible
+    this.$store.commit('profile/access/setHasAccessesMenu', menu != null)
+    return ref(menu)
+  }
+
+  /**
+   * Construit le menu Changement d'utilisateur et mets à jour le state du profile d'access
+   */
+  useMyFamilyMenuConstruct() {
+    const menu = getMyFamilyMenu(this.$config,this.$ability,this.$store);
+    //Si l'utilisateur possède au moins un menu alors le menu changement d'utilisateur sera accessible
+    this.$store.commit('profile/access/setHasFamilyMenu', menu != null)
+    return ref(menu)
+  }
+
+  /**
+   * Construit le menu site internet du header
+   */
+  useWebSiteMenuConstruct() {
+    return ref(getWebsiteMenu(this.$config,this.$ability,this.$store).getHeaderMenu())
+  }
+}
+
+export const $useMenu = new Menu()

+ 0 - 78
use/template/Menus/admin2iosMenu.ts

@@ -1,78 +0,0 @@
-import {ItemMenu, ItemsMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
-
-class Admin2iosMenu extends BaseMenu{
-  private $ability:any;
-
-  constructor($config:any, $ability:any) {
-    super($config)
-    this.$ability = $ability
-  }
-
-  /**
-   * Construit le menu Administration 2ios ou null si aucune page accessible
-   * @return {ItemMenu | null}
-   */
-  getMenu():ItemMenu | null {
-    const children:ItemsMenu = [];
-
-    if (this.$ability().can('display', 'all_accesses_page')) {
-      children.push(this.constructMenu('fa-users', 'all_accesses', '/all_accesses/list/', true))
-    }
-
-    if (this.$ability().can('display', 'all_organizations_page')) {
-      children.push(this.constructMenu('fa-building', 'all_organizations', '/organization_params/list/', true))
-    }
-
-    if (this.$ability().can('display', 'tips_page')) {
-      children.push(this.constructMenu('fa-info-circle', 'tips', '/tips/list/', true))
-    }
-
-    if (this.$ability().can('display', 'actions_lead_page')) {
-      children.push(this.constructMenu('fa-comments-dollar', 'actions_lead', '/admin2ios/actions_lead', true))
-    }
-
-    if (this.$ability().can('display', 'renewall_list_page')) {
-      children.push(this.constructMenu('fa-sync', 'renewall_list', '/admin2ios/renewalllist', true))
-    }
-
-    if (this.$ability().can('display', 'settlements_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'settlements', '/admin2ios/settlements', true))
-    }
-
-    if (this.$ability().can('display', 'pendings_settlements_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'pendings_settlements', '/admin2ios/pendings_settlements', true))
-    }
-
-    if (this.$ability().can('display', 'outages_notice_page')) {
-      children.push(this.constructMenu('fa-cut', 'outages_notice', '/admin2ios/outagesnotice', true))
-    }
-
-    if (this.$ability().can('display', 'degraded_page')) {
-      children.push(this.constructMenu('fa-users', 'degraded', '/admin2ios/degraded', true))
-    }
-
-    if (this.$ability().can('display', 'dgv_page')) {
-      children.push(this.constructMenu('fa-house-damage', 'dgv', '/admin2ios/dgv', true))
-    }
-
-    if (this.$ability().can('display', 'cmf_cotisation_page')) {
-      children.push(this.constructMenu('fa-info-circle', 'cmf_cotisation', '/admin2ios/cotisationcmf', true))
-    }
-
-    if (this.$ability().can('display', 'right_page')) {
-      children.push(this.constructMenu('fa-balance-scale-right', 'right_menu', '/admin2ios/right', true))
-    }
-
-    if (this.$ability().can('display', 'tree_page')) {
-      children.push(this.constructMenu('fa-sitemap', 'tree_menu', '/admin2ios/tree', true))
-    }
-
-    if(children.length === 1){
-      return children[0];
-    }
-    return children.length > 0 ? this.constructMenu('fa-sitemap', 'admin2ios', undefined, undefined, children) : null;
-  }
-}
-
-export const getAdmin2iosMenu = ($config:any, $ability:any) => new Admin2iosMenu($config, $ability).getMenu()

+ 0 - 94
use/template/Menus/cotisationsMenu.ts

@@ -1,94 +0,0 @@
-import {ItemMenu, ItemsMenu} from "~/types/types";
-import BaseMenu from "~/use/template/Menus/baseMenu";
-
-class CotisationsMenu extends BaseMenu{
-  private $ability:any;
-
-  constructor($config:any, $ability:any) {
-    super($config)
-    this.$ability = $ability
-  }
-
-  /**
-   * Construit le menu Cotisations ou null si aucune page accessible
-   * @return {ItemMenu | null}
-   */
-  getMenu():ItemMenu | null {
-    const children:ItemsMenu = [];
-
-    if (this.$ability().can('display', 'rate_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'rate_cotisation', '/cotisation/rate', true))
-    }
-
-    if (this.$ability().can('display', 'parameters_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'parameters_cotisation', '/cotisation/parameter', true))
-    }
-
-    if (this.$ability().can('display', 'send_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'send_cotisation', '/cotisation/send', true))
-    }
-
-    if (this.$ability().can('display', 'state_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'state_cotisation', '/cotisation/state', true))
-    }
-
-    if (this.$ability().can('display', 'pay_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'pay_cotisation', '/cotisation/pay', true))
-    }
-
-    if (this.$ability().can('display', 'check_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'check_cotisation', '/cotisation/check', true))
-    }
-
-    if (this.$ability().can('display', 'ledger_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'ledger_cotisation', '/cotisation/ledger', true))
-    }
-
-    if (this.$ability().can('display', 'magazine_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'magazine_cotisation', '/cotisation/magazine', true))
-    }
-
-    if (this.$ability().can('display', 'ventilated_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'ventilated_cotisation', '/cotisation/ventilated', true))
-    }
-
-    if (this.$ability().can('display', 'pay_erase_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'pay_erase_cotisation', '/cotisation/payerase', true))
-    }
-
-    if (this.$ability().can('display', 'resume_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'resume_cotisation', '/cotisation/resume', true))
-    }
-
-    if (this.$ability().can('display', 'history_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'history_cotisation', '/cotisation/history', true))
-    }
-
-    if (this.$ability().can('display', 'call_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'call_cotisation', '/cotisation/call', true))
-    }
-
-    if (this.$ability().can('display', 'history_struture_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'history_struture_cotisation', '/cotisation/historystructure', true))
-    }
-
-    if (this.$ability().can('display', 'insurance_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'insurance_cotisation', '/cotisation/insurance', true))
-    }
-
-    if (this.$ability().can('display', 'resume_all_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'resume_all_cotisation', '/cotisation/resumeall', true))
-    }
-
-    if (this.$ability().can('display', 'resume_pay_cotisation_page')) {
-      children.push(this.constructMenu('fa-euro-sign', 'resume_pay_cotisation', '/cotisation/resumepay', true))
-    }
-
-    if(children.length === 1){
-      return children[0];
-    }
-    return children.length > 0 ? this.constructMenu('fa-money-bill', 'cotisations', undefined, undefined, children) : null;
-  }
-}
-
-export const getCotisationsMenu = ($config:any, $ability:any) => new CotisationsMenu($config, $ability).getMenu()

+ 0 - 87
use/template/menu.ts

@@ -1,87 +0,0 @@
-import {ref, useContext} from "@nuxtjs/composition-api";
-import {ItemsMenu} from "~/types/types";
-import {getAccessMenu} from "~/use/template/Menus/accessMenu";
-import {getAgendaMenu} from "~/use/template/Menus/agendaMenu";
-import {getEquipmentMenu} from "~/use/template/Menus/equipmentMenu";
-import {getEducationalMenu} from "~/use/template/Menus/educationalMenu";
-import {getBillingMenu} from "~/use/template/Menus/billingMenu";
-import {getCommunicationMenu} from "~/use/template/Menus/communicationMenu";
-import {getDonorsMenu} from "~/use/template/Menus/donorsMenu";
-import {getMedalsMenu} from "~/use/template/Menus/medalsMenu";
-import {getStatsMenu} from "~/use/template/Menus/statsMenu";
-import {getCotisationsMenu} from "~/use/template/Menus/cotisationsMenu";
-import {getAdmin2iosMenu} from "~/use/template/Menus/admin2iosMenu";
-import {getWebsiteMenu} from "~/use/template/Menus/websiteMenu";
-
-/**
- * @category Use/template
- * @class Menu
- * Use Classe pour la construction du Menu
- */
-class Menu{
-  private $ability:any;
-  private $config:any;
-  private $store:any;
-
-  /**
-   * @constructor
-   * Initialisation des services issues du context
-   */
-  constructor() {
-  }
-
-  setUpContext(){
-    const {$ability, $config, store} = useContext();
-    this.$ability = $ability;
-    this.$config = $config;
-    this.$store = store;
-    return this;
-  }
-
-  /**
-   * Construit le menu
-   */
-  useLateralMenuConstruct(){
-    let menu:ItemsMenu = []
-
-    const accessMenu = getAccessMenu(this.$config,this.$ability,this.$store)
-    if(accessMenu) menu.push(accessMenu)
-
-    const agendaMenu = getAgendaMenu(this.$config,this.$ability)
-    if(agendaMenu) menu.push(agendaMenu)
-
-    const equipmentMenu = getEquipmentMenu(this.$config,this.$ability)
-    if(equipmentMenu) menu.push(equipmentMenu)
-
-    const educationalMenu = getEducationalMenu(this.$config,this.$ability)
-    if(educationalMenu) menu.push(educationalMenu)
-
-    const billingMenu = getBillingMenu(this.$config,this.$ability)
-    if(billingMenu) menu.push(billingMenu)
-
-    const communicationMenu = getCommunicationMenu(this.$config,this.$ability)
-    if(communicationMenu) menu.push(communicationMenu)
-
-    const donorsMenu = getDonorsMenu(this.$config,this.$ability)
-    if(donorsMenu) menu.push(donorsMenu)
-
-    const medalsMenu = getMedalsMenu(this.$config,this.$ability)
-    if(medalsMenu) menu.push(medalsMenu)
-
-    const websiteMenu = getWebsiteMenu(this.$config,this.$ability,this.$store)
-    if(websiteMenu) menu.push(websiteMenu)
-
-    const cotisationsMenu = getCotisationsMenu(this.$config,this.$ability)
-    if(cotisationsMenu) menu.push(cotisationsMenu)
-
-    const statsMenu = getStatsMenu(this.$config,this.$ability)
-    if(statsMenu) menu.push(statsMenu)
-
-    const admin2iosMenu = getAdmin2iosMenu(this.$config,this.$ability)
-    if(admin2iosMenu) menu.push(admin2iosMenu)
-
-    return ref(menu)
-  }
-}
-
-export const $useMenu = new Menu()

文件差異過大導致無法顯示
+ 460 - 429
yarn.lock


部分文件因文件數量過多而無法顯示