Skip to content

Commit

Permalink
UI-106: Group unknown number into a 'Unknown Carrier' request
Browse files Browse the repository at this point in the history
  • Loading branch information
joristirado committed Feb 24, 2015
1 parent 5d6395a commit 9a628ec
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 28 deletions.
5 changes: 1 addition & 4 deletions apps/common/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
"progressBarRight": "Confirm Order",
"requiredConditions": "Please agree with all the conditions",
"comingSoon": "Coming Soon!",
"unknownCarrier": "Unknown Carrier",
"state": {
"completed": "Completed",
"rejected": "Rejected",
Expand Down Expand Up @@ -327,10 +328,6 @@
},
"mimeTypes": "The following files are not in a supported format: ",
"size": "The following files are too big: ",
"number": {
"single": "The number you entered is invalid !!!",
"multiple": "The numbers you entered are invalid !!!"
},
"submit": {
"document": "Please upload the signed LOA and the bill corresponding to the numbers you want to port"
}
Expand Down
7 changes: 2 additions & 5 deletions apps/common/i18n/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"progressBarRight":"Confirmer le transfert",
"requiredConditions": "Veuillez accepter les condictions",
"comingSoon": "Prochainement",
"unknownCarrier": "Opérateur inconnu",
"state": {
"completed": "Effectué",
"rejected": "Refusé",
Expand Down Expand Up @@ -323,11 +324,7 @@
"update": "La mise à jour de la demande de transfert à échoué"
},
"mimeType": "Les fichiers suivants ne sont pas dans un format accepter: ",
"size": "Les fichiers suivants sont trop gros: ",
"number": {
"single": "Le numéro que vous avez saisi est invalide !!!",
"multiple": "Les numéros que vous avez saisi sont invalides !!!"
},
"size": "Les fichiers suivants sont trop volumineux: ",
"submit": {
"document": "Veuillez joindre la lettre d'autorisation signée ainsi que la facture correspondant aux numéros que vous souhaitez transférer"
}
Expand Down
4 changes: 0 additions & 4 deletions apps/common/i18n/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,6 @@
},
"mimeTypes": "Следующие файлы предоставлены в неподдерживаемом формате: ",
"size": "Следующие файлы имеют слишком большой размер: ",
"number": {
"single": "Введенный номер не существует!!!",
"multiple": "Введённые номера не существуют !!!"
},
"submit": {
"document": "Пожалуйста, предоставьте подписанную Доверенность и счёт для номеров, которые вы хотите перенести"
}
Expand Down
21 changes: 6 additions & 15 deletions apps/common/submodules/port/port.js
Original file line number Diff line number Diff line change
Expand Up @@ -1016,19 +1016,17 @@ define(function(require){
data = data.data;

var carriersList = [],
formattedData = { orders: [] },
errorCount = 0;
formattedData = { orders: [] };

for (var number in data) {
if (data[number].company == null || data[number].company == 'undefined' || data[number].company == "") {
errorCount++;
delete data[number];
continue;
data[number].company = self.i18n.active().port.unknownCarrier;
}
carriersList.push(data[number].company);
}

carriersList = _.uniq(carriersList);
if (carriersList.indexOf(data[number].company) === -1) {
carriersList.push(data[number].company);
}
}

for (var carrier in carriersList) {
var numbersArray = [],
Expand All @@ -1046,13 +1044,6 @@ define(function(require){
formattedData.orders[carrier] = order;
}

if (errorCount == 1) {
toastr.error(self.i18n.active().port.toastr.error.number.single, '', { timeOut: 5000 });
}
else if (errorCount > 1) {
toastr.error(self.i18n.active().port.toastr.error.number.multiple, '', { timeOut: 5000 });
}

callback(formattedData);
}
});
Expand Down

0 comments on commit 9a628ec

Please sign in to comment.