diff --git a/app/components/app/initial-nursing/entry-form.vue b/app/components/app/initial-nursing/entry-form.vue index 55b65228..acca54fb 100644 --- a/app/components/app/initial-nursing/entry-form.vue +++ b/app/components/app/initial-nursing/entry-form.vue @@ -12,10 +12,10 @@ import { genBase } from '~/models/_base' interface Masalah { id: number - tanggalMuncul: string + date: string diagnosa: string - tanggalTeratasi: string - petugas: string + finishDate: string + staff: string } const props = defineProps<{ @@ -84,10 +84,10 @@ const validate = async () => { const form = ref({ id: 0, - tanggalMuncul: '', + date: '', diagnosa: '', - tanggalTeratasi: '', - petugas: '', + finishDate: '', + staff: '', }) const list = ref([]) @@ -97,10 +97,10 @@ const showForm = ref(false) const resetForm = () => { form.value = { id: 0, - tanggalMuncul: '', + date: '', diagnosa: '', - tanggalTeratasi: '', - petugas: '', + finishDate: '', + staff: '', } isEditing.value = false } @@ -112,15 +112,14 @@ const openAdd = () => { const submitForm = () => { if (isEditing.value) { - // update const index = list.value.findIndex((v) => v.id === form.value.id) if (index !== -1) list.value[index] = { ...form.value } } else { - // tambah baru list.value.push({ ...form.value, id: Date.now(), }) + emit('click', { type: 'add-problem', data: list.value }) } showForm.value = false @@ -431,7 +430,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
@@ -444,14 +443,14 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
- +
@@ -490,10 +489,10 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key) :key="item.id" class="border" > - {{ item.tanggalMuncul }} + {{ item.date }} {{ item.diagnosa }} - {{ item.tanggalTeratasi }} - {{ item.petugas }} + {{ item.finishDate }} + {{ item.staff }} import('~/components/pub/my-ui/data/dropdown-action-ud.vue')) export const config: Config = { - cols: [{}, {}, {}, { width: 100 }, { width: 120 }, {}, {}, {}, { width: 100 }, { width: 100 }, {}, { width: 50 }], + cols: [{}, {}, {}, { width: 100 }, { width: 120 }, {}, {}, {}, { width: 100 }, { width: 50 }], headers: [ - [ - { label: 'Tanggal' }, - { label: 'DPJP' }, - { label: 'Keluhan & Riwayat' }, - { label: 'Pemeriksaan' }, - { label: 'Diagnosa' }, - { label: 'Status' }, - { label: 'Aksi' }, - ], + [{ label: 'Tanggal' }, { label: 'Diagnosa' }, { label: 'Tanggal Selesai' }, { label: 'Staff' }, { label: 'Aksi' }], ], - keys: ['time', 'employee_id', 'main_complaint', 'encounter', 'diagnose', 'status', 'action'], + keys: ['date', 'diagnosa', 'finishDate', 'staff', 'action'], delKeyNames: [ { key: 'code', label: 'Kode' }, diff --git a/app/components/app/initial-nursing/preview.vue b/app/components/app/initial-nursing/preview.vue index cce6debf..501969f0 100644 --- a/app/components/app/initial-nursing/preview.vue +++ b/app/components/app/initial-nursing/preview.vue @@ -1,177 +1,127 @@