diff --git a/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/AgentAssignmentEditPage.vue b/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/AgentAssignmentEditPage.vue
index 0550e7364..abba07478 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/AgentAssignmentEditPage.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/AgentAssignmentEditPage.vue
@@ -79,13 +79,15 @@ const breadcrumbItems = computed(() => {
});
const buildInboxList = allInboxes =>
- allInboxes?.map(({ name, id, email, phoneNumber, channelType, medium }) => ({
- name,
- id,
- email,
- phoneNumber,
- icon: getInboxIconByType(channelType, medium, 'line'),
- })) || [];
+ allInboxes?.map(
+ ({ name, id, email, phoneNumber, channelType, medium, voiceEnabled }) => ({
+ name,
+ id,
+ email,
+ phoneNumber,
+ icon: getInboxIconByType(channelType, medium, 'line', voiceEnabled),
+ })
+ ) || [];
const policyInboxes = computed(() =>
buildInboxList(selectedPolicy.value?.inboxes)
diff --git a/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/AgentCapacityEditPage.vue b/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/AgentCapacityEditPage.vue
index 31d0fa3e1..a65c2f8b3 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/AgentCapacityEditPage.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/AgentCapacityEditPage.vue
@@ -64,13 +64,23 @@ const allInboxes = computed(
inboxes.value
?.slice()
.sort((a, b) => a.name.localeCompare(b.name))
- .map(({ name, id, email, phoneNumber, channelType, medium }) => ({
- name,
- id,
- email,
- phoneNumber,
- icon: getInboxIconByType(channelType, medium, 'line'),
- })) || []
+ .map(
+ ({
+ name,
+ id,
+ email,
+ phoneNumber,
+ channelType,
+ medium,
+ voiceEnabled,
+ }) => ({
+ name,
+ id,
+ email,
+ phoneNumber,
+ icon: getInboxIconByType(channelType, medium, 'line', voiceEnabled),
+ })
+ ) || []
);
const formData = computed(() => ({
diff --git a/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/components/InboxLinkDialog.vue b/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/components/InboxLinkDialog.vue
index 69ea620bd..6a0aaa1d5 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/components/InboxLinkDialog.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/assignmentPolicy/pages/components/InboxLinkDialog.vue
@@ -29,7 +29,8 @@ const inboxIcon = computed(() => {
return getInboxIconByType(
props.inbox.channelType,
props.inbox.medium,
- 'line'
+ 'line',
+ props.inbox.voiceEnabled
);
});
diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue
index 0ebe8f238..93a21c868 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/Settings.vue
@@ -281,8 +281,12 @@ export default {
return this.$store.getters['inboxes/getInbox'](this.currentInboxId);
},
inboxIcon() {
- const { medium, channel_type: type } = this.inbox;
- return getInboxIconByType(type, medium, 'line');
+ const {
+ medium,
+ channel_type: type,
+ voice_enabled: voiceEnabled,
+ } = this.inbox;
+ return getInboxIconByType(type, medium, 'line', voiceEnabled);
},
bannerMaxWidth() {
const narrowTabs = ['collaborators', 'bot-configuration'];
diff --git a/enterprise/app/finders/call_finder.rb b/enterprise/app/finders/call_finder.rb
index 31d6ae5f2..6d3ee59be 100644
--- a/enterprise/app/finders/call_finder.rb
+++ b/enterprise/app/finders/call_finder.rb
@@ -62,7 +62,7 @@ class CallFinder
end
def paginated_calls
- @calls.includes(:contact, :inbox, :conversation, :accepted_by_agent)
+ @calls.includes(:contact, :conversation, :accepted_by_agent, inbox: :channel)
.order(created_at: :desc)
.page(@params[:page] || 1)
.per(RESULTS_PER_PAGE)
diff --git a/enterprise/app/views/api/v1/models/_call.json.jbuilder b/enterprise/app/views/api/v1/models/_call.json.jbuilder
index 7a3531b39..cd14a27c7 100644
--- a/enterprise/app/views/api/v1/models/_call.json.jbuilder
+++ b/enterprise/app/views/api/v1/models/_call.json.jbuilder
@@ -19,6 +19,8 @@ end
json.inbox do
json.id call.inbox_id
json.name call.inbox.name
+ json.channel_type call.inbox.channel_type
+ json.medium call.inbox.channel.try(:medium)
end
if call.accepted_by_agent
diff --git a/spec/enterprise/controllers/api/v1/accounts/calls_controller_spec.rb b/spec/enterprise/controllers/api/v1/accounts/calls_controller_spec.rb
index 86e4fb317..4f6d0d1b4 100644
--- a/spec/enterprise/controllers/api/v1/accounts/calls_controller_spec.rb
+++ b/spec/enterprise/controllers/api/v1/accounts/calls_controller_spec.rb
@@ -32,6 +32,7 @@ RSpec.describe 'Calls API', type: :request do
item = body['payload'].find { |c| c['id'] == agent_call.id }
expect(item['transcript']).to eq('hello world')
expect(item['contact']['phone_number']).to eq(contact.phone_number)
+ expect(item['inbox']).to include('id' => inbox.id, 'name' => inbox.name, 'channel_type' => inbox.channel_type)
end
it 'scopes the list to calls the agent accepted' do
diff --git a/theme/icons.js b/theme/icons.js
index 265bd4e16..fa737bd30 100644
--- a/theme/icons.js
+++ b/theme/icons.js
@@ -269,6 +269,16 @@ export const icons = {
width: 24,
height: 24,
},
+ 'voice-call': {
+ body: `
`,
+ width: 16,
+ height: 16,
+ },
+ 'whatsapp-voice': {
+ body: `
`,
+ width: 16,
+ height: 16,
+ },
instagram: {
body: `
`,
width: 24,
@@ -470,5 +480,15 @@ export const icons = {
width: 24,
height: 24,
},
+ 'audio-play': {
+ body: `
`,
+ width: 14,
+ height: 14,
+ },
+ 'audio-pause': {
+ body: `
`,
+ width: 14,
+ height: 14,
+ },
/** Ends */
};