54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import type { Config } from '~/components/pub/my-ui/data-table'
|
|
import type { DeviceOrder } from '~/models/device-order'
|
|
// import type {} from
|
|
// import { defineAsyncComponent } from 'vue'
|
|
|
|
// const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue'))
|
|
|
|
|
|
export const config: Config = {
|
|
cols: [{ width: 120 }, { }, { }, { }, { width: 50 }],
|
|
headers: [[
|
|
{ label: 'Tanggal' },
|
|
{ label: 'DPJP' },
|
|
{ label: 'Alat Kesehatan' },
|
|
{ label: 'Status' },
|
|
{ label: '' }]],
|
|
keys: ['createdAt', 'doctor.employee.person.name', 'items', 'status_code', 'action'],
|
|
delKeyNames: [
|
|
{ key: 'code', label: 'Kode' },
|
|
{ key: 'name', label: 'Nama' },
|
|
],
|
|
skeletonSize: 10,
|
|
htmls: {
|
|
items: (rec: unknown): unknown => {
|
|
const recX = rec as DeviceOrder
|
|
return recX.items?.length || 0
|
|
},
|
|
},
|
|
parses: {
|
|
createdAt: (rec: unknown): unknown => {
|
|
const recX = rec as DeviceOrder
|
|
return recX.createdAt ? new Date(recX.createdAt).toLocaleDateString() : '-'
|
|
},
|
|
// parent: (rec: unknown): unknown => {
|
|
// const recX = rec as SmallDetailDto
|
|
// return recX.parent?.name || '-'
|
|
// },
|
|
},
|
|
// funcComponent: {
|
|
// action(rec: object, idx: any) {
|
|
// const res: RecComponent = {
|
|
// idx,
|
|
// rec: rec as object,
|
|
// component: action,
|
|
// props: {
|
|
// size: 'sm',
|
|
// },
|
|
// }
|
|
// return res
|
|
// },
|
|
// }
|
|
}
|
|
|