impl get position over detail divions

wip: detail division

for entry new division position

finish v1 divison-position
This commit is contained in:
Khafid Prayoga
2025-10-24 12:48:05 +07:00
parent 1042fd4923
commit df27262bd1
13 changed files with 675 additions and 6 deletions
+4 -3
View File
@@ -1,4 +1,5 @@
// Base
import type { Employee } from '~/models/employee'
import * as base from './_crud-base'
const path = '/api/v1/employee'
@@ -29,9 +30,9 @@ export async function getValueLabelList(params: any = null): Promise<{ value: st
const result = await getList(params)
if (result.success) {
const resultData = result.body?.data || []
data = resultData.map((item: any) => ({
value: item.id ? Number(item.id) : item.code,
label: item.name,
data = resultData.map((item: Employee) => ({
value: item.id,
label: `${item.person.frontTitle} ${item.person.name} ${item.person.endTitle}`.trim(),
}))
}
return data