diff --git a/app/components/app/encounter/entry-form.vue b/app/components/app/encounter/entry-form.vue index 86681d2f..64290f3e 100644 --- a/app/components/app/encounter/entry-form.vue +++ b/app/components/app/encounter/entry-form.vue @@ -49,7 +49,6 @@ model.value = genEncounter() // Common preparation const defaultCBItems = [{ label: 'Pilih', value: '' }] -const paymentMethodItems = ref({}) // Emit preparation const emit = defineEmits<{ @@ -84,21 +83,21 @@ const sepTrafficStatus = ref('') const diagnosis = ref('') const noteReference = ref('Hanya diperlukan jika pembayaran jenis JKN') const noteFile = ref('Gunakan file [.pdf, .jpg, .png] dengan ukuran maksimal 1MB') - +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 mode = props.mode !== undefined ? props.mode : 'add' -// SEP validation state from props -const isSepValid = computed(() => props.isSepValid || false) +const isSepValid = computed(() => props.isSepValid || false) // SEP validation state from props const isCheckingSep = computed(() => props.isCheckingSep || false) const isInsurancePayment = computed(() => ['insurance', 'jkn'].includes(paymentMethodCode.value)) const isDateLoading = ref(false) +const isUsePaymentNew = true const debouncedSepNumber = refDebounced(sepNumber, 500) const debouncedCardNumber = refDebounced(cardNumber, 500) const sepFileReview = ref(null) const sippFileReview = ref(null) const unitFullName = ref('') // Unit, specialist, subspecialist const formRef = ref(null) // Expose submit method for parent component +const paymentMethodItems = isUsePaymentNew ? props.payments : CB.recStrToItem(paymentMethodCodes) if (mode === 'add') { // Set default sepDate to current date in YYYY-MM-DD format @@ -236,11 +235,6 @@ function submitForm() { defineExpose({ submitForm, }) - -onMounted(() => { - const isPaymentMethodVclaim = true - paymentMethodItems.value = isPaymentMethodVclaim ? props.payments : CB.recStrToItem(paymentMethodCodes) -})