Skip to content

Commit

Permalink
[5.3] MSTR-300: Add support to Intrado when adding a e911 to a number (
Browse files Browse the repository at this point in the history
…#536)

* MSTR-300: Add support to intrado when adding a e911 to a number

* Fix issue where address is not set
  • Loading branch information
pcandia committed May 23, 2024
1 parent bc97150 commit d95b99d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
9 changes: 8 additions & 1 deletion i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1297,10 +1297,17 @@
"emergencyCity": "City",
"emergencyState": "State",
"emergencyEmail": "Email Address(es)",
"emergencyCountry": "Country",
"emergencyEmailError": "Invalid space separated address(es)",
"emergencyHelp1": "This information will appear as your Caller ID information when you make outbound emergency call to a government agency (e.g. 911 in the US).",
"emergencyHelp2": "Note: You can set this feature on users' numbers too if they do not share the same location as above.",
"mandatoryE911Alert": "You must specify e911 information for your company caller ID number."
"mandatoryE911Alert": "You must specify e911 information for your company caller ID number.",
"countries": {
"us": {
"value": "US",
"option": "United States"
}
}
},
"others": "Others",
"missingMainNumberForCallerId": "You need to add a main number to your office before configuring the Caller-ID!",
Expand Down
14 changes: 11 additions & 3 deletions submodules/myOffice/myOffice.js
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,10 @@ define(function(require) {

if (hasE911 && isE911Enabled) {
if (_.has(numberData, 'e911')) {
var street_address = _.get(numberData, 'e911.legacy_data.house_number', '') + ' ' + _.get(numberData, 'e911.street_address', '');

emergencyZipcodeInput.val(numberData.e911.postal_code);
emergencyAddress1Input.val(numberData.e911.street_address);
emergencyAddress1Input.val(street_address);
emergencyAddress2Input.val(numberData.e911.extended_address);
emergencyCityInput.val(numberData.e911.locality);
emergencyStateInput.val(numberData.e911.region);
Expand Down Expand Up @@ -994,7 +996,8 @@ define(function(require) {
setNumberData = function(e911Data) {
var callerIdName = callerIdNameInput.val(),
setCNAM = popupTemplate.find('.number-feature[data-feature="cnam"]').is(':visible'),
setE911 = popupTemplate.find('.number-feature[data-feature="e911"]').is(':visible');
setE911 = popupTemplate.find('.number-feature[data-feature="e911"]').is(':visible'),
splitAddress = e911Data.street_address.split(/\s/g);

account.caller_id = $.extend(true, {}, account.caller_id, {
external: {
Expand Down Expand Up @@ -1031,7 +1034,12 @@ define(function(require) {
.split(' ')
.reject(_.isEmpty)
.uniq()
.value()
.value(),
caller_name: monster.apps.auth.currentAccount.name,
legacy_data: {
house_number: _.head(splitAddress)
},
street_address: splitAddress.slice(1).join(' ')
})
});
} else {
Expand Down
8 changes: 8 additions & 0 deletions submodules/myOffice/views/callerIdPopup.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@
<textarea name="notification_contact_emails" class="caller-id-emergency-email"></textarea>
</div>
</label>
<label>
<span class="emergency-form-label">{{ i18n.myOffice.callerId.emergencyCountry }}</span>
<select class="country-list" name="country">
<option value="{{ i18n.myOffice.callerId.countries.us.value }}" selected>
{{ i18n.myOffice.callerId.countries.us.option }}
</option>
</select>
</label>
</form>

{{#monsterText}}
Expand Down

0 comments on commit d95b99d

Please sign in to comment.