✨ feat (patient): set dynamic title for patient pages
This commit is contained in:
@@ -5,6 +5,12 @@ const useIdFunction = () => useId()
|
|||||||
|
|
||||||
const textDirection = useTextDirection({ initialValue: 'ltr' })
|
const textDirection = useTextDirection({ initialValue: 'ltr' })
|
||||||
const dir = computed(() => (textDirection.value === 'rtl' ? 'rtl' : 'ltr'))
|
const dir = computed(() => (textDirection.value === 'rtl' ? 'rtl' : 'ltr'))
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
// as a string,
|
||||||
|
// where `%s` is replaced with the title
|
||||||
|
titleTemplate: '%s - RSSA',
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ const { setOpenMobile } = useSidebar()
|
|||||||
<template>
|
<template>
|
||||||
<SidebarMenu>
|
<SidebarMenu>
|
||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton as-child :tooltip="item.title" :size="size">
|
<SidebarMenuButton as-child :tooltip="item.title" :size="size" class="">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
:to="item.link"
|
: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"
|
active-class="bg-primary text-white"
|
||||||
@click="setOpenMobile(false)"
|
@click="setOpenMobile(false)"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -5,10 +5,14 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
|
|||||||
definePageMeta({
|
definePageMeta({
|
||||||
middleware: ['rbac'],
|
middleware: ['rbac'],
|
||||||
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
||||||
pageTitle: 'Patient',
|
title: 'Tambah Pasien',
|
||||||
contentFrame: 'cf-full-width',
|
contentFrame: 'cf-full-width',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: () => useRoute().meta.title,
|
||||||
|
})
|
||||||
|
|
||||||
const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
|
const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
|
||||||
|
|
||||||
const { checkRole, hasCreateAccess } = useRBAC()
|
const { checkRole, hasCreateAccess } = useRBAC()
|
||||||
|
|||||||
@@ -5,10 +5,14 @@ import { PAGE_PERMISSIONS } from '~/lib/page-permission'
|
|||||||
definePageMeta({
|
definePageMeta({
|
||||||
middleware: ['rbac'],
|
middleware: ['rbac'],
|
||||||
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
||||||
pageTitle: 'Patient',
|
title: 'Daftar Pasien',
|
||||||
contentFrame: 'cf-full-width',
|
contentFrame: 'cf-full-width',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: () => useRoute().meta.title,
|
||||||
|
})
|
||||||
|
|
||||||
const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
|
const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
|
||||||
|
|
||||||
const { checkRole, hasReadAccess } = useRBAC()
|
const { checkRole, hasReadAccess } = useRBAC()
|
||||||
|
|||||||
Reference in New Issue
Block a user