浏览代码

fix après recette

Vincent 8 月之前
父节点
当前提交
85e51e5ebf

+ 36 - 16
components/Layout/Pages/Subscription/Card.vue

@@ -13,25 +13,27 @@
       >{{ extraHeader }}</span
     >
 
-    <!-- Titre -->
-    <v-card-title class="title" :class="{ ['margin-sup']: !extraHeader }">
-      {{ title }}
-    </v-card-title>
+    <div class="card-content">
+      <!-- Titre -->
+      <v-card-title class="title" :class="{ ['margin-sup']: !extraHeader }">
+        {{ title }}
+      </v-card-title>
 
-    <v-card-subtitle class="subtitle">
-      {{ subTitle }}
-      <slot name="card.subTitle" />
-    </v-card-subtitle>
+      <v-card-subtitle class="subtitle">
+        {{ subTitle }}
+        <slot name="card.subTitle" />
+      </v-card-subtitle>
 
-    <!-- Texte -->
-    <v-card-text>
-      <LayoutPagesSubscriptionList :elements="list" :color="color" />
-    </v-card-text>
+      <!-- Texte -->
+      <v-card-text>
+        <LayoutPagesSubscriptionList :elements="list" :color="color" />
+      </v-card-text>
 
-    <!-- Actions -->
-    <v-card-actions class="mb-3">
-      <slot name="card.action" />
-    </v-card-actions>
+      <!-- Actions -->
+      <v-card-actions class="mb-3 card-actions">
+        <slot name="card.action" />
+      </v-card-actions>
+    </div>
   </v-card>
 </template>
 
@@ -65,10 +67,15 @@ const props = defineProps({
   border-width: 1px;
   border-top-width: 4px;
   height: 100%;
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  position: relative;
 
   .title {
     padding-top: 10px;
     white-space: normal;
+    text-transform: uppercase;
   }
   .subtitle {
     text-transform: uppercase;
@@ -87,6 +94,19 @@ const props = defineProps({
   }
 }
 
+.card-content {
+  display: flex;
+  flex-direction: column;
+  flex: 1 1 auto;
+  padding: 10px;
+}
+
+.card-actions {
+  margin-top: auto; // pousse les actions en bas
+  display: flex;
+  flex-direction: column;
+}
+
 .extraBorder {
   text-align: center;
   text-transform: uppercase;

+ 3 - 2
lang/fr.json

@@ -1,4 +1,5 @@
 {
+  "price_include_cmf": "Inclus avec votre adhésion CMF",
   "artist": "Artist Standard",
   "trial_started": "Sur votre période d'essai.\nSouscrire à l'offre Premium.",
   "important": "Important",
@@ -718,9 +719,9 @@
   "stop_trial_period_warning_1b": "sans perte de vos données essentielles.",
   "stop_trial_period_warning_2": "Que se passe-t-il si vous arrêtez votre période d’essai ?",
   "stop_trial_period_warning_3": "Les fonctionnalités premium de l’essai ne seront plus accessibles.",
-  "stop_trial_period_warning_4": "Vous conserverez toutes les informations et configurations que vous avez ajoutées pendant l’essai.",
+  "stop_trial_period_warning_4": "Vos données et configurations Premium sont conservées pendant 30 jours.",
   "stop_trial_period_warning_5": "Vous pourrez toujours gérer vos activités grâce aux fonctionnalités de la version de base.",
-  "stop_trial_period_warning_6": "Si vous souhaitez continuer à profiter des avantages complets d’Opentalent Artist, vous pouvez souscrire à une licence à tout moment.",
+  "stop_trial_period_warning_6": "Si vous souhaitez continuer à profiter des avantages complets d’Opentalent Artist Premium, vous pouvez souscrire à une licence à tout moment.",
   "stop_trial_missing_version_label": "précédente",
   "stop_trial": "Arrêter l'essai",
   "trial_ongoing": "En cours d'essai",

+ 80 - 43
pages/subscription.vue

@@ -123,39 +123,43 @@ Page 'Mon abonnement'
           >
             <v-col
               cols="12"
-              :lg="organizationProfile.isArtistPremiumProduct ? 3 : 6"
+              :lg="
+                organizationProfile.isArtistPremiumProduct &&
+                !organizationProfile.isTrialActive
+                  ? 4
+                  : 8
+              "
               sm="12"
             >
               <span class="theme-artist"
-                >Pour les orchestres, chorales, compagnies et troupes
+                >Pour les orchestres, chorales, <br />compagnies et troupes
                 artistiques</span
               >
             </v-col>
-            <v-col
-              cols="12"
-              :lg="organizationProfile.isArtistPremiumProduct ? 3 : 5"
-              sm="12"
-              :offset="organizationProfile.isArtistPremiumProduct ? 0 : 1"
-            >
+            <v-col cols="12" lg="4" sm="12">
               <span class="theme-school"
-                >Pour les établissements d'enseignements artistiques*</span
+                >Pour les établissements d'enseignements <br />
+                artistiques*</span
               >
             </v-col>
           </v-row>
 
           <v-row class="card-container">
             <v-col
-              lg="3"
+              lg="4"
               sm="12"
               md="6"
-              v-if="organizationProfile.isArtistProduct"
+              v-if="
+                organizationProfile.isArtistProduct ||
+                organizationProfile.isTrialActive
+              "
             >
               <LayoutPagesSubscriptionCard
                 class="artistCard"
                 title="Logiciel Artist Standard"
                 :extraHeader="
                   organizationProfile.isArtistProduct
-                    ? 'Votre version'
+                    ? 'Votre version actuelle'
                     : undefined
                 "
                 color="artist"
@@ -163,25 +167,54 @@ Page 'Mon abonnement'
               >
                 <template #card.subTitle>
                   <div class="priceBlock">
-                    <span class="price">{{ formatCurrency(11, 'EUR') }}</span>
-                    TTC/mois
+                    <span v-if="organizationProfile.isCmf"
+                      ><strong>{{ $t('price_include_cmf') }}*</strong></span
+                    >
+                    <span v-else
+                      ><span class="price">{{
+                        formatCurrency(14.0, 'EUR')
+                      }}</span>
+                      TTC/mois*</span
+                    >
                   </div>
                 </template>
                 <template #card.action>
-                  <v-btn
-                    v-if="!organizationProfile.isArtistProduct"
-                    class="theme-artist btn"
-                    href="https://logiciels.opentalent.fr/opentalent-artist"
-                    target="_blank"
-                  >
-                    {{ $t('to_know_more') }}
-                    <i class="fa-solid fa-greater-than small"></i>
-                  </v-btn>
+                  <v-row>
+                    <v-col
+                      cols="12"
+                      v-if="
+                        !organizationProfile.isArtistProduct &&
+                        !organizationProfile.isTrialActive
+                      "
+                    >
+                      <v-btn
+                        class="theme-artist btn"
+                        href="https://logiciels.opentalent.fr/opentalent-artist"
+                        target="_blank"
+                      >
+                        {{ $t('to_know_more') }}
+                        <i class="fa-solid fa-greater-than small"></i>
+                      </v-btn>
+                    </v-col>
+                    <v-col cols="12">
+                      <span
+                        v-if="organizationProfile.isCmf"
+                        class="special_conditions"
+                      >
+                        *En cas de non-réadhésion, il reste accessible au tarif
+                        public de 14€ TTC/mois (Tarif 2025. Abonnement payable
+                        annuellement).
+                      </span>
+                      <span v-else class="special_conditions">
+                        *Tarif public 2025. Abonnement payable annuellement.
+                      </span>
+                    </v-col>
+                  </v-row>
                 </template>
               </LayoutPagesSubscriptionCard>
             </v-col>
 
-            <v-col lg="3" sm="12" md="6" v-if="organizationProfile.isArtist">
+            <v-col lg="4" sm="12" md="6" v-if="organizationProfile.isArtist">
               <LayoutPagesSubscriptionCard
                 class="artistCard"
                 title="Logiciel Artist Premium*"
@@ -189,20 +222,26 @@ Page 'Mon abonnement'
                   organizationProfile.isArtistPremiumProduct
                     ? organizationProfile.isTrialActive
                       ? `Version en cours d'essai J-${organizationProfile.trialCountDown}`
-                      : 'Votre version'
+                      : 'Votre version actuelle'
                     : '1 mois d\'essai offert'
                 "
                 color="artist"
                 :list="listCheck.artistPremium"
               >
                 <template #card.subTitle>
-                  <div class="priceBlock">
+                  <div
+                    class="priceBlock"
+                    v-if="
+                      !organizationProfile.isArtistPremiumProduct ||
+                      organizationProfile.isTrialActive
+                    "
+                  >
                     <span class="price">{{
                       organizationProfile.isCmf
                         ? formatCurrency(7.5, 'EUR')
                         : formatCurrency(18.0, 'EUR')
                     }}</span>
-                    TTC/mois
+                    TTC/mois**
                   </div>
                 </template>
                 <template #card.action>
@@ -252,6 +291,12 @@ Page 'Mon abonnement'
                         *Convient aux petites écoles sans besoins spécifiques de
                         gestion pédagogique, de facturation, etc. Pour une
                         solution complète optez pour Opentalent School
+                        <br />
+                        **Tarif
+                        <span v-if="organizationProfile.isCmf"
+                          >adhérent CMF</span
+                        ><span v-else>public</span> 2025. Abonnement payable
+                        annuellement.
                       </span>
                     </v-col>
                   </v-row>
@@ -260,17 +305,11 @@ Page 'Mon abonnement'
             </v-col>
 
             <v-col
-              lg="3"
+              lg="4"
               sm="12"
               md="6"
               :offset="
-                !md && mdAndUp
-                  ? organizationProfile.isSchool
-                    ? 4
-                    : organizationProfile.isArtistPremiumProduct
-                      ? 0
-                      : 2
-                  : 0
+                !md && mdAndUp ? (organizationProfile.isSchool ? 4 : 0) : 0
               "
             >
               <LayoutPagesSubscriptionCard
@@ -284,7 +323,9 @@ Page 'Mon abonnement'
                 "
                 :subTitle="!organizationProfile.isSchool ? 'Sur devis' : ''"
                 :extraHeader="
-                  organizationProfile.isSchool ? 'Votre version' : undefined
+                  organizationProfile.isSchool
+                    ? 'Votre version actuelle'
+                    : undefined
                 "
                 color="school"
                 :list="listCheck.school"
@@ -615,24 +656,20 @@ const downloadDolibarrBill = (ref: string): void => {
     padding-left: 5px;
   }
   .priceBlock {
-    text-align: center;
     font-size: 15px;
     font-weight: normal;
+    text-transform: none;
     .price {
+      text-transform: uppercase;
       font-size: 30px;
       font-weight: bold;
     }
   }
 }
 
-.artistCard {
-  :deep(.v-card-title) {
-    text-align: center;
-  }
-}
-
 .special_conditions {
   font-size: 10px;
+  font-style: italic;
 }
 
 .trialBtn {

+ 11 - 11
tests/units/services/data/normalizer/hydraNormalizer.test.ts

@@ -134,17 +134,17 @@ describe('getData', () => {
     expect(HydraNormalizer.getData(data)).toEqual(['foo'])
   })
 
-  test('With item', () => {
-    const data = {
-      '@context': '/api/contexts/Foo',
-      '@id': '/api/foo',
-      '@type': 'Foo',
-      param1: 'a',
-    }
-
-    // @ts-ignore
-    expect(HydraNormalizer.getData(data)).toEqual(data)
-  })
+ test('With item', () => {
+   const data = {
+     '@context': '/api/contexts/Foo',
+     '@id': '/api/foo',
+     '@type': 'Foo',
+     param1: 'a',
+   }
+
+   // @ts-ignore
+   expect(HydraNormalizer.getData(data)).toEqual(data)
+ })
 })
 
 describe('getMetadata', () => {