|
|
@ -76,7 +76,7 @@ function ColumnsModalController($scope, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
function getColumnNames(arr) { |
|
|
|
function getColumnNames(arr) { |
|
|
|
return _.map(arr, column => column.name); |
|
|
|
return arr.map(column => column.name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
vm.updateSelectedColumns = () => { |
|
|
|
vm.updateSelectedColumns = () => { |
|
|
@ -97,7 +97,7 @@ function ColumnsModalController($scope, |
|
|
|
vm.updateUnusedColumns = selectedColumns => { |
|
|
|
vm.updateUnusedColumns = selectedColumns => { |
|
|
|
var used = getColumnNames(selectedColumns); |
|
|
|
var used = getColumnNames(selectedColumns); |
|
|
|
|
|
|
|
|
|
|
|
vm.unusedColumns = _.filter(vm.availableColumns, column => !_.contains(used, column.name)); |
|
|
|
vm.unusedColumns = vm.availableColumns.filter(column => !_.contains(used, column.name)); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
vm.setSelectedColumn = column => { |
|
|
|
vm.setSelectedColumn = column => { |
|
|
@ -105,7 +105,7 @@ function ColumnsModalController($scope, |
|
|
|
vm.selectedColumns.push(column); |
|
|
|
vm.selectedColumns.push(column); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
_.remove(vm.selectedColumns, c => c.name === column.name); |
|
|
|
_.remove(vm.selectedColumns, (c: any) => c.name === column.name); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|