edit one business
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user