diff --git a/app/components/app/encounter/dropdown-action.vue b/app/components/app/encounter/dropdown-action.vue new file mode 100644 index 00000000..bd7a4974 --- /dev/null +++ b/app/components/app/encounter/dropdown-action.vue @@ -0,0 +1,154 @@ + + + diff --git a/app/components/app/encounter/entry-form.vue b/app/components/app/encounter/entry-form.vue index 9c24a0c6..22acbbb8 100644 --- a/app/components/app/encounter/entry-form.vue +++ b/app/components/app/encounter/entry-form.vue @@ -20,6 +20,7 @@ import type { TreeItem } from '~/components/pub/my-ui/select-tree/type' // Helpers import { toTypedSchema } from '@vee-validate/zod' import { useForm } from 'vee-validate' +import { refDebounced } from '@vueuse/core' const props = defineProps<{ isLoading?: boolean @@ -92,8 +93,9 @@ watch(subSpecialistId, async (newValue) => { } }) -// Watch SEP number changes to notify parent -watch(sepNumber, (newValue) => { +// Debounced SEP number watcher: emit change only after user stops typing +const debouncedSepNumber = refDebounced(sepNumber, 500) +watch(debouncedSepNumber, (newValue) => { emit('event', 'sep-number-changed', newValue) }) @@ -452,7 +454,11 @@ defineExpose({ name="i-lucide-loader-2" class="h-4 w-4 animate-spin" /> - + +