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

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

@ -167,7 +167,7 @@
"addInputError": "Input a valid number or subscriber name", "addInputError": "Input a valid number or subscriber name",
"timeout": "Timeout", "timeout": "Timeout",
"destination": "Destination", "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": { "times": {
"removeDialogTitle": "Remove call forward time", "removeDialogTitle": "Remove call forward time",
"removeDialogText": "You are about to remove the time entry for {day}", "removeDialogText": "You are about to remove the time entry for {day}",

Loading…
Cancel
Save