✨ feat (soapi): introduce early rehab and function forms
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<script setup lang="ts">
|
||||
import Entry from '~/components/app/soapi/entry.vue'
|
||||
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
||||
|
||||
const isOpen = ref(false)
|
||||
const data = ref([])
|
||||
const isLoading = reactive<DataTableLoader>({
|
||||
isTableLoading: false,
|
||||
})
|
||||
|
||||
async function getPatientList() {
|
||||
isLoading.isTableLoading = true
|
||||
const resp = await xfetch('/api/v1/patient')
|
||||
if (resp.success) {
|
||||
data.value = (resp.body as Record<string, any>).data
|
||||
}
|
||||
isLoading.isTableLoading = false
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getPatientList()
|
||||
})
|
||||
|
||||
function handleClick(type: string) {
|
||||
console.log(type)
|
||||
isOpen.value = true
|
||||
}
|
||||
|
||||
provide('table_data_loader', isLoading)
|
||||
</script>
|
||||
<template>
|
||||
<Entry
|
||||
type="early-rehab"
|
||||
:exclude-fields="['prim-compl', 'sec-compl']"
|
||||
@click="handleClick"
|
||||
/>
|
||||
<Dialog
|
||||
v-model:open="isOpen"
|
||||
title="Pilih Prosedur"
|
||||
size="xl"
|
||||
prevent-outside
|
||||
>
|
||||
<AppIcdMultiselectPicker :data="data" />
|
||||
</Dialog>
|
||||
</template>
|
||||
Reference in New Issue
Block a user