| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <!--
- Page 'Mon abonnement'
- @see https://ressources.opentalent.fr/display/SPEC/Mon+abonnement
- -->
- <template>
- <LayoutContainer>
- <v-col cols="12" sm="12" md="12">
- <v-expansion-panels focusable multiple :value="[0,1,2]">
- <UiExpansionPanel id="informations" icon="fa-info">
- <v-container fluid class="container">
- <v-row>
- <v-simple-table>
- <tbody>
- <tr>
- <td>{{ $t('client_id') }}</td>
- <td>{{ dolibarrAccount ? dolibarrAccount.clientNumber : '-' }}</td>
- </tr>
- <tr>
- <td>{{ $t('version') }}</td>
- <td>{{ dolibarrAccount ? $t(dolibarrAccount.product) : '-' }}</td>
- </tr>
- <tr v-if="dolibarrAccount && dolibarrAccount.contract">
- <td>{{ $t('services') }}</td>
- <td class="py-2">
- <div
- v-for="line in dolibarrAccount.contract.lines"
- :key="line.id"
- >
- {{ line.serviceLabel }} - {{ $t('until') }} :
- {{ $moment(line.dateEnd).format($moment.localeData($i18n.locale).longDateFormat('L')) }}
- </div>
- </td>
- </tr>
- <tr v-if="$can('manage', 'texto')">
- <td>{{ $t('remaining_sms_credit') }}</td>
- <td>
- <UiTemplateMobytStatus @disabled_sms_row="show_sms_row = false"/>
- </td>
- </tr>
- </tbody>
- </v-simple-table>
- </v-row>
- </v-container>
- </UiExpansionPanel>
- <UiExpansionPanel id="bills" icon="fa-file" v-if="!dolibarrAccountFetch.pending && dolibarrAccount && dolibarrAccount.bills.length > 0">
- <v-container fluid class="container">
- <v-row>
- <v-simple-table>
- <thead>
- <tr>
- <th>{{ $t('reference') }}</th>
- <th>{{ $t('date') }}</th>
- <th>{{ $t('taxExcludedAmount') }}</th>
- <th>{{ $t('status') }}</th>
- </tr>
- </thead>
- <tbody>
- <tr
- v-for="bill in dolibarrAccount.bills"
- :key="bill.id"
- >
- <td>{{ bill.ref }}</td>
- <td>{{ $moment(bill.date).format($moment.localeData($i18n.locale).longDateFormat('L')) }}</td>
- <td>{{ bill.taxExcludedAmount.toLocaleString($i18n.locale, { style: 'currency', currency: 'EUR' }) }}</td>
- <td>{{ bill.paid === true ? $t('paid') : $t('unpaid') }}</td>
- </tr>
- </tbody>
- </v-simple-table>
- </v-row>
- </v-container>
- </UiExpansionPanel>
- <UiExpansionPanel id="more_features" icon="fa-plus">
- <v-container id="products-section" fluid class="container">
- <v-row>
- <v-simple-table>
- <template #default>
- <thead>
- <tr>
- <th v-if="organizationProfile.isArtistProduct()">
- {{ $t('PRODUCT_ARTIST_PREMIUM') }}
- </th>
- <th v-if="organizationProfile.isArtist()">
- {{ $t('PRODUCT_SCHOOL') }}
- </th>
- <th>
- {{ $t('sms') }}
- </th>
- <th>
- {{ $t('website') }}
- </th>
- </tr>
- </thead>
- <tbody>
- <tr class="center-td-content">
- <td v-if="organizationProfile.isArtistProduct()">
- <nuxt-img src="/images/Artist-Square.jpg" />
- </td>
- <td v-if="organizationProfile.isArtist()">
- <nuxt-img src="/images/School-Square.jpg" />
- </td>
- <td>
- <nuxt-img src="/images/sms_big.png" />
- </td>
- <td>
- <nuxt-img src="/images/nom-de-domaine.jpg" />
- </td>
- </tr>
- <tr>
- <!-- Opentalent Artist Premium -->
- <td v-if="organizationProfile.isArtistProduct()">
- <p>
- {{ $t('get_more_functionalities_with_version') }} <b>{{ $t('PRODUCT_ARTIST_PREMIUM') }}</b>
- </p>
- <!-- Cmf member -->
- <div v-if="organizationProfile.isCmf()">
- <p>
- <b>{{ $t('for_only_x_eur_ttc_by_month', { price: formatCurrency(7.25, 'EUR') }) }} *</b>
- </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 -->
- <div v-else>
- <p>
- <b>{{ $t('for_only_x_eur_ttc_by_month', { price: formatCurrency(14.00, 'EUR') }) }} *</b>
- </p>
- <p>
- <i>
- * {{ $t('yearly_paid_giving_x_eur_ttc_per_year', { price: formatCurrency(168.00, 'EUR') }) }}
- </i>
- </p>
- </div>
- <p class="mt-3">
- <a href="/resources/Fiche_produit_Opentalent_Artist.pdf" target="_blank">
- {{ $t('product_sheet') }} {{ $t('PRODUCT_ARTIST_PREMIUM') }}
- </a>
- </p>
- <p v-if="organizationProfile.isCmf()" class="mt-3">
- <a href="/resources/BDC_Artist_Premium_CMF.pdf">
- <b>{{ $t('download_cmf_order_form') }}</b>
- </a>
- </p>
- <p v-else class="mt-3">
- <a href="/resources/BDC_Artist_Premium_Public.pdf">
- <b>{{ $t('download_order_form') }}</b>
- </a>
- </p>
- </td>
- <!-- Opentalent School Premium -->
- <td v-if="organizationProfile.isArtist()">
- <p>
- {{ $t('switch_to_version') }} <b>{{ $t('PRODUCT_SCHOOL_PREMIUM') }}</b> {{ $t('and_benefit') }} :
- </p>
- <ul class="mb-2">
- <li>{{ $t('of_accounts_for_teachers_and_students') }}</li>
- <li>{{ $t('of_a_complete_website') }}</li>
- </ul>
- <!-- Cmf member -->
- <div v-if="organizationProfile.isCmf()">
- <p><b>{{ $t('starting_from_x_eur_ttc_per_month', { price: formatCurrency(26.50, 'EUR') }) }} *</b></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>
- <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 class="mt-4">
- <a href="/resources/Fiche_produit_Opentalent_School.pdf" target="_blank">
- {{ $t('product_sheet') }} {{ $t('PRODUCT_SCHOOL') }}
- </a>
- </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>
- <!-- SMS -->
- <td>
- <p><b>{{ $t('send_sms') }} {{ $t('to_your_members_from_app') }}</b></p>
- <!-- Cmf member -->
- <div v-if="organizationProfile.isCmf()">
- <p><b>{{ $t('starting_from_x_eur_ttc_per_sms', { price: formatCurrency(0.10, 'EUR') }) }} *</b></p>
- <p><i>* {{ $t('for_x_sms', { amount: '5000' }) }}</i></p>
- <p>
- <b>
- <a href="/resources/BDC_SMS_CMF.pdf" target="_blank">
- {{ $t('download_cmf_order_form') }}
- </a>
- </b>
- </p>
- </div>
- <!-- Not cmf member -->
- <div v-else>
- <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>
- <a href="/resources/BDC_SMS_Public.pdf" target="_blank">
- <b>{{ $t('download_order_form') }}</b>
- </a>
- </p>
- </div>
- </td>
- <!-- Custom domain -->
- <td>
- <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>
- <p>{{ $t('example') }} :</p>
- <table>
- <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>
- <p>
- <a href="/resources/BDC_Nom_de_domaine.pdf" target="_blank">
- <b>{{ $t('download_order_form') }}</b>
- </a>
- </p>
- </td>
- </tr>
- </tbody>
- </template>
- </v-simple-table>
- </v-row>
- </v-container>
- </UiExpansionPanel>
- </v-expansion-panels>
- </v-col>
- </LayoutContainer>
- </template>
- <script lang="ts">
- import { defineComponent, useFetch, useContext, ref, Ref } from '@nuxtjs/composition-api'
- import { $organizationProfile } from '~/services/profile/organizationProfile'
- import { QUERY_TYPE } from '~/types/enums'
- import { ApiResponse, DolibarrAccount } from '~/types/interfaces'
- export default defineComponent({
- name: 'Subscription',
- middleware({ $ability, redirect }) {
- if(!$ability.can('display', 'subscription_page'))
- return redirect('/error')
- },
- setup () {
- const { store, $dataProvider } = useContext()
- const organizationProfile = ref($organizationProfile(store))
- const id: number = store.state.profile.organization.id
- const dolibarrAccount: Ref<DolibarrAccount | null> = ref(null)
- // fetch the dolibarr account's data
- const { fetchState } = useFetch(async () => {
- try {
- const response: ApiResponse = await $dataProvider.invoke({
- type: QUERY_TYPE.DEFAULT,
- url: '/api/dolibarr/account/' + id
- })
- dolibarrAccount.value = response.data as DolibarrAccount
- } catch (Error) {
- // eslint-disable-next-line no-console
- console.error('Error: Dolibarr account not found')
- }
- })
- return {
- organizationProfile,
- dolibarrAccount,
- dolibarrAccountFetch: fetchState
- }
- },
- methods: {
- formatCurrency(value: Number, currency: string): string {
- return value.toLocaleString(this.$i18n.locale, { style: 'currency', currency: currency })
- }
- }
- })
- </script>
- <style>
- #products-section table {
- table-layout: fixed;
- width: 100%;
- }
- #products-section table img {
- max-height: 250px;
- max-width: 100%;
- }
- #products-section tr.center-td-content td {
- text-align: center;
- }
- #products-section td {
- padding: 12px 18px;
- vertical-align: top;
- }
- .theme--light.v-data-table > .v-data-table__wrapper > table > tbody > tr:hover:not(.v-data-table__expanded__content):not(.v-data-table__empty-wrapper) {
- background:none;
- }
- </style>
|