✨ feat (encounter): add small entry form for sep
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
id: number
|
||||
formType: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl">
|
||||
<Icon name="i-lucide-user" class="me-2" />
|
||||
<span class="font-semibold">Tambah</span> Kunjungan
|
||||
<span class="font-semibold">{{ props.formType }}</span> Kunjungan
|
||||
</div>
|
||||
<AppEncounterEntryForm />
|
||||
<AppSepSmallEntry v-if="props.id" />
|
||||
</template>
|
||||
|
||||
@@ -56,6 +56,19 @@ onMounted(() => {
|
||||
getPatientList()
|
||||
})
|
||||
|
||||
watch(
|
||||
() => recAction.value,
|
||||
() => {
|
||||
if (recAction.value === 'showDetail') {
|
||||
navigateTo(`/rehab/encounter/${recId.value}/detail`)
|
||||
} else if (recAction.value === 'showEdit') {
|
||||
navigateTo(`/rehab/encounter/${recId.value}/edit`)
|
||||
} else {
|
||||
// handle other actions
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
provide('rec_id', recId)
|
||||
provide('rec_action', recAction)
|
||||
provide('rec_item', recItem)
|
||||
|
||||
Reference in New Issue
Block a user