init form add doctor

This commit is contained in:
Khafid Prayoga
2025-08-14 14:59:47 +07:00
parent b22d606a17
commit 4f2782a934
7 changed files with 89 additions and 13 deletions

No files matched your search

+76 -7
View File
@@ -13,20 +13,89 @@ import Label from '~/components/pub/form/label.vue'
</div> </div>
<div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl"> <div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl">
<div> <div class="flex flex-col justify-between">
<Block> <Block>
<FieldGroup :column="2"> <FieldGroup :column="1">
<Label>Nama</Label> <Label>Nama dan Gelar</Label>
<Field name="name"> <Field>
<Input type="text" name="name" default-value="dr." />
</Field>
<Field>
<Input type="text" name="name" />
</Field>
<Field>
<Input type="text" name="name" /> <Input type="text" name="name" />
</Field> </Field>
</FieldGroup> </FieldGroup>
</Block>
<Block>
<FieldGroup :column="2"> <FieldGroup :column="2">
<Label>Nomor RM</Label> <Label>NIK</Label>
<Field name="name"> <Field>
<Input type="text" name="name" /> <Input type="text" name="identity_number" />
</Field> </Field>
</FieldGroup> </FieldGroup>
<FieldGroup :column="2">
<Label>NO SIP</Label>
<Field name="sip_number">
<Input type="text" name="sip_no" />
</Field>
</FieldGroup>
</Block>
<Block>
<FieldGroup :column="2">
<Label>Telepon / HP</Label>
<Field name="phone">
<Input type="text" name="phone" />
</Field>
</FieldGroup>
<FieldGroup :column="2">
<Label>Kode BPJS</Label>
<Field>
<Input type="text" name="bpjs_code" />
</Field>
</FieldGroup>
</Block>
<Block>
<FieldGroup :column="2">
<Label>Fee Rajal</Label>
<Field>
<Input type="number" name="outPatient_rate" />
</Field>
</FieldGroup>
<FieldGroup :column="2">
<Label>Fee Ranap</Label>
<Field>
<Input type="number" name="inPatient_rate" />
</Field>
</FieldGroup>
</Block>
<Block>
<FieldGroup :column="3">
<Label>Status</Label>
<Field>
<Input type="select" name="status">
<option value="active">Aktif</option>
<option value="inactive">Tidak Aktif</option>
</Input>
</Field>
</FieldGroup>
</Block>
<Block>
<FieldGroup :column="2">
<Label>Username</Label>
<Field>
<Input type="text" name="username" />
</Field>
</FieldGroup>
<FieldGroup :column="2">
<Label>Password</Label>
<Field>
<Input type="password" name="password" />
</Field>
</FieldGroup>
</Block> </Block>
</div> </div>
</div> </div>
+1 -1
View File
@@ -21,7 +21,7 @@ const recAction = ref<string>('')
const recItem = ref<any>(null) const recItem = ref<any>(null)
const hreaderPrep: HeaderPrep = { const hreaderPrep: HeaderPrep = {
title: 'Doctor', title: 'Dokter',
icon: 'i-lucide-add', icon: 'i-lucide-add',
addNav: { addNav: {
label: 'Tambah', label: 'Tambah',
+5 -1
View File
@@ -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: 'Doctor', title: 'Tambah Dokter',
contentFrame: 'cf-full-width', contentFrame: 'cf-full-width',
}) })
useHead({
title: () => useRoute().meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor'] const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor']
const { checkRole, hasCreateAccess } = useRBAC() const { checkRole, hasCreateAccess } = useRBAC()
+4 -1
View File
@@ -5,10 +5,13 @@ 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: 'Doctor', title: 'Daftar Dokter',
contentFrame: 'cf-full-width', contentFrame: 'cf-full-width',
}) })
useHead({
title: () => useRoute().meta.title as string,
})
const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor'] const roleAccess: PagePermission = PAGE_PERMISSIONS['/doctor']
const { checkRole, hasReadAccess } = useRBAC() const { checkRole, hasReadAccess } = useRBAC()
+1 -1
View File
@@ -10,7 +10,7 @@ definePageMeta({
}) })
useHead({ useHead({
title: () => useRoute().meta.title, title: () => useRoute().meta.title as string,
}) })
const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient'] const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
+1 -1
View File
@@ -18,7 +18,7 @@ export const useUserStore = defineStore(
return { return {
user, user,
isAuthenticated, isAuthenticated,
userRole: ['admisi'], userRole: ['doctor'],
login, login,
logout, logout,
} }
+1 -1
View File
@@ -31,7 +31,7 @@
] ]
}, },
{ {
"title": "Doctor", "title": "Dokter",
"icon": "i-lucide-cross", "icon": "i-lucide-cross",
"link": "/doctor" "link": "/doctor"
}, },