refactor(role): rename PagePermission to RoleAccesses and fix base model id

Update type name from PagePermission to RoleAccesses across multiple files for consistency
Change mock id value from -1 to 0 in base model to match backend constraints
Enable RBAC middleware and fix patient edit page permissions
This commit is contained in:
Khafid Prayoga
2025-12-08 18:57:35 +07:00
parent 1083bb5384
commit e967ee1cf0
7 changed files with 26 additions and 29 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import type { RoleAccess } from '~/models/role'
import type { RoleAccesses } from '~/models/role'
export const PAGE_PERMISSIONS = {
'/client/patient': {
@@ -63,4 +63,4 @@ export const PAGE_PERMISSIONS = {
'emp|pay': ['R'],
'emp|mng': ['R'],
},
} as const satisfies Record<string, RoleAccess>
} as const satisfies Record<string, RoleAccesses>