MT#63174 Add phonebook name matching into call list

Use new /api/conversations properties to show
phonebook name matching. If the number is
not saved in the phonebook the app shows
the simple number.

Change-Id: Ia80a74c74ea250ed4f697b2897aba380d49bc8ca
master
Debora Crescenzo 1 month ago
parent 09f40c36df
commit a9c90731d0

@ -134,9 +134,9 @@ export default {
computed: {
number () {
if (this.call.direction === 'out') {
return this.call.callee
return this.call.callee_phonebook_name || this.call.callee
}
return this.call.caller
return this.call.caller_phonebook_name || this.call.caller
},
totalCustomerCostRounded () {
const formatter = new Intl.NumberFormat('en-US', {

@ -97,9 +97,9 @@ export default {
},
number () {
if (this.fax.direction === 'out') {
return this.fax.callee
return this.fax.callee_phonebook_name || this.fax.callee
}
return this.fax.caller
return this.fax.caller_phonebook_name || this.fax.caller
}
},
methods: {

@ -15,7 +15,7 @@
>
{{ $t('Voicemail') }}
{{ direction }}
{{ $filters.destinationFormat(voiceMail.caller) }}
{{ $filters.destinationFormat(voicemailCaller) }}
</q-item-label>
<q-item-label
caption
@ -150,6 +150,9 @@ export default {
}
return 'from'
},
voicemailCaller () {
return this.voiceMail.caller_phonebook_name || this.voiceMail.caller
},
soundFileFormat () {
return this.platform.mozilla ? 'ogg' : 'mp3'
},

@ -177,7 +177,7 @@ export default {
id: item.id,
icon: { name: 'download', color: 'primary' },
clickable_icon: true,
title: item.caller,
title: item.caller_phonebook_name || item.caller,
sub_title: date.formatDate(item.start_time, INTERNAL_DATE_FORMAT_DASH_HOUR),
extra_text: new Date(item.duration * 1000).toISOString().substr(11, 8)
}
@ -208,9 +208,9 @@ export default {
call.call_type === 'cfb' || call.call_type === 'cft') {
return `vmu${call.caller}`
} else if (call.direction === 'out') {
return call.callee
return call.callee_phonebook_name || call.callee
} else if (call.direction === 'in') {
return call.caller
return call.caller_phonebook_name || call.caller
}
return call.caller
},

Loading…
Cancel
Save