From 8354d3819d2366155fe39df0cd96c80e4e4b848a Mon Sep 17 00:00:00 2001 From: Khafid Prayoga Date: Wed, 10 Dec 2025 20:38:54 +0700 Subject: [PATCH] fix(entry-form): clear disabilityType when disability is 'no' Reset the disabilityType field when disability is set to 'no' to maintain data consistency --- app/components/app/patient/entry-form.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/components/app/patient/entry-form.vue b/app/components/app/patient/entry-form.vue index 5bb367fe..c2e187a5 100644 --- a/app/components/app/patient/entry-form.vue +++ b/app/components/app/patient/entry-form.vue @@ -91,6 +91,15 @@ watch( immediate: true, }, ) + +watch( + () => values.disability, + (newValue) => { + if (newValue === 'no') { + setFieldValue('disabilityType', undefined) + } + }, +)