|
|
@@ -309,12 +309,11 @@ Page 'Mon abonnement'
|
|
|
|
|
|
const { data: dolibarrAccount, pending: dolibarrPending } = fetch(DolibarrAccount, organizationProfile.id)
|
|
|
|
|
|
- if (ability.can('manage', 'texto')) {
|
|
|
- const {data: mobytStatus, pending: mobytPending} = fetch(MobytUserStatus, organizationProfile.id)
|
|
|
- } else {
|
|
|
- const mobytStatus = ref(null)
|
|
|
- const mobytPending = ref(false)
|
|
|
- }
|
|
|
+ const mobytFetch = ability.can('manage', 'texto') ?
|
|
|
+ fetch(MobytUserStatus, organizationProfile.id) :
|
|
|
+ { data: ref(false), pending: ref(false) }
|
|
|
+
|
|
|
+ const { data: mobytStatus, pending: mobytPending } = mobytFetch
|
|
|
|
|
|
const formatCurrency = (value: Number, currency: string): string => {
|
|
|
return value.toLocaleString(i18n.locale.value, { style: 'currency', currency: currency })
|