1
0
forked from test/crm

fix: show call tab and action only when twilio is enabled

This commit is contained in:
Shariq Ansari 2024-04-24 16:00:58 +05:30
parent eb08d59816
commit de9a460fa1
3 changed files with 8 additions and 5 deletions

View File

@ -814,7 +814,7 @@ import {
import { globalStore } from '@/stores/global'
import { usersStore } from '@/stores/users'
import { contactsStore } from '@/stores/contacts'
import { whatsappEnabled } from '@/stores/settings'
import { whatsappEnabled, twilioEnabled } from '@/stores/settings'
import {
Button,
Tooltip,
@ -958,6 +958,7 @@ const defaultActions = computed(() => {
icon: h(PhoneIcon, { class: 'h-4 w-4' }),
label: __('Make a Call'),
onClick: () => makeCall(doc.value.data.mobile_no),
condition: () => Boolean(twilioEnabled.value),
},
{
icon: h(NoteIcon, { class: 'h-4 w-4' }),

View File

@ -69,7 +69,7 @@
</div>
</Tooltip>
<div class="flex gap-1.5">
<Tooltip :text="__('Make a call')">
<Tooltip v-if="twilioEnabled" :text="__('Make a call')">
<Button class="h-7 w-7" @click="triggerCall">
<PhoneIcon class="h-4 w-4" />
</Button>
@ -320,7 +320,7 @@ import {
import { globalStore } from '@/stores/global'
import { organizationsStore } from '@/stores/organizations'
import { statusesStore } from '@/stores/statuses'
import { whatsappEnabled } from '@/stores/settings'
import { whatsappEnabled, twilioEnabled } from '@/stores/settings'
import {
createResource,
Dropdown,
@ -452,6 +452,7 @@ const tabs = computed(() => {
name: 'Calls',
label: __('Calls'),
icon: PhoneIcon,
condition: () => Boolean(twilioEnabled.value),
},
{
name: 'Tasks',

View File

@ -111,7 +111,7 @@
</div>
</Tooltip>
<div class="flex gap-1.5">
<Tooltip :text="__('Make a call')">
<Tooltip v-if="twilioEnabled" :text="__('Make a call')">
<Button
class="h-7 w-7"
@click="
@ -287,7 +287,7 @@ import { globalStore } from '@/stores/global'
import { contactsStore } from '@/stores/contacts'
import { organizationsStore } from '@/stores/organizations'
import { statusesStore } from '@/stores/statuses'
import { whatsappEnabled } from '@/stores/settings'
import { whatsappEnabled, twilioEnabled } from '@/stores/settings'
import {
createResource,
FileUploader,
@ -417,6 +417,7 @@ const tabs = computed(() => {
name: 'Calls',
label: __('Calls'),
icon: PhoneIcon,
condition: () => Boolean(twilioEnabled.value),
},
{
name: 'Tasks',