refactor(encounter): comment out navigation logic and update class code for ContentEncounterList

This commit is contained in:
riefive
2025-11-09 19:06:35 +07:00
parent 6dcc9e6c30
commit 2bb9b04cf9
2 changed files with 22 additions and 23 deletions
+21 -22
View File
@@ -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
// }
// }
},
)
@@ -34,7 +34,7 @@ const canRead = hasReadAccess(roleAccess)
<div>
<div v-if="canRead">
<ContentEncounterList
class-code="outpatient"
class-code="ambulatory"
sub-class-code="reg"
type="encounter"
/>