fix: call makeCall from global store

This commit is contained in:
Shariq Ansari 2024-01-12 11:53:29 +05:30
parent 76e76bdec1
commit 4dcaab9fc2
3 changed files with 12 additions and 10 deletions

View File

@ -709,6 +709,7 @@ import {
startCase, startCase,
taskStatusOptions, taskStatusOptions,
} from '@/utils' } from '@/utils'
import { globalStore } from '@/stores/global'
import { usersStore } from '@/stores/users' import { usersStore } from '@/stores/users'
import { contactsStore } from '@/stores/contacts' import { contactsStore } from '@/stores/contacts'
import { import {
@ -724,6 +725,7 @@ import {
import { useElementVisibility } from '@vueuse/core' import { useElementVisibility } from '@vueuse/core'
import { ref, computed, h, defineModel, markRaw, watch, nextTick } from 'vue' import { ref, computed, h, defineModel, markRaw, watch, nextTick } from 'vue'
const { makeCall } = globalStore()
const { getUser } = usersStore() const { getUser } = usersStore()
const { getContact } = contactsStore() const { getContact } = contactsStore()

View File

@ -70,14 +70,14 @@
> >
· ·
</span> </span>
<Tooltip <Tooltip text="Make Call" v-if="contact.mobile_no">
text="Make Call" <div
v-if="contact.mobile_no" class="flex cursor-pointer items-center gap-1.5"
class="flex cursor-pointer items-center gap-1.5" @click="makeCall(contact.mobile_no)"
@click="makeCall(contact.mobile_no)" >
> <PhoneIcon class="h-4 w-4" />
<PhoneIcon class="h-4 w-4" /> <span class="">{{ contact.mobile_no }}</span>
<span class="">{{ contact.mobile_no }}</span> </div>
</Tooltip> </Tooltip>
<span <span
v-if="contact.mobile_no" v-if="contact.mobile_no"
@ -229,7 +229,7 @@ import { statusesStore } from '@/stores/statuses'
import { ref, computed, h } from 'vue' import { ref, computed, h } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const { $dialog } = globalStore() const { $dialog, makeCall } = globalStore()
const { getContactByName, contacts } = contactsStore() const { getContactByName, contacts } = contactsStore()
const { getUser } = usersStore() const { getUser } = usersStore()

View File

@ -310,7 +310,7 @@ import {
import { ref, computed, h } from 'vue' import { ref, computed, h } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const { $dialog } = globalStore() const { $dialog, makeCall } = globalStore()
const { getContactByName, contacts } = contactsStore() const { getContactByName, contacts } = contactsStore()
const { organizations, getOrganization } = organizationsStore() const { organizations, getOrganization } = organizationsStore()
const { statusOptions, getDealStatus } = statusesStore() const { statusOptions, getDealStatus } = statusesStore()