Commit 3b0b9b622ac389f8578dff8ab3564e2ebd48c87c
1 parent
0818a192f6
Exists in
master
refactor para usar tabla AVENDCLI para clientes
Showing
2 changed files
with
9 additions
and
5 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -114,11 +114,15 @@ angular.module('focaCrearLogin') |
| 114 | 114 | $scope.seleccionado == 'Vendedores' |
| 115 | 115 | ) { |
| 116 | 116 | for (var i = $scope.cuentas.length - 1; i >= 0; i--) { |
| 117 | - $scope.cuentas[i].id = $scope.cuentas[i].CodVen; | |
| 118 | - $scope.cuentas[i].nombre = $scope.cuentas[i].NomVen; | |
| 119 | - $scope.cuentas[i].dni = $scope.cuentas[i].DNI; | |
| 120 | - $scope.cuentas[i].telefono = $scope.cuentas[i].TelVen; | |
| 117 | + console.info($scope.cuentas[i]); | |
| 118 | + $scope.cuentas[i].codigo = $scope.cuentas[i].NUM; | |
| 119 | + $scope.cuentas[i].nombre = $scope.cuentas[i].NOM; | |
| 120 | + $scope.cuentas[i].dni = $scope.cuentas[i].dni; | |
| 121 | 121 | } |
| 122 | + } else { | |
| 123 | + for (var i = $scope.cuentas.length - 1; i >= 0; i--) { | |
| 124 | + $scope.cuentas[i].codigo = $scope.cuentas[i].id; | |
| 125 | + } | |
| 122 | 126 | } |
| 123 | 127 | |
| 124 | 128 | $scope.$broadcast('removeCabecera', { |
src/views/foca-crear-login.html
| ... | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | </thead> |
| 26 | 26 | <tbody> |
| 27 | 27 | <tr ng-repeat="cuenta in currentPageUsuarios"> |
| 28 | - <td ng-bind="cuenta.id"></td> | |
| 28 | + <td ng-bind="cuenta.codigo"></td> | |
| 29 | 29 | <td ng-bind="cuenta.nombre"></td> |
| 30 | 30 | <td ng-bind="cuenta.dni"></td> |
| 31 | 31 | <td ng-bind="cuenta.telefono"></td> |