diff --git a/app/components/app/sep/entry-form.vue b/app/components/app/sep/entry-form.vue index 6727d339..df8cf6c1 100644 --- a/app/components/app/sep/entry-form.vue +++ b/app/components/app/sep/entry-form.vue @@ -102,10 +102,11 @@ const titleLetterNumber = computed(() => (admissionType.value === '3' ? 'Surat K const titleLetterDate = computed(() => admissionType.value === '3' ? 'Tanggal Surat Kontrol' : 'Tanggal Surat Rujukan', ) +const mode = props.mode !== undefined ? props.mode : 'add' +const attendingDoctorName = ref('') const isAccidentally = computed(() => accident.value === '1' || accident.value === '2') const isProvinceSelected = computed(() => accidentProvince.value !== '') const isCitySelected = computed(() => accidentCity.value !== '') -const mode = props.mode !== undefined ? props.mode : 'add' const isLoading = props.isLoading !== undefined ? props.isLoading : false const isReadonly = props.isReadonly !== undefined ? props.isReadonly : false const isService = ref(props.isService || false) @@ -156,8 +157,8 @@ const onInitialized = (objects: any) => { if (objects?.sepType === 'external') { admissionType.value = '1' } - if (objects?.diagnoseLabel) { - initialDiagnosis.value = objects?.diagnoseLabel + if (objects?.initialDiagnosis) { + initialDiagnosis.value = objects?.initialDiagnosis } // Patient data if (objects?.serviceType) { @@ -173,6 +174,9 @@ const onInitialized = (objects: any) => { if (objects?.attendingDoctor) { attendingDoctor.value = objects?.attendingDoctor } + if (objects?.attendingDoctorName) { + attendingDoctorName.value = objects?.attendingDoctorName + } if (objects?.cob) { cob.value = objects?.cob } @@ -314,7 +318,7 @@ onMounted(() => { id="sepDate" v-model="sepDate" v-bind="sepDateAttrs" - :disabled="true" + :disabled="isLoading || isReadonly" placeholder="Pilih tanggal sep" /> @@ -511,7 +515,7 @@ onMounted(() => { id="referralLetterDate" v-model="referralLetterDate" v-bind="referralLetterDateAttrs" - :disabled="true" + :disabled="isLoading || isReadonly" placeholder="Pilih tanggal surat" /> @@ -527,6 +531,7 @@ onMounted(() => { v-model="clinicExcecutive" v-bind="clinicExcecutiveAttrs" class="flex items-center gap-2" + :disabled="isLoading || isReadonly" >