Added new Auth Store

This commit is contained in:
2025-09-24 17:50:20 +02:00
parent b57b11ca9a
commit 9894f003e3
2 changed files with 27 additions and 82 deletions

View File

@@ -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>