Files
simrsx-fe/app/components/app/prescription-item/list-entry.cfg.ts
T
Andrian Roshandy 20649c5917 feat/prescription: finalize #1
+ integration
+ non mix entry
2025-11-16 19:52:22 +07:00

49 lines
1.0 KiB
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: 'Nama' },
{ label: 'Cara Buat' },
{ label: 'Bentuk' },
{ label: 'Freq' },
{ label: 'Dosis' },
// { label: 'Interval' },
{ label: 'Total' },
{ label: '' },
],
],
keys: ['medicine.name', 'isMix', 'medicine.medicineForm.name', 'frequency', 'dose', 'quantity', 'action'], //
delKeyNames: [
{ key: 'code', label: 'Kode' },
{ key: 'name', label: 'Nama' },
],
parses: {
isMix: (rec: unknown): unknown => {
return (rec as SmallDetailDto).isMix ? 'Racikan' : 'Non Racikan'
},
},
components: {
action(rec, idx) {
return {
idx,
rec: rec as object,
component: action,
}
},
},
htmls: {},
}