소스 검색

Merge remote-tracking branch 'origin/feature/boutique' into feature/boutique

Olivier Massot 8 달 전
부모
커밋
1be62fcd7a
5개의 변경된 파일16개의 추가작업 그리고 10개의 파일을 삭제
  1. 4 0
      components/Layout/Dialog/Trial/StopConfirmation.vue
  2. 1 0
      lang/fr.json
  3. 7 10
      pages/subscription.vue
  4. 3 0
      stores/organizationProfile.ts
  5. 1 0
      types/interfaces.d.ts

+ 4 - 0
components/Layout/Dialog/Trial/StopConfirmation.vue

@@ -27,6 +27,8 @@
 
 <script setup lang="ts">
 
+import {useOrganizationProfileStore} from "~/stores/organizationProfile";
+
 const props = defineProps({
   show: {
     type: Boolean,
@@ -35,6 +37,8 @@ const props = defineProps({
   },
 })
 
+const organizationProfile = useOrganizationProfileStore()
+
 const emit = defineEmits(['closeDialog', 'stopTrial'])
 
 const closeDialog = () => {

+ 1 - 0
lang/fr.json

@@ -1,4 +1,5 @@
 {
+  "artist": "Artist Standard",
   "trial_started": "Sur votre période d'essai.\nSouscrire à l'offre Premium.",
   "important": "Important",
   "trial_all_ready_did": "Vous avez déjà bénéficié d’un essai gratuit !",

+ 7 - 10
pages/subscription.vue

@@ -138,7 +138,7 @@ Page 'Mon abonnement'
                 <LayoutPagesSubscriptionCard
                   class="artistCard"
                   title="Logiciel Artist Premium*"
-                  :extraHeader="organizationProfile.isArtistPremiumProduct ? 'Votre version' : '1 mois d\'essai offert'"
+                  :extraHeader="organizationProfile.isArtistPremiumProduct ? (organizationProfile.isTrialActive ? `Version en cours d'essai J-${organizationProfile.trialCountDown}` : 'Votre version') : '1 mois d\'essai offert'"
                   color="artist"
                   :list="listCheck.artistPremium"
                 >
@@ -165,15 +165,7 @@ Page 'Mon abonnement'
                           {{ $t('subscribe_to_the_offer') }} <i class="fa-solid fa-greater-than small"></i>
                         </v-btn>
                       </v-col>
-                      <v-col cols="12" v-if="!organizationProfile.isArtistPremiumProduct" >
-                        <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" v-if="organizationProfile.isTrialActive && (accessProfileStore.isAdmin || accessProfileStore.isCaMember)">
                         <v-btn
                           class="stop_btn"
@@ -362,6 +354,7 @@ const listCheck: Record<string, Array<string>> = {
     '1Go de stockage',
     '150 comptes utilisateurs',
     'Gestion de la structure',
+    'Module de communication',
     'Site internet illimité',
     'Options disponibles',
   ],
@@ -549,4 +542,8 @@ const downloadDolibarrBill = (ref: string): void => {
 .stop_btn{
   color: rgb(var(--v-theme-danger));
 }
+
+.plus_btn{
+  color: rgb(var(--v-theme-on-neutral));
+}
 </style>

+ 3 - 0
stores/organizationProfile.ts

@@ -30,6 +30,7 @@ export const useOrganizationProfileStore = defineStore(
     const parents: Ref<Array<BaseOrganizationProfile>> = ref([])
     const isTrialActive: Ref<boolean> = ref(false)
     const trialCountDown: Ref<number> = ref(0)
+    const productBeforeTrial: Ref<string | null> = ref(null)
 
     // Getters
     /**
@@ -186,6 +187,7 @@ export const useOrganizationProfileStore = defineStore(
       isTrialActive.value = profile.trialActive
       trialCountDown.value = profile.trialCountDown
       networks.value = Array.from(profile.networks)
+      productBeforeTrial.value = profile.productBeforeTrial
 
       _.each(profile.parents, (parent) => {
         parents.value.push({
@@ -232,6 +234,7 @@ export const useOrganizationProfileStore = defineStore(
       isAssociation,
       isTrialActive,
       trialCountDown,
+      productBeforeTrial,
       getWebsite,
       hasModule,
       setProfile,

+ 1 - 0
types/interfaces.d.ts

@@ -134,6 +134,7 @@ interface organizationState extends BaseOrganizationProfile {
   parents: Array<BaseOrganizationProfile>
   isTrialActive: boolean
   trialCountDown: number
+  productBeforeTrial?: string | null
 
   hasModule(module: string): boolean
 }