diff --git a/app/components/app/consultation/entry.vue b/app/components/app/consultation/entry.vue index a8378b0c..bff12bfb 100644 --- a/app/components/app/consultation/entry.vue +++ b/app/components/app/consultation/entry.vue @@ -95,7 +95,7 @@ function onCancelForm() { id="strUnit_id" v-model.number="unit_id" icon-name="i-lucide-chevron-down" - placeholder="Pilih kelompok obat" + placeholder="Pilih poliklinik tujuan" v-bind="unitAttrs" :items="props.units || []" :disabled="isLoading || isReadonly" diff --git a/app/components/content/consultation/list.vue b/app/components/content/consultation/list.vue index 5d17acd0..cfce5ae3 100644 --- a/app/components/content/consultation/list.vue +++ b/app/components/content/consultation/list.vue @@ -23,6 +23,7 @@ import { isProcessing, isFormEntryDialogOpen, isRecordConfirmationOpen, + onResetState, handleActionSave, handleActionEdit, handleActionRemove, @@ -43,6 +44,7 @@ interface Props { const props = defineProps() let units = ref<{ value: string; label: string }[]>([]) +const encounterId = ref(props?.encounter?.id || 0) const title = ref('') const { @@ -57,7 +59,7 @@ const { fetchFn: async ({ page, search }) => { const result = await getList({ 'encounter-id': props.encounter.id, includes: 'encounter,dstUnit', search, page }) if (result.success) { - data.value = result.body.data; + data.value = result.body.data } return { success: result.success || false, body: result.body || {} } }, @@ -83,7 +85,7 @@ const headerPrep: HeaderPrep = { icon: 'i-lucide-plus', onClick: () => { recItem.value = { - encounter_id: props.encounter.id, + encounter_id: encounterId.value, date: today.toISOString().slice(0, 10), unit_id: 0, problem: '', @@ -144,13 +146,29 @@ onMounted(async () => { @search="handleSearch" class="mb-4 xl:mb-5" /> - - + + + { - {{ isRecordConfirmationOpen }} { >