Added new Auth Store
This commit is contained in:
@@ -4,7 +4,7 @@ definePageMeta({
|
||||
layout: 'mobile',
|
||||
})
|
||||
|
||||
const profileStore = useProfileStore()
|
||||
const auth = useAuthStore()
|
||||
|
||||
</script>
|
||||
|
||||
@@ -68,14 +68,12 @@ const profileStore = useProfileStore()
|
||||
|
||||
<UDivider class="my-5">Unternehmen wechseln</UDivider>
|
||||
|
||||
<UButton
|
||||
v-for="option in profileStore.ownProfiles"
|
||||
class="my-1"
|
||||
variant="outline"
|
||||
@click="profileStore.changeProfile(option.id)"
|
||||
>
|
||||
{{profileStore.tenants.find(i => i.id === option.tenant).name}}
|
||||
</UButton>
|
||||
<div class="w-full flex flex-row justify-between my-3" v-for="tenant in auth.tenants">
|
||||
<span class="text-left">{{tenant.name}}</span>
|
||||
<UButton
|
||||
@click="auth.switchTenant(tenant.id)"
|
||||
>Wechseln</UButton>
|
||||
</div>
|
||||
|
||||
|
||||
</UDashboardPanelContent>
|
||||
|
||||
Reference in New Issue
Block a user