Vincent 8 months ago
parent
commit
83b2e05997
3 changed files with 32 additions and 7 deletions
  1. 17 1
      components/Layout/Dialog/Trial/AlreadyDid.vue
  2. 1 0
      i18n/lang/fr.json
  3. 14 6
      pages/subscription.vue

+ 17 - 1
components/Layout/Dialog/Trial/AlreadyDid.vue

@@ -25,7 +25,10 @@
       <v-btn class="mr-4 submitBtn theme-neutral-strong" @click="closeDialog">
       <v-btn class="mr-4 submitBtn theme-neutral-strong" @click="closeDialog">
         {{ $t('cancel') }}
         {{ $t('cancel') }}
       </v-btn>
       </v-btn>
-      <v-btn class="mr-4 submitBtn theme-warning" @click="contactOpentalent">
+      <v-btn class="mr-4 submitBtn theme-warning" @click="goSubscribe">
+        {{ $t('i_subscribe') }}
+      </v-btn>
+      <v-btn class="mr-4 submitBtn theme-neutral-strong" @click="contactOpentalent">
         {{ $t('opentalent_contact') }}
         {{ $t('opentalent_contact') }}
       </v-btn>
       </v-btn>
     </template>
     </template>
@@ -33,6 +36,10 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
+import UrlUtils from "~/services/utils/urlUtils";
+
+const runtimeConfig = useRuntimeConfig()
+
 const props = defineProps({
 const props = defineProps({
   show: {
   show: {
     type: Boolean,
     type: Boolean,
@@ -46,6 +53,15 @@ const closeDialog = () => {
   emit('closeDialog')
   emit('closeDialog')
 }
 }
 
 
+const goSubscribe = async () => {
+  const v1BaseURL =
+    runtimeConfig.baseUrlAdminLegacy || runtimeConfig.public.baseUrlAdminLegacy
+
+  await navigateTo(UrlUtils.join(v1BaseURL, '#', 'subscribe'), {
+    external: true,
+  })
+}
+
 const contactOpentalent = async () => {
 const contactOpentalent = async () => {
   emit('closeDialog')
   emit('closeDialog')
 
 

+ 1 - 0
i18n/lang/fr.json

@@ -1,4 +1,5 @@
 {
 {
+  "i_subscribe": "Je m'abonne",
   "price_include_cmf": "Inclus avec votre adhésion CMF",
   "price_include_cmf": "Inclus avec votre adhésion CMF",
   "artist": "Artist Standard",
   "artist": "Artist Standard",
   "trial_started": "Sur votre période d'essai.\nSouscrire à l'offre Premium.",
   "trial_started": "Sur votre période d'essai.\nSouscrire à l'offre Premium.",

+ 14 - 6
pages/subscription.vue

@@ -291,12 +291,20 @@ Page 'Mon abonnement'
                         *Convient aux petites écoles sans besoins spécifiques de
                         *Convient aux petites écoles sans besoins spécifiques de
                         gestion pédagogique, de facturation, etc. Pour une
                         gestion pédagogique, de facturation, etc. Pour une
                         solution complète optez pour Opentalent School
                         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-if="
+                            !organizationProfile.isArtistPremiumProduct ||
+                            organizationProfile.isTrialActive
+                          "
+                        >
+                          <br />
+                            **Tarif
+                            <span v-if="organizationProfile.isCmf"
+                            >adhérent CMF</span
+                            ><span v-else>public</span> 2025. Abonnement payable
+                            annuellement.
+                        </span>
+
                       </span>
                       </span>
                     </v-col>
                     </v-col>
                   </v-row>
                   </v-row>