|
|
@@ -118,6 +118,7 @@ Page 'Mon abonnement'
|
|
|
</template>
|
|
|
<template #card.action>
|
|
|
<v-btn
|
|
|
+ v-if="!organizationProfile.isArtistProduct"
|
|
|
class="theme-artist btn"
|
|
|
href="https://logiciels.opentalent.fr/opentalent-artist"
|
|
|
target="_blank"
|
|
|
@@ -159,7 +160,7 @@ Page 'Mon abonnement'
|
|
|
Souscrire à l'offre <i class="fa-solid fa-greater-than small"></i>
|
|
|
</v-btn>
|
|
|
</v-col>
|
|
|
- <v-col cols="12">
|
|
|
+ <v-col cols="12" v-if="!organizationProfile.isArtistPremiumProduct" >
|
|
|
<v-btn
|
|
|
class="theme-artist btn"
|
|
|
href="https://logiciels.opentalent.fr/opentalent-artist"
|
|
|
@@ -168,6 +169,14 @@ Page 'Mon abonnement'
|
|
|
En savoir plus <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"
|
|
|
+ @click="stopTrial"
|
|
|
+ >
|
|
|
+ Arrêter l'essai
|
|
|
+ </v-btn>
|
|
|
+ </v-col>
|
|
|
<v-col cols="12">
|
|
|
<span class="special_conditions">
|
|
|
*Convient aux petites écoles sans besoins spécifiques de gestion pédagogique, de facturation, etc.
|
|
|
@@ -194,6 +203,7 @@ Page 'Mon abonnement'
|
|
|
<v-row>
|
|
|
<v-col cols="12">
|
|
|
<v-btn
|
|
|
+ v-if="!organizationProfile.isSchool"
|
|
|
class="theme-school btn"
|
|
|
href="https://logiciels.opentalent.fr/opentalent-school"
|
|
|
target="_blank"
|
|
|
@@ -271,8 +281,13 @@ Page 'Mon abonnement'
|
|
|
</LayoutContainer>
|
|
|
|
|
|
<DialogTrialAllReadyDid
|
|
|
- :show="showDialog"
|
|
|
- @closeDialog = "showDialog = false"
|
|
|
+ :show="showDialogTrialAllReadyDid"
|
|
|
+ @closeDialog = "showDialogTrialAllReadyDid = false"
|
|
|
+ />
|
|
|
+
|
|
|
+ <DialogTrialStopConfirmation
|
|
|
+ :show="showDialogTrialStopConfirmation"
|
|
|
+ @closeDialog = "showDialogTrialStopConfirmation = false"
|
|
|
/>
|
|
|
</template>
|
|
|
|
|
|
@@ -286,7 +301,7 @@ import {useEntityFetch} from '~/composables/data/useEntityFetch'
|
|
|
import DolibarrAccount from '~/models/Organization/DolibarrAccount'
|
|
|
import MobytUserStatus from '~/models/Organization/MobytUserStatus'
|
|
|
import UrlUtils from "~/services/utils/urlUtils";
|
|
|
-import {useAp2iRequestService} from "~/composables/data/useAp2iRequestService";
|
|
|
+import {useApiLegacyRequestService} from "~/composables/data/useApiLegacyRequestService";
|
|
|
|
|
|
//meta
|
|
|
definePageMeta({
|
|
|
@@ -299,10 +314,11 @@ const runtimeConfig = useRuntimeConfig()
|
|
|
const {mdAndUp, md} = useDisplay()
|
|
|
const {fetch} = useEntityFetch()
|
|
|
const i18n = useI18n()
|
|
|
-const { apiRequestService } = useAp2iRequestService()
|
|
|
+const { apiRequestService } = useApiLegacyRequestService()
|
|
|
|
|
|
//Init ref
|
|
|
-const showDialog: Ref<boolean> = ref(false)
|
|
|
+const showDialogTrialAllReadyDid: Ref<boolean> = ref(false)
|
|
|
+const showDialogTrialStopConfirmation: Ref<boolean> = ref(false)
|
|
|
const openedPanels: Ref<Array<string>> = initPanel()
|
|
|
const organizationProfile = getOrganizationProfile()
|
|
|
const accessProfileStore = useAccessProfileStore()
|
|
|
@@ -408,17 +424,13 @@ function getMobytInformations(): Record<Ref<MobytUserStatus | null>, Ref<boolean
|
|
|
*/
|
|
|
async function startTrial(){
|
|
|
try{
|
|
|
- const apiV1BaseURL = runtimeConfig.baseUrlLegacy || runtimeConfig.public.baseUrlLegacy
|
|
|
- await apiRequestService.get(
|
|
|
- UrlUtils.join(apiV1BaseURL, '/api/trial/is_available')
|
|
|
- )
|
|
|
-
|
|
|
+ await apiRequestService.get('/trial/is_available')
|
|
|
const v1BaseURL = runtimeConfig.baseUrlAdminLegacy || runtimeConfig.public.baseUrlAdminLegacy
|
|
|
await navigateTo(UrlUtils.join(v1BaseURL, '#', 'trial'), {
|
|
|
external: true
|
|
|
})
|
|
|
}catch(error){
|
|
|
- showDialog.value = true
|
|
|
+ showDialogTrialAllReadyDid.value = true
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -431,6 +443,13 @@ async function subscription(){
|
|
|
external: true
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Action lorsque l'on souhaite stopper l'essai
|
|
|
+ */
|
|
|
+function stopTrial(){
|
|
|
+ showDialogTrialStopConfirmation.value = true
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
|
|
|
@@ -493,4 +512,8 @@ async function subscription(){
|
|
|
margin-top: 0px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.stop_btn{
|
|
|
+ color: rgb(var(--v-theme-danger));
|
|
|
+}
|
|
|
</style>
|