feat(encounter): adjust component encounter list

This commit is contained in:
riefive
2025-11-07 14:39:23 +07:00
parent 8cc260f5c3
commit 25b5ef0e87
5 changed files with 148 additions and 15 deletions
+16 -1
View File
@@ -9,6 +9,8 @@ import Header from '~/components/pub/my-ui/nav-header/prep.vue'
import Filter from '~/components/pub/my-ui/nav-header/filter.vue'
const props = defineProps<{
classCode?: 'ambulatory' | 'emergency' | 'inpatient' | 'outpatient'
subClassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
type: string
}>()
@@ -27,7 +29,20 @@ const hreaderPrep: HeaderPrep = {
icon: 'i-lucide-users',
addNav: {
label: 'Tambah',
onClick: () => navigateTo('/rehab/encounter/add'),
onClick: () => {
if (props.classCode === 'ambulatory' && props.subClassCode === 'rehab') {
navigateTo('/rehab/encounter/add')
}
if (props.classCode === 'emergency') {
navigateTo('/emergency/encounter/add')
}
if (props.classCode === 'outpatient') {
navigateTo('/outpatient/encounter/add')
}
if (props.classCode === 'inpatient') {
navigateTo('/inpatient/encounter/add')
}
},
},
}