Skip to content

Commit

Permalink
UI-1902: now properly list advanced callflows with their numbers if t…
Browse files Browse the repository at this point in the history
…hey don' have a name assigned
  • Loading branch information
JRMaitre committed Jan 8, 2016
1 parent c926594 commit efc303e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion submodules/strategy/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2179,9 +2179,20 @@ define(function(require){
groupName: self.i18n.active().strategy.callEntities[key],
groupType: key,
entities: $.map(value, function(entity) {
var name = entity.name;

if(!name) {
if(entity.hasOwnProperty('first_name')) {
name = entity.first_name + ' ' + entity.last_name;
}
else if (entity.hasOwnProperty('numbers')) {
name = entity.numbers.toString();
}
}

return {
id: entity.id,
name: entity.name || (entity.first_name + ' ' + entity.last_name),
name: name,
module: entity.module || key
};
})
Expand Down

0 comments on commit efc303e

Please sign in to comment.