diff --git a/app/components/app/antibiotic-in-use/entry.vue b/app/components/app/antibiotic-in-use/entry.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/antibiotic-in-use/list.cfg.ts b/app/components/app/antibiotic-in-use/list.cfg.ts new file mode 100644 index 00000000..429e2dd8 --- /dev/null +++ b/app/components/app/antibiotic-in-use/list.cfg.ts @@ -0,0 +1,28 @@ +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: [{}, {}], + + headers: [[{ label: 'Kode' }, { label: 'Nama' }]], + + keys: ['code', 'name'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, + ], + + parses: { + }, + + components: { + }, + + htmls: { + }, +} diff --git a/app/components/app/antibiotic-in-use/list.vue b/app/components/app/antibiotic-in-use/list.vue new file mode 100644 index 00000000..fac15e5c --- /dev/null +++ b/app/components/app/antibiotic-in-use/list.vue @@ -0,0 +1,17 @@ + + + diff --git a/app/components/app/consultation/entry.vue b/app/components/app/consultation/entry.vue index bff12bfb..873bfd40 100644 --- a/app/components/app/consultation/entry.vue +++ b/app/components/app/consultation/entry.vue @@ -35,24 +35,24 @@ const { defineField, errors, meta } = useForm({ initialValues: { date: props.values.date || today.toISOString().slice(0, 10), problem: '', - dstUnit_id: 0, - } as Partial, + dstUnit_code: '', + } as ConsultationFormData, }) const [date, dateAttrs] = defineField('date') -const [unit_id, unitAttrs] = defineField('unit_id') +const [unit_code, unitAttrs] = defineField('unit_code') const [problem, problemAttrs] = defineField('problem') // Fill fields from props.values if provided if (props.values) { if (props.values.date !== undefined) date.value = props.values.date.substring(0, 10) - if (props.values.dstUnit_id !== undefined) unit_id.value = props.values.dstUnit_id + if (props.values.dstUnit_code !== undefined) unit_code.value = props.values.dstUnit_code if (props.values.problem !== undefined) problem.value = props.values.problem } const resetForm = () => { date.value = date.value ?? today.toISOString().slice(0, 10) - unit_id.value = 0 + unit_code.value = 0 problem.value = '' } @@ -62,7 +62,7 @@ function onSubmitForm(values: any) { encounter_id: props.encounter_id, date: date.value ? `${date.value}T00:00:00Z` : '', problem: problem.value || '', - dstUnit_id: unit_id.value || 0, + dstUnit_code: unit_code.value || '', } emit('submit', formData, resetForm) } @@ -89,18 +89,18 @@ function onCancelForm() { Unit - - {{ errors.unit_id }} + + {{ errors.unit_code }}