Browse Source

Merge branch 'release/0.2.5'

Vincent GUFFON 3 years ago
parent
commit
d3e4493e86

+ 1 - 1
components/Layout/Alertbar.vue

@@ -7,7 +7,7 @@ Contient les différentes barre d'alertes qui s'affichent selon certains cas...
   <main>
     <client-only><LayoutAlertBarEnv></LayoutAlertBarEnv></client-only>
     <LayoutAlertBarSwitchUser></LayoutAlertBarSwitchUser>
-    <LayoutAlertBarCotisation v-if="isCmf && $can('manage', 'cotisation')"></LayoutAlertBarCotisation>
+    <client-only><LayoutAlertBarCotisation v-if="isCmf && $can('manage', 'cotisation')"></LayoutAlertBarCotisation></client-only>
     <LayoutAlertBarSwitchYear></LayoutAlertBarSwitchYear>
     <LayoutAlertBarSuperAdmin></LayoutAlertBarSuperAdmin>
   </main>

+ 1 - 1
components/Layout/Header/Notification.vue

@@ -161,7 +161,7 @@ export default defineComponent({
            if(notification.message?.action)
              return `${i18n.t('your_message')} ${notification.message?.fileName} ${i18n.t('is_ready_to_be')} ${notification.message.action}`
 
-           return `${i18n.t('your_message')} ${notification.message?.about} ${i18n.t('has_been_sent')} `
+           return `${i18n.t('your_message')} ${notification.message?.about ?? ''} ${i18n.t('has_been_sent')} `
            break;
 
         case NOTIFICATION_TYPE.SYSTEM :

+ 16 - 7
components/Layout/Subheader.vue

@@ -6,11 +6,11 @@ Contient entre autres le breadcrumb, les commandes de changement d'année et les
 <template>
   <main>
     <v-card
-      class="d-none d-sm-none d-md-flex ot_light_grey text-body-2"
+      class="d-md-flex ot_light_grey text-body-2"
       flat
       tile
     >
-      <LayoutSubHeaderBreadcrumbs class="mr-auto" />
+      <LayoutSubHeaderBreadcrumbs class="mr-auto d-sm-none d-md-flex d-none d-sm-flex" />
 
       <v-card
         class="d-md-flex ot_light_grey pt-2 mr-6  align-baseline"
@@ -18,22 +18,31 @@ Contient entre autres le breadcrumb, les commandes de changement d'année et les
         tile
       >
         <LayoutSubHeaderActivityYear v-if="!showDateTimeRange" class="activity-year" />
-        <LayoutSubHeaderDataTiming v-if="!showDateTimeRange" class="data-timing ml-2" />
-        <LayoutSubHeaderDataTimingRange class="data-timing-range ml-n1" @showDateTimeRange="showDateTimeRange=$event" />
-        <LayoutSubHeaderPersonnalizedList class="personalized-list ml-2" />
+        <div v-if="hasMenuOrIsTeacher" class="d-sm-none d-md-flex d-none d-sm-flex">
+          <LayoutSubHeaderDataTiming v-if="!showDateTimeRange" class="data-timing ml-2" />
+          <LayoutSubHeaderDataTimingRange class="data-timing-range ml-n1" @showDateTimeRange="showDateTimeRange=$event" />
+          <LayoutSubHeaderPersonnalizedList class="personalized-list ml-2" />
+        </div>
       </v-card>
     </v-card>
   </main>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref, Ref } from '@nuxtjs/composition-api'
+import {computed, ComputedRef, defineComponent, ref, Ref, useContext} from '@nuxtjs/composition-api'
 
 export default defineComponent({
   setup () {
+    const {store} = useContext()
     const showDateTimeRange: Ref<boolean> = ref(false)
+
+    const hasMenuOrIsTeacher: ComputedRef<boolean> = computed(
+      () => store.state.profile.access.hasLateralMenu || store.state.profile.access.isTeacher
+    )
+
     return {
-      showDateTimeRange
+      showDateTimeRange,
+      hasMenuOrIsTeacher
     }
   }
 })

+ 1 - 5
layouts/default.vue

@@ -9,7 +9,7 @@
       <LayoutHeader @handle-open-menu-click="handleOpenMenu" />
 
       <v-main class="ot_content_color">
-        <LayoutSubheader v-if="displayedSubHeader" />
+        <LayoutSubheader />
 
         <LayoutAlertbar class="mt-1"></LayoutAlertbar>
 
@@ -40,9 +40,6 @@ export default defineComponent({
     })
 
     const displayedMenu: ComputedRef<boolean> = computed(() => store.state.profile.access.hasLateralMenu)
-    const displayedSubHeader: ComputedRef<boolean> = computed(
-      () => store.state.profile.access.hasLateralMenu || store.state.profile.access.isTeacher
-    )
 
     const handleOpenMenu = (miniVariant: boolean) => {
       properties.miniVariant = miniVariant
@@ -52,7 +49,6 @@ export default defineComponent({
       properties,
       menu,
       displayedMenu,
-      displayedSubHeader,
       handleOpenMenu
     }
   }

+ 14 - 15
pages/subscription.vue

@@ -24,11 +24,10 @@ Page 'Mon abonnement'
                   </tr>
                   <tr v-if="dolibarrAccount && dolibarrAccount.contract">
                     <td>{{ $t('services') }}</td>
-                    <td>
+                    <td class="py-2">
                       <div
                         v-for="line in dolibarrAccount.contract.lines"
                         :key="line.id"
-                        style="list-style: none;"
                       >
                         {{ line.serviceLabel }}
                       </div>
@@ -66,7 +65,7 @@ Page 'Mon abonnement'
                     <td>{{ bill.ref }}</td>
                     <td>{{ $moment(bill.date).format($moment.localeData($i18n.locale).longDateFormat('L')) }}</td>
                     <td>{{ bill.taxExcludedAmount.toLocaleString($i18n.locale, { style: 'currency', currency: 'EUR' }) }}</td>
-                    <td>{{ bill.status === 1 ? $t('paid') : $t('unpaid') }}</td>
+                    <td>{{ bill.paid === true ? $t('paid') : $t('unpaid') }}</td>
                   </tr>
                 </tbody>
               </v-simple-table>
@@ -138,18 +137,18 @@ Page 'Mon abonnement'
                         </div>
 
                         <p class="mt-3">
-                          <a href="https://www.opentalent.fr/uploads/opentalent/ficheproduit_Opentalentartist.pdf" target="_blank">
+                          <a href="/resources/ficheproduit_Opentalentartist.pdf" target="_blank">
                             {{ $t('product_sheet') }} {{ $t('PRODUCT_ARTIST_PREMIUM') }}
                           </a>
                         </p>
 
                         <p v-if="organizationProfile.isCmf()" class="mt-3">
-                          <a href="">
+                          <a href="/resources/BDC_Artist_Premium_CMF.pdf">
                             <b>{{ $t('download_cmf_order_form') }}</b>
                           </a>
                         </p>
                         <p v-else class="mt-3">
-                          <a href="">
+                          <a href="/resources/BDC_Artist_Premium_Public.pdf">
                             <b>{{ $t('download_order_form') }}</b>
                           </a>
                         </p>
@@ -183,7 +182,7 @@ Page 'Mon abonnement'
                         </div>
 
                         <p class="mt-4">
-                          <a href="https://www.opentalent.fr/uploads/opentalent/ficheproduit_Opentalentschool" target="_blank">
+                          <a href="/resources/ficheproduit_Opentalentschool.pdf" target="_blank">
                             {{ $t('product_sheet') }} {{ $t('PRODUCT_SCHOOL') }}
                           </a>
                         </p>
@@ -205,7 +204,7 @@ Page 'Mon abonnement'
 
                           <p>
                             <b>
-                              <a href="https://www.opentalent.fr/uploads/opentalent/Bon_commande_SMS_ouverture-CMF.pdf" target="_blank">
+                              <a href="/resources/BDC_SMS_CMF.pdf" target="_blank">
                                 {{ $t('download_cmf_order_form') }}
                               </a>
                             </b>
@@ -217,7 +216,7 @@ Page 'Mon abonnement'
                           <p><i>* {{ $t('for_x_sms', { amount: '5000' }) }}</i></p>
 
                           <p>
-                            <a href="https://www.opentalent.fr/uploads/opentalent/Bon_commande_SMS_ouverture-public.pdf" target="_blank">
+                            <a href="/resources/BDC_SMS_Public.pdf" target="_blank">
                               <b>{{ $t('download_order_form') }}</b>
                             </a>
                           </p>
@@ -249,6 +248,12 @@ Page 'Mon abonnement'
                             </tr>
                           </tbody>
                         </table>
+
+                        <p>
+                          <a href="/resources/BDC_Nom_de_domaine.pdf" target="_blank">
+                            <b>{{ $t('download_order_form') }}</b>
+                          </a>
+                        </p>
                       </td>
                     </tr>
                   </tbody>
@@ -267,7 +272,6 @@ import { defineComponent, useFetch, useContext, ref, Ref } from '@nuxtjs/composi
 import { $organizationProfile } from '~/services/profile/organizationProfile'
 import { QUERY_TYPE } from '~/types/enums'
 import { ApiResponse, DolibarrAccount } from '~/types/interfaces'
-import {trimEnd} from "lodash";
 
 export default defineComponent({
   name: 'Subscription',
@@ -277,11 +281,6 @@ export default defineComponent({
     const id: number = store.state.profile.organization.id
     const dolibarrAccount: Ref<DolibarrAccount | null> = ref(null)
 
-    console.log(organizationProfile.value)
-    console.log(organizationProfile.value.isArtist())
-    console.log(organizationProfile.value.isArtistProduct())
-
-
     // fetch the dolibarr account's data
     const { fetchState } = useFetch(async () => {
       try {

BIN
static/resources/BDC_Achat_SMS_CMF.pdf


BIN
static/resources/BDC_Achat_SMS_Public.pdf


BIN
static/resources/BDC_Artist_Premium_CMF.pdf


BIN
static/resources/BDC_Artist_Premium_Public.pdf


BIN
static/resources/BDC_Nom_de_domaine.pdf


BIN
static/resources/BDC_SMS_CMF.pdf


BIN
static/resources/BDC_SMS_Public.pdf


File diff suppressed because it is too large
+ 24 - 0
static/resources/ficheproduit_Opentalentartist.pdf


BIN
static/resources/ficheproduit_Opentalentschool.pdf


Some files were not shown because too many files changed in this diff