Ajuste rotas, Menus, Layout, Permissãoes UserRoleGuard
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useTenantStore } from '@/stores/tenantStore'
|
||||
|
||||
const router = useRouter()
|
||||
const tenant = useTenantStore()
|
||||
|
||||
function goHome () {
|
||||
const role = tenant.activeRole
|
||||
|
||||
if (role === 'tenant_admin' || role === 'clinic_admin' || role === 'admin') {
|
||||
router.push('/admin')
|
||||
return
|
||||
}
|
||||
|
||||
if (role === 'therapist') {
|
||||
router.push('/therapist')
|
||||
return
|
||||
}
|
||||
|
||||
if (role === 'patient') {
|
||||
router.push('/portal')
|
||||
return
|
||||
}
|
||||
|
||||
router.push('/')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col items-center justify-center min-h-[60vh] text-center px-6">
|
||||
<div class="text-6xl font-bold text-[var(--primary-color)] mb-4">
|
||||
403
|
||||
</div>
|
||||
|
||||
<h1 class="text-2xl font-semibold mb-2">
|
||||
Acesso negado
|
||||
</h1>
|
||||
|
||||
<p class="text-[var(--text-color-secondary)] max-w-md mb-6">
|
||||
Você está autenticado, mas não possui permissão para acessar esta área.
|
||||
Caso acredite que isso seja um erro, entre em contato com o administrador da clínica.
|
||||
</p>
|
||||
|
||||
<Button
|
||||
label="Voltar para minha área"
|
||||
icon="pi pi-home"
|
||||
@click="goHome"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user