diff --git a/app/components/app/sep/entry-form.vue b/app/components/app/sep/entry-form.vue index c8e8beb0..f98d4caa 100644 --- a/app/components/app/sep/entry-form.vue +++ b/app/components/app/sep/entry-form.vue @@ -9,6 +9,7 @@ import { Input } from '~/components/pub/ui/input' import { RadioGroup, RadioGroupItem } from '~/components/pub/ui/radio-group' import { Textarea } from '~/components/pub/ui/textarea' import Select from '~/components/pub/ui/select/Select.vue' +import Combobox from '~/components/pub/my-ui/combobox/combobox.vue' import DatepickerSingle from '~/components/pub/my-ui/datepicker/datepicker-single.vue' // Types @@ -22,17 +23,23 @@ import { useForm } from 'vee-validate' const props = defineProps<{ isLoading?: boolean isReadonly?: boolean + doctors: any[] patient?: PatientEntity | null | undefined values?: any }>() const emit = defineEmits<{ - (e: 'event', value: any): void + (e: 'event', menu: string, value?: any): void }>() const isLoading = props.isLoading !== undefined ? props.isLoading : false const isReadonly = props.isReadonly !== undefined ? props.isReadonly : false +const admissionTypes = [ + { value: '1', label: 'Kontrol' }, + { value: '2', label: 'Rujukan' }, +] + const items = [ { value: 'item-1', label: 'Item 1' }, { value: 'item-2', label: 'Item 2' }, @@ -68,7 +75,6 @@ const onSubmit = handleSubmit((values) => { }) watch(props, (value) => { - console.log('patient changed:', value) const patient = value.patient || ({} as PatientEntity) if (Object.keys(patient).length > 0) { bpjsNumber.value = '-' @@ -116,9 +122,10 @@ watch(props, (value) => { icon-name="i-lucide-chevron-down" v-model="admissionType" v-bind="admissionTypeAttrs" - :items="items" + :items="admissionTypes" :disabled="isLoading || isReadonly" placeholder="Pilih jalur" + @change="emit('event', 'admission-type', $event)" /> @@ -327,14 +334,15 @@ watch(props, (value) => { * -