TT#39817 Show non-number dests and fix tooltip

What has been done:
- TT#39817, [Issue] CallForwarding: "Number destinations" that contain
  non-number chars are not rendered
- TT#39819, [Issue] CallForwarding: Terminated destinations tooltip have
  wrong meaning

Change-Id: I3ba55f367012f0deb82c5e9d6fef8c1d1b800335
changes/44/22444/4
raxelsen 7 years ago
parent 8d008b8f4a
commit a64f92b9c4

@ -12,7 +12,7 @@
<span class="dest-values">
{{ destination.destination | destinationFormat }}
</span>
<span v-if="isNumber(destination.destination)">
<span v-if="isNonTerminating(destination.destination)">
<span>
{{ $t('pages.callForward.for') }}
</span>
@ -154,14 +154,12 @@
prevId: this.prevDestId
});
},
isNumber(destination) {
isNonTerminating(destination) {
let dest = destination.split(/:|@/);
if (dest[2] === 'fax2mail.local') {
return false;
}
else {
return !isNaN(dest[1]);
}
let host = dest[2];
let type = host.split('.')[0];
let isLocal = host.split('.')[1] === 'local' ? true : false;
return type !== 'fax2mail' && type !== 'voicebox' && !isLocal;
},
deleteDestination(index) {
let clonedDestinations = _.cloneDeep(this.destinations);

@ -12,6 +12,7 @@ const DestinationHosts = {
VoiceBox: 'voicebox.local',
Fax2Mail: 'fax2mail.local',
ManagerSecretary: 'managersecretary.local',
Conference: 'conference.local',
App: 'app.local'
};
@ -92,11 +93,14 @@ export function normalizeDestination(destination) {
else if (authParts[0] === 'custom-hours') {
return 'Custom Announcement';
}
else if (host === DestinationHosts.Conference) {
return 'Conference';
}
else if (host === DestinationHosts.App) {
return _.capitalize(authParts[0]);
}
else if (!isNumber) {
return _.capitalize(host.split('.')[0]);
return authParts[0];
}
else {
return normalizedNumber;

@ -167,7 +167,7 @@
"addInputError": "Input a valid number or subscriber name",
"timeout": "Timeout",
"destination": "Destination",
"terminatedTooltip": "This destination precedes a terminating destinations, and is therefore inactive.",
"terminatedTooltip": "This destination comes after a terminating destinations, and is therefore inactive.",
"times": {
"removeDialogTitle": "Remove call forward time",
"removeDialogText": "You are about to remove the time entry for {day}",

Loading…
Cancel
Save