diff --git a/i18n/en-US.json b/i18n/en-US.json index 1b06d19..336dc97 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -947,7 +947,6 @@ "mandatoryE911Alert": "You must specify e911 information for your company caller ID number." }, "missingMainNumberForCallerId": "You need to add a main number to your office before configuring the Caller-ID!", - "missingE911Message": "Please setup your Company Caller ID and e911 on a Main Number.", "missingMainNumberMessage": "Please add a Main Number to your account.", "totalUsers": "Total Users", "totalDevices": "Total Devices", @@ -987,7 +986,12 @@ "3": "Once you have created enough users, create user groups. This is extremely useful if you have users that work in the same department, such as a sales team.", "4": "Main Number services are highly important for your business! Manage call handling with Virtual Receptionist, and route calls depending on Office Hours and Holidays." } - } + }, + "__comment": "UI-1856: On the dashboard, hide cnam related actions when the feature is disabled on the account", + "__version": "3.23", + "missingCnamE911Message": "Please setup your Company Caller ID and e911 on a Main Number.", + "missingCnamMessage": "Please setup your Company Caller ID on a Main Number.", + "missingE911Message": "Please setup your e911 on a Main Number." }, "__comment": "UI-299, v3.19_s2: Added the Feature Codes tab to SmartPBX.", diff --git a/i18n/fr-FR.json b/i18n/fr-FR.json index c807abe..310316e 100644 --- a/i18n/fr-FR.json +++ b/i18n/fr-FR.json @@ -859,7 +859,9 @@ "mandatoryE911Alert": "Vous devez spécifier les infos E911 pour le Caller-ID de ce numéro d'entreprise." }, "missingMainNumberForCallerId": "Veuillez ajouter un Numéro principal à votre compte avant de configurer le Caller-ID de votre compte!", - "missingE911Message": "Veuillez configurer le Caller-ID et l'E911 sur un de vos numéros principaux.", + "missingCnamE911Message": "Veuillez configurer le Caller-ID et l'E911 sur un de vos numéros principaux.", + "missingCnamMessage": "Veuillez configurer le Caller-ID sur un de vos numéros principaux.", + "missingE911Message": "Veuillez configurer l'E911 sur un de vos numéros principaux.", "missingMainNumberMessage": "Veuillez ajouter un Numéro principal à votre compte.", "totalUsers": "Utilisateurs", "totalDevices": "Téléphones", diff --git a/submodules/myOffice/myOffice.css b/submodules/myOffice/myOffice.css index 577436d..58b2a0b 100644 --- a/submodules/myOffice/myOffice.css +++ b/submodules/myOffice/myOffice.css @@ -14,6 +14,7 @@ -webkit-box-sizing: border-box; } #myoffice_container .dashboard-header .header-title { + float: left; width: 55%; padding: 10px 20px; line-height: 40px; @@ -23,6 +24,7 @@ white-space: nowrap; } #myoffice_container .dashboard-header .header-link { + float: right; width: 15%; border-left: solid 1px #dcdcdc; color: #fff; diff --git a/submodules/myOffice/myOffice.js b/submodules/myOffice/myOffice.js index d820525..90f9b18 100644 --- a/submodules/myOffice/myOffice.js +++ b/submodules/myOffice/myOffice.js @@ -33,6 +33,7 @@ define(function(require){ self.myOfficeLoadData(function(myOfficeData) { var dataTemplate = { + isCnamEnabled: monster.util.isNumberFeatureEnabled('cnam'), account: myOfficeData.account, totalUsers: myOfficeData.users.length, totalDevices: myOfficeData.devices.length, @@ -528,7 +529,6 @@ define(function(require){ if( data.mainNumbers && data.mainNumbers.length > 0 - && monster.util.isNumberFeatureEnabled('e911') && ( !('caller_id' in data.account) || !('emergency' in data.account.caller_id) @@ -537,10 +537,24 @@ define(function(require){ || data.numbers[data.account.caller_id.emergency.number].features.indexOf('dash_e911') < 0 ) ) { - data.topMessage = { - class: 'btn-danger', - message: self.i18n.active().myOffice.missingE911Message - }; + if (monster.util.isNumberFeatureEnabled('cnam') && monster.util.isNumberFeatureEnabled('e911')) { + data.topMessage = { + class: 'btn-danger', + message: self.i18n.active().myOffice.missingCnamE911Message + }; + } + else if (monster.util.isNumberFeatureEnabled('cnam')) { + data.topMessage = { + class: 'btn-danger', + message: self.i18n.active().myOffice.missingCnamMessage + }; + } + else if (monster.util.isNumberFeatureEnabled('e911')) { + data.topMessage = { + class: 'btn-danger', + message: self.i18n.active().myOffice.missingE911Message + }; + } } data.totalChannels = channelsArray.length; @@ -595,13 +609,15 @@ define(function(require){ }); }); - template.find('.header-link.caller-id:not(.disabled)').on('click', function(e) { - e.preventDefault(); - self.myOfficeRenderCallerIdPopup({ - parent: parent, - myOfficeData: myOfficeData + if (monster.util.isNumberFeatureEnabled('cnam')) { + template.find('.header-link.caller-id:not(.disabled)').on('click', function(e) { + e.preventDefault(); + self.myOfficeRenderCallerIdPopup({ + parent: parent, + myOfficeData: myOfficeData + }); }); - }); + } template.find('.header-link.caller-id.disabled').on('click', function(e) { monster.ui.alert(self.i18n.active().myOffice.missingMainNumberForCallerId); @@ -755,9 +771,8 @@ define(function(require){ var self = this, parent = args.parent, myOfficeData = args.myOfficeData, - isE911Enabled = monster.util.isNumberFeatureEnabled('e911'), templateData = { - isE911Enabled: isE911Enabled, + isE911Enabled: monster.util.isNumberFeatureEnabled('e911'), mainNumbers: myOfficeData.mainNumbers, selectedMainNumber: 'caller_id' in myOfficeData.account && 'external' in myOfficeData.account.caller_id ? myOfficeData.account.caller_id.external.number || 'none' : 'none' }, @@ -767,7 +782,7 @@ define(function(require){ position: ['center', 20] }); - if (isE911Enabled) { + if (monster.util.isNumberFeatureEnabled('e911')) { var e911Form = popupTemplate.find('.emergency-form > form'); monster.ui.validate(e911Form, { diff --git a/views/myOffice-layout.html b/views/myOffice-layout.html index ce297e5..ced9c66 100644 --- a/views/myOffice-layout.html +++ b/views/myOffice-layout.html @@ -1,22 +1,24 @@