From 71bb1bb8ff8286b68632e5e10af8a2dac7571a8b Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 20 Jan 2025 15:57:23 +0530 Subject: [PATCH] fix: only show call popup to the agent who received the call --- frontend/src/components/Telephony/ExotelCallUI.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Telephony/ExotelCallUI.vue b/frontend/src/components/Telephony/ExotelCallUI.vue index c1e28fa9..5772c0d2 100644 --- a/frontend/src/components/Telephony/ExotelCallUI.vue +++ b/frontend/src/components/Telephony/ExotelCallUI.vue @@ -246,12 +246,14 @@ import TaskPanel from '@/components/Telephony/TaskPanel.vue' import CountUpTimer from '@/components/CountUpTimer.vue' import { createToast } from '@/utils' import { globalStore } from '@/stores/global' +import { sessionStore } from '@/stores/session' import { useDraggable, useWindowSize } from '@vueuse/core' import { TextEditor, Avatar, Button, createResource } from 'frappe-ui' import { ref, onBeforeUnmount, watch, nextTick } from 'vue' import { useRouter } from 'vue-router' const { $socket } = globalStore() +const { user } = sessionStore() const callPopupHeader = ref(null) const showCallPopup = ref(false) @@ -425,7 +427,11 @@ function setup() { callStatus.value = updateStatus(data) - if (!showCallPopup.value && !showSmallCallPopup.value) { + if ( + !showCallPopup.value && + !showSmallCallPopup.value && + data.AgentEmail == user.value + ) { showCallPopup.value = true } })