Browse Source

retour michel & guillaume

Vincent GUFFON 3 years ago
parent
commit
736b79b251

+ 1 - 1
.env.local

@@ -1,5 +1,5 @@
 ## LOCAL ENVIRONMENT FILE
-NODE_ENV=dev
+ENV=dev
 DEBUG=1
 
 ## API Base Url

+ 1 - 1
.env.preprod

@@ -1,5 +1,5 @@
 ## PREPROD ENVIRONMENT FILE
-NODE_ENV=preprod
+ENV=preprod
 DEBUG=1
 
 ## API Base Url

+ 1 - 1
.env.prod

@@ -1,6 +1,6 @@
 ## PROD ENVIRONMENT FILE
 # /!\ -- USE ONLY IN PRODUCTION --
-NODE_ENV=production
+ENV=production
 DEBUG=0
 
 ## API Base Url

+ 13 - 6
assets/css/global.scss

@@ -18,12 +18,6 @@ header .v-toolbar__content{
   color: var(--v-ot_green-base, white)
 }
 
-.header_menu{
-  max-height: 300px;
-  min-width: 300px;
-  overflow-y: auto;
-}
-
 .v-menu__content{
   z-index: 400 !important;
 }
@@ -41,6 +35,7 @@ header .v-toolbar__content{
 .left-menu > div > .v-list-item
 {
   border-left:3px solid var(--v-ot_dark_grey-base, white);
+  height: 48px;
 }
 
 .left-menu > div > .v-list-group--no-action > .v-list-group__header:hover,
@@ -69,3 +64,15 @@ header .v-toolbar__content{
 .left-menu > div > .v-list-group--no-action > .v-list-group__items{
   background: var(--v-ot_dark_grey_hover-base, white);
 }
+
+.header-menu{
+  max-height: 300px;
+  min-width: 300px;
+  overflow-y: auto;
+  .v-list{
+    .v-list-item{
+      border-bottom: 1px solid;
+      border-bottom-color: var(--v-ot_border_menu-base, white);
+    }
+  }
+}

+ 2 - 2
components/Layout/AlertBar/Env.vue

@@ -16,8 +16,8 @@ import { defineComponent} from '@nuxtjs/composition-api'
 export default defineComponent({
   setup () {
     return{
-      show: process.env.NODE_ENV !== 'production',
-      env: process.env.NODE_ENV
+      show: process.env.environment !== 'production',
+      env: process.env.environment
     }
   }
 })

+ 1 - 1
components/Layout/Header.vue

@@ -57,7 +57,7 @@ et aux préférences de l'utilisateur
 
     <LayoutHeaderMenu v-if="hasConfigurationMenu" :menu="configurationMenu" />
 
-    <LayoutHeaderMenu :menu="accountMenu" :avatar="true" />
+    <LayoutHeaderMenu :menu="accountMenu"/>
 
     <a class="text-body pa-3 ml-2 ot_dark_grey ot_white--text text-decoration-none" href="https://support.opentalent.fr/" target="_blank">
       <span class="d-none d-sm-none d-md-flex">{{ $t('help_access') }}</span>

+ 18 - 17
components/Layout/Header/Menu.vue

@@ -16,13 +16,13 @@ header principal (configuration, paramètres du compte...)
             @click="click"
           >
             <v-avatar
-              v-if="avatar"
+              v-if="menu.icon.avatarId"
               size="30"
             >
-              <UiImage :id="avatarId" :imageByDefault="avatarByDefault" :width="30"></UiImage>
+              <UiImage :id="menu.icon.avatarId" :imageByDefault="menu.icon.avatarByDefault" :width="30"></UiImage>
             </v-avatar>
             <v-icon  v-else class="ot_white--text" small>
-              {{ menu.icon }}
+              {{ menu.icon.name }}
             </v-icon>
           </v-btn>
         </template>
@@ -33,7 +33,7 @@ header principal (configuration, paramètres du compte...)
       <v-card-title class="ot_header_menu text-body-2 font-weight-bold">
         {{$t(menu.title)}}
       </v-card-title>
-      <v-card-text class="ma-0 pa-0 header_menu">
+      <v-card-text class="ma-0 pa-0 header-menu">
         <v-list dense :subheader="true">
           <template v-for="(item, index) in menu.children">
             <v-list-item
@@ -44,7 +44,20 @@ header principal (configuration, paramètres du compte...)
               router
               exact
             >
-              <v-list-item-title v-text="$t(item.title)"/>
+              <v-list-item-title>
+                <span v-if="item.icon">
+                  <v-avatar
+                    v-if="item.icon.avatarId"
+                    size="30"
+                  >
+                    <UiImage :id="item.icon.avatarId" :imageByDefault="item.icon.avatarByDefault" :width="30"></UiImage>
+                  </v-avatar>
+                  <v-icon v-else class="ot_white--text" small>
+                    {{ item.icon.name }}
+                  </v-icon>
+                </span>
+                <span>{{$t(item.title)}}</span>
+              </v-list-item-title>
             </v-list-item>
           </template>
         </v-list>
@@ -77,18 +90,6 @@ export default defineComponent({
     menu: {
       type: Object,
       required: true
-    },
-    avatar: {
-      type: Boolean,
-      required: false
-    }
-  },
-  setup () {
-    const {store} = useContext()
-    const accessStore: accessState = store.state.profile.access
-    return {
-      avatarId: accessStore.avatarId,
-      avatarByDefault: accessStore.gender == 'MISTER' ? 'men-1.png' : 'women-1.png'
     }
   }
 })

+ 3 - 3
components/Layout/Menu.vue

@@ -23,7 +23,7 @@ Prend en paramètre une liste de ItemMenu et les met en forme
         >
           <v-list-item-action>
             <v-icon class="ot_menu_color--text" small>
-              {{ item.icon }}
+              {{ item.icon.name }}
             </v-icon>
           </v-list-item-action>
           <v-list-item-content>
@@ -39,7 +39,7 @@ Prend en paramètre une liste de ItemMenu et les met en forme
           <template #activator>
             <v-list-item-action>
               <v-icon class="ot_menu_color--text" small>
-                {{ item.icon }}
+                {{ item.icon.name }}
               </v-icon>
             </v-list-item-action>
             <v-list-item-content>
@@ -57,7 +57,7 @@ Prend en paramètre une liste de ItemMenu et les met en forme
           >
             <v-list-item-action>
               <v-icon class="ot_white--text" small>
-                {{ child.icon }}
+                {{ child.icon.name }}
               </v-icon>
             </v-list-item-action>
             <v-list-item-content>

+ 3 - 2
components/Ui/Template/MobytStatus.vue

@@ -5,7 +5,7 @@ Texte descriptif du statut Mobyt de la structure
 -->
 
 <template>
-  <span v-if="mobytStatus && !mobytStatusFetch.pending">
+  <span v-if="mobytStatus && !mobytStatusFetch.pending && mobytStatus.active">
     {{ mobytStatus.money.toLocaleString($i18n.locale, { style: 'currency', currency: 'EUR' }) }}
     {{ $t('convert_price_to_sms', { nb_sms: mobytStatus.amount }) }}
   </span>
@@ -18,7 +18,7 @@ import { ApiResponse, MobytUserStatus } from '~/types/interfaces'
 import { QUERY_TYPE } from '~/types/enums'
 
 export default defineComponent({
-  setup () {
+  setup (_, {emit}) {
     const { store, $dataProvider } = useContext()
     const id: number = store.state.profile.organization.id
     const mobytStatus: Ref<MobytUserStatus | null> = ref(null)
@@ -31,6 +31,7 @@ export default defineComponent({
           url: '/api/mobyt/status/' + id
         })
         mobytStatus.value = response.data as MobytUserStatus
+        if(!mobytStatus.value?.active) emit('disabled_sms_row')
       } catch (Error) {
         // eslint-disable-next-line no-console
         console.error('Error: Mobyt status not found')

+ 7 - 7
composables/layout/Menus/accessMenu.ts

@@ -33,33 +33,33 @@ class AccessMenu extends BaseMenu implements Menu {
     if (this.$ability.can('display', 'accesses_page')) {
       const organization = $organizationProfile(this.$store)
       const to = organization.isSchool() ? '/students/list/' : '/adherent/list/'
-      children.push(this.constructMenu('person', 'fa-user', to, true))
+      children.push(this.constructMenu('person', {name: 'fa-user'}, to, true))
     }
 
     if (this.$ability.can('display', 'student_registration_page')) {
-      children.push(this.constructMenu('family_view', 'fa-users', '/student_registration/new', true))
+      children.push(this.constructMenu('family_view', {name: 'fa-users'}, '/student_registration/new', true))
     }
 
     if (this.$ability.can('display', 'education_student_next_year_page')) {
-      children.push(this.constructMenu('education_student_next_year', 'fa-list-alt', '/education_student_next_year/list/', true))
+      children.push(this.constructMenu('education_student_next_year', {name: 'fa-list-alt'}, '/education_student_next_year/list/', true))
     }
 
     if (this.$ability.can('display', 'commissions_page')) {
-      children.push(this.constructMenu('commissions', 'fa-street-view', '/commissions/list/', true))
+      children.push(this.constructMenu('commissions', {name: 'fa-street-view'}, '/commissions/list/', true))
     }
 
     if (this.$ability.can('display', 'network_children_page')) {
-      children.push(this.constructMenu('network', 'fa-sitemap', 'networks/list/', true))
+      children.push(this.constructMenu('network', {name: 'fa-sitemap'}, 'networks/list/', true))
     }
 
     if (this.$ability.can('display', 'network_parents_page')) {
-      children.push(this.constructMenu('my_network', 'fa-sitemap', '/network_artist_schools/list/', true))
+      children.push(this.constructMenu('my_network', {name: 'fa-sitemap'}, '/network_artist_schools/list/', true))
     }
 
     if (children.length === 1) {
       return children[0]
     } else if (children.length > 0) {
-      return this.constructMenu('address_book', 'fa-address-book', undefined, undefined, children)
+      return this.constructMenu('address_book', {name: 'fa-address-book'}, undefined, undefined, children)
     } else {
       return null
     }

+ 4 - 1
composables/layout/Menus/accountMenu.ts

@@ -89,7 +89,10 @@ class AccountMenu extends BaseMenu implements Menu {
       children.push(this.constructMenu('print_my_licence', undefined, `/licence_cmf/user`, true))
     }
 
-    const accountMenu = this.constructMenu('my_account', 'fa-user', undefined, undefined, children, false)
+    const accountMenu = this.constructMenu('my_account', {
+      avatarId: this.$store.state.profile.access.avatarId,
+      avatarByDefault: this.$store.state.profile.access.gender == 'MISTER' ? 'men-1.png' : 'women-1.png'
+    }, undefined, undefined, children, false)
 
     const actions: ItemsMenu = [];
     actions.push(this.constructMenu('logout', undefined, `/logout`, true))

+ 8 - 8
composables/layout/Menus/admin2iosMenu.ts

@@ -28,37 +28,37 @@ class Admin2iosMenu extends BaseMenu implements Menu {
     const children: ItemsMenu = []
 
     if (this.$ability.can('display', 'all_accesses_page')) {
-      children.push(this.constructMenu('all_accesses', 'fa-users', '/all_accesses/list/', true))
+      children.push(this.constructMenu('all_accesses', {name: '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))
+      children.push(this.constructMenu('all_organizations', {name: 'fa-building'}, '/organization_params/list/', true))
     }
 
     if (this.$ability.can('display', 'tips_page')) {
-      children.push(this.constructMenu('tips', 'fa-info-circle', '/tips/list/', true))
+      children.push(this.constructMenu('tips', {name: 'fa-info-circle'}, '/tips/list/', true))
     }
 
     if (this.$ability.can('display', 'dgv_page')) {
-      children.push(this.constructMenu('dgv', 'fa-house-damage', '/admin2ios/dgv', true))
+      children.push(this.constructMenu('dgv', {name: '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))
+      children.push(this.constructMenu('cmf_cotisation', {name: '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))
+      children.push(this.constructMenu('right_menu', {name: '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))
+      children.push(this.constructMenu('tree_menu', {name: 'fa-sitemap'}, '/admin2ios/tree', true))
     }
 
     if (children.length === 1) {
       return children[0]
     } else if (children.length > 0) {
-      return this.constructMenu('admin2ios', 'fa-sitemap', undefined, undefined, children)
+      return this.constructMenu('admin2ios', {name: 'fa-sitemap'}, undefined, undefined, children)
     } else {
       return null
     }

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

@@ -28,17 +28,17 @@ class AgendaMenu extends BaseMenu implements Menu {
     const children: ItemsMenu = []
 
     if (this.$ability.can('display', 'agenda_page')) {
-      children.push(this.constructMenu('schedule', 'fa-calendar-alt', '/calendar', true))
+      children.push(this.constructMenu('schedule', {name: 'fa-calendar-alt'}, '/calendar', true))
     }
 
     if (this.$ability.can('display', 'attendance_page')) {
-      children.push(this.constructMenu('attendances', 'fa-calendar-check', '/attendances/list/', true))
+      children.push(this.constructMenu('attendances', {name: 'fa-calendar-check'}, '/attendances/list/', true))
     }
 
     if (children.length === 1) {
       return children[0]
     }
-    return children.length > 0 ? this.constructMenu('schedule', 'fa-calendar-alt', undefined, undefined, children) : null
+    return children.length > 0 ? this.constructMenu('schedule', {name: 'fa-calendar-alt'}, undefined, undefined, children) : null
   }
 }
 

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

@@ -1,5 +1,5 @@
 import { NuxtConfig } from '@nuxt/types/config'
-import { ItemMenu } from '~/types/interfaces'
+import {IconItem, ItemMenu} from '~/types/interfaces'
 
 /**
  * @category composables/layout/Menus
@@ -19,7 +19,7 @@ class BaseMenu {
 
   /**
    * Construit un ItemMenu
-   * @param {string} icon
+   * @param {IconItem} icon
    * @param {string} title titre qui sera traduit
    * @param {string} link lien
    * @param {boolean} isOldLink est-ce un lien renvoyant vers l'ancien admin?
@@ -28,7 +28,7 @@ class BaseMenu {
    * @param {Array<ItemMenu>} actions Tableau d'ItemMenu représentant les actions devant apparaitre en bas du menu
    * @return {ItemMenu}
    */
-  constructMenu (title: string, icon?: string, link?: string, isOldLink?: boolean, children?: Array<ItemMenu>, isExternalLink?: boolean): ItemMenu {
+  constructMenu (title: string, icon: IconItem, link?: string, isOldLink?: boolean, children?: Array<ItemMenu>, isExternalLink?: boolean): ItemMenu {
     return children ? {
       title,
       icon,

+ 9 - 9
composables/layout/Menus/billingMenu.ts

@@ -28,41 +28,41 @@ class BillingMenu extends BaseMenu implements Menu {
     const children: ItemsMenu = []
 
     if (this.$ability.can('display', 'billing_product_page')) {
-      children.push(this.constructMenu('billing_product', 'fa-cube', '/intangibles/list/', true))
+      children.push(this.constructMenu('billing_product', {name: 'fa-cube'}, '/intangibles/list/', true))
     }
 
     if (this.$ability.can('display', 'billing_products_by_student_page')) {
-      children.push(this.constructMenu('billing_products_by_student', 'fa-cubes', '/access_intangibles/list/', true))
+      children.push(this.constructMenu('billing_products_by_student', {name: 'fa-cubes'}, '/access_intangibles/list/', true))
     }
 
     if (this.$ability.can('display', 'billing_edition_page')) {
-      children.push(this.constructMenu('billing_edition', 'fa-copy', '/billing_edition', true))
+      children.push(this.constructMenu('billing_edition', {name: 'fa-copy'}, '/billing_edition', true))
     }
 
     if (this.$ability.can('display', 'billing_accounting_page')) {
-      children.push(this.constructMenu('billing_accounting', 'fa-file-alt', '/bill_accountings/list/', true))
+      children.push(this.constructMenu('billing_accounting', {name: 'fa-file-alt'}, '/bill_accountings/list/', true))
     }
 
     if (this.$ability.can('display', 'billing_payment_list_page')) {
-      children.push(this.constructMenu('billing_payment_list', 'fa-credit-card', '/bill_payments_list/list/', true))
+      children.push(this.constructMenu('billing_payment_list', {name: 'fa-credit-card'}, '/bill_payments_list/list/', true))
     }
 
     if (this.$ability.can('display', 'pes_page')) {
-      children.push(this.constructMenu('pes_export', 'fa-align-justify', '/pes/list/', true))
+      children.push(this.constructMenu('pes_export', {name: 'fa-align-justify'}, '/pes/list/', true))
     }
 
     if (this.$ability.can('display', 'berger_levrault_page')) {
-      children.push(this.constructMenu('berger_levrault_export', 'fa-align-justify', '/berger_levraults/list/', true))
+      children.push(this.constructMenu('berger_levrault_export', {name: 'fa-align-justify'}, '/berger_levraults/list/', true))
     }
 
     if (this.$ability.can('display', 'jvs_page')) {
-      children.push(this.constructMenu('jvs_export', 'fa-align-justify', '/jvs/list/', true))
+      children.push(this.constructMenu('jvs_export', {name: 'fa-align-justify'}, '/jvs/list/', true))
     }
 
     if (children.length === 1) {
       return children[0]
     } else if (children.length > 0) {
-      return this.constructMenu('billing', 'fa-euro-sign', undefined, undefined, children)
+      return this.constructMenu('billing', {name: 'fa-euro-sign'}, undefined, undefined, children)
     } else {
       return null
     }

+ 4 - 4
composables/layout/Menus/communicationMenu.ts

@@ -28,21 +28,21 @@ class CommunicationMenu extends BaseMenu implements Menu {
     const children: ItemsMenu = []
 
     if (this.$ability.can('display', 'inbox_page')) {
-      children.push(this.constructMenu('inbox', 'fa-inbox', '/messages/list/', true))
+      children.push(this.constructMenu('inbox', {name: 'fa-inbox'}, '/messages/list/', true))
     }
 
     if (this.$ability.can('display', 'message_send_page')) {
-      children.push(this.constructMenu('message_send', 'fa-paper-plane', '/messagessends/list/', true))
+      children.push(this.constructMenu('message_send', {name: 'fa-paper-plane'}, '/messagessends/list/', true))
     }
 
     if (this.$ability.can('display', 'message_templates_page')) {
-      children.push(this.constructMenu('message_templates', 'fa-edit', '/templates/list/', true))
+      children.push(this.constructMenu('message_templates', {name: 'fa-edit'}, '/templates/list/', true))
     }
 
     if (children.length === 1) {
       return children[0]
     } else if (children.length > 0) {
-      return this.constructMenu('communication', 'fa-comments', undefined, undefined, children)
+      return this.constructMenu('communication', {name: 'fa-comments'}, undefined, undefined, children)
     } else {
       return null
     }

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

@@ -84,7 +84,7 @@ class ConfigurationMenu extends BaseMenu implements Menu {
     if (children.length === 1) {
       return children[0]
     } else if (children.length > 0) {
-      return this.constructMenu('configuration', 'fa-cogs', undefined, undefined, children)
+      return this.constructMenu('configuration', {name: 'fa-cogs'}, undefined, undefined, children)
     } else {
       return null
     }

+ 18 - 18
composables/layout/Menus/cotisationsMenu.ts

@@ -28,77 +28,77 @@ class CotisationsMenu extends BaseMenu implements Menu {
     const children: ItemsMenu = []
 
     if (this.$ability.can('display', 'rate_cotisation_page')) {
-      children.push(this.constructMenu('rate_cotisation', 'fa-euro-sign', '/cotisation/rate', true))
+      children.push(this.constructMenu('rate_cotisation', {name: '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))
+      children.push(this.constructMenu('parameters_cotisation', {name: '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))
+      children.push(this.constructMenu('send_cotisation', {name: '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))
+      children.push(this.constructMenu('state_cotisation', {name: '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))
+      children.push(this.constructMenu('pay_cotisation', {name: '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))
+      children.push(this.constructMenu('check_cotisation', {name: '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))
+      children.push(this.constructMenu('ledger_cotisation', {name: '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))
+      children.push(this.constructMenu('magazine_cotisation', {name: '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))
+      children.push(this.constructMenu('ventilated_cotisation', {name: '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))
+      children.push(this.constructMenu('pay_erase_cotisation', {name: '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))
+      children.push(this.constructMenu('resume_cotisation', {name: '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))
+      children.push(this.constructMenu('history_cotisation', {name: '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))
+      children.push(this.constructMenu('call_cotisation', {name: '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))
+      children.push(this.constructMenu('history_struture_cotisation', {name: '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))
+      children.push(this.constructMenu('insurance_cotisation', {name: '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))
+      children.push(this.constructMenu('resume_all_cotisation', {name: '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))
+      children.push(this.constructMenu('resume_pay_cotisation', {name: 'fa-euro-sign'}, '/cotisation/resumepay', true))
     }
 
     if (children.length === 1) {
       return children[0]
     } else if (children.length > 0) {
-      return this.constructMenu('cotisations', 'fa-money-bill', undefined, undefined, children)
+      return this.constructMenu('cotisations', {name: 'fa-money-bill'}, undefined, undefined, children)
     } else {
       return null
     }

+ 1 - 1
composables/layout/Menus/donorsMenu.ts

@@ -26,7 +26,7 @@ class DonorsMenu extends BaseMenu implements Menu {
    */
   getMenu (): ItemMenu | null {
     if (this.$ability.can('display', 'donors_page')) {
-      return this.constructMenu('donors', 'far fa-handshake', '/donors/list/', true)
+      return this.constructMenu('donors', {name: 'far fa-handshake'}, '/donors/list/', true)
     }
     return null
   }

+ 8 - 8
composables/layout/Menus/educationalMenu.ts

@@ -28,37 +28,37 @@ class EducationalMenu extends BaseMenu implements Menu {
     const children: ItemsMenu = []
 
     if (this.$ability.can('display', 'criteria_notations_page')) {
-      children.push(this.constructMenu('criteria_notations', 'fa-bars', '/criteria_notations/list/', true))
+      children.push(this.constructMenu('criteria_notations', {name: 'fa-bars'}, '/criteria_notations/list/', true))
     }
 
     if (this.$ability.can('display', 'education_notation_config_page')) {
-      children.push(this.constructMenu('education_notation_configs', 'fa-bars',  '/education_notation_configs/list/', true))
+      children.push(this.constructMenu('education_notation_configs', {name: 'fa-bars'},  '/education_notation_configs/list/', true))
     }
 
     if (this.$ability.can('display', 'seizure_period_page')) {
-      children.push(this.constructMenu('seizure_period', 'fa-calendar-alt', '/education_teachers/list/', true))
+      children.push(this.constructMenu('seizure_period', {name: 'fa-calendar-alt'}, '/education_teachers/list/', true))
     }
 
     if (this.$ability.can('display', 'test_seizure_page')) {
-      children.push(this.constructMenu('test_seizure', 'fa-pencil-alt', '/education_input/list/', true))
+      children.push(this.constructMenu('test_seizure', {name: 'fa-pencil-alt'}, '/education_input/list/', true))
     }
 
     if (this.$ability.can('display', 'test_validation_page')) {
-      children.push(this.constructMenu('test_validation', 'fa-check', '/education_notations/list/', true))
+      children.push(this.constructMenu('test_validation', {name: 'fa-check'}, '/education_notations/list/', true))
     }
 
     if (this.$ability.can('display', 'examen_results_page')) {
-      children.push(this.constructMenu('examen_results', 'fa-graduation-cap', '/examen_convocations/list/', true))
+      children.push(this.constructMenu('examen_results', {name: 'fa-graduation-cap'}, '/examen_convocations/list/', true))
     }
 
     if (this.$ability.can('display', 'education_by_student_validation_page')) {
-      children.push(this.constructMenu('education_by_student_validation', 'fa-check-square', '/education_by_student/list/', true))
+      children.push(this.constructMenu('education_by_student_validation', {name: 'fa-check-square'}, '/education_by_student/list/', true))
     }
 
     if (children.length === 1) {
       return children[0]
     } else if (children.length > 0) {
-      return this.constructMenu('education_state', 'fa-graduation-cap', undefined, undefined, children)
+      return this.constructMenu('education_state', {name: 'fa-graduation-cap'}, undefined, undefined, children)
     } else {
       return null
     }

+ 1 - 1
composables/layout/Menus/equipmentMenu.ts

@@ -26,7 +26,7 @@ class EquipmentMenu extends BaseMenu implements Menu {
    */
   getMenu (): ItemMenu | null {
     if (this.$ability.can('display', 'equipment_page')) {
-      return this.constructMenu('equipment', 'fa-cube', '/equipment/list/', true)
+      return this.constructMenu('equipment', {name: 'fa-cube'}, '/equipment/list/', true)
     }
     return null
   }

+ 1 - 1
composables/layout/Menus/medalsMenu.ts

@@ -26,7 +26,7 @@ class MedalsMenu extends BaseMenu implements Menu {
    */
   getMenu (): ItemMenu | null {
     if (this.$ability.can('display', 'medals_page')) {
-      return this.constructMenu('medals', 'fa-trophy', '/medals/list/', true)
+      return this.constructMenu('medals', {name: 'fa-trophy'}, '/medals/list/', true)
     }
     return null
   }

+ 1 - 1
composables/layout/Menus/myAccessesMenu.ts

@@ -34,7 +34,7 @@ class MyAccessesMenu extends BaseMenu implements Menu {
       children.push(this.constructMenu(access.organizationName, undefined, '/switch/' + access.organizationId, true))
     })
 
-    return children.length > 0 ? this.constructMenu('multiAccesses', 'fa-building', undefined, undefined, children) : null
+    return children.length > 0 ? this.constructMenu('multiAccesses', {name: 'fa-building'}, undefined, undefined, children) : null
   }
 }
 

+ 7 - 4
composables/layout/Menus/myFamilyMenu.ts

@@ -33,17 +33,20 @@ class MyFamilyMenu extends BaseMenu implements Menu {
     // Si Access des membres de la familles (enfants)
     _.each(this.$store.state.profile.access.familyAccesses, (access) => {
       const url = `/switch_user/${this.$store.state.profile.organization.id}/${this.$store.state.profile.access.id}/${access.id}`
-      children.push(this.constructMenu(`${access.givenName} ${access.name}`, undefined, url, true))
+      children.push(this.constructMenu(`${access.givenName} ${access.name}`, {
+        avatarId: access.avatarId,
+        avatarByDefault: access.gender == 'MISTER' ? 'men-1.png' : 'women-1.png'
+      }, url, true))
     })
 
     // Si on est en compte swtich, on doit pouvoir retourner au compte d'origine
-    if (this.$store.state.profile.access.originalAccess) {
-      const originalAccess = this.$store.state.profile.access.originalAccess
+    const originalAccess = this.$store.state.profile.access.originalAccess
+    if (originalAccess && !originalAccess.isSuperAdminAccess) {
       const url = `/switch_user/${originalAccess.organization.id}/${originalAccess.id}/exit`
       children.push(this.constructMenu(`${originalAccess.givenName} ${originalAccess.name}`, undefined, url, true))
     }
 
-    return children.length > 0 ? this.constructMenu('familyAccesses', 'fa-users', undefined, undefined, children) : null
+    return children.length > 0 ? this.constructMenu('familyAccesses', {name: 'fa-users'}, undefined, undefined, children) : null
   }
 }
 

+ 5 - 5
composables/layout/Menus/statsMenu.ts

@@ -28,25 +28,25 @@ class StatsMenu extends BaseMenu implements Menu {
     const children: ItemsMenu = []
 
     if (this.$ability.can('display', 'report_activity_page')) {
-      children.push(this.constructMenu('report_activity', 'fa-chart-bar', '/report_activity', true))
+      children.push(this.constructMenu('report_activity', {name: 'fa-chart-bar'}, '/report_activity', true))
     }
 
     if (this.$ability.can('display', 'education_quotas_page')) {
-      children.push(this.constructMenu('educations_quotas_by_education', 'fa-user-circle',  '/educations_quotas_by_education_year/list/', true))
+      children.push(this.constructMenu('educations_quotas_by_education', {name: 'fa-user-circle'},  '/educations_quotas_by_education_year/list/', true))
     }
 
     if (this.$ability.can('display', 'fede_stats_page')) {
-      children.push(this.constructMenu('fede_stats', 'fa-chart-bar', '/statistic/membersfedeonly', true))
+      children.push(this.constructMenu('fede_stats', {name: 'fa-chart-bar'}, '/statistic/membersfedeonly', true))
     }
 
     if (this.$ability.can('display', 'structure_stats_page')) {
-      children.push(this.constructMenu('structure_stats', 'fa-chart-bar', '/statistic/membersfedeassos', true))
+      children.push(this.constructMenu('structure_stats', {name: 'fa-chart-bar'}, '/statistic/membersfedeassos', true))
     }
 
     if (children.length === 1) {
       return children[0]
     } else if (children.length > 0) {
-      return this.constructMenu('stats', 'fa-chart-bar', undefined, undefined, children)
+      return this.constructMenu('stats', {name: 'fa-chart-bar'}, undefined, undefined, children)
     } else {
       return null
     }

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

@@ -29,7 +29,7 @@ class WebsiteMenu extends BaseMenu implements Menu {
    */
   getMenu (): ItemMenu | null {
     if (!this.$store.state.profile.organization.website && this.$store.state.profile.access.isAdminAccess) {
-      return this.constructMenu('advanced_modification', 'fa-globe-europe', this.getWebsite(this.$store.state.profile.organization) + '/typo3', false, undefined, true)
+      return this.constructMenu('advanced_modification', {name: 'fa-globe-europe'}, this.getWebsite(this.$store.state.profile.organization) + '/typo3', false, undefined, true)
     }
     return null
   }
@@ -49,7 +49,7 @@ class WebsiteMenu extends BaseMenu implements Menu {
       }
     })
 
-    return children.length > 0 ? this.constructMenu('website', 'fa-globe-europe', undefined, undefined, children) : null
+    return children.length > 0 ? this.constructMenu('website', {name: 'fa-globe-europe'}, undefined, undefined, children) : null
   }
 
   getWebsite (organization: organizationState): string {

+ 1 - 0
config/nuxtConfig/env.js

@@ -1,5 +1,6 @@
 export default {
   env: {
+    environment: process.env.ENV,
     school_product: 'school',
     school_premium_product: 'school-premium',
     artist_product: 'artist',

+ 1 - 0
config/nuxtConfig/vuetify.js

@@ -45,6 +45,7 @@ export default {
           ot_info: '#3c8dbc',
           ot_menu_color: '#b8c7ce',
           ot_content_color: '#ecf0f4',
+          ot_border_menu: '#f4f4f4',
           ot_white: '#ffffff',
           ot_black: '#000000'
         },

+ 5 - 4
pages/subscription.vue

@@ -31,10 +31,10 @@ Page 'Mon abonnement'
                       </div>
                     </td>
                   </tr>
-                  <tr>
+                  <tr v-if="show_sms_row">
                     <td>{{ $t('remaining_sms_credit') }}</td>
                     <td>
-                      <UiTemplateMobytStatus />
+                      <UiTemplateMobytStatus @disabled_sms_row="show_sms_row = false"/>
                     </td>
                   </tr>
                 </tbody>
@@ -43,7 +43,7 @@ Page 'Mon abonnement'
           </v-container>
         </UiExpansionPanel>
 
-        <UiExpansionPanel id="bills" icon="fa-file" v-if="!dolibarrAccountFetch.pending && dolibarrAccount && dolibarrAccount.bills">
+        <UiExpansionPanel id="bills" icon="fa-file" v-if="!dolibarrAccountFetch.pending && dolibarrAccount && dolibarrAccount.bills.length > 0">
           <v-container fluid class="container">
             <v-row>
               <v-simple-table>
@@ -300,7 +300,8 @@ export default defineComponent({
     return {
       organizationProfile,
       dolibarrAccount,
-      dolibarrAccountFetch: fetchState
+      dolibarrAccountFetch: fetchState,
+      show_sms_row: true
     }
   },
   methods: {

+ 9 - 1
types/interfaces.d.ts

@@ -25,14 +25,22 @@ declare module '@vuex-orm/core' {
   }
 }
 
+interface IconItem{
+  name?: string,
+  avatarId?:number,
+  avatarByDefault?:string,
+}
+
 interface ItemMenu {
   title: string,
-  icon?: string,
+  icon?: IconItem,
+  avatar?: number,
   to?: string,
   children?: ItemsMenu,
   isExternalLink?: boolean,
   actions?: ItemsMenu,
 }
+
 interface ItemsMenu extends Array<ItemMenu> {}
 
 interface Menu {