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

This commit is contained in:
Khafid Prayoga
2025-08-14 11:05:20 +07:00
6 changed files with 65 additions and 5 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>
+1 -1
View File
@@ -7,7 +7,7 @@ defineProps<{
</script>
<template>
<PubNavDataTable
<PubBaseDataTable
:rows="data"
:cols="cols"
:header="header"
+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)"
>
+46
View File
@@ -0,0 +1,46 @@
<script setup lang="ts">
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '~/components/pub/ui/table'
defineProps<{
rows: unknown[]
cols: object
header: object[]
keys: string[]
funcParsed: object
funcHtml: object
funcComponent: object
}>()
</script>
<template>
<Table>
<TableHeader>
<TableRow>
<TableHead
v-for="(h, idx) in header[0]"
:key="`head-${idx}`"
:style="{ width: cols[idx]?.width ? `${cols[idx].width}px` : undefined }"
>
{{ h.label }}
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow v-for="(row, rowIndex) in rows" :key="`row-${rowIndex}`">
<TableCell v-for="(key, cellIndex) in keys" :key="`cell-${rowIndex}-${cellIndex}`">
<!-- If funcComponent has a renderer -->
<component
:is="funcComponent[key](row, rowIndex).component"
v-if="funcComponent[key]"
v-bind="funcComponent[key](row, rowIndex)"
/>
<!-- If funcParsed or funcHtml returns a value -->
<template v-else>
{{ funcParsed[key]?.(row) ?? funcHtml[key]?.(row) ?? row[key] }}
</template>
</TableCell>
</TableRow>
</TableBody>
</Table>
</template>
+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()