|
|
@@ -338,7 +338,7 @@ Page 'Mon abonnement'
|
|
|
import { defineComponent, useFetch, useContext, ref, Ref } from '@nuxtjs/composition-api'
|
|
|
import { $organizationProfile } from '~/services/profile/organizationProfile'
|
|
|
import { QUERY_TYPE } from '~/types/enums'
|
|
|
-import { DolibarrAccount, MobytUserStatus } from '~/types/interfaces'
|
|
|
+import {ApiResponse, DolibarrAccount, MobytUserStatus} from '~/types/interfaces'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'Subscription',
|
|
|
@@ -352,10 +352,11 @@ export default defineComponent({
|
|
|
// fetch the dolibarr account's data
|
|
|
useFetch(async () => {
|
|
|
try {
|
|
|
- dolibarrAccount.value = await $dataProvider.invoke({
|
|
|
+ const reponse:ApiResponse = await $dataProvider.invoke({
|
|
|
type: QUERY_TYPE.DEFAULT,
|
|
|
url: 'dolibarr/account/' + id
|
|
|
})
|
|
|
+ dolibarrAccount.value = reponse.data as DolibarrAccount
|
|
|
} catch (Error) {
|
|
|
// eslint-disable-next-line no-console
|
|
|
console.error('Error: Dolibarr account not found')
|
|
|
@@ -365,10 +366,11 @@ export default defineComponent({
|
|
|
// fetch the mobyt status
|
|
|
useFetch(async () => {
|
|
|
try {
|
|
|
- mobytStatus.value = await $dataProvider.invoke({
|
|
|
+ const reponse:ApiResponse = await $dataProvider.invoke({
|
|
|
type: QUERY_TYPE.DEFAULT,
|
|
|
url: 'mobyt/status/' + id
|
|
|
})
|
|
|
+ mobytStatus.value = reponse.data as MobytUserStatus
|
|
|
} catch (Error) {
|
|
|
// eslint-disable-next-line no-console
|
|
|
console.error('Error: Mobyt status not found')
|