From 2bb9b04cf9bc3665e44cdf1105a1ab204abaf0a1 Mon Sep 17 00:00:00 2001 From: riefive Date: Sun, 9 Nov 2025 19:06:35 +0700 Subject: [PATCH] refactor(encounter): comment out navigation logic and update class code for ContentEncounterList --- app/components/content/encounter/list.vue | 43 +++++++++---------- .../(features)/outpatient/encounter/index.vue | 2 +- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/app/components/content/encounter/list.vue b/app/components/content/encounter/list.vue index 36a37b33..8524a0f1 100644 --- a/app/components/content/encounter/list.vue +++ b/app/components/content/encounter/list.vue @@ -144,32 +144,31 @@ function handleCancelConfirmation() { watch( () => recAction.value, () => { - console.log('recAction.value', recAction.value) if (recAction.value === ActionEvents.showConfirmDelete) { isRecordConfirmationOpen.value = true return } - if (props.type === 'encounter') { - if (recAction.value === 'showDetail') { - navigateTo(`/rehab/encounter/${recId.value}/detail`) - } else if (recAction.value === 'showEdit') { - navigateTo(`/rehab/encounter/${recId.value}/edit`) - } else if (recAction.value === 'showProcess') { - navigateTo(`/rehab/encounter/${recId.value}/process`) - } else { - // handle other actions - } - } else if (props.type === 'registration') { - if (recAction.value === 'showDetail') { - navigateTo(`/rehab/registration/${recId.value}/detail`) - } else if (recAction.value === 'showEdit') { - navigateTo(`/rehab/registration/${recId.value}/edit`) - } else if (recAction.value === 'showProcess') { - navigateTo(`/rehab/registration/${recId.value}/process`) - } else { - // handle other actions - } - } + // if (props.type === 'encounter') { + // if (recAction.value === 'showDetail') { + // navigateTo(`/rehab/encounter/${recId.value}/detail`) + // } else if (recAction.value === 'showEdit') { + // navigateTo(`/rehab/encounter/${recId.value}/edit`) + // } else if (recAction.value === 'showProcess') { + // navigateTo(`/rehab/encounter/${recId.value}/process`) + // } else { + // // handle other actions + // } + // } else if (props.type === 'registration') { + // if (recAction.value === 'showDetail') { + // navigateTo(`/rehab/registration/${recId.value}/detail`) + // } else if (recAction.value === 'showEdit') { + // navigateTo(`/rehab/registration/${recId.value}/edit`) + // } else if (recAction.value === 'showProcess') { + // navigateTo(`/rehab/registration/${recId.value}/process`) + // } else { + // // handle other actions + // } + // } }, ) diff --git a/app/pages/(features)/outpatient/encounter/index.vue b/app/pages/(features)/outpatient/encounter/index.vue index e8dfb708..1e679c5d 100644 --- a/app/pages/(features)/outpatient/encounter/index.vue +++ b/app/pages/(features)/outpatient/encounter/index.vue @@ -34,7 +34,7 @@ const canRead = hasReadAccess(roleAccess)