Przeglądaj źródła

fix ssr rendering and finalize template

Olivier Massot 3 lat temu
rodzic
commit
9c22fdded5
3 zmienionych plików z 51 dodań i 115 usunięć
  1. 3 3
      lang/content/subscription/fr-FR.js
  2. 2 2
      lang/fr-FR.js
  3. 46 110
      pages/subscription.vue

+ 3 - 3
lang/content/subscription/fr-FR.js

@@ -17,7 +17,7 @@ export default (context, locale) => {
     download_cmf_order_form: 'Télécharger le bon de commande CMF',
     a_suitable_solution_for_your_artistic_school: 'Une solution économique adaptée à votre établissement d\'enseignement artistique',
     starting_from_x_eur_ttc_per_month: 'A partir de {price} TTC par mois',
-    version_x_up_to_x_students: 'Version {product} jusqu\'à {max_students} students',
+    version_x_up_to_x_students: 'Version {product} jusqu\'à {max_students} étudiants',
     excluding_license_and_training_fees: 'Hors frais de licence d\'utilisation et de formation',
     freely_try_our_software: 'Essayez notre logiciel en toute liberté',
     contact_us_for_show_and_demo: 'Contactez-nous sans plus tarder pour obtenir une présentation ainsi qu\'un accès de démonstration',
@@ -28,9 +28,9 @@ export default (context, locale) => {
     of_accounts_for_teachers_and_students: 'de comptes pour vos professeurs et élèves',
     of_a_complete_website: 'd\'un site internet complet',
     send_sms_from_app_to_your_members: 'Envoyez des SMS directement depuis votre logiciel à vos membres / élèves',
-    starting_from_x_eur_ttc_per_ssm: 'A partir de {price} TTC / sms',
+    starting_from_x_eur_ttc_per_sms: 'A partir de {price} TTC / sms',
     for_x_sms: 'pour {amount} SMS',
-    "get_your_own_domain_and_up_to_five_emails_for_only_x_eur_ttc_per_month": "Bénéficiez de votre propre nom de domaine et 5 adresses email pour seulement {price} TTC / mois",
+    get_your_own_domain_and_up_to_five_emails_for_only_x_eur_ttc_per_month: 'Bénéficiez de votre propre nom de domaine et 5 adresses email pour seulement {price} TTC / mois',
     example: 'Exemple',
     domain_name: 'Nom de domaine',
     dummy_domain_name: 'ma-structure.fr',

+ 2 - 2
lang/fr-FR.js

@@ -5,7 +5,7 @@ import rulesAndErrors from '@/lang/rulesAndErrors/fr-FR'
 import form from '@/lang/form/fr-FR'
 import breadcrumbs from '@/lang/breadcrumbs/fr-FR'
 import menuKey from '@/lang/menuKey/fr-FR'
-import subscription from '@/lang/content/subscription/fr-FR'
+import contentSubscription from '@/lang/content/subscription/fr-FR'
 
 export default (context, locale) => {
   return {
@@ -16,6 +16,6 @@ export default (context, locale) => {
     ...form(context, locale),
     ...breadcrumbs(context, locale),
     ...menuKey(context, locale),
-    ...subscription(context, locale)
+    ...contentSubscription(context, locale)
   }
 }

+ 46 - 110
pages/subscription.vue

@@ -44,9 +44,7 @@ Page 'Mon abonnement'
                   </tr>
                   <tr v-if="organizationProfile.isCmf && organizationProfile.isArtistProduct">
                     <td>{{ $t('paying_structure') }}</td>
-                    <td>
-                      CMF
-                    </td>
+                    <td>CMF</td>
                   </tr>
                 </tbody>
               </v-simple-table>
@@ -98,9 +96,6 @@ Page 'Mon abonnement'
                       <th v-if="organizationProfile.isArtist">
                         {{ $t('PRODUCT_SCHOOL') }}
                       </th>
-                      <th v-if="organizationProfile.isSchoolProduct">
-                        {{ $t('PRODUCT_SCHOOL_PREMIUM') }}
-                      </th>
                       <th>
                         {{ $t('sms') }}
                       </th>
@@ -117,9 +112,6 @@ Page 'Mon abonnement'
                       <td v-if="organizationProfile.isArtist">
                         <nuxt-img src="/images/School-Square.jpg" />
                       </td>
-                      <td v-if="organizationProfile.isSchoolProduct">
-                        <nuxt-img src="/images/School-Square.jpg" />
-                      </td>
                       <td>
                         <nuxt-img src="/images/sms_big.png" />
                       </td>
@@ -139,12 +131,8 @@ Page 'Mon abonnement'
                           <p>
                             <b>{{ $t('for_only_x_eur_ttc_by_month', { price: formatCurrency(7.25, 'EUR') }) }} *</b>
                           </p>
-                          <p>
-                            <i>
-                              * {{ $t('yearly_paid_giving_x_eur_ttc_per_year', { price: formatCurrency(87.00, 'EUR') }) }}
-                              {{ $t('only_for_cmf_members') }} ({{ $t('public_price_x_ttc_a_year', { price: formatCurrency(168.00, 'EUR') }) }})
-                            </i>
-                          </p>
+                          <div><i>* {{ $t('yearly_paid_giving_x_eur_ttc_per_year', { price: formatCurrency(87.00, 'EUR') }) }}</i></div>
+                          <div><i>{{ $t('only_for_cmf_members') }} ({{ $t('public_price_x_ttc_a_year', { price: formatCurrency(168.00, 'EUR') }) }})</i></div>
                         </div>
 
                         <!-- Not a cmf member -->
@@ -159,77 +147,31 @@ Page 'Mon abonnement'
                           </p>
                         </div>
 
-                        <p>
-                          <a href="https://www.opentalent.fr/uploads/opentalent/ficheproduit_Opentalentartist.pdf">
-                            {{ $t('product_sheet') }} : {{ $t('PRODUCT_ARTIST_PREMIUM') }}
+                        <p class="mt-3">
+                          <a href="https://www.opentalent.fr/uploads/opentalent/ficheproduit_Opentalentartist.pdf" target="_blank">
+                            {{ $t('product_sheet') }} {{ $t('PRODUCT_ARTIST_PREMIUM') }}
                           </a>
                         </p>
 
-                        <p v-if="organizationProfile.isCmf">
+                        <p v-if="organizationProfile.isCmf" class="mt-3">
                           <a href="">
                             <b>{{ $t('download_cmf_order_form') }}</b>
                           </a>
                         </p>
-                        <p v-else>
+                        <p v-else class="mt-3">
                           <a href="">
                             <b>{{ $t('download_order_form') }}</b>
                           </a>
                         </p>
                       </td>
 
-                      <!-- Opentalent School -->
-                      <td v-if="organizationProfile.isArtist">
-                        <p>
-                          {{ $t('a_suitable_solution_for_your_artistic_school') }}
-                        </p>
-
-                        <!-- Cmf member -->
-                        <div v-if="organizationProfile.isCmf">
-                          <p>{{ $t('starting_from_x_eur_ttc_per_month', { price: formatCurrency(16.45, 'EUR') }) }} *</p>
-                          <p>
-                            <i>
-                              * {{ $t('yearly_paid_giving_x_eur_ttc_per_year', { price: formatCurrency(198, 'EUR') }) }}
-                              {{ $t('version_x_up_to_x_students', { product: 'Opentalent School Standard', max_students: '69' }) }}
-                              {{ $t('excluding_license_and_training_fees') }}.
-                              {{ $t('only_for_cmf_members') }} ({{ $t('public_price_x_ttc_a_year', { price: formatCurrency(358.80, 'EUR') }) }})
-                            </i>
-                          </p>
-                        </div>
-                        <!-- Not a cmf member -->
-                        <div v-else>
-                          <p>{{ $t('starting_from_x_eur_ttc_per_month', { price: formatCurrency(29.90, 'EUR') }) }} *</p>
-                          <p>
-                            <i>
-                              * {{ $t('yearly_paid_giving_x_eur_ttc_per_year', { price: formatCurrency(358, 'EUR') }) }}
-                              {{ $t('version_x_up_to_x_students', { product: 'Opentalent School Standard', max_students: '69' }) }}
-                              {{ $t('excluding_license_and_training_fees') }}.
-                            </i>
-                          </p>
-                        </div>
-
-                        <p>
-                          <a href="https://www.opentalent.fr/uploads/opentalent/ficheproduit_Opentalentschool">
-                            {{ $t('product_sheet') }} Opentalent School
-                          </a>
-                        </p>
-
-                        <p>
-                          {{ $t('freely_try_our_software') }} !
-                          {{ $t('contact_us_for_show_and_demo') }}.
-                        </p>
-                        <p>
-                          {{ $t('contact_us_at') }} <a href="tel:+33972126017">0 972 126 017</a>, {{ $t('or_by_mail_at') }}
-                          <a href="mailto:contact@opentalent.fr">contact@opentalent.fr</a>
-                        </p>
-                      </td>
-
                       <!-- Opentalent School Premium -->
-                      <td v-if="organizationProfile.isSchoolProduct">
+                      <td v-if="organizationProfile.isArtist">
                         <p>
                           {{ $t('switch_to_version') }} <b>{{ $t('PRODUCT_SCHOOL_PREMIUM') }}</b> {{ $t('and_benefit') }} :
                         </p>
 
-                        <ul>
+                        <ul class="mb-2">
                           <li>{{ $t('of_accounts_for_teachers_and_students') }}</li>
                           <li>{{ $t('of_a_complete_website') }}</li>
                         </ul>
@@ -237,29 +179,21 @@ Page 'Mon abonnement'
                         <!-- Cmf member -->
                         <div v-if="organizationProfile.isCmf">
                           <p><b>{{ $t('starting_from_x_eur_ttc_per_month', { price: formatCurrency(26.50, 'EUR') }) }} *</b></p>
-                          <p>
-                            <i>
-                              * {{ $t('yearly_paid_giving_x_eur_ttc_per_year', { price: formatCurrency(318.00, 'EUR') }) }}
-                              {{ $t('version_x_up_to_x_students', { product: $t('PRODUCT_SCHOOL_PREMIUM'), max_students: '69' }) }}
-                              {{ $t('excluding_license_and_training_fees') }}.
-                              {{ $t('only_for_cmf_members') }} ({{ $t('public_price_x_ttc_a_year', { price: formatCurrency(529.20, 'EUR') }) }})
-                            </i>
-                          </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>
+                          <div><i>{{ $t('excluding_license_and_training_fees') }}.</i></div>
+                          <div><i>{{ $t('only_for_cmf_members') }} ({{ $t('public_price_x_ttc_a_year', { price: formatCurrency(529.20, 'EUR') }) }})</i></div>
                         </div>
                         <!-- Not cmf member -->
                         <div v-else>
                           <p>{{ $t('starting_from_x_eur_ttc_per_month', { price: formatCurrency(44.10, 'EUR') }) }} *</p>
-                          <p>
-                            <i>
-                              * {{ $t('yearly_paid_giving_x_eur_ttc_per_year', { price: formatCurrency(529.20, 'EUR') }) }}
-                              {{ $t('version_x_up_to_x_students', { product: $t('PRODUCT_SCHOOL_PREMIUM'), max_students: '69' }) }}
-                              {{ $t('excluding_license_and_training_fees') }}.
-                            </i>
-                          </p>
+                          <div><i>* {{ $t('yearly_paid_giving_x_eur_ttc_per_year', { price: formatCurrency(529.20, 'EUR') }) }}</i></div>
+                          <div><i>{{ $t('version_x_up_to_x_students', { product: $t('PRODUCT_SCHOOL_PREMIUM'), max_students: '69' }) }}</i></div>
+                          <div><i>{{ $t('excluding_license_and_training_fees') }}.</i></div>
                         </div>
 
-                        <p>
-                          <a href="https://www.opentalent.fr/uploads/opentalent/ficheproduit_Opentalentschool">
+                        <p class="mt-4">
+                          <a href="https://www.opentalent.fr/uploads/opentalent/ficheproduit_Opentalentschool" target="_blank">
                             {{ $t('product_sheet') }} {{ $t('PRODUCT_SCHOOL') }}
                           </a>
                         </p>
@@ -272,7 +206,7 @@ Page 'Mon abonnement'
 
                       <!-- SMS -->
                       <td>
-                        <p><b>{{ $t('send_sms_from_app_to_your_members') }}</b></p>
+                        <p><b>{{ $t('send_sms') }} {{ $t('to_your_members_from_app') }}</b></p>
 
                         <!-- Cmf member -->
                         <div v-if="organizationProfile.isCmf">
@@ -281,7 +215,7 @@ Page 'Mon abonnement'
 
                           <p>
                             <b>
-                              <a href="https://www.opentalent.fr/uploads/opentalent/Bon_commande_SMS_ouverture-CMF.pdf">
+                              <a href="https://www.opentalent.fr/uploads/opentalent/Bon_commande_SMS_ouverture-CMF.pdf" target="_blank">
                                 {{ $t('download_cmf_order_form') }}
                               </a>
                             </b>
@@ -289,40 +223,41 @@ Page 'Mon abonnement'
                         </div>
                         <!-- Not cmf member -->
                         <div v-else>
-                          <p><b>{{ $t('starting_from_x_eur_ttc_per_ssm', { price: formatCurrency(0.12, 'EUR') }) }} *</b></p>
+                          <p><b>{{ $t('starting_from_x_eur_ttc_per_sms', { price: formatCurrency(0.12, 'EUR') }) }} *</b></p>
                           <p><i>* {{ $t('for_x_sms', { amount: '5000' }) }}</i></p>
 
                           <p>
-                            <b>
-                              <a href="https://www.opentalent.fr/uploads/opentalent/Bon_commande_SMS_ouverture-public.pdf">
-                                {{ $t('download_order_form') }}
-                              </a>
-                            </b>
+                            <a href="https://www.opentalent.fr/uploads/opentalent/Bon_commande_SMS_ouverture-public.pdf" target="_blank">
+                              <b>{{ $t('download_order_form') }}</b>
+                            </a>
                           </p>
                         </div>
                       </td>
 
                       <!-- Custom domain -->
                       <td>
-                        <b>{{ $t('get_your_own_domain_and_up_to_five_emails_for_only_x_eur_ttc_per_month', { price: formatCurrency(34.80, 'EUR') }) }}</b>
+                        <p>
+                          <b>{{ $t('get_your_own_domain_and_up_to_five_emails_for_only_x_eur_ttc_per_month', { price: formatCurrency(34.80, 'EUR') }) }}</b>
+                        </p>
 
-                        <br/>
                         <p>{{ $t('example') }} :</p>
                         <table>
-                          <tr>
-                            <td style="width: 200px;">
-                              {{ $t('domain_name') }} :
-                            </td>
-                            <td>
-                              <i>{{ $t('dummy_domain_name') }}</i>
-                            </td>
-                          </tr>
-                          <tr>
-                            <td>{{ $t('associated_mail_address') }} : </td>
-                            <td>
-                              <i>{{ $t('dummy_email_address') }}</i>
-                            </td>
-                          </tr>
+                          <tbody>
+                            <tr>
+                              <td style="width: 150px;">
+                                {{ $t('domain_name') }} :
+                              </td>
+                              <td>
+                                <i>{{ $t('dummy_domain_name') }}</i>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>{{ $t('associated_mail_address') }} : </td>
+                              <td>
+                                <i>{{ $t('dummy_email_address') }}</i>
+                              </td>
+                            </tr>
+                          </tbody>
                         </table>
                       </td>
                     </tr>
@@ -342,12 +277,13 @@ 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',
   setup () {
     const { store, $dataProvider } = useContext()
-    const organizationProfile = $organizationProfile(store)
+    const organizationProfile = ref($organizationProfile(store))
     const id: number = store.state.profile.organization.id
     const dolibarrAccount: Ref<DolibarrAccount | null> = ref(null)