Browse Source

UI-2023: Specificaly select the 'MainUserCallflow' to edit user's numbers

4.3
Joris Tirado 10 years ago
parent
commit
0d8268f1cd
1 changed files with 7 additions and 18 deletions
  1. +7
    -18
      submodules/users/users.js

+ 7
- 18
submodules/users/users.js View File

@ -42,7 +42,7 @@ define(function(require){
var dataTemplate = self.usersFormatListData(data),
template = $(monster.template(self, 'users-layout', dataTemplate)),
templateUser;
console.log(dataTemplate);
_.each(dataTemplate.users, function(user) {
templateUser = monster.template(self, 'users-row', user);
@ -326,20 +326,6 @@ console.log(dataTemplate);
mapUsers[user.id] = self.usersFormatUserData(user);
});
// Inject MDNs into the numbers' indicator so they are displayed like Kazoo numbers
// _.each(data.devices, function(device, idx) {
// if (device.device_type === 'mobile'&& device.hasOwnProperty('owner_id')) {
// var user = mapUsers[device.owner_id];
// if (user.extra.phoneNumber === '') {
// user.extra.phoneNumber = device.mobile.mdn;
// }
// else {
// user.extra.additionalNumbers++;
// }
// }
// });
_.each(data.callflows, function(callflow) {
if(callflow.type !== 'faxing') {
var userId = callflow.owner_id;
@ -1147,9 +1133,12 @@ console.log(dataTemplate);
template.find('.item-row').each(function(k, row) {
var row = $(row),
number = row.data('id');
number = row.data('id'),
type = row.data('type');
dataNumbers.push(number);
if (type !== 'mobile') {
dataNumbers.push(number);
}
});
if(dataNumbers.length > 0) {
@ -2644,7 +2633,7 @@ console.log(dataTemplate);
$.each(callflows, function(k, callflowLoop) {
/* Find Smart PBX Callflow of this user */
if(callflowLoop.owner_id === userId && callflowLoop.type !== 'faxing') {
if(callflowLoop.owner_id === userId && callflowLoop.type === 'mainUserCallflow') {
callflowId = callflowLoop.id;
return false;


Loading…
Cancel
Save