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

This commit is contained in:
Khafid Prayoga
2025-12-08 10:18:40 +07:00
835 changed files with 53072 additions and 3507 deletions
@@ -0,0 +1,38 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/ambulatory'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/detail.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|doc', 'emp|nur', 'emp|reg', 'emp|pha', 'emp|pay', 'emp|mng'],
title: 'Detail Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/ambulatory/encounter/[id]'] || {}
const hasAccess = getPageAccess(roleAccess, 'read')
</script>
<template>
<div v-if="hasAccess">
<Content />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,49 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/ambulatory'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/entry.vue'
const { getParamsId, getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg'],
title: 'Edit Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/ambulatory/encounter/[id]/edit'] || {}
const hasAccess = getPageAccess(roleAccess, 'update')
const encounterId = getParamsId()
const { user } = useUserStore()
const subClassCode = user.unit_code == 'rehab' ? 'rehab' : 'reg'
</script>
<template>
<div v-if="hasAccess">
<Content
:id="encounterId"
class-code="ambulatory"
:sub-class-code="subClassCode"
form-type="edit"
/>
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,59 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/ambulatory'
// Helpers
import { usePageChecker } from '~/lib/page-checker'
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/process.vue'
const { getRouteTitle, getPageAccess, hasCreateAccess, hasReadAccess, hasUpdateAccess, hasDeleteAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|doc', 'emp|nur', 'emp|miw', 'emp|nut', 'emp|lab', 'emp|pha', 'emp|thr'],
title: 'Proses Kunjungan',
contentFrame: 'cf-full-width',
contentPadding: 'p-0',
contentUseCard: false,
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const route = useRoute()
const menu = computed(() => route.query.menu as string | undefined)
const accessKey = computed(() => `/ambulatory/encounter/[id]/process` + (menu.value ? `?menu=${menu.value}` : ''))
const roleAccess: Record<string, Permission[]> = permissions[accessKey.value] || {}
const hasAccess = getPageAccess(roleAccess, 'read') || true
const canCreate = hasCreateAccess(roleAccess)
const canRead = hasReadAccess(roleAccess)
const canUpdate = hasUpdateAccess(roleAccess)
const canDelete = hasDeleteAccess(roleAccess)
</script>
<template>
<!--
{{ accessKey }}
{{ roleAccess }}
{{ hasAccess }}
{{ canUpdate }}
-->
<div v-if="hasAccess">
<Content
class-code="ambulatory"
:can-create="canCreate"
:can-read="canRead"
:can-update="canUpdate"
:can-delete="canDelete"
/>
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,46 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/ambulatory'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/entry.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg'],
title: 'Tambah Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/ambulatory/encounter/add'] || {}
const hasAccess = getPageAccess(roleAccess, 'create')
</script>
<template>
<div v-if="hasAccess">
<Content
:id="0"
class-code="ambulatory"
sub-class-code="reg"
form-type="add"
/>
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,58 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/ambulatory'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/list.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
// Page meta
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg', 'emp|nur', 'emp|doc', 'emp|miw', 'emp|thr', 'emp|nut', 'emp|pha', 'emp|lab'],
title: 'Daftar Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Define common things
const route = useRoute()
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions[route.path] || {}
const hasAccess = getPageAccess(roleAccess, 'read')
const canCreate = getPageAccess(roleAccess, 'create')
const canRemove = getPageAccess(roleAccess, 'delete')
// User info
const { user } = useUserStore()
const subClassCode = user.unit_code == 'rehab' ? 'rehab' : 'reg'
</script>
<template>
<div>
<div v-if="hasAccess">
<Content
class-code="ambulatory"
:sub-class-code="subClassCode"
:can-create="canCreate"
:can-delete="canRemove"
/>
</div>
<Error
v-else
:status-code="403"
/>
</div>
</template>
@@ -0,0 +1,47 @@
<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'
import ContentChemotherapyAdminList from '~/components/content/chemotherapy/admin-list.vue'
import ContentChemotherapyVerification from '~/components/content/chemotherapy/verification.vue'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Kemoterapi Admin',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => 'Verifikasi Jadwal Pasien',
})
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)
const mode = computed(() => route.params.mode as string)
</script>
<template>
<div>
<div v-if="canRead">
<ContentChemotherapyVerification />
</div>
<Error
v-else
:status-code="403"
/>
</div>
</template>
@@ -0,0 +1,55 @@
<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'
import ContentChemotherapyAdminList from '~/components/content/chemotherapy/admin-list.vue'
import ContentChemotherapyVerification from '~/components/content/chemotherapy/verification.vue'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Kemoterapi Admin',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => {
const mode = route.params.mode as string
if (mode === 'admin') {
return 'Administrasi Pasien Rawat Jalan Kemoterapi'
} else if (mode === 'series') {
return 'Proses Jadwal Pasien'
}
return 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)
const mode = computed(() => route.params.mode as string)
</script>
<template>
<div>
<div v-if="canRead">
<ContentChemotherapyAdminList v-if="mode === 'admin'" />
<ContentChemotherapyProcess v-else-if="mode === 'series'" />
<Error v-else :status-code="404" status-message="Mode tidak ditemukan" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -0,0 +1,39 @@
<script setup lang="ts">
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/ambulatory'
import Error from '~/components/pub/my-ui/error/error.vue'
import Content from '~/components/content/encounter/detail.vue'
definePageMeta({
middleware: ['rbac'],
roles: ['emp|doc', 'emp|nur', 'emp|reg', 'emp|pha', 'emp|pay', 'emp|mng'],
title: 'Detail Kunjungan',
contentFrame: 'cf-full-width',
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/ambulatory/encounter'] || {}
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)
// Page needs
const route = useRoute()
useHead({
title: () => `${route.meta.title}`,
})
</script>
<template>
<div v-if="canRead">
<Content />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,39 @@
<script setup lang="ts">
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/chemoteraphy'
import Error from '~/components/pub/my-ui/error/error.vue'
import Content from '~/components/content/encounter/process.vue'
definePageMeta({
middleware: ['rbac'],
roles: ['emp|doc', 'emp|nur', 'emp|reg', 'emp|pha', 'emp|pay', 'emp|mng'],
title: 'Tambah Kunjungan',
contentFrame: 'cf-full-width',
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/outpatient/encounter'] || {}
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)
// Page needs
const route = useRoute()
useHead({
title: () => `${route.meta.title}`,
})
</script>
<template>
<div v-if="canRead">
<Content class-code="ambulatory" sub-class-code="chemo" />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,51 @@
<script setup lang="ts">
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/ambulatory'
import Error from '~/components/pub/my-ui/error/error.vue'
import Content from '~/components/content/encounter/entry.vue'
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg'],
title: 'Tambah Kunjungan',
contentFrame: 'cf-full-width',
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/outpatient/encounter'] || {}
const { checkRole, hasReadAccess, hasCreateAccess } = 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)
// Page needs
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
// Define permission-based computed properties
const canCreate = hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<Content
:id="0"
class-code="ambulatory"
sub-class-code="chemo"
form-type="Tambah"
/>
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,49 @@
<script setup lang="ts">
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/ambulatory'
import Error from '~/components/pub/my-ui/error/error.vue'
import Content from '~/components/content/encounter/list.vue'
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg', 'emp|nur', 'emp|doc', 'emp|miw', 'emp|thr', 'emp|nut', 'emp|pha', 'emp|lab'],
title: 'Daftar Kunjungan',
contentFrame: 'cf-full-width',
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/outpatient/encounter'] || {}
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)
// Page needs
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
</script>
<template>
<div>
<div v-if="canRead">
<Content
class-code="ambulatory"
sub-class-code="chemo"
type="encounter"
/>
</div>
<Error
v-else
:status-code="403"
/>
</div>
</template>
@@ -0,0 +1,9 @@
<script setup lang="ts">
// Redirect to list page - the process page is now at [id]/index.vue
const route = useRoute()
navigateTo('/outpation-action/chemotherapy/list')
</script>
<template>
<div />
</template>
@@ -1,12 +1,12 @@
<script setup lang="ts">
import type { PagePermission } from '~/models/role'
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/chemoteraphy'
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: 'Pendaftaran',
title: 'Daftar Kempterapi',
contentFrame: 'cf-full-width',
})
@@ -16,7 +16,7 @@ useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/registration']
const roleAccess: Record<string, Permission[]> = permissions['/chemotherapy'] || {}
const { checkRole, hasReadAccess } = useRBAC()
@@ -33,7 +33,7 @@ const canRead = hasReadAccess(roleAccess)
<template>
<div>
<div v-if="canRead">
<ContentEncounterList type="registration" />
<ContentChemotherapyList />
</div>
<Error v-else :status-code="403" />
</div>
-41
View File
@@ -1,41 +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: 'Tambah Dokter',
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">
<ContentDoctorAdd />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,38 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/emergency'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/detail.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|doc', 'emp|nur', 'emp|reg', 'emp|pha', 'emp|pay', 'emp|mng'],
title: 'Detail Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/emergency/encounter/[id]'] || {}
const hasAccess = getPageAccess(roleAccess, 'read')
</script>
<template>
<div v-if="hasAccess">
<Content />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,47 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/emergency'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/entry.vue'
const { getParamsId, getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg'],
title: 'Edit Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/emergency/encounter/[id]/edit'] || {}
const hasAccess = getPageAccess(roleAccess, 'update')
const encounterId = getParamsId()
</script>
<template>
<div v-if="hasAccess">
<Content
:id="encounterId"
class-code="emergency"
sub-class-code="emg"
form-type="edit"
/>
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,43 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/emergency'
// Helpers
import { usePageChecker } from '~/lib/page-checker'
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/process.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|doc', 'emp|nur', 'emp|miw', 'emp|nut', 'emp|lab', 'emp|pha', 'emp|thr'],
title: 'Proses Kunjungan',
contentFrame: 'cf-full-width',
contentPadding: 'p-0',
contentUseCard: false,
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/emergency/encounter/[id]/process'] || {}
const hasAccess = getPageAccess(roleAccess, 'read')
</script>
<template>
<div v-if="hasAccess">
<Content class-code="emergency" />
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,46 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/emergency'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/entry.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg'],
title: 'Tambah Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/emergency/encounter/add'] || {}
const hasAccess = getPageAccess(roleAccess, 'create')
</script>
<template>
<div v-if="hasAccess">
<Content
:id="0"
class-code="emergency"
sub-class-code="emg"
form-type="add"
/>
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -1,10 +1,54 @@
<script setup lang="ts">
const route = useRoute();
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/emergency'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/list.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
// Page meta
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg', 'emp|nur', 'emp|doc', 'emp|miw', 'emp|thr', 'emp|nut', 'emp|pha', 'emp|lab'],
title: 'Daftar Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Define common things
const route = useRoute()
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions[route.path] || {}
const hasAccess = getPageAccess(roleAccess, 'read')
const canCreate = getPageAccess(roleAccess, 'create')
const canRemove = getPageAccess(roleAccess, 'delete')
</script>
<template>
<div class="p-10 text-center">
<div class="mb-5 text-base font-semibold">Hello world!!</div>
<div>You are accessing "{{ route.fullPath }}"</div>
<div>
<div v-if="hasAccess">
<Content
class-code="emergency"
sub-class-code="emg"
:can-create="canCreate"
:can-delete="canRemove"
/>
</div>
<Error
v-else
:status-code="403"
/>
</div>
</template>
@@ -0,0 +1,3 @@
<template>
</template>
@@ -0,0 +1,3 @@
<template>
</template>
@@ -0,0 +1,38 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/inpatient'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/detail.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|doc', 'emp|nur', 'emp|reg', 'emp|pha', 'emp|pay', 'emp|mng'],
title: 'Detail Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/inpatient/encounter/[id]'] || {}
const hasAccess = getPageAccess(roleAccess, 'read')
</script>
<template>
<div v-if="hasAccess">
<Content />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,47 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/inpatient'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/entry.vue'
const { getParamsId, getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg'],
title: 'Edit Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/inpatient/encounter/[id]/edit'] || {}
const hasAccess = getPageAccess(roleAccess, 'update')
const encounterId = getParamsId()
</script>
<template>
<div v-if="hasAccess">
<Content
:id="encounterId"
class-code="inpatient"
sub-class-code="vk"
form-type="edit"
/>
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,43 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/inpatient'
// Helpers
import { usePageChecker } from '~/lib/page-checker'
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/process.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|doc', 'emp|nur', 'emp|miw', 'emp|nut', 'emp|lab', 'emp|pha', 'emp|thr'],
title: 'Proses Kunjungan',
contentFrame: 'cf-full-width',
contentPadding: 'p-0',
contentUseCard: false,
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/inpatient/encounter/[id]/process'] || {}
const hasAccess = getPageAccess(roleAccess, 'read')
</script>
<template>
<div v-if="hasAccess">
<Content class-code="inpatient" />
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,46 @@
<script setup lang="ts">
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/inpatient'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/entry.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg'],
title: 'Tambah Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions['/inpatient/encounter/add'] || {}
const hasAccess = getPageAccess(roleAccess, 'create')
</script>
<template>
<div v-if="hasAccess">
<Content
:id="0"
class-code="inpatient"
sub-class-code="vk"
form-type="add"
/>
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -1,10 +1,54 @@
<script setup lang="ts">
const route = useRoute();
// Types & Consts
import type { Permission } from '~/models/role'
import { permissions } from '~/const/page-permission/inpatient'
// Helpers
import { usePageChecker } from "~/lib/page-checker"
// Pubs
import Error from '~/components/pub/my-ui/error/error.vue'
// Apps
import Content from '~/components/content/encounter/list.vue'
const { getRouteTitle, getPageAccess } = usePageChecker()
// Page meta
definePageMeta({
middleware: ['rbac'],
roles: ['emp|reg', 'emp|nur', 'emp|doc', 'emp|miw', 'emp|thr', 'emp|nut', 'emp|pha', 'emp|lab'],
title: 'Daftar Kunjungan',
contentFrame: 'cf-full-width',
})
useHead({
title: () => `${getRouteTitle()}`,
})
// Define common things
const route = useRoute()
// Preps role checking
const roleAccess: Record<string, Permission[]> = permissions[route.path] || {}
const hasAccess = getPageAccess(roleAccess, 'read')
const canCreate = getPageAccess(roleAccess, 'create')
const canRemove = getPageAccess(roleAccess, 'delete')
</script>
<template>
<div class="p-10 text-center">
<div class="mb-5 text-base font-semibold">Hello world!!</div>
<div>You are accessing "{{ route.fullPath }}"</div>
<div>
<div v-if="hasAccess">
<Content
class-code="inpatient"
sub-class-code="vk"
:can-create="canCreate"
:can-delete="canRemove"
/>
</div>
<Error
v-else
:status-code="403"
/>
</div>
</template>
@@ -6,7 +6,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Daftar Kunjungan',
title: 'Surat Kontrol',
contentFrame: 'cf-full-width',
})
@@ -22,18 +22,18 @@ const { checkRole, hasReadAccess } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
if (!hasAccess) {
navigateTo('/403')
}
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const canRead = hasReadAccess(roleAccess)
const canRead = true // hasReadAccess(roleAccess)
</script>
<template>
<div>
<div v-if="canRead">
<ContentEncounterList type="encounter" />
<ContentBpjsControlLetterList type="encounter" />
</div>
<Error v-else :status-code="403" />
</div>
@@ -0,0 +1,26 @@
<script setup lang="ts">
import Error from '~/components/pub/my-ui/error/error.vue'
import Content from '~/components/content/sep/entry.vue'
definePageMeta({
middleware: [],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Detail SEP',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const canCreate = true
</script>
<template>
<div v-if="canCreate">
<Content mode="detail" />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,26 @@
<script setup lang="ts">
import Error from '~/components/pub/my-ui/error/error.vue'
import Content from '~/components/content/sep/entry.vue'
definePageMeta({
middleware: [],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Detail SEP',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const canCreate = true
</script>
<template>
<div v-if="canCreate">
<Content mode="link" />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,26 @@
<script setup lang="ts">
import Error from '~/components/pub/my-ui/error/error.vue'
import Content from '~/components/content/sep/entry.vue'
definePageMeta({
middleware: [],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah SEP',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const canCreate = true
</script>
<template>
<div v-if="canCreate">
<Content mode="add" />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,28 @@
<script setup lang="ts">
import Error from '~/components/pub/my-ui/error/error.vue'
import Content from '~/components/content/sep/list.vue'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Daftar SEP',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const canRead = true
</script>
<template>
<div>
<div v-if="canRead">
<Content />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -6,7 +6,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Daftar Dokter',
title: 'Update PRB',
contentFrame: 'cf-full-width',
})
@@ -16,24 +16,25 @@ useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor']
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')
}
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const canRead = hasReadAccess(roleAccess)
// const canRead = hasReadAccess(roleAccess)
const canRead = true
</script>
<template>
<div>
<div v-if="canRead">
<ContentDoctorList />
<ContentPrbEntry :is-bpjs="true" />
</div>
<Error v-else :status-code="403" />
</div>
@@ -0,0 +1,41 @@
<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: 'Detail PRB',
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">
<ContentPrbDetail :patient-id="Number(route.params.id)" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -0,0 +1,41 @@
<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 PRB',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
const { checkRole, getPagePermissions } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const pagePermission = getPagePermissions(roleAccess)
const callbackUrl = route.query['return-path'] as string | undefined
</script>
<template>
<div>
<div v-if="pagePermission.canRead">
<ContentPrbEntry :is-bpjs="true" :callback-url="callbackUrl" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -0,0 +1,41 @@
<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 PRB',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
const { checkRole, getPagePermissions } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const pagePermission = getPagePermissions(roleAccess)
const callbackUrl = route.query['return-path'] as string | undefined
</script>
<template>
<div>
<div v-if="pagePermission.canRead">
<ContentPrbBpjsList :callback-url="callbackUrl" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -1,41 +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: [],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah SEP',
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 = true // hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentSepEntry />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,42 @@
<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 Divisi',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentDivisionPositionList />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,42 @@
<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: 'Detail Divisi',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentDivisionDetail :division-id="String(route.params.id)" />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,42 @@
<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 Instalasi',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentInstallationPositionList />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,42 @@
<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: 'Detail Divisi',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentInstallationDetail :installation-id="String(route.params.id)" />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,42 @@
<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 Spesialis',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentSpecialistPositionList />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,42 @@
<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: 'Detail Divisi',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentSpecialistDetail :specialist-id="String(route.params.id)" />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,42 @@
<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 Sub Spesialis',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentSubspecialistPositionList />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,42 @@
<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: 'Detail Divisi',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentSubspecialistDetail :subspecialist-id="String(route.params.id)" />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,42 @@
<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 Unit Posisi',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentUnitPositionList />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,42 @@
<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: 'Detail Divisi',
contentFrame: 'cf-container-lg',
})
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>
<template v-if="canRead">
<ContentUnitDetail :unit-id="String(route.params.id)" />
</template>
<Error
v-else
:status-code="403"
/>
</template>
@@ -1,10 +0,0 @@
<script setup lang="ts">
const route = useRoute();
</script>
<template>
<div class="p-10 text-center">
<div class="mb-5 text-base font-semibold">Hello world!!</div>
<div>You are accessing "{{ route.fullPath }}"</div>
</div>
</template>
@@ -1,10 +0,0 @@
<script setup lang="ts">
const route = useRoute();
</script>
<template>
<div class="p-10 text-center">
<div class="mb-5 text-base font-semibold">Hello world!!</div>
<div>You are accessing "{{ route.fullPath }}"</div>
</div>
</template>
@@ -1,9 +0,0 @@
<script setup lang="ts">
definePageMeta({
roles: ['sys', 'doc'],
})
</script>
<template>
<div>detail pasien</div>
</template>
@@ -1,9 +0,0 @@
<script setup lang="ts">
definePageMeta({
roles: ['sys', 'doc'],
})
</script>
<template>
<div>edit pasien</div>
</template>
@@ -0,0 +1,44 @@
<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: 'Protokol Terapi',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => `${route.meta.title}`, // backtick to avoid the ts-plugin(2322) warning
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
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 = true // hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentKfrEntry mode="edit" />
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -6,7 +6,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah Pasien',
title: 'Protokol Terapi',
contentFrame: 'cf-full-width',
})
@@ -16,26 +16,29 @@ useHead({
title: () => `${route.meta.title}`, // backtick to avoid the ts-plugin(2322) warning
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
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',
})
}
// if (!hasAccess) {
// throw createError({
// statusCode: 403,
// statusMessage: 'Access denied',
// })
// }
// Define permission-based computed properties
const canCreate = hasCreateAccess(roleAccess)
const canCreate = true // hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentPatientAdd />
<ContentKfrEntry />
</div>
<Error v-else :status-code="403" />
<Error
v-else
:status-code="403"
/>
</template>
@@ -6,7 +6,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Daftar Pasien',
title: 'Update PRB',
contentFrame: 'cf-full-width',
})
@@ -22,18 +22,19 @@ const { checkRole, hasReadAccess } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
if (!hasAccess) {
navigateTo('/403')
}
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const canRead = hasReadAccess(roleAccess)
// const canRead = hasReadAccess(roleAccess)
const canRead = true
</script>
<template>
<div>
<div v-if="canRead">
<ContentPatientList />
<ContentPrbEntry />
</div>
<Error v-else :status-code="403" />
</div>
@@ -0,0 +1,41 @@
<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: 'Detail PRB',
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">
<ContentPrbDetail :patient-id="Number(route.params.id)" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -0,0 +1,41 @@
<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 PRB',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
const { checkRole, getPagePermissions } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const pagePermission = getPagePermissions(roleAccess)
const callbackUrl = route.query['return-path'] as string | undefined
</script>
<template>
<div>
<div v-if="pagePermission.canRead">
<ContentPrbEntry :callback-url="callbackUrl" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -2,6 +2,7 @@
import type { PagePermission } from '~/models/role'
import Error from '~/components/pub/my-ui/error/error.vue'
import { PAGE_PERMISSIONS } from '~/lib/page-permission'
import EncounterProcess from '~/components/content/encounter/process.vue'
definePageMeta({
middleware: ['rbac'],
@@ -18,24 +19,24 @@ useHead({
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
const { checkRole, hasCreateAccess } = useRBAC()
const { checkRole, hasCreateAccess, getPagePermissions } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
if (!hasAccess) {
throw createError({
statusCode: 403,
statusMessage: 'Access denied',
})
}
// if (!hasAccess) {
// throw createError({
// statusCode: 403,
// statusMessage: 'Access denied',
// })
// }
// Define permission-based computed properties
const canCreate = hasCreateAccess(roleAccess)
const pagePermission = getPagePermissions(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentEncounterProcess />
<div v-if="pagePermission.canRead">
<EncounterProcess class-code="ambulatory" sub-class-code="rehab" />
</div>
<Error v-else :status-code="403" />
</template>
@@ -0,0 +1,41 @@
<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: 'Update Surat Kontrol',
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">
<ContentSurgeryReportEntry />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -0,0 +1,41 @@
<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: 'Detail Surat Kontrol',
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">
<ContentSurgeryReportDetail :patient-id="Number(route.params.id)" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -0,0 +1,41 @@
<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 Surat Kontrol',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
const { checkRole, getPagePermissions } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const pagePermission = getPagePermissions(roleAccess)
const callbackUrl = route.query['return-path'] as string | undefined
</script>
<template>
<div>
<div v-if="pagePermission.canRead">
<ContentSurgeryReportEntry :callback-url="callbackUrl" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -6,7 +6,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah Kunjungan',
title: 'Protokol Terapi',
contentFrame: 'cf-full-width',
})
@@ -16,26 +16,29 @@ useHead({
title: () => `${route.meta.title}`, // backtick to avoid the ts-plugin(2322) warning
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/registration']
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
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',
})
}
// if (!hasAccess) {
// throw createError({
// statusCode: 403,
// statusMessage: 'Access denied',
// })
// }
// Define permission-based computed properties
const canCreate = hasCreateAccess(roleAccess)
const canCreate = true // hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentEncounterEntry :id="1" form-type="Edit" />
<ContentTherapyProtocolEdit />
</div>
<Error v-else :status-code="403" />
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,44 @@
<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: 'Protokol Terapi',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => `${route.meta.title}`, // backtick to avoid the ts-plugin(2322) warning
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
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 = true // hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentTherapyProtocolAdd />
</div>
<Error
v-else
:status-code="403"
/>
</template>
@@ -0,0 +1,41 @@
<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: 'Detail Data Vaksin',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS[`/rehab/encounter`]
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">
<ContentVaccineDataDetail :patient-id="Number(route.params.id)" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -0,0 +1,41 @@
<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 Data Vaksin',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
const { checkRole, getPagePermissions } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const pagePermission = getPagePermissions(roleAccess)
const callbackUrl = route.query['return-path'] as string | undefined
</script>
<template>
<div>
<div v-if="pagePermission.canRead">
<ContentVaccineDataEntry :callback-url="callbackUrl" />
</div>
<Error v-else :status-code="403" />
</div>
</template>
@@ -1,3 +0,0 @@
<template>
<div>Examination Queue</div>
</template>
@@ -1,3 +0,0 @@
<template>
<div>Examination</div>
</template>
@@ -1,5 +0,0 @@
<script setup lang="ts"></script>
<template>
<FlowRehabRegistrationHome />
</template>
@@ -1,40 +0,0 @@
<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">
<ContentDoctorAdd />
</div>
<PubMyUiError v-else :status-code="403" />
</template>
@@ -1,41 +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: 'Tambah Kunjungan',
contentFrame: 'cf-full-width',
})
const route = useRoute()
useHead({
title: () => `${route.meta.title}`, // backtick to avoid the ts-plugin(2322) warning
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/registration']
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>
<template v-if="canCreate">
<ContentEncounterEntry form-type="Tambah" />
</template>
<Error v-else :status-code="403" />
</template>
@@ -6,7 +6,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah Kunjungan',
title: 'Resume',
contentFrame: 'cf-full-width',
})
@@ -22,20 +22,20 @@ 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',
})
}
// if (!hasAccess) {
// throw createError({
// statusCode: 403,
// statusMessage: 'Access denied',
// })
// }
// Define permission-based computed properties
const canCreate = hasCreateAccess(roleAccess)
const canCreate = true // hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentEncounterEntry form-type="Tambah" />
<ContentResumeAdd />
</div>
<Error v-else :status-code="403" />
</template>
@@ -6,7 +6,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah Kunjungan',
title: 'Detail Protokol Terapi',
contentFrame: 'cf-full-width',
})
@@ -16,26 +16,26 @@ useHead({
title: () => `${route.meta.title}`, // backtick to avoid the ts-plugin(2322) warning
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/registration']
const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
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',
})
}
// if (!hasAccess) {
// throw createError({
// statusCode: 403,
// statusMessage: 'Access denied',
// })
// }
// Define permission-based computed properties
const canCreate = hasCreateAccess(roleAccess)
const canCreate = true // hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentEncounterEntry :id="1" form-type="Detail" />
<ContentTherapyProtocolDetail/>
</div>
<Error v-else :status-code="403" />
</template>
@@ -6,7 +6,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah Kunjungan',
title: 'Edit Protokol Terapi',
contentFrame: 'cf-full-width',
})
@@ -22,20 +22,20 @@ 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',
})
}
// if (!hasAccess) {
// throw createError({
// statusCode: 403,
// statusMessage: 'Access denied',
// })
// }
// Define permission-based computed properties
const canCreate = hasCreateAccess(roleAccess)
const canCreate = true // hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentEncounterEntry :id="1" form-type="Edit" />
<ContentTherapyProtocolEdit />
</div>
<Error v-else :status-code="403" />
</template>
@@ -6,7 +6,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Tambah Kunjungan',
title: 'Tambah Protokol Terapi',
contentFrame: 'cf-full-width',
})
@@ -22,20 +22,20 @@ 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',
})
}
// if (!hasAccess) {
// throw createError({
// statusCode: 403,
// statusMessage: 'Access denied',
// })
// }
// Define permission-based computed properties
const canCreate = hasCreateAccess(roleAccess)
const canCreate = true // hasCreateAccess(roleAccess)
</script>
<template>
<div v-if="canCreate">
<ContentEncounterEntry :id="1" form-type="Detail" />
<ContentTherapyProtocolAdd />
</div>
<Error v-else :status-code="403" />
</template>
@@ -6,8 +6,8 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
title: 'Daftar User',
contentFrame: 'cf-full-width',
title: 'Daftar Dokter',
contentFrame: 'cf-container-lg',
})
const route = useRoute()
@@ -22,19 +22,17 @@ const { checkRole, hasReadAccess } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
if (!hasAccess) {
navigateTo('/403')
}
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const canRead = true // hasReadAccess(roleAccess)
</script>
<template>
<div>
<div v-if="canRead">
<ContentSepList />
</div>
<Error v-else :status-code="403" />
</div>
<template v-if="canRead">
<ContentMedicineFormList />
</template>
<Error v-else :status-code="403" />
</template>
@@ -5,7 +5,7 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
roles: [],
title: 'Daftar Dokter',
contentFrame: 'cf-full-width',
})
@@ -16,18 +16,18 @@ useHead({
title: () => route.meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor']
const roleAccess: PagePermission = PAGE_PERMISSIONS['/tools-equipment-src/medicine']!
const { checkRole, hasReadAccess } = useRBAC()
// Check if user has access to this page
const hasAccess = checkRole(roleAccess)
if (!hasAccess) {
navigateTo('/403')
}
// if (!hasAccess) {
// navigateTo('/403')
// }
// Define permission-based computed properties
const canRead = hasReadAccess(roleAccess)
const canRead = true // hasReadAccess(roleAccess)
</script>
<template>