init doctor page

This commit is contained in:
Khafid Prayoga
2025-08-14 10:55:25 +07:00
parent bcfbc3af67
commit 616c843260
8 changed files with 109 additions and 73 deletions

No files matched your search

+2 -1
View File
@@ -1,3 +1,4 @@
import type { Pinia } from 'pinia'
import { PAGE_PERMISSIONS } from '~/lib/page-permission'
export default defineNuxtRouteMiddleware((to) => {
@@ -5,7 +6,7 @@ export default defineNuxtRouteMiddleware((to) => {
const { $pinia } = useNuxtApp()
if (import.meta.server) {
const authStore = useUserStore($pinia)
const authStore = useUserStore($pinia as Pinia)
// Check specific page permissions if defined in config
const pagePermissions = PAGE_PERMISSIONS[to.path as keyof typeof PAGE_PERMISSIONS]
if (pagePermissions) {