init: treatment report

feat(treatment-report): add treatment report component with sample data

Implement new treatment report feature including list view component, sample data, and configuration. The component supports pagination, filtering by date range, and search functionality. Also integrates with encounter process and home views.

wip: init form and schema
This commit is contained in:
Khafid Prayoga
2025-11-25 15:27:50 +07:00
parent a2323e0827
commit 7ee6f40196
12 changed files with 422 additions and 2 deletions
@@ -0,0 +1,45 @@
<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: 'Tambah Laporan',
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)
const hasAccess = true
if (!hasAccess) {
navigateTo('/403')
}
// Define permission-based computed properties
// const canRead = hasReadAccess(roleAccess)
const canRead = true
</script>
<template>
<div>
<div v-if="canRead">
<ContentTreatmentReportAdd />
</div>
<Error
v-else
:status-code="403"
/>
</div>
</template>