From daf9c8f46cf35e1469913bc31759277d54ab3f23 Mon Sep 17 00:00:00 2001 From: riefive Date: Thu, 6 Nov 2025 15:50:29 +0700 Subject: [PATCH] feat(sep): adjust entry form of sep --- app/components/app/sep/entry-form.vue | 26 ++++++++++++++++++++++++- app/components/content/sep/entry.vue | 27 +++++++++++++++++++++++--- app/schemas/integration-bpjs.schema.ts | 5 +++++ 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/app/components/app/sep/entry-form.vue b/app/components/app/sep/entry-form.vue index 1d0c0580..914f7860 100644 --- a/app/components/app/sep/entry-form.vue +++ b/app/components/app/sep/entry-form.vue @@ -11,10 +11,12 @@ 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' +import TreeSelect from '~/components/pub/my-ui/select-tree/tree-select.vue' // Types import { IntegrationBpjsSchema, type IntegrationBpjsFormData } from '~/schemas/integration-bpjs.schema' import type { PatientEntity } from '~/models/patient' +import type { TreeItem } from '~/components/pub/my-ui/select-tree/type' // Helpers import { watch } from 'vue' @@ -45,6 +47,7 @@ const props = defineProps<{ provinces: any[] cities: any[] districts: any[] + specialists?: TreeItem[] patient?: PatientEntity | null | undefined objects?: any values?: any @@ -96,6 +99,7 @@ const [accidentCity, accidentCityAttrs] = defineField('accidentCity') const [accidentDistrict, accidentDistrictAttrs] = defineField('accidentDistrict') const [suplesi, suplesiAttrs] = defineField('suplesi') const [suplesiNumber, suplesiNumberAttrs] = defineField('suplesiNumber') +const [subSpecialistId, subSpecialistIdAttrs] = defineField('subSpecialistId') const titleLetterNumber = computed(() => (admissionType.value === '3' ? 'Surat Kontrol' : 'Surat Rujukan')) const titleLetterDate = computed(() => admissionType.value === '3' ? 'Tanggal Surat Kontrol' : 'Tanggal Surat Rujukan', @@ -123,6 +127,10 @@ if (mode === 'add') { sepDate.value = `${year}-${month}-${day}` } +async function onFetchChildren(parentId: string): Promise { + console.log('onFetchChildren', parentId) +} + // Submit handler const onSubmit = handleSubmit((values) => { console.log('✅ Validated form values:', JSON.stringify(values, null, 2)) @@ -456,7 +464,7 @@ onMounted(() => { - + + + + + + + +