refactor(division): improve employee name formatting and navigation

- Simplify employee name construction using array filtering
- Replace dropdown-action-ud with dropdown-action-dud component
- Update division detail navigation to use route navigation
- Clean up code formatting and remove unnecessary whitespace
This commit is contained in:
Khafid Prayoga
2025-10-27 11:05:32 +07:00
parent df27262bd1
commit b16d3f108f
4 changed files with 23 additions and 17 deletions

No files matched your search

@@ -33,8 +33,10 @@ export const config: Config = {
},
employee: (rec: unknown): unknown => {
const recX = rec as DivisionPosition
const fullName =
`${recX.employee?.person.frontTitle} ${recX.employee?.person.name} ${recX.employee?.person.endTitle}`.trim()
const fullName = [recX.employee?.person.frontTitle, recX.employee?.person.name, recX.employee?.person.endTitle]
.filter(Boolean)
.join(' ')
.trim()
return fullName || '-'
},
+3 -8
View File
@@ -3,17 +3,12 @@ import { defineAsyncComponent } from 'vue'
type SmallDetailDto = any
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue'))
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
export const config: Config = {
cols: [{}, {}, {}, { width: 50 }],
headers: [[
{ label: 'Kode' },
{ label: 'Nama' },
{ label: 'Divisi Induk' },
{ label: '' },
]],
headers: [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Divisi Induk' }, { label: '' }]],
keys: ['code', 'name', 'parent', 'action'],
@@ -44,4 +39,4 @@ export const config: Config = {
},
htmls: {},
}
}