From 7fe94dc1a2c79c0201530dfefbf8a1336a31337a Mon Sep 17 00:00:00 2001 From: Sojan Jose Date: Tue, 19 Aug 2025 12:12:01 +0200 Subject: [PATCH] feat(voice): Call button on Contacts with inbox picker (#12218) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This introduces a reusable Call button used in the Contacts details header (between Block contact and Send message) and in the conversation contact panel. The button shows only when the account has at least one Voice inbox and the contact has a phone number. If multiple Voice inboxes are present, clicking opens a picker modal; otherwise, a “Calling is under development” toast is shown > Actual wiring to functionality will available in follow up PRs references: #11602 , #11481 ## Screens Screenshot 2025-08-18 at 8 33 02 PM Screenshot 2025-08-18 at 8 32 31 PM Screenshot 2025-08-18 at 8 32 40 PM ## Test Cases - Enable voice feature and create inboxes and test the cases for both contact details view and contact card view in conversation - Details: 0 Voice inboxes → no Call button. - Details: 1+ Voice inboxes, no phone number for contact → no Call button. - Details: 1 Voice inbox + phone number for contact → button visible; click → toast. - Details: >1 Voice inboxes + phone number for contact → click → modal → choose → toast. --------- Co-authored-by: Muhsin Keloth Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> --- .../Contacts/ContactsDetailsLayout.vue | 6 ++ .../Contacts/VoiceCallButton.vue | 91 +++++++++++++++++++ .../dashboard/i18n/locale/en/contact.json | 5 + .../conversation/contact/ContactInfo.vue | 10 ++ 4 files changed, 112 insertions(+) create mode 100644 app/javascript/dashboard/components-next/Contacts/VoiceCallButton.vue diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsDetailsLayout.vue b/app/javascript/dashboard/components-next/Contacts/ContactsDetailsLayout.vue index 51d306311..4c7b9249e 100644 --- a/app/javascript/dashboard/components-next/Contacts/ContactsDetailsLayout.vue +++ b/app/javascript/dashboard/components-next/Contacts/ContactsDetailsLayout.vue @@ -7,6 +7,7 @@ import { vOnClickOutside } from '@vueuse/components'; import Button from 'dashboard/components-next/button/Button.vue'; import Breadcrumb from 'dashboard/components-next/breadcrumb/Breadcrumb.vue'; import ComposeConversation from 'dashboard/components-next/NewConversation/ComposeConversation.vue'; +import VoiceCallButton from 'dashboard/components-next/Contacts/VoiceCallButton.vue'; const props = defineProps({ selectedContact: { @@ -99,6 +100,11 @@ const closeMobileSidebar = () => { :disabled="isUpdating" @click="toggleBlock" /> + +