fix(encounter): modify dropdown action
This commit is contained in:
@@ -20,7 +20,6 @@ import Consultation from '~/components/content/consultation/list.vue'
|
||||
import ProtocolList from '~/components/app/chemotherapy/list.protocol.vue'
|
||||
import MedicineProtocolList from '~/components/app/chemotherapy/list.medicine.vue'
|
||||
|
||||
const { getActiveRole } = useUserStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
@@ -30,6 +29,7 @@ const props = defineProps<{
|
||||
subClassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
|
||||
}>()
|
||||
|
||||
const { getActiveRole } = useUserStore()
|
||||
const activeRole = getActiveRole()
|
||||
const activePosition = ref(getPositionAs(activeRole))
|
||||
const tabs = ref([] as any)
|
||||
@@ -375,6 +375,12 @@ function getMenus() {
|
||||
})
|
||||
}
|
||||
|
||||
function handleClick(type: string) {
|
||||
if (type === 'draft') {
|
||||
router.back()
|
||||
}
|
||||
}
|
||||
|
||||
watch(getActiveRole, () => {
|
||||
const activeRole = getActiveRole()
|
||||
activePosition.value = getPositionAs(activeRole)
|
||||
@@ -390,7 +396,7 @@ onMounted(async () => {
|
||||
<template>
|
||||
<div class="w-full">
|
||||
<div class="mb-4">
|
||||
<PubMyUiNavContentBa label="Kembali ke Daftar Kunjungan" />
|
||||
<PubMyUiNavContentBa label="Kembali ke Daftar Kunjungan" @click="handleClick" />
|
||||
</div>
|
||||
<EncounterQuickInfoFull
|
||||
v-if="data && data.patient && data.patient.person"
|
||||
|
||||
@@ -7,6 +7,9 @@ import Header from '~/components/pub/my-ui/nav-header/prep.vue'
|
||||
import Filter from '~/components/pub/my-ui/nav-header/filter.vue'
|
||||
import RecordConfirmation from '~/components/pub/my-ui/confirmation/record-confirmation.vue'
|
||||
|
||||
// Libs
|
||||
import { getPositionAs } from '~/lib/roles'
|
||||
|
||||
// Types
|
||||
import type { DataTableLoader } from '~/components/pub/my-ui/data-table/type'
|
||||
import type { Summary } from '~/components/pub/my-ui/summary-card/type'
|
||||
@@ -19,6 +22,9 @@ import { getList as getEncounterList, remove as removeEncounter, cancel as cance
|
||||
// UI
|
||||
import { toast } from '~/components/pub/ui/toast'
|
||||
|
||||
const { getActiveRole } = useUserStore()
|
||||
const activeRole = getActiveRole()
|
||||
const activePosition = ref(getPositionAs(activeRole))
|
||||
const props = defineProps<{
|
||||
classCode?: 'ambulatory' | 'emergency' | 'inpatient' | 'outpatient'
|
||||
subClassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
|
||||
@@ -245,10 +251,16 @@ watch(
|
||||
},
|
||||
)
|
||||
|
||||
watch(getActiveRole, () => {
|
||||
const activeRole = getActiveRole()
|
||||
activePosition.value = getPositionAs(activeRole)
|
||||
})
|
||||
|
||||
provide('rec_id', recId)
|
||||
provide('rec_action', recAction)
|
||||
provide('rec_item', recItem)
|
||||
provide('table_data_loader', isLoading)
|
||||
provide('position', activePosition)
|
||||
|
||||
onMounted(() => {
|
||||
getPatientList()
|
||||
|
||||
Reference in New Issue
Block a user