|
@@ -283,13 +283,13 @@ Page 'Mon abonnement'
|
|
|
import MobytUserStatus from "~/models/Organization/MobytUserStatus";
|
|
import MobytUserStatus from "~/models/Organization/MobytUserStatus";
|
|
|
import {Ref} from "@vue/reactivity";
|
|
import {Ref} from "@vue/reactivity";
|
|
|
import {useDisplay} from "vuetify";
|
|
import {useDisplay} from "vuetify";
|
|
|
|
|
+ import {useRedirect} from "~/composables/utils/useRedirect";
|
|
|
|
|
|
|
|
const ability = useAbility()
|
|
const ability = useAbility()
|
|
|
|
|
|
|
|
- onBeforeMount(() => {
|
|
|
|
|
- if(!ability.can('display', 'subscription_page'))
|
|
|
|
|
- return navigateTo('/error')
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if(!ability.can('display', 'subscription_page')) {
|
|
|
|
|
+ throw new Error('Forbidden')
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
const showDolibarrPanel = computed(() => !dolibarrPending.value && dolibarrAccount.value && dolibarrAccount.value.bills.length > 0)
|
|
const showDolibarrPanel = computed(() => !dolibarrPending.value && dolibarrAccount.value && dolibarrAccount.value.bills.length > 0)
|
|
|
|
|
|