feat/page-cleaning: adjust add encounter

This commit is contained in:
Andrian Roshandy
2025-12-02 10:02:00 +07:00
parent d221203bd5
commit 88a2dc5aba
9 changed files with 779 additions and 224 deletions
+1 -1
View File
@@ -111,4 +111,4 @@ export async function removeCustom(path: string, data: any, name: string = 'item
console.error(`Error deleting ${name}:`, error)
throw new Error(`Failed to delete ${name}`)
}
}
}
+3 -3
View File
@@ -13,8 +13,8 @@ export function getList(params: any = null) {
return base.getList(path, params, name)
}
export function getDetail(id: number | string) {
return base.getDetail(path, id, name)
export function getDetail(id: number | string, params?: any) {
return base.getDetail(path, id, name, params)
}
export function update(id: number | string, data: any) {
@@ -32,7 +32,7 @@ export async function getValueLabelList(params: any = null, useCodeAsValue = fal
const resultData = result.body?.data || []
data = resultData.map((item: Doctor) => ({
value: useCodeAsValue ? item.code
: item.id ? Number(item.id)
: item.id ? Number(item.id)
: item.id,
label: item.employee?.person?.name || '',
}))