Skip to content

Commit

Permalink
fix: session user is not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Jan 21, 2025
1 parent cb2cb6d commit 8ec406d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions frontend/src/components/Telephony/ExotelCallUI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8ec406d

Please sign in to comment.