Files
simrsx-fe/app/pages/(features)/org-src/unit/add.vue
Khafid Prayoga 5e1775d057 feat(unit): add unit management pages and form components
- Create new unit list and add pages under org-src feature
- Implement unit entry form with validation using zod
- Update error types to support readonly path property
- Refactor field component to use shared error type
2025-08-29 13:39:59 +07:00

42 lines
998 B
Vue

<script setup lang="ts">
// import type { PagePermission } from '~/models/role'
import Error from '~/components/pub/base/error/error.vue'
// import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
// middleware: ['rbac'],
// roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah Unit Instalasi',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
// const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
// 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 = hasReadAccess(roleAccess)
const canRead = true
</script>
<template>
<div>
<div v-if="canRead">
<FlowUnitEntry />
</div>
<Error v-else :status-code="403" />
</div>
</template>