Commit 8f9f538d87266ed2bb57de2722ee45185989a86e
Exists in
master
Merge branch 'develop' into 'master'
Develop See merge request !33
Showing
3 changed files
Show diff stats
package.json
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | "description": "Seguimiento de actividad", |
5 | 5 | "main": "index.js", |
6 | 6 | "scripts": { |
7 | + "refresh": "gulp uglify && cp tmp/foca-admin-seguimiento.js ../wrapper-demo/node_modules/foca-admin-seguimiento/dist/foca-admin-seguimiento.min.js", | |
7 | 8 | "test": "echo \"Error: no test specified\" && exit 1", |
8 | 9 | "compile": "gulp uglify", |
9 | 10 | "gulp-pre-commit": "gulp pre-commit", |
src/js/controller.js
... | ... | @@ -205,7 +205,8 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
205 | 205 | }); |
206 | 206 | }); |
207 | 207 | } |
208 | - $scope.openModal = function () { | |
208 | + $scope.openModal = function (key) { | |
209 | + if (key !== 13) return; | |
209 | 210 | var parametrosModal = {}; |
210 | 211 | switch ($routeParams.parametro) { |
211 | 212 | case 'nota-pedido': |
... | ... | @@ -275,23 +276,21 @@ angular.module('focaAdminSeguimiento').controller('focaAdminSeguimientoControlle |
275 | 276 | break; |
276 | 277 | } |
277 | 278 | focaModalService.modal(parametrosModal) |
278 | - .then( | |
279 | - function (data) { | |
280 | - $scope.idUsuario = $scope.idUsuarioInput = data.NUM; | |
281 | - getSeguimiento(); | |
282 | - if ($scope.actividad === 'Entrega de producto' && $scope.idUsuario !== 0) { | |
283 | - focaAdminSeguimientoService.obtenerRemitosVehiculo($scope.idUsuario) | |
284 | - .then(function (res) { | |
285 | - var remitos = []; | |
286 | - for (var i = 0; i < res.data.length; i++) { | |
287 | - remitos = remitos.concat(res.data[i].remitos); | |
288 | - } | |
289 | - $scope.remitosVehiculo = remitos; | |
290 | - }); | |
291 | - } | |
279 | + .then(function (data) { | |
280 | + $scope.idUsuario = $scope.idUsuarioInput = data.NUM; | |
281 | + getSeguimiento(); | |
282 | + if ($scope.actividad === 'Entrega de producto' && $scope.idUsuario !== 0) { | |
283 | + focaAdminSeguimientoService.obtenerRemitosVehiculo($scope.idUsuario) | |
284 | + .then(function (res) { | |
285 | + var remitos = []; | |
286 | + for (var i = 0; i < res.data.length; i++) { | |
287 | + remitos = remitos.concat(res.data[i].remitos); | |
288 | + } | |
289 | + $scope.remitosVehiculo = remitos; | |
290 | + }); | |
292 | 291 | } |
293 | - ) | |
294 | - .catch(function (e) { console.log(e) }); | |
292 | + }) | |
293 | + .catch(function (e) { console.error(e) }); | |
295 | 294 | } |
296 | 295 | } |
297 | 296 | ]); |
src/views/foca-admin-seguimiento.html
1 | 1 | <div class="foca-admin-seguimiento"> |
2 | 2 | <div class="row"> |
3 | - <foca-cabecera-facturador | |
3 | + <foca-cabecera-facturador | |
4 | 4 | titulo="titulo" |
5 | 5 | fecha="now" |
6 | 6 | class="mb-0 col-lg-12" |
... | ... | @@ -41,45 +41,83 @@ |
41 | 41 | </div> |
42 | 42 | <button |
43 | 43 | type="button" |
44 | - ng-class="{'active': idUsuario == 0}" | |
45 | - class="btn btn-outline-debo col-12 my-1" | |
46 | - ng-click="general()" | |
47 | - >General</button> | |
44 | + class="btn btn-outline-light col-12 my-1" | |
45 | + ng-click="general()"> | |
46 | + General | |
47 | + <div | |
48 | + ng-class="{'btn-default': idUsuario != 0,'btn-primary': idUsuario == 0}" | |
49 | + class="btn fa fa-circle-thin icon-white p-1 float-right"> | |
50 | + </div> | |
51 | + </button> | |
48 | 52 | <button |
49 | 53 | type="button" |
50 | - ng-class="{'active': idUsuario != 0}" | |
51 | - class="btn btn-outline-debo col-12 my-1" | |
52 | - ng-click="individual()" | |
53 | - >Individual</button> | |
54 | - <div class="form-group my-1" ng-show="idUsuario != 0"> | |
55 | - <button | |
56 | - class="btn btn-default" | |
57 | - foca-focus="idUsuario == -1" | |
58 | - ng-show="actividad == 'Nota de pedido'" | |
59 | - ng-click="openModal()"> | |
60 | - <i class="fa fa-hand-pointer-o" aria-hidden="true"></i> | |
61 | - Vendedor | |
62 | - </button> | |
63 | - <button | |
64 | - class="btn btn-default" | |
65 | - foca-focus="idUsuario == -1" | |
66 | - ng-show="actividad == 'Entrega de producto'" | |
67 | - ng-click="openModal()"> | |
68 | - <i class="fa fa-hand-pointer-o" aria-hidden="true"></i> | |
69 | - Transportista | |
70 | - </button> | |
71 | - <button | |
72 | - class="btn btn-default" | |
73 | - foca-focus="idUsuario == -1" | |
74 | - ng-show="actividad == 'Cobranza'" | |
75 | - ng-click="openModal()"> | |
76 | - <i class="fa fa-hand-pointer-o" aria-hidden="true"></i> | |
77 | - Cobrador | |
78 | - </button> | |
54 | + class="btn btn-outline-light col-12 my-1" | |
55 | + ng-click="individual()"> | |
56 | + Individual | |
57 | + <div | |
58 | + ng-class="{'btn-default': idUsuario == 0, 'btn-primary': idUsuario != 0}" | |
59 | + class="btn fa fa-circle-thin icon-white p-1 float-right"> | |
60 | + </div> | |
61 | + </button> | |
62 | + <div class="my-1" ng-show="idUsuario != 0"> | |
63 | + <div | |
64 | + class="input-group mb-3" | |
65 | + ng-show="actividad == 'Nota de pedido'"> | |
66 | + <input | |
67 | + class="form-control" | |
68 | + placeholder="Vendedor" | |
69 | + teclado-virtual | |
70 | + ng-keypress="openModal($event.keyCode)" | |
71 | + ng-disabled="true"> | |
72 | + <div class="input-group-append"> | |
73 | + <button | |
74 | + class="btn btn-outline-secondary" | |
75 | + foca-focus="idUsuario == -1" | |
76 | + ng-click="openModal(13)"> | |
77 | + <i class="fa fa-search" aria-hidden="true"></i> | |
78 | + </button> | |
79 | + </div> | |
80 | + </div> | |
81 | + <div | |
82 | + class="input-group mb-3" | |
83 | + ng-show="actividad == 'Entrega de producto'"> | |
84 | + <input | |
85 | + class="form-control" | |
86 | + placeholder="Transportista" | |
87 | + teclado-virtual | |
88 | + ng-keypress="openModal($event.keyCode)" | |
89 | + ng-disabled="true"> | |
90 | + <div class="input-group-append"> | |
91 | + <button | |
92 | + class="btn btn-outline-secondary" | |
93 | + foca-focus="idUsuario == -1" | |
94 | + ng-click="openModal(13)"> | |
95 | + <i class="fa fa-search" aria-hidden="true"></i> | |
96 | + </button> | |
97 | + </div> | |
98 | + </div> | |
99 | + <div | |
100 | + class="input-group mb-3" | |
101 | + ng-show="actividad == 'Cobranza'"> | |
102 | + <input | |
103 | + class="form-control" | |
104 | + placeholder="Cobrador" | |
105 | + teclado-virtual | |
106 | + ng-keypress="openModal($event.keyCode)" | |
107 | + ng-disabled="true"> | |
108 | + <div class="input-group-append"> | |
109 | + <button | |
110 | + class="btn btn-outline-secondary" | |
111 | + foca-focus="idUsuario == -1" | |
112 | + ng-click="openModal(13)"> | |
113 | + <i class="fa fa-search" aria-hidden="true"></i> | |
114 | + </button> | |
115 | + </div> | |
116 | + </div> | |
79 | 117 | </div> |
80 | 118 | <button |
81 | 119 | type="button" |
82 | - class="btn btn-danger col-12 my-1" | |
120 | + class="btn btn-outline-light col-12 my-1" | |
83 | 121 | ng-show="marcadores.length > 0 && idUsuario > 0" |
84 | 122 | ng-click="showMarcadores()" |
85 | 123 | >Listar marcadores</button> |