feat (patient): set dynamic title for patient pages

This commit is contained in:
Abizrh
2025-08-14 10:43:00 +07:00
parent 922820f1b0
commit 0b59f48fdb
4 changed files with 18 additions and 4 deletions
+6
View File
@@ -5,6 +5,12 @@ const useIdFunction = () => useId()
const textDirection = useTextDirection({ initialValue: 'ltr' })
const dir = computed(() => (textDirection.value === 'rtl' ? 'rtl' : 'ltr'))
useHead({
// as a string,
// where `%s` is replaced with the title
titleTemplate: '%s - RSSA',
})
</script>
<template>
+2 -2
View File
@@ -18,10 +18,10 @@ const { setOpenMobile } = useSidebar()
<template>
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton as-child :tooltip="item.title" :size="size">
<SidebarMenuButton as-child :tooltip="item.title" :size="size" class="">
<NuxtLink
:to="item.link"
class="group flex items-center gap-3 rounded-lg px-3 py-3 text-sm font-medium transition-all duration-200"
class="group flex items-center gap-3 rounded-lg px-3 py-4 text-sm font-medium transition-all duration-200"
active-class="bg-primary text-white"
@click="setOpenMobile(false)"
>
+5 -1
View File
@@ -5,10 +5,14 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
pageTitle: 'Patient',
title: 'Tambah Pasien',
contentFrame: 'cf-full-width',
})
useHead({
title: () => useRoute().meta.title,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
const { checkRole, hasCreateAccess } = useRBAC()
+5 -1
View File
@@ -5,10 +5,14 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
definePageMeta({
middleware: ['rbac'],
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
pageTitle: 'Patient',
title: 'Daftar Pasien',
contentFrame: 'cf-full-width',
})
useHead({
title: () => useRoute().meta.title,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
const { checkRole, hasReadAccess } = useRBAC()