feat(chemo): add page process and modify components

This commit is contained in:
riefive
2025-11-03 15:03:56 +07:00
parent d1369d513b
commit 89b2fb9cd9
26 changed files with 296 additions and 24 deletions

No files matched your search

@@ -1,7 +0,0 @@
<script setup lang="ts">
const route = useRoute()
</script>
<template>
<ContentCemotherapyProtocol />
</template>
@@ -1,40 +0,0 @@
<script setup lang="ts">
import type { PagePermission } from '~/models/role'
import Error from '~/components/pub/my-ui/error/error.vue'
import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Daftar Kempterapi',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
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')
}
// Define permission-based computed properties
const canRead = true // hasReadAccess(roleAccess)
</script>
<template>
<div>
<div v-if="canRead">
<ContentCemotherapyList />
</div>
<Error v-else :status-code="403" />
</div>
</template>