Skip to content

Commit

Permalink
MSTR-300: Add support to intrado when adding a e911 to a number (#1177)
Browse files Browse the repository at this point in the history
* MSTR-300: Add support to intrado when adding a e911 to a number

* Add dropdown to country field

* Add street number to address
  • Loading branch information
pcandia committed Sep 19, 2024
1 parent 9235eb7 commit 2d42984
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/apps/common/i18n/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
"postalCode": "PLZ",
"rotatedText": "Für Notdienste",
"state": "Bundesland/Kanton",
"country": "Country",
"successE911": "Sie haben die e911-Adresse von <br> {{phoneNumber}} erfolgreich aktualisiert",
"title": "E911-Adresse",
"verifyLocation": "Standort prüfen",
Expand All @@ -216,6 +217,12 @@
"youEntered": "Ihre Eingabe:",
"choicesAvailable": "Verfügbare Auswahl:",
"content": "Ihre Angaben passen zu mehreren Adressen. Vielleicht haben Sie keine Hausnummer angegeben oder das Haus besteht aus mehreren Gebäuden."
},
"countries": {
"us": {
"value": "US",
"option": "United States"
}
}
},

Expand Down
7 changes: 7 additions & 0 deletions src/apps/common/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@
"postalCode": "Zip Code",
"rotatedText": "For emergency services",
"state": "State",
"country": "Country",
"successE911": "You successfully updated the e911 information of <br> {{phoneNumber}}",
"title": "E911 Information",
"verifyLocation": "Verify Location",
Expand All @@ -735,6 +736,12 @@
"youEntered": "You entered:",
"choicesAvailable": "Choices available:",
"content": "Several addresses matched the information you provided. Perhaps you didn't enter a street number or the building has multiple units."
},
"countries": {
"us": {
"value": "US",
"option": "United States"
}
}
},

Expand Down
7 changes: 7 additions & 0 deletions src/apps/common/i18n/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
"postalCode":"Code Postal",
"rotatedText":"Pour Services d'Urgences",
"state":"État",
"country": "Country",
"successE911":"Mise à jour de l'Adresse d'Urgence de <br> {{phoneNumber}} réussie",
"title":"Adresse d'Urgence",
"verifyLocation":"Vérifier Adresse",
Expand All @@ -137,6 +138,12 @@
"youEntered": "Vous avez entré:",
"choicesAvailable": "Choix disponibles:",
"content": "Plusieurs adresses correpondent à celle que vous avez entré. Peut-être que vous n'avez pas spécifié un numéro de rue ou le bâtiment à plusieurs appartements."
},
"countries": {
"us": {
"value": "US",
"option": "United States"
}
}
},
"failover":{
Expand Down
9 changes: 8 additions & 1 deletion src/apps/common/i18n/nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,16 @@
"postalCode": "Postcode",
"rotatedText": "Voor alarmdiensten",
"state": "Provincie",
"country": "Country",
"successE911": "U werkte met succes het 112 alarmdienst adres bij voor {{phoneNumber}}",
"title": "112 Adres",
"verifyLocation": "Check de Locatie"
"verifyLocation": "Check de Locatie",
"countries": {
"us": {
"value": "US",
"option": "United States"
}
}
},

"failover": {
Expand Down
9 changes: 8 additions & 1 deletion src/apps/common/i18n/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,16 @@
"postalCode": "Почтовый индекс",
"rotatedText": "Для экстренных служб",
"state": "Регион",
"country": "Country",
"successE911": "Вы успешно обновили адрес вызова экстренных служб для номера {{phoneNumber}}",
"title": "Адрес для вызова экстренных служб",
"verifyLocation": "Проверьте адрес"
"verifyLocation": "Проверьте адрес",
"countries": {
"us": {
"value": "US",
"option": "United States"
}
}
},

"failover": {
Expand Down
7 changes: 7 additions & 0 deletions src/apps/common/submodules/e911/e911.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ define(function(require) {
},

e911Normalize: function(data) {
var splitAddress = data.street_address.split(/\s/g);
data.caller_name = monster.apps.auth.currentAccount.name;
data.legacy_data = {
house_number: _.head(splitAddress)
};
data.street_address = splitAddress.slice(1).join(' ');

return _.merge({}, data, {
notification_contact_emails: _
.chain(data)
Expand Down
5 changes: 5 additions & 0 deletions src/apps/common/submodules/e911/e911.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
width: 186px;
padding: 10px 5px;
}

.control-group .controls select {
width: 197px;
height: 42px;
}

.control-group .controls button {
width: 200px;
Expand Down
12 changes: 11 additions & 1 deletion src/apps/common/submodules/e911/views/dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="control-group">
<label class="control-label" for="street_address">{{ i18n.e911.addressLine1 }}</label>
<div class="controls">
<input id="street_address" type="text" placeholder='{{ i18n.e911.addressLine1 }}' name="street_address" value="{{street_address}}" />
<input id="street_address" type="text" placeholder='{{ i18n.e911.addressLine1 }}' name="street_address" value="{{legacy_data.house_number}} {{street_address}}" />
</div>
</div>
<div class="control-group">
Expand All @@ -39,6 +39,16 @@
<input id="region" type="text" name="region" placeholder='{{ i18n.e911.state }}' value="{{region}}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="country">{{ i18n.e911.country }}</label>
<div class="controls">
<select class="country-list" name="country">
<option value="{{ i18n.e911.countries.us.value }}" selected>
{{ i18n.e911.countries.us.option }}
</option>
</select>
</div>
</div>
{{#if status}}
<div class="control-group gmap_link_div" style="display: none;">
<div class="controls">
Expand Down

0 comments on commit 2d42984

Please sign in to comment.