fix(role): add role in encounter home

This commit is contained in:
riefive
2025-11-13 15:36:31 +07:00
parent 8bb57de4cc
commit 5af84a8dc2
6 changed files with 175 additions and 34 deletions

No files matched your search

@@ -20,7 +20,7 @@ const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor']
const { checkRole, hasCreateAccess } = useRBAC()
Check if user has access to this page
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
if (!hasAccess) {
throw createError({
@@ -31,10 +31,10 @@ const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor'] || {}
const { checkRole, hasReadAccess } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
if (!hasAccess) {
navigateTo('/403')
}
// const hasAccess = checkRole(roleAccess)
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const canRead = true // hasReadAccess(roleAccess)