Commit ac32559d1a093bce169402843b8e4dab95018ca0
1 parent
a3596c2f6c
Exists in
master
Nuevo diseño, muestra puntos cargados anteriormente
Showing
2 changed files
with
148 additions
and
55 deletions
Show diff stats
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 | function($timeout, $filter, $scope, $uibModalInstance, | 9 | function($timeout, $filter, $scope, $uibModalInstance, |
10 | focaModalPuntoDescargaService, filters) { | 10 | focaModalPuntoDescargaService, filters) { |
11 | 11 | ||
12 | $scope.cantidadArticulo = 0; | 12 | $scope.cantidadArticulo = 0; |
13 | $scope.articuloSeleccionado = 0; | 13 | $scope.articuloSeleccionado = 0; |
14 | $scope.ivas = []; | 14 | $scope.ivas = []; |
15 | $scope.puntosSeleccionados = []; | 15 | $scope.puntosSeleccionados = []; |
16 | $scope.puntoDescarga = { | 16 | $scope.puntoDescarga = { |
17 | id: 0, | 17 | id: 0, |
18 | id_cliente: filters.idCliente, | 18 | id_cliente: filters.idCliente, |
19 | id_da_config_0: filters.idDomicilio | 19 | id_da_config_0: filters.idDomicilio |
20 | }; | 20 | }; |
21 | $scope.articulos = angular.copy(filters.articulos); | 21 | $scope.articulos = angular.copy(filters.articulos); |
22 | $scope.articulos.map(function(articulo) { | ||
23 | articulo.restante = articulo.cantidad; | ||
24 | }); | ||
22 | actualizarTabla(); | 25 | actualizarTabla(); |
26 | cargarPuntos(filters.puntosDescarga); | ||
23 | 27 | ||
24 | $scope.cancel = function() { | 28 | $scope.cancel = function() { |
25 | if($scope.ingreso){ | 29 | if($scope.ingreso) { |
26 | $scope.ingreso = false; | 30 | $scope.ingreso = false; |
27 | }else { | 31 | }else { |
28 | $uibModalInstance.dismiss('cancel'); | 32 | $uibModalInstance.dismiss('cancel'); |
29 | } | 33 | } |
30 | }; | 34 | }; |
31 | 35 | ||
32 | $scope.aceptar = function() { | 36 | $scope.aceptar = function() { |
33 | if($scope.cargaArticulos) { | 37 | if($scope.cargaArticulos) { |
34 | cargarArticulos(); | 38 | cargarArticulos(); |
35 | }else { | 39 | }else { |
36 | verCargaArticulos(); | 40 | verCargaArticulos(); |
37 | } | 41 | } |
38 | }; | 42 | }; |
39 | 43 | ||
40 | $scope.guardar = function() { | 44 | $scope.guardar = function() { |
41 | focaModalPuntoDescargaService | 45 | focaModalPuntoDescargaService |
42 | .guardarPuntoDescarga($scope.puntoDescarga) | 46 | .guardarPuntoDescarga($scope.puntoDescarga) |
43 | .then(function() { | 47 | .then(function() { |
44 | actualizarTabla(); | 48 | actualizarTabla(); |
45 | $scope.ingreso = false; | 49 | $scope.ingreso = false; |
46 | }); | 50 | }); |
47 | }; | 51 | }; |
48 | 52 | ||
49 | $scope.editar = function(id) { | 53 | $scope.editar = function(id) { |
50 | focaModalPuntoDescargaService.getPuntoDescargaById(id).then(function(res) { | 54 | focaModalPuntoDescargaService.getPuntoDescargaById(id).then(function(res) { |
51 | $scope.puntoDescarga = res.data; | 55 | $scope.puntoDescarga = res.data; |
52 | $scope.ingreso = true; | 56 | $scope.ingreso = true; |
53 | }); | 57 | }); |
54 | }; | 58 | }; |
55 | 59 | ||
56 | $scope.eliminar = function(idx, id) { | 60 | $scope.eliminar = function(idx, id) { |
57 | focaModalPuntoDescargaService.eliminarPuntoDescarga(id).then(function() { | 61 | focaModalPuntoDescargaService.eliminarPuntoDescarga(id).then(function() { |
58 | $scope.puntosDescarga.splice(idx, 1); | 62 | $scope.puntosDescarga.splice(idx, 1); |
59 | }); | 63 | }); |
60 | }; | 64 | }; |
61 | 65 | ||
62 | $scope.seleccionarPunto = function(idx) { | 66 | $scope.seleccionarPunto = function(idx) { |
63 | $scope.puntosSeleccionados.push(idx); | 67 | var indexPunto = $scope.puntosSeleccionados.indexOf(idx); |
68 | if(indexPunto !== -1) { | ||
69 | $scope.puntosSeleccionados.splice(indexPunto, 1); | ||
70 | }else { | ||
71 | $scope.puntosSeleccionados.push(idx); | ||
72 | } | ||
64 | }; | 73 | }; |
65 | 74 | ||
66 | $scope.agregarArticulo = function(punto) { | 75 | $scope.agregarArticulo = function(punto) { |
67 | var articulo = $scope.articulos[$scope.articuloSeleccionado], | 76 | var articulo = $scope.articulos[$scope.articuloSeleccionado], |
68 | cantidadRestante = articulo.cantidad - $scope.cantidadArticulo; | 77 | cantidadRestante = articulo.restante - punto.cantidadACargar; |
69 | 78 | ||
70 | if(cantidadRestante < 0) { | 79 | if(cantidadRestante < 0) { |
71 | alert('La cantidad a cargar debe ser menor o igual al restante'); | 80 | alert('La cantidad a cargar debe ser menor o igual al restante'); |
72 | }else if($scope.cantidadArticulo <= 0) { | 81 | }else if(punto.cantidadACargar <= 0) { |
73 | alert('La cantidad a cargar debe ser mayor que cero'); | 82 | alert('La cantidad a cargar debe ser mayor que cero'); |
74 | }else { | 83 | }else { |
75 | articulo.cantidad = cantidadRestante; | 84 | punto.cargado += parseInt(punto.cantidadACargar); |
76 | punto.articulosAgregados.push({ | 85 | articulo.restante = cantidadRestante; |
77 | id: articulo.id, | 86 | var existeArticulo = punto.articulosAgregados.filter( |
78 | descripcion: articulo.descripcion, | 87 | function (articuloAAgregar) { |
79 | cantidad: $scope.cantidadArticulo, | 88 | return articuloAAgregar.id === articulo.id; |
80 | index: $scope.articuloSeleccionado | 89 | }); |
81 | }); | 90 | //Si el articulo ya fue agregado |
82 | $scope.cantidadArticulo = 0; | 91 | if(existeArticulo.length) { |
92 | //Solo sumo cantidad | ||
93 | var total = parseInt(existeArticulo[0].cantidad) + parseInt(punto.cantidadACargar); | ||
94 | existeArticulo[0].cantidad = total; | ||
95 | }else { | ||
96 | //Agrego el articulo con la cantidad | ||
97 | punto.articulosAgregados.push({ | ||
98 | id: articulo.id, | ||
99 | descripcion: articulo.descripcion, | ||
100 | cantidad: punto.cantidadACargar, | ||
101 | index: $scope.articuloSeleccionado | ||
102 | }); | ||
103 | } | ||
104 | punto.cantidadACargar = 0; | ||
83 | } | 105 | } |
84 | }; | 106 | }; |
85 | 107 | ||
86 | $scope.quitarArticulo = function(articulo, idx, punto) { | 108 | $scope.quitarArticulo = function(articulo, idx, punto) { |
87 | var restante = parseInt($scope.articulos[articulo.index].cantidad); | 109 | var articuloAEliminar = $scope.articulos.filter(function(art) { |
110 | return art.id == articulo.id; | ||
111 | }); | ||
112 | var restante = parseInt(articuloAEliminar[0].restante); | ||
88 | restante += parseInt(articulo.cantidad); | 113 | restante += parseInt(articulo.cantidad); |
89 | $scope.articulos[articulo.index].cantidad = restante; | 114 | articuloAEliminar[0].restante = restante; |
115 | |||
116 | punto.cargado -= parseInt(punto.articulosAgregados[idx].cantidad); | ||
90 | punto.articulosAgregados.splice(idx, 1); | 117 | punto.articulosAgregados.splice(idx, 1); |
91 | }; | 118 | }; |
92 | 119 | ||
93 | function actualizarTabla() { | 120 | function actualizarTabla() { |
94 | focaModalPuntoDescargaService | 121 | focaModalPuntoDescargaService |
95 | .getPuntosDescargaByClienDom(filters.idDomicilio, filters.idCliente) | 122 | .getPuntosDescargaByClienDom(filters.idDomicilio, filters.idCliente) |
96 | .then(function(res) { | 123 | .then(function(res) { |
97 | $scope.puntosDescarga = res.data; | 124 | $scope.puntosDescarga = res.data; |
98 | }); | 125 | }); |
99 | } | 126 | } |
100 | function verCargaArticulos() { | 127 | function verCargaArticulos() { |
101 | $scope.puntosACargar = []; | 128 | $scope.puntosACargar = []; |
102 | $scope.cargaArticulos = true; | 129 | $scope.cargaArticulos = true; |
103 | $scope.puntosSeleccionados.forEach(function(idx) { | 130 | $scope.puntosSeleccionados.forEach(function(idx) { |
104 | $scope.puntosACargar.push($scope.puntosDescarga[idx]); | 131 | $scope.puntosACargar.push($scope.puntosDescarga[idx]); |
105 | }); | 132 | }); |
106 | 133 | ||
107 | $scope.puntosACargar.map(function(punto) { | 134 | $scope.puntosACargar.map(function(punto) { |
108 | punto.articulosAgregados = []; | 135 | punto.articulosAgregados = []; |
136 | punto.cantidadACargar = 0; | ||
137 | punto.cargado = 0; | ||
109 | }); | 138 | }); |
110 | } | 139 | } |
111 | function cargarArticulos() { | 140 | function cargarArticulos() { |
112 | $uibModalInstance.close($scope.puntosACargar); | 141 | $uibModalInstance.close($scope.puntosACargar); |
113 | } | 142 | } |
143 | function cargarPuntos(puntosDescarga) { | ||
144 | //Si existen puntos ya cargados | ||
145 | if(puntosDescarga) { | ||
146 | if(!puntosDescarga[0].cargado) { | ||
147 | agregarTotalCargado(puntosDescarga); | ||
148 | } | ||
149 | $scope.puntosACargar = puntosDescarga; | ||
150 | $scope.cargaArticulos = true; | ||
151 | //Recorro los puntos | ||
152 | puntosDescarga.forEach(function(punto) { | ||
153 | //Recorro los articulos cargados en cada punto | ||
154 | punto.articulosAgregados.forEach(function(articulo) { | ||
155 | var articuloARestar = $scope.articulos.filter(function(art) { | ||
156 | return art.id == articulo.id; | ||
157 | }); | ||
158 | articuloARestar[0].restante -= articulo.cantidad; | ||
159 | }); | ||
160 | }); | ||
161 | } | ||
162 | } | ||
163 | function agregarTotalCargado(puntosDescarga){ | ||
164 | puntosDescarga.map(function(punto) { | ||
165 | punto.cantidadACargar = 0; | ||
166 | punto.cargado = 0; | ||
167 | }); | ||
168 | //Agrego cantidad de combustible cargada en los puntos de descarga | ||
169 | puntosDescarga.forEach(function(punto) { | ||
170 | punto.articulosAgregados.forEach(function(articulo) { | ||
171 | punto.cargado += articulo.cantidad; | ||
172 | }); | ||
173 | }); | ||
174 | } | ||
114 | }] | 175 | }] |
115 | ); | 176 | ); |
116 | 177 |
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" |