edit one business

This commit is contained in:
2026-05-31 16:42:32 +03:30
parent 40abab5fde
commit 4eae73159a
6 changed files with 213 additions and 116 deletions
+7
View File
@@ -13,6 +13,12 @@ export const useAuthStore = defineStore('auth', () => {
const isAdmin = computed(() => user.value?.role === 'admin');
const isBusinessOwner = computed(() => user.value?.role === 'business_owner');
const isCustomer = computed(() => user.value?.role === 'customer');
const canBookAsCustomer = computed(
() =>
user.value?.role === 'customer' ||
user.value?.role === 'business_owner' ||
user.value?.role === 'admin',
);
function setSession(accessToken: string, profile: User) {
token.value = accessToken;
@@ -51,6 +57,7 @@ export const useAuthStore = defineStore('auth', () => {
isAdmin,
isBusinessOwner,
isCustomer,
canBookAsCustomer,
setSession,
logout,
loadUser,