Commit 748026387b547e71bfcfae73b4a27e2e63b0f8bc
Exists in
develop
Merge branch 'develop' into 'develop'
Change - Add See merge request !42
Showing
3 changed files
Show diff stats
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" |
... | ... | @@ -223,7 +227,6 @@ |
223 | 227 | class="btn-effect col-auto px-0 align-self-center bg-white" |
224 | 228 | [routerLink]="['/carrito']"> |
225 | 229 | <div class="row mx-0 bg-light"> |
226 | - <div class="col-auto align-self-center text-primary d-none d-sm-block">VER CARRITO</div> | |
227 | 230 | <div class="col-auto p-0 bg-primary"> |
228 | 231 | <img |
229 | 232 | draggable="false" |
... | ... | @@ -232,6 +235,7 @@ |
232 | 235 | class="p-2 icon-40" |
233 | 236 | src="assets/img/carrito.svg"> |
234 | 237 | </div> |
238 | + <div class="col-auto align-self-center text-primary d-none d-sm-block">IR AL CARRITO</div> | |
235 | 239 | </div> |
236 | 240 | </div> |
237 | 241 | </div> |
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 | } |