1
0
forked from test/crm

fix: session user is not loading

This commit is contained in:
Shariq Ansari 2025-01-21 15:08:09 +05:30
parent cb2cb6db56
commit 8ec406dad0

View File

@ -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