feat (soapi): adjust list

This commit is contained in:
Abizrh
2025-12-09 22:33:50 +07:00
parent e4cd02f2ce
commit a8bf9c172d
6 changed files with 45 additions and 28 deletions

No files matched your search

+13 -1
View File
@@ -7,7 +7,9 @@ import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
import { EarlyRehabSchema } from '~/schemas/soapi.schema'
import { toast } from '~/components/pub/ui/toast'
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
const { backToList } = useQueryMode('mode')
const { backToList } = useQueryCRUDMode('mode')
const { recordId } = useQueryCRUDRecordId('record-id')
const route = useRoute()
const isOpenProcedure = ref(false)
@@ -89,9 +91,19 @@ async function getProcedures() {
isLoading.isTableLoading = false
}
async function getDetail() {
isLoading.isTableLoading = true
const resp = await xfetch(`/api/v1/soapi/${recordId.value}`)
if (resp.success) {
diagnoses.value = (resp.body as Record<string, any>).data
}
isLoading.isTableLoading = false
}
onMounted(() => {
getProcedures()
getDiagnoses()
getDetail()
})
function handleOpen(type: string) {