Merge branch 'dev' of github.com:dikstub-rssa/simrs-fe into feat/satusehat

This commit is contained in:
Khafid Prayoga
2025-08-21 10:02:38 +07:00
10 changed files with 345 additions and 1 deletions
@@ -1,3 +1,5 @@
<script setup lang="ts"></script>
<template>
<div>Registration Queue</div>
<FlowRehabRegistrationHome />
</template>
@@ -0,0 +1,40 @@
<script setup lang="ts">
import type { PagePermission } from '~/models/role'
import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah SEP Prosedur',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor']
const { checkRole, hasCreateAccess } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
if (!hasAccess) {
throw createError({
statusCode: 403,
statusMessage: 'Access denied',
})
}
// Define permission-based computed properties
const canCreate = hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<FlowDoctorAdd />
</div>
<PubBaseError v-else :status-code="403" />
</template>