- 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
43 lines
985 B
TypeScript
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: {},
|
|
}
|