Commit 42ea0d5581058b61ebdc03f0e8177139ea4b1e0e

Authored by Marcelo Puebla
1 parent 5b653cdb33
Exists in develop

Add

Boton para eliminar articulo en el carrito en pantalla de seleccion de articulo
src/app/modules/seleccion-articulos/seleccion-articulos.component.html
... ... @@ -177,6 +177,10 @@
177 177 *ngFor="let articulo of articuloService.carrito; let i = index;">
178 178 <div class="swing-in-top-fwd">
179 179 <img
  180 + class="btn-effect icon-20 position-absolute right-0"
  181 + src="assets/img/icono-cancelar-color.svg"
  182 + (click)="deleteArticulo(i)">
  183 + <img
180 184 draggable="false"
181 185 ondragstart="return false;"
182 186 (contextmenu)="false"
src/app/modules/seleccion-articulos/seleccion-articulos.component.ts
... ... @@ -154,6 +154,12 @@ export class SeleccionArticulosComponent implements OnInit, OnDestroy {
154 154 });
155 155 }
156 156  
  157 +
  158 + deleteArticulo(index: number) {
  159 + this.articuloService.carrito.splice(index, 1);
  160 + this.articuloService.calcularTotal();
  161 + }
  162 +
157 163 increaseShow() {
158 164 this.showQuantity += 100;
159 165 }
... ... @@ -50,6 +50,14 @@ p {
50 50 transform: translateX(-50%);
51 51 }
52 52  
  53 +.right-0 {
  54 + right: 0;
  55 +}
  56 +
  57 +.left-0 {
  58 + left: 0;
  59 +}
  60 +
53 61 .rotate-45 {
54 62 transform: rotate(45deg);
55 63 }