Commit 159e4967dfc63cf6213db87db09a8da2089613c5
Exists in
master
Merge branch 'master' into 'master'
Nuevo diseño, muestra puntos cargados anteriormente See merge request !3
Showing
3 changed files
Show diff stats
src/js/app.js
1 | angular.module('focaModalPuntoDescarga', ['ui.bootstrap', 'focaDirectivas', 'angular-ladda']); | 1 | angular.module('focaModalPuntoDescarga', [ |
2 | 'ui.bootstrap', | ||
3 | 'focaModal', | ||
4 | 'focaDirectivas', | ||
5 | 'angular-ladda' | ||
6 | ]); | ||
2 | 7 |
src/js/controller.js
1 | angular.module('focaModalPuntoDescarga') | 1 | angular.module('focaModalPuntoDescarga') |
2 | .controller('focaModalPuntoDescargaController', [ | 2 | .controller('focaModalPuntoDescargaController', [ |
3 | '$timeout', | 3 | '$timeout', |
4 | '$filter', | 4 | '$filter', |
5 | '$scope', | 5 | '$scope', |
6 | '$uibModalInstance', | 6 | '$uibModalInstance', |
7 | 'focaModalPuntoDescargaService', | 7 | 'focaModalPuntoDescargaService', |
8 | 'filters', | 8 | 'filters', |
9 | 'focaModalService', | ||
9 | function($timeout, $filter, $scope, $uibModalInstance, | 10 | function($timeout, $filter, $scope, $uibModalInstance, |
10 | focaModalPuntoDescargaService, filters) { | 11 | focaModalPuntoDescargaService, filters, focaModalService) { |
11 | 12 | ||
12 | $scope.cantidadArticulo = 0; | 13 | $scope.cantidadArticulo = 0; |
13 | $scope.articuloSeleccionado = 0; | 14 | $scope.articuloSeleccionado = 0; |
14 | $scope.ivas = []; | 15 | $scope.ivas = []; |
15 | $scope.puntosSeleccionados = []; | 16 | $scope.puntosSeleccionados = []; |
16 | $scope.puntoDescarga = { | 17 | $scope.puntoDescarga = { |
17 | id: 0, | 18 | id: 0, |
18 | id_cliente: filters.idCliente, | 19 | id_cliente: filters.idCliente, |
19 | id_da_config_0: filters.idDomicilio | 20 | id_da_config_0: filters.idDomicilio |
20 | }; | 21 | }; |
21 | $scope.articulos = angular.copy(filters.articulos); | 22 | $scope.articulos = angular.copy(filters.articulos); |
23 | $scope.articulos.map(function(articulo) { | ||
24 | articulo.restante = articulo.cantidad; | ||
25 | }); | ||
22 | actualizarTabla(); | 26 | actualizarTabla(); |
27 | cargarPuntos(filters.puntosDescarga); | ||
23 | 28 | ||
24 | $scope.cancel = function() { | 29 | $scope.cancel = function() { |
25 | if($scope.ingreso){ | 30 | if($scope.ingreso) { |
26 | $scope.ingreso = false; | 31 | $scope.ingreso = false; |
27 | }else { | 32 | }else { |
28 | $uibModalInstance.dismiss('cancel'); | 33 | $uibModalInstance.dismiss('cancel'); |
29 | } | 34 | } |
30 | }; | 35 | }; |
31 | 36 | ||
32 | $scope.aceptar = function() { | 37 | $scope.aceptar = function() { |
33 | if($scope.cargaArticulos) { | 38 | if($scope.cargaArticulos) { |
34 | cargarArticulos(); | 39 | cargarArticulos(); |
35 | }else { | 40 | }else { |
36 | verCargaArticulos(); | 41 | verCargaArticulos(); |
37 | } | 42 | } |
38 | }; | 43 | }; |
39 | 44 | ||
40 | $scope.guardar = function() { | 45 | $scope.guardar = function() { |
41 | focaModalPuntoDescargaService | 46 | focaModalPuntoDescargaService |
42 | .guardarPuntoDescarga($scope.puntoDescarga) | 47 | .guardarPuntoDescarga($scope.puntoDescarga) |
43 | .then(function() { | 48 | .then(function() { |
44 | actualizarTabla(); | 49 | actualizarTabla(); |
45 | $scope.ingreso = false; | 50 | $scope.ingreso = false; |
46 | }); | 51 | }); |
47 | }; | 52 | }; |
48 | 53 | ||
49 | $scope.editar = function(id) { | 54 | $scope.editar = function(id) { |
50 | focaModalPuntoDescargaService.getPuntoDescargaById(id).then(function(res) { | 55 | focaModalPuntoDescargaService.getPuntoDescargaById(id).then(function(res) { |
51 | $scope.puntoDescarga = res.data; | 56 | $scope.puntoDescarga = res.data; |
52 | $scope.ingreso = true; | 57 | $scope.ingreso = true; |
53 | }); | 58 | }); |
54 | }; | 59 | }; |
55 | 60 | ||
56 | $scope.eliminar = function(idx, id) { | 61 | $scope.eliminar = function(idx, id) { |
57 | focaModalPuntoDescargaService.eliminarPuntoDescarga(id).then(function() { | 62 | focaModalPuntoDescargaService.eliminarPuntoDescarga(id).then(function() { |
58 | $scope.puntosDescarga.splice(idx, 1); | 63 | $scope.puntosDescarga.splice(idx, 1); |
59 | }); | 64 | }); |
60 | }; | 65 | }; |
61 | 66 | ||
62 | $scope.seleccionarPunto = function(idx) { | 67 | $scope.seleccionarPunto = function(idx) { |
63 | $scope.puntosSeleccionados.push(idx); | 68 | var indexPunto = $scope.puntosSeleccionados.indexOf(idx); |
69 | if(indexPunto !== -1) { | ||
70 | $scope.puntosSeleccionados.splice(indexPunto, 1); | ||
71 | }else { | ||
72 | $scope.puntosSeleccionados.push(idx); | ||
73 | } | ||
64 | }; | 74 | }; |
65 | 75 | ||
66 | $scope.agregarArticulo = function(punto) { | 76 | $scope.agregarArticulo = function(punto) { |
67 | var articulo = $scope.articulos[$scope.articuloSeleccionado], | 77 | var articulo = $scope.articulos[$scope.articuloSeleccionado], |
68 | cantidadRestante = articulo.cantidad - $scope.cantidadArticulo; | 78 | cantidadRestante = articulo.restante - punto.cantidadACargar; |
69 | 79 | ||
70 | if(cantidadRestante < 0) { | 80 | if(cantidadRestante < 0) { |
71 | alert('La cantidad a cargar debe ser menor o igual al restante'); | 81 | focaModalService.alert('La cantidad a cargar debe ser menor o igual al restante'); |
72 | }else if($scope.cantidadArticulo <= 0) { | 82 | }else if(punto.cantidadACargar <= 0) { |
73 | alert('La cantidad a cargar debe ser mayor que cero'); | 83 | focaModalService.alert('La cantidad a cargar debe ser mayor que cero'); |
74 | }else { | 84 | }else { |
75 | articulo.cantidad = cantidadRestante; | 85 | punto.cargado += parseInt(punto.cantidadACargar); |
76 | punto.articulosAgregados.push({ | 86 | articulo.restante = cantidadRestante; |
77 | id: articulo.id, | 87 | var existeArticulo = punto.articulosAgregados.filter( |
78 | descripcion: articulo.descripcion, | 88 | function (articuloAAgregar) { |
79 | cantidad: $scope.cantidadArticulo, | 89 | return articuloAAgregar.id === articulo.id; |
80 | index: $scope.articuloSeleccionado | 90 | }); |
81 | }); | 91 | //Si el articulo ya fue agregado |
82 | $scope.cantidadArticulo = 0; | 92 | if(existeArticulo.length) { |
93 | //Solo sumo cantidad | ||
94 | var total = parseInt(existeArticulo[0].cantidad) + parseInt(punto.cantidadACargar); | ||
95 | existeArticulo[0].cantidad = total; | ||
96 | }else { | ||
97 | //Agrego el articulo con la cantidad | ||
98 | punto.articulosAgregados.push({ | ||
99 | id: articulo.id, | ||
100 | descripcion: articulo.descripcion, | ||
101 | cantidad: punto.cantidadACargar, | ||
102 | index: $scope.articuloSeleccionado | ||
103 | }); | ||
104 | } | ||
105 | punto.cantidadACargar = 0; | ||
83 | } | 106 | } |
84 | }; | 107 | }; |
85 | 108 | ||
86 | $scope.quitarArticulo = function(articulo, idx, punto) { | 109 | $scope.quitarArticulo = function(articulo, idx, punto) { |
87 | var restante = parseInt($scope.articulos[articulo.index].cantidad); | 110 | var articuloAEliminar = $scope.articulos.filter(function(art) { |
111 | return art.id == articulo.id; | ||
112 | }); | ||
113 | var restante = parseInt(articuloAEliminar[0].restante); | ||
88 | restante += parseInt(articulo.cantidad); | 114 | restante += parseInt(articulo.cantidad); |
89 | $scope.articulos[articulo.index].cantidad = restante; | 115 | articuloAEliminar[0].restante = restante; |
116 | |||
117 | punto.cargado -= parseInt(punto.articulosAgregados[idx].cantidad); | ||
90 | punto.articulosAgregados.splice(idx, 1); | 118 | punto.articulosAgregados.splice(idx, 1); |
91 | }; | 119 | }; |
92 | 120 | ||
93 | function actualizarTabla() { | 121 | function actualizarTabla() { |
94 | focaModalPuntoDescargaService | 122 | focaModalPuntoDescargaService |
95 | .getPuntosDescargaByClienDom(filters.idDomicilio, filters.idCliente) | 123 | .getPuntosDescargaByClienDom(filters.idDomicilio, filters.idCliente) |
96 | .then(function(res) { | 124 | .then(function(res) { |
97 | $scope.puntosDescarga = res.data; | 125 | $scope.puntosDescarga = res.data; |
98 | }); | 126 | }); |
99 | } | 127 | } |
100 | function verCargaArticulos() { | 128 | function verCargaArticulos() { |
101 | $scope.puntosACargar = []; | 129 | $scope.puntosACargar = []; |
102 | $scope.cargaArticulos = true; | 130 | $scope.cargaArticulos = true; |
103 | $scope.puntosSeleccionados.forEach(function(idx) { | 131 | $scope.puntosSeleccionados.forEach(function(idx) { |
104 | $scope.puntosACargar.push($scope.puntosDescarga[idx]); | 132 | $scope.puntosACargar.push($scope.puntosDescarga[idx]); |
105 | }); | 133 | }); |
106 | 134 | ||
107 | $scope.puntosACargar.map(function(punto) { | 135 | $scope.puntosACargar.map(function(punto) { |
108 | punto.articulosAgregados = []; | 136 | punto.articulosAgregados = []; |
137 | punto.cantidadACargar = 0; | ||
138 | punto.cargado = 0; | ||
109 | }); | 139 | }); |
110 | } | 140 | } |
111 | function cargarArticulos() { | 141 | function cargarArticulos() { |
112 | $uibModalInstance.close($scope.puntosACargar); | 142 | $uibModalInstance.close($scope.puntosACargar); |
113 | } | 143 | } |
144 | function cargarPuntos(puntosDescarga) { | ||
145 | //Si existen puntos ya cargados | ||
146 | if(puntosDescarga) { | ||
147 | if(!puntosDescarga[0].cargado) { | ||
148 | agregarTotalCargado(puntosDescarga); | ||
149 | } | ||
150 | $scope.puntosACargar = puntosDescarga; | ||
151 | $scope.cargaArticulos = true; | ||
152 | //Recorro los puntos | ||
153 | puntosDescarga.forEach(function(punto) { | ||
154 | //Recorro los articulos cargados en cada punto | ||
155 | punto.articulosAgregados.forEach(function(articulo) { | ||
156 | var articuloARestar = $scope.articulos.filter(function(art) { | ||
157 | return art.id == articulo.id; | ||
158 | }); | ||
159 | articuloARestar[0].restante -= articulo.cantidad; | ||
160 | }); | ||
161 | }); | ||
162 | } | ||
163 | } | ||
164 | function agregarTotalCargado(puntosDescarga) { | ||
165 | puntosDescarga.map(function(punto) { | ||
166 | punto.cantidadACargar = 0; | ||
167 | punto.cargado = 0; | ||
168 | }); | ||
169 | //Agrego cantidad de combustible cargada en los puntos de descarga | ||
170 | puntosDescarga.forEach(function(punto) { | ||
171 | punto.articulosAgregados.forEach(function(articulo) { | ||
172 | punto.cargado += articulo.cantidad; | ||
173 | }); | ||
174 | }); | ||
175 | } | ||
114 | }] | 176 | }] |
115 | ); | 177 | ); |
116 | 178 |
src/views/modal-punto-descarga.html
1 | <div class="modal-header d-flex"> | 1 | <div class="modal-header d-flex"> |
2 | <h5 class="modal-title my-1" ng-hide="ingreso || cargaArticulos">Búsqueda de puntos de descarga</h5> | 2 | <h5 class="modal-title my-1" ng-hide="ingreso || cargaArticulos">Búsqueda de puntos de descarga</h5> |
3 | <h5 class="modal-title my-1" ng-show="ingreso">Crear punto de descarga</h5> | 3 | <h5 class="modal-title my-1" ng-show="ingreso">Crear punto de descarga</h5> |
4 | <h5 class="modal-title my-1" ng-show="cargaArticulos">Cargar articulos en puntos de descarga</h5> | 4 | <h5 class="modal-title my-1" ng-show="cargaArticulos">Cargar articulos en puntos de descarga</h5> |
5 | <button | 5 | <button |
6 | class="btn btn-primary" | 6 | class="btn btn-primary" |
7 | ng-click="ingreso = true" | 7 | ng-click="ingreso = true" |
8 | ng-hide="ingreso || cargaArticulos"> | 8 | ng-hide="ingreso || cargaArticulos"> |
9 | <i class="fa fa-plus" aria-hidden="true"></i> | 9 | <i class="fa fa-plus" aria-hidden="true"></i> |
10 | </button> | 10 | </button> |
11 | </div> | 11 | </div> |
12 | <div class="modal-body" id="modal-body"> | 12 | <div class="modal-body" id="modal-body"> |
13 | <table | 13 | <table |
14 | class="table table-striped table-sm col-12" | 14 | class="table table-striped table-sm col-12" |
15 | ng-hide="ingreso || cargaArticulos"> | 15 | ng-hide="ingreso || cargaArticulos"> |
16 | <thead> | 16 | <thead> |
17 | <tr> | 17 | <tr> |
18 | <th>Código</th> | 18 | <th>Código</th> |
19 | <th>Descripción</th> | 19 | <th>Descripción</th> |
20 | <th>Latitud</th> | 20 | <th>Latitud</th> |
21 | <th>Longitud</th> | 21 | <th>Longitud</th> |
22 | <th></th> | 22 | <th></th> |
23 | </tr> | 23 | </tr> |
24 | </thead> | 24 | </thead> |
25 | <tbody> | 25 | <tbody> |
26 | <tr ng-show="puntosDescarga.length == 0"> | 26 | <tr ng-show="puntosDescarga.length == 0"> |
27 | <td colspan="3"> | 27 | <td colspan="3"> |
28 | No se encontraron resultados. | 28 | No se encontraron resultados. |
29 | </td> | 29 | </td> |
30 | </tr> | 30 | </tr> |
31 | <tr class="selected" | 31 | <tr class="selected" |
32 | ng-repeat="(key, puntoDescarga) in puntosDescarga | filter: filters" | 32 | ng-repeat="(key, puntoDescarga) in puntosDescarga | filter: filters" |
33 | > | 33 | > |
34 | <td ng-bind="puntoDescarga.id | rellenarDigitos: 3: 0"></td> | 34 | <td ng-bind="puntoDescarga.id | rellenarDigitos: 3: 0"></td> |
35 | <td ng-bind="puntoDescarga.descripcion"></td> | 35 | <td ng-bind="puntoDescarga.descripcion"></td> |
36 | <td ng-bind="puntoDescarga.latitud"></td> | 36 | <td ng-bind="puntoDescarga.latitud"></td> |
37 | <td ng-bind="puntoDescarga.longitud"></td> | 37 | <td ng-bind="puntoDescarga.longitud"></td> |
38 | <td class="d-md-none text-primary"> | 38 | <td class="d-md-none text-primary"> |
39 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 39 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
40 | </td> | 40 | </td> |
41 | <td class="d-none d-md-table-cell"> | 41 | <td class="d-none d-md-table-cell"> |
42 | <input | 42 | <input |
43 | type="checkbox" | 43 | type="checkbox" |
44 | class="custom-control-input float-right" | 44 | class="custom-control-input float-right" |
45 | id="checkSelect{{key}}"> | 45 | id="checkSelect{{key}}"> |
46 | <label | 46 | <label |
47 | class="custom-control-label float-right" | 47 | class="custom-control-label float-right" |
48 | for="checkSelect{{key}}" | 48 | for="checkSelect{{key}}" |
49 | ng-click="seleccionarPunto(key)"></label> | 49 | ng-click="seleccionarPunto(key)"></label> |
50 | <button | 50 | <button |
51 | type="button" | 51 | type="button" |
52 | class="btn btn-xs p-1 float-right mr-5" | 52 | class="btn btn-xs p-1 float-right mr-5" |
53 | ng-click="eliminar(key, puntoDescarga.id)"> | 53 | ng-click="eliminar(key, puntoDescarga.id)" |
54 | title="Eliminar"> | ||
54 | <i class="fa fa-trash" aria-hidden="true"></i> | 55 | <i class="fa fa-trash" aria-hidden="true"></i> |
55 | </button> | 56 | </button> |
56 | <button | 57 | <button |
57 | type="button" | 58 | type="button" |
58 | class="btn btn-xs p-1 float-right mr-1" | 59 | class="btn btn-xs p-1 float-right mr-1" |
59 | ng-click="editar(puntoDescarga.id)"> | 60 | ng-click="editar(puntoDescarga.id)" |
61 | title="Editar"> | ||
60 | <i class="fa fa-pencil" aria-hidden="true"></i> | 62 | <i class="fa fa-pencil" aria-hidden="true"></i> |
61 | </button> | 63 | </button> |
62 | </td> | 64 | </td> |
63 | </tr> | 65 | </tr> |
64 | </tbody> | 66 | </tbody> |
65 | </table> | 67 | </table> |
66 | <form ng-show="ingreso"> | 68 | <form ng-show="ingreso"> |
67 | <div class="row"> | 69 | <div class="row"> |
68 | <div class="col-6"> | 70 | <div class="col-6"> |
69 | <label>Latitud</label> | 71 | <label>Latitud</label> |
70 | <input | 72 | <input |
71 | type="text" | 73 | type="text" |
72 | class="form-control form-control-sm" | 74 | class="form-control form-control-sm" |
73 | ng-model="puntoDescarga.latitud" | 75 | ng-model="puntoDescarga.latitud" |
74 | ng-required="true" | 76 | ng-required="true" |
75 | /> | 77 | /> |
76 | </div> | 78 | </div> |
77 | <div class="col-6"> | 79 | <div class="col-6"> |
78 | <label>Longitud</label> | 80 | <label>Longitud</label> |
79 | <input | 81 | <input |
80 | type="text" | 82 | type="text" |
81 | class="form-control form-control-sm" | 83 | class="form-control form-control-sm" |
82 | ng-model="puntoDescarga.longitud" | 84 | ng-model="puntoDescarga.longitud" |
83 | ng-required="true" | 85 | ng-required="true" |
84 | /> | 86 | /> |
85 | </div> | 87 | </div> |
86 | </div> | 88 | </div> |
87 | <div class="row"> | 89 | <div class="row"> |
88 | <div class="col-12"> | 90 | <div class="col-12"> |
89 | <label>Descripción</label> | 91 | <label>Descripción</label> |
90 | <textarea | 92 | <textarea |
91 | class="form-control form-control-sm" | 93 | class="form-control form-control-sm text-uppercase" |
92 | cols="30" | 94 | cols="30" |
93 | rows="5" | 95 | rows="5" |
94 | ng-model="puntoDescarga.descripcion"></textarea> | 96 | ng-model="puntoDescarga.descripcion"> |
97 | </textarea> | ||
95 | </div> | 98 | </div> |
96 | </div> | 99 | </div> |
97 | </form> | 100 | </form> |
98 | <div ng-show="cargaArticulos"> | 101 | <div ng-show="cargaArticulos"> |
99 | <div ng-show="articulos.length === 0"> | 102 | <div ng-show="articulos.length === 0"> |
100 | <h6>No existen articulos para agregar</h6> | 103 | <h6>No existen articulos para agregar</h6> |
101 | </div> | 104 | </div> |
102 | <div ng-show="articulos.length > 0"> | 105 | <div ng-show="articulos.length > 0"> |
103 | <div class="row"> | 106 | <div class="row"> |
104 | <div class="form-check ml-4" ng-repeat="(key, articulo) in articulos"> | 107 | <div class="col-12"> |
105 | <input | 108 | <table class="table table-sm"> |
106 | class="form-check-input" | 109 | <thead> |
107 | type="radio" | 110 | <tr> |
108 | name="exampleRadios" | 111 | <th></th> |
109 | id="inputRadio{{key}}" | 112 | <th>Articulo</th> |
110 | ng-value="key" | 113 | <th>Total</th> |
111 | ng-model="$parent.articuloSeleccionado" | 114 | <th>Restante</th> |
112 | > | 115 | </tr> |
113 | <label class="form-check-label" for="inputRadio{{key}}"> | 116 | </thead> |
114 | {{articulo.descripcion}} <strong>Cantidad:</strong> {{articulo.cantidad}} | 117 | <tbody> |
115 | </label> | 118 | <tr ng-repeat="(key, articulo) in articulos"> |
116 | </div> | 119 | <td> |
117 | </div> | 120 | <input |
118 | <div class="row"> | 121 | type="radio" |
119 | <div class="form-group col-3 mt-3"> | 122 | ng-value="key" |
120 | <label for="inputCantidad">Cantidad</label> | 123 | ng-model="$parent.articuloSeleccionado" |
121 | <input | 124 | > |
122 | type="text" | 125 | </td> |
123 | class="form-control" | 126 | <td ng-bind="articulo.descripcion"></td> |
124 | id="inputCantidad" | 127 | <td ng-bind="articulo.cantidad"></td> |
125 | placeholder="Cantidad" | 128 | <td ng-bind="articulo.restante"></td> |
126 | ng-model="cantidadArticulo" | 129 | </tr> |
127 | > | 130 | </tbody> |
131 | </table> | ||
128 | </div> | 132 | </div> |
129 | </div> | 133 | </div> |
130 | <div class="row"> | 134 | <div class="row"> |
131 | <div class="col-6" ng-repeat="punto in puntosACargar"> | 135 | <div class="col-12"> |
132 | <div class="d-flex"> | 136 | <h5 class="col-12 my-3">Puntos de descarga</h5> |
133 | <h6>{{punto.descripcion}}</h6> | ||
134 | <button | ||
135 | class="btn btn-sm btn-outline-primary ml-auto" | ||
136 | type="button" | ||
137 | ng-click="agregarArticulo(punto)" | ||
138 | > | ||
139 | Agregar | ||
140 | </button> | ||
141 | </div> | ||
142 | <table class="table table-sm"> | 137 | <table class="table table-sm"> |
143 | <thead> | 138 | <thead> |
144 | <tr> | 139 | <tr> |
145 | <th>Articulo</th> | 140 | <th>Lugar</th> |
141 | <th class="text-right">Total cargado</th> | ||
146 | <th class="text-right">Cantidad</th> | 142 | <th class="text-right">Cantidad</th> |
147 | <th></th> | 143 | <th></th> |
148 | </tr> | 144 | </tr> |
149 | </thead> | 145 | </thead> |
150 | <tbody> | 146 | <tbody> |
147 | <tr ng-repeat="punto in puntosACargar"> | ||
148 | <td ng-bind="punto.descripcion"></td> | ||
149 | <td ng-bind="punto.cargado" class="text-right"></td> | ||
150 | <td> | ||
151 | <input | ||
152 | type="text" | ||
153 | class="form-control col-4 float-right" | ||
154 | id="inputCantidad" | ||
155 | placeholder="A cargar" | ||
156 | ng-model="punto.cantidadACargar" | ||
157 | > | ||
158 | </td> | ||
159 | <td> | ||
160 | <button | ||
161 | class="btn btn-sm btn-outline-primary ml-auto" | ||
162 | type="button" | ||
163 | ng-click="agregarArticulo(punto)" | ||
164 | > | ||
165 | Agregar | ||
166 | </button> | ||
167 | </td> | ||
168 | </tr> | ||
169 | </tbody> | ||
170 | </table> | ||
171 | <table class="table table-sm"> | ||
172 | <thead> | ||
173 | <tr> | ||
174 | <th>Lugar</th> | ||
175 | <th>Articulo</th> | ||
176 | <th class="text-right">Cantidad</th> | ||
177 | <th></th> | ||
178 | </tr> | ||
179 | </thead> | ||
180 | <tbody ng-repeat="punto in puntosACargar"> | ||
151 | <tr ng-repeat="(key, articulo) in punto.articulosAgregados"> | 181 | <tr ng-repeat="(key, articulo) in punto.articulosAgregados"> |
182 | <td ng-bind="punto.descripcion"></td> | ||
152 | <td ng-bind="articulo.descripcion" class="p-2"></td> | 183 | <td ng-bind="articulo.descripcion" class="p-2"></td> |
153 | <td ng-bind="articulo.cantidad" class="text-right p-2"></td> | 184 | <td ng-bind="articulo.cantidad" class="text-right p-2"></td> |
154 | <td class="p-2"> | 185 | <td class="p-2"> |
155 | <button | 186 | <button |
156 | type="button" | 187 | type="button" |
157 | class="btn btn-xs p-1 float-right mr-5" | 188 | class="btn btn-xs p-1 float-right mr-5" |
158 | ng-click="quitarArticulo(articulo, key, punto)"> | 189 | ng-click="quitarArticulo(articulo, key, punto)" |
190 | title="Eliminar"> | ||
159 | <i class="fa fa-trash" aria-hidden="true"></i> | 191 | <i class="fa fa-trash" aria-hidden="true"></i> |
160 | </button> | 192 | </button> |
161 | </td> | 193 | </td> |
162 | </tr> | 194 | </tr> |
163 | </tbody> | 195 | </tbody> |
164 | </table> | 196 | </table> |
165 | </div> | 197 | </div> |
166 | </div> | 198 | </div> |
167 | </div> | 199 | </div> |
168 | </div> | 200 | </div> |
169 | </div> | 201 | </div> |
170 | <div class="modal-footer"> | 202 | <div class="modal-footer"> |
171 | <button | 203 | <button |
172 | class="btn btn-sm btn-secondary my-1" | 204 | class="btn btn-sm btn-secondary my-1" |
173 | type="button" | 205 | type="button" |
174 | ng-click="cancel()">Cancelar</button> | 206 | ng-click="cancel()">Cancelar</button> |
175 | <button | 207 | <button |
176 | class="btn btn-sm btn-primary my-1" | 208 | class="btn btn-sm btn-primary my-1" |
177 | type="button" | 209 | type="button" |