From 8ec406dad0f95db463a2eeb31b39caa3928ffba3 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 21 Jan 2025 15:08:09 +0530 Subject: [PATCH] fix: session user is not loading --- .../src/components/Telephony/ExotelCallUI.vue | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/Telephony/ExotelCallUI.vue b/frontend/src/components/Telephony/ExotelCallUI.vue index bb7844fa6..3408d11ce 100644 --- a/frontend/src/components/Telephony/ExotelCallUI.vue +++ b/frontend/src/components/Telephony/ExotelCallUI.vue @@ -253,7 +253,6 @@ 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) @@ -298,11 +297,14 @@ const getContact = createResource({ }, }) -watch(phoneNumber, (value) => { - if (!value) return - getContact.fetch() -}, { immediate: true }) - +watch( + phoneNumber, + (value) => { + if (!value) return + getContact.fetch() + }, + { immediate: true }, +) const dirty = ref(false) @@ -427,12 +429,13 @@ function setup() { console.log(data) callStatus.value = updateStatus(data) + const { user } = sessionStore() if ( !showCallPopup.value && !showSmallCallPopup.value && data.AgentEmail && - data.AgentEmail == user.value + data.AgentEmail == (user || user.value) ) { phoneNumber.value = data.CallTo || data.To showCallPopup.value = true