fix: only show call popup to the agent who received the call
This commit is contained in:
parent
0315220857
commit
71bb1bb8ff
@ -246,12 +246,14 @@ import TaskPanel from '@/components/Telephony/TaskPanel.vue'
|
|||||||
import CountUpTimer from '@/components/CountUpTimer.vue'
|
import CountUpTimer from '@/components/CountUpTimer.vue'
|
||||||
import { createToast } from '@/utils'
|
import { createToast } from '@/utils'
|
||||||
import { globalStore } from '@/stores/global'
|
import { globalStore } from '@/stores/global'
|
||||||
|
import { sessionStore } from '@/stores/session'
|
||||||
import { useDraggable, useWindowSize } from '@vueuse/core'
|
import { useDraggable, useWindowSize } from '@vueuse/core'
|
||||||
import { TextEditor, Avatar, Button, createResource } from 'frappe-ui'
|
import { TextEditor, Avatar, Button, createResource } from 'frappe-ui'
|
||||||
import { ref, onBeforeUnmount, watch, nextTick } from 'vue'
|
import { ref, onBeforeUnmount, watch, nextTick } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
const { $socket } = globalStore()
|
const { $socket } = globalStore()
|
||||||
|
const { user } = sessionStore()
|
||||||
|
|
||||||
const callPopupHeader = ref(null)
|
const callPopupHeader = ref(null)
|
||||||
const showCallPopup = ref(false)
|
const showCallPopup = ref(false)
|
||||||
@ -425,7 +427,11 @@ function setup() {
|
|||||||
|
|
||||||
callStatus.value = updateStatus(data)
|
callStatus.value = updateStatus(data)
|
||||||
|
|
||||||
if (!showCallPopup.value && !showSmallCallPopup.value) {
|
if (
|
||||||
|
!showCallPopup.value &&
|
||||||
|
!showSmallCallPopup.value &&
|
||||||
|
data.AgentEmail == user.value
|
||||||
|
) {
|
||||||
showCallPopup.value = true
|
showCallPopup.value = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user