Files
simrsx-fe/app/components/app/subspecialist/list-cfg.ts
T
Khafid Prayoga 3ae81c29fd feat(subspecialist): enhance specialist details with unit and installation info
- Update Unit interface to allow null installation
- Include specialist.Unit and specialist.Unit.Installation in API includes
- Add Unit and Installation fields to subspecialist detail view
- Simplify list configuration headers and update keys for specialist name
2025-11-04 09:23:26 +07:00

43 lines
985 B
TypeScript

import type { Config } 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: 'Specialis' }, { label: '' }]],
keys: ['code', 'name', 'specialist.name', 'action'],
delKeyNames: [
{ key: 'code', label: 'Kode' },
{ key: 'name', label: 'Nama' },
],
parses: {
name: (rec: unknown): unknown => {
const recX = rec as SmallDetailDto
return `${recX.name}`.trim()
},
specialist: (rec: unknown): unknown => {
const recX = rec as SmallDetailDto
return recX.specialist_id || '-'
},
},
components: {
action(rec, idx) {
return {
idx,
rec: rec as object,
component: action,
}
},
},
htmls: {},
}