fix: list unit

This commit is contained in:
riefive
2025-10-02 14:37:17 +07:00
parent d544d031c3
commit 0e115eed5e
4 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ export const funcParsed: RecStrFuncUnknown = {
},
installation: (rec: unknown): unknown => {
const recX = rec as SmallDetailDto
return recX.installation?.name || '-'
return recX.installation?.name || recX.Installation?.name || '-'
},
}
+1 -1
View File
@@ -49,7 +49,7 @@ const {
// TODO: use pagination params
const result = await getSpecialists({
search: params.search,
// page: params['page-number'] || 0,
page: params['page-number'] || 0,
includes: 'unit',
})
return { success: result.success || false, body: result.body || {} }
@@ -45,7 +45,12 @@ const {
fetchData: getSubSpecialistList,
} = usePaginatedList({
fetchFn: async (params: any) => {
const result = await getSubspecialists({ search: params.search, page: params['page-number'] || 0 })
// TODO: use pagination params
const result = await getSubspecialists({
search: params.search,
page: params['page-number'] || 0,
includes: 'specialist',
})
return { success: result.success || false, body: result.body || {} }
},
entityName: 'subspecialist',
+6 -1
View File
@@ -45,7 +45,12 @@ const {
fetchData: getUnitList,
} = usePaginatedList({
fetchFn: async (params: any) => {
const result = await getUnits({ search: params.search, page: params['page-number'] || 0, includes: 'installation' })
// TODO: use pagination params
const result = await getUnits({
search: params.search,
page: params['page-number'] || 0,
includes: 'installation',
})
return { success: result.success || false, body: result.body || {} }
},
entityName: 'unit',