feat(sep): adjust entry form of sep
This commit is contained in:
@@ -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<void> {
|
||||
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(() => {
|
||||
</Field>
|
||||
</Cell>
|
||||
|
||||
<Cell>
|
||||
<Cell v-if="isShowPatient">
|
||||
<Label height="compact">
|
||||
Klinik Tujuan
|
||||
<span class="text-red-500">*</span>
|
||||
@@ -476,6 +484,22 @@ onMounted(() => {
|
||||
</Field>
|
||||
</Cell>
|
||||
|
||||
<Cell>
|
||||
<Label height="compact">
|
||||
Spesialis / Subspesialis
|
||||
<span class="text-red-500">*</span>
|
||||
</Label>
|
||||
<Field :errMessage="errors.subSpecialistId">
|
||||
<TreeSelect
|
||||
id="subSpecialistId"
|
||||
v-model="subSpecialistId"
|
||||
v-bind="subSpecialistIdAttrs"
|
||||
:data="specialists || []"
|
||||
:on-fetch-children="onFetchChildren"
|
||||
/>
|
||||
</Field>
|
||||
</Cell>
|
||||
|
||||
<Cell>
|
||||
<Label height="compact">
|
||||
DPJP
|
||||
|
||||
Reference in New Issue
Block a user