sidebar.component.html
2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<div class="d-flex align-items-center flex-column h-100 pt-2 text-center">
<h4 class="border-bottom border-white text-white"> Mi compra </h4>
<div class="overflow-auto overflow-scroll mb-2 w-100">
<div class="my-2 bg-white border-0 rounded-sm" *ngFor="let prod of productos; let i = index">
<img class="m-auto pt-2" [src]="prod.img">
<div class="row m-0 p-0 px-1 py-1 shadow rounded-sm">
<div class="col-12 p-0 pt-2 text-left my-auto">
<p class="m-0 h6"><small>{{prod.desc}}</small></p>
<p class="m-0 h6"><small>COD: {{prod.cod}}</small></p>
</div>
<div class="col-12 pr-1 text-right h6 my-auto ">
<p class="m-0">{{prod.precio | currency}}</p>
</div>
</div>
<div class="row m-0 p-0">
<div class="col px-2 my-2">
<div class="btn-group-sm btn-group float-left my-auto" role="group">
<button type="button" class="btn btn-light btn-sm my-auto border" (click)="aumentarContador(i)">
<i class="fa fa-plus" aria-hidden="true"></i>
</button>
<div class="bg-white border border-white px-3 my-auto text-dark h5">
<small>{{prod.cantidad}}</small>
</div>
<button type="button" class="btn btn-light btn-sm my-auto border" (click)="decrementarContador(i)">
<i class="fa fa-minus" aria-hidden="true"></i>
</button>
</div>
</div>
<div class="col px-2 my-2">
<div class="btn-group-sm btn-group float-right my-auto" role="group">
<button type="button" class="btn btn-light btn-sm my-auto float-left border mr-2">
<i class="fa fa-hand-o-up" aria-hidden="true"></i>
</button>
<button type="button" class="btn btn-secondary btn-sm my-auto ml-2" (click)="deleteProducto(i)">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="card rounded-top-sm mt-auto blue-gradient border-0">
<div class="card-body row">
<div class="col">
<h4 class="border-bottom border-secondary text-secondary pb-2" *ngIf="cont === 1">({{cont}}) item</h4>
<h4 class="border-bottom border-secondary text-secondary pb-2" *ngIf="cont > 1">({{cont}}) items</h4>
<h3 class="text-secondary">Total</h3>
<h3 class=""><strong>{{total | currency}}</strong></h3>
</div>
<div class="col 12 p-0">
<button type="button" class="btn btn-light shadow mb-2" routerLink="/confirmacion-carrito">
<strong>Finalizar y pagar</strong>
</button>
<button type="button" class="btn btn-light shadow btn-sm" (click)="clearCar()">Cancelar</button>
</div>
</div>
</div>
</div>