Browse Source

Merge branch 'feature/v8-2879' into 'develop'

fix v-if calls and bills display

See merge request opentalent/app!13
Guffon 3 năm trước cách đây
mục cha
commit
4817ca693c
1 tập tin đã thay đổi với 17 bổ sung16 xóa
  1. 17 16
      pages/subscription.vue

+ 17 - 16
pages/subscription.vue

@@ -46,10 +46,10 @@ Page 'Mon abonnement'
           </v-container>
         </UiExpansionPanel>
 
-        <UiExpansionPanel id="bills" icon="fa-file">
+        <UiExpansionPanel id="bills" icon="fa-file" v-if="!dolibarrAccountFetch.pending && dolibarrAccount && dolibarrAccount.bills">
           <v-container fluid class="container">
             <v-row>
-              <v-simple-table v-if="!dolibarrAccountFetch.pending && dolibarrAccount && dolibarrAccount.bills">
+              <v-simple-table>
                 <thead>
                   <tr>
                     <th>{{ $t('reference') }}</th>
@@ -70,13 +70,9 @@ Page 'Mon abonnement'
                   </tr>
                 </tbody>
               </v-simple-table>
-              <div v-else class="ma-2">
-                <i>{{ $t('no_bill_to_display') }}</i>
-              </div>
             </v-row>
           </v-container>
         </UiExpansionPanel>
-
         <UiExpansionPanel id="more_features" icon="fa-plus">
           <v-container id="products-section" fluid class="container">
             <v-row>
@@ -84,10 +80,10 @@ Page 'Mon abonnement'
                 <template #default>
                   <thead>
                     <tr>
-                      <th v-if="organizationProfile.isArtistProduct">
+                      <th v-if="organizationProfile.isArtistProduct()">
                         {{ $t('PRODUCT_ARTIST_PREMIUM') }}
                       </th>
-                      <th v-if="organizationProfile.isArtist">
+                      <th v-if="organizationProfile.isArtist()">
                         {{ $t('PRODUCT_SCHOOL') }}
                       </th>
                       <th>
@@ -100,10 +96,10 @@ Page 'Mon abonnement'
                   </thead>
                   <tbody>
                     <tr class="center-td-content">
-                      <td v-if="organizationProfile.isArtistProduct">
+                      <td v-if="organizationProfile.isArtistProduct()">
                         <nuxt-img src="/images/Artist-Square.jpg" />
                       </td>
-                      <td v-if="organizationProfile.isArtist">
+                      <td v-if="organizationProfile.isArtist()">
                         <nuxt-img src="/images/School-Square.jpg" />
                       </td>
                       <td>
@@ -115,13 +111,13 @@ Page 'Mon abonnement'
                     </tr>
                     <tr>
                       <!-- Opentalent Artist Premium -->
-                      <td v-if="organizationProfile.isArtistProduct">
+                      <td v-if="organizationProfile.isArtistProduct()">
                         <p>
                           {{ $t('get_more_functionalities_with_version') }} <b>{{ $t('PRODUCT_ARTIST_PREMIUM') }}</b>
                         </p>
 
                         <!-- Cmf member -->
-                        <div v-if="organizationProfile.isCmf">
+                        <div v-if="organizationProfile.isCmf()">
                           <p>
                             <b>{{ $t('for_only_x_eur_ttc_by_month', { price: formatCurrency(7.25, 'EUR') }) }} *</b>
                           </p>
@@ -147,7 +143,7 @@ Page 'Mon abonnement'
                           </a>
                         </p>
 
-                        <p v-if="organizationProfile.isCmf" class="mt-3">
+                        <p v-if="organizationProfile.isCmf()" class="mt-3">
                           <a href="">
                             <b>{{ $t('download_cmf_order_form') }}</b>
                           </a>
@@ -160,7 +156,7 @@ Page 'Mon abonnement'
                       </td>
 
                       <!-- Opentalent School Premium -->
-                      <td v-if="organizationProfile.isArtist">
+                      <td v-if="organizationProfile.isArtist()">
                         <p>
                           {{ $t('switch_to_version') }} <b>{{ $t('PRODUCT_SCHOOL_PREMIUM') }}</b> {{ $t('and_benefit') }} :
                         </p>
@@ -171,7 +167,7 @@ Page 'Mon abonnement'
                         </ul>
 
                         <!-- Cmf member -->
-                        <div v-if="organizationProfile.isCmf">
+                        <div v-if="organizationProfile.isCmf()">
                           <p><b>{{ $t('starting_from_x_eur_ttc_per_month', { price: formatCurrency(26.50, 'EUR') }) }} *</b></p>
                           <div><i>* {{ $t('yearly_paid_giving_x_eur_ttc_per_year', { price: formatCurrency(318.00, 'EUR') }) }}</i></div>
                           <div><i>{{ $t('version_x_up_to_x_students', { product: $t('PRODUCT_SCHOOL_PREMIUM'), max_students: '69' }) }}</i></div>
@@ -203,7 +199,7 @@ Page 'Mon abonnement'
                         <p><b>{{ $t('send_sms') }} {{ $t('to_your_members_from_app') }}</b></p>
 
                         <!-- Cmf member -->
-                        <div v-if="organizationProfile.isCmf">
+                        <div v-if="organizationProfile.isCmf()">
                           <p><b>{{ $t('starting_from_x_eur_ttc_per_sms', { price: formatCurrency(0.10, 'EUR') }) }} *</b></p>
                           <p><i>* {{ $t('for_x_sms', { amount: '5000' }) }}</i></p>
 
@@ -281,6 +277,11 @@ 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 {