Commit 332c7a377b6cd04aa6e4b1c7e054cdd8f146adf1
Exists in
master
Merge branch 'master' into 'master'
Master(mpuebla) See merge request !35
Showing
3 changed files
Show diff stats
src/app/components/inicio/inicio.component.ts
... | ... | @@ -65,6 +65,7 @@ export class InicioComponent implements OnInit { |
65 | 65 | if (res.length === 0) { |
66 | 66 | //Si no tiene promociones la cargará al carrito despues de un tiempo |
67 | 67 | setTimeout(() => { |
68 | + this.productoAcargar.cantidad = 1; | |
68 | 69 | this.productoService.productos.push(this.productoAcargar); |
69 | 70 | this.productoAcargar = this.productoService.productoAcargar = undefined; |
70 | 71 | }, 2000) |
... | ... | @@ -95,7 +96,7 @@ export class InicioComponent implements OnInit { |
95 | 96 | } |
96 | 97 | |
97 | 98 | confirmarProducto() { |
98 | - | |
99 | + this.promoAcargar.cantidad = 1; | |
99 | 100 | this.productoService.productos.push(this.promoAcargar); |
100 | 101 | this.promoAcargar = undefined; |
101 | 102 | this.productoAcargar = undefined; |
... | ... | @@ -112,11 +113,11 @@ export class InicioComponent implements OnInit { |
112 | 113 | |
113 | 114 | if (this.promoAcargar) { |
114 | 115 | this.promoAcargar = undefined; |
115 | - if(this.productoAcargar.PRO){ | |
116 | + if (this.productoAcargar.PRO) { | |
116 | 117 | this.productoAcargar = undefined; |
117 | 118 | this.promociones = []; |
118 | 119 | this.popoverDirective.hide(); |
119 | - }else{ | |
120 | + } else { | |
120 | 121 | this.popoverDirective.show(); |
121 | 122 | } |
122 | 123 | } else { |
src/app/components/master/master.component.html
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 | </div> |
10 | 10 | |
11 | 11 | <!-- SIDEBAR --> |
12 | - <app-sidebar class="sidebar position-fixed float-right col-2 col-md-2 vh-100 bg-primary-gradient"></app-sidebar> | |
12 | + <app-sidebar class="sidebar position-fixed float-right col-2 col-md-2 vh-100 bg-primary-gradient p-2"> | |
13 | + </app-sidebar> | |
13 | 14 | |
14 | 15 | </div> |
src/app/components/sidebar/sidebar.component.html
1 | 1 | <div class="disable-user-select d-flex align-items-center flex-column h-100 pt-2 text-center"> |
2 | 2 | |
3 | + <!-- ENCABEZADO --> | |
3 | 4 | <p class="h4 border-bottom border-white text-white mt-4 pb-2"> |
4 | 5 | Mi compra |
5 | 6 | <i class="fa fa-shopping-cart" aria-hidden="true"></i> |
... | ... | @@ -20,8 +21,11 @@ |
20 | 21 | <p class="m-0">{{producto.PreVen | currency}}</p> |
21 | 22 | </div> |
22 | 23 | </div> |
23 | - <div class="row m-0 p-0"> | |
24 | - <div class="col-6 px-2 my-2"> | |
24 | + | |
25 | + <!-- BOTONES --> | |
26 | + <div class="row m-0 d-flex justify-content-between"> | |
27 | + <!-- SUMAR - RESTAR CANTIDAD --> | |
28 | + <div class="col-auto px-1 my-2"> | |
25 | 29 | <div class="btn-group-sm btn-group float-left my-auto" role="group"> |
26 | 30 | <button type="button" class="btn btn-light btn-sm my-auto border" (click)="aumentarContador(i)"> |
27 | 31 | <i class="fa fa-plus" aria-hidden="true"></i> |
... | ... | @@ -34,19 +38,21 @@ |
34 | 38 | </button> |
35 | 39 | </div> |
36 | 40 | </div> |
37 | - <div class="col-6 px-2 my-2"> | |
38 | - <div class="btn-group-sm btn-group float-right my-auto" role="group"> | |
39 | - <button | |
40 | - *ngIf="esPersonalizable(producto)" | |
41 | - type="button" | |
42 | - class="btn btn-light btn-sm my-auto float-left border mr-2" | |
43 | - (click)="personalizarPromo"> | |
44 | - <i class="fa fa-hand-o-up" aria-hidden="true"></i> | |
45 | - </button> | |
46 | - <button type="button" class="btn btn-secondary btn-sm my-auto ml-2" (click)="deleteProducto(i)"> | |
47 | - <i class="fa fa-times" aria-hidden="true"></i> | |
48 | - </button> | |
49 | - </div> | |
41 | + <!-- PERSONALIZAR --> | |
42 | + <div class="col-auto px-1 my-2"> | |
43 | + <button | |
44 | + *ngIf="esPersonalizable(producto)" | |
45 | + type="button" | |
46 | + class="btn btn-light btn-sm my-auto float-left border" | |
47 | + (click)="personalizarPromo"> | |
48 | + <i class="fa fa-hand-o-up" aria-hidden="true"></i> | |
49 | + </button> | |
50 | + </div> | |
51 | + <!-- BORRAR --> | |
52 | + <div class="col-auto px-1 my-2"> | |
53 | + <button type="button" class="btn btn-secondary btn-sm my-auto" (click)="deleteProducto(i)"> | |
54 | + <i class="fa fa-times" aria-hidden="true"></i> | |
55 | + </button> | |
50 | 56 | </div> |
51 | 57 | </div> |
52 | 58 | </div> |