From 0e115eed5ecc49c55af8820d0080dd5d1d5f5c04 Mon Sep 17 00:00:00 2001 From: riefive Date: Thu, 2 Oct 2025 14:37:17 +0700 Subject: [PATCH] fix: list unit --- app/components/app/unit/list-cfg.ts | 2 +- app/components/content/specialist/list.vue | 2 +- app/components/content/subspecialist/list.vue | 7 ++++++- app/components/content/unit/list.vue | 7 ++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/components/app/unit/list-cfg.ts b/app/components/app/unit/list-cfg.ts index 1e3a46be..b491d4f2 100644 --- a/app/components/app/unit/list-cfg.ts +++ b/app/components/app/unit/list-cfg.ts @@ -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 || '-' }, } diff --git a/app/components/content/specialist/list.vue b/app/components/content/specialist/list.vue index 27b25e6b..6e68b1b3 100644 --- a/app/components/content/specialist/list.vue +++ b/app/components/content/specialist/list.vue @@ -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 || {} } diff --git a/app/components/content/subspecialist/list.vue b/app/components/content/subspecialist/list.vue index 5571f632..5a9d2748 100644 --- a/app/components/content/subspecialist/list.vue +++ b/app/components/content/subspecialist/list.vue @@ -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', diff --git a/app/components/content/unit/list.vue b/app/components/content/unit/list.vue index 1e8edd99..d7c1a34f 100644 --- a/app/components/content/unit/list.vue +++ b/app/components/content/unit/list.vue @@ -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',