b16d3f108f
- 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
43 lines
952 B
TypeScript
43 lines
952 B
TypeScript
import type { Config, RecComponent } from '~/components/pub/my-ui/data-table'
|
|
import { defineAsyncComponent } from 'vue'
|
|
|
|
type SmallDetailDto = any
|
|
|
|
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: '' }]],
|
|
|
|
keys: ['code', 'name', 'parent', 'action'],
|
|
|
|
delKeyNames: [
|
|
{ key: 'code', label: 'Kode' },
|
|
{ key: 'name', label: 'Nama' },
|
|
],
|
|
|
|
parses: {
|
|
parent: (rec: unknown): unknown => {
|
|
const recX = rec as SmallDetailDto
|
|
return recX.parent?.name || '-'
|
|
},
|
|
},
|
|
|
|
components: {
|
|
action(rec, idx) {
|
|
const res: RecComponent = {
|
|
idx,
|
|
rec: rec as object,
|
|
component: action,
|
|
props: {
|
|
size: 'sm',
|
|
},
|
|
}
|
|
return res
|
|
},
|
|
},
|
|
|
|
htmls: {},
|
|
}
|