Commit d90b1d556a5cadc6e13a4520b628c9ee444a03ad
1 parent
5dcd31ce9a
Exists in
master
and in
1 other branch
Cambio para mostrar las imagenes de los productos.
Showing
5 changed files
with
36 additions
and
5 deletions
Show diff stats
src/app/components/busqueda-productos/busqueda-productos.component.html
| ... | ... | @@ -61,7 +61,7 @@ |
| 61 | 61 | <div |
| 62 | 62 | class="card-effect bg-white rounded-sm shadow border-0" |
| 63 | 63 | (click)="mostrarBotonCargar(producto)"> |
| 64 | - <img src="{{apiUrl}}/imagenes/testImg.jpg" class="rounded-sm w-100 m-auto"> | |
| 64 | + <img src="{{apiUrl}}/imagenes/{{producto.imagenes[0].imagen}}" class="rounded-sm w-100 m-auto"> | |
| 65 | 65 | <div class="p-2"> |
| 66 | 66 | <p class="h6 text-left m-0">{{producto.DetArt}}</p> |
| 67 | 67 | <div class="row justify-content-between m-0"> |
src/app/components/inicio/inicio.component.html
| ... | ... | @@ -112,7 +112,7 @@ |
| 112 | 112 | <div class="fade-in m-0" *ngIf="productoAcargar && !promoAcargar"> |
| 113 | 113 | <img |
| 114 | 114 | class="card-img-top d-block w-75 mx-auto rounded-sm" |
| 115 | - src="{{apiUrl}}/imagenes/testImg.jpg"> | |
| 115 | + src="{{apiUrl}}/imagenes/{{productoAcargar.imagenes[0].imagen}}"> | |
| 116 | 116 | |
| 117 | 117 | <div class="row justify-content-between m-3"> |
| 118 | 118 | <div class="col-12 text-left px-1"> |
| ... | ... | @@ -128,7 +128,7 @@ |
| 128 | 128 | <div class="fade-in m-0" *ngIf="promoAcargar"> |
| 129 | 129 | <img |
| 130 | 130 | class="card-img-top d-block w-100 mx-auto rounded-sm" |
| 131 | - src="{{apiUrl}}/imagenes/testImg.jpg"> | |
| 131 | + src="{{apiUrl}}/imagenes/{{promoAcargar.imagenes[0].imagen}}"> | |
| 132 | 132 | |
| 133 | 133 | <div class="row justify-content-between m-3"> |
| 134 | 134 | <div class="col-12 text-left px-1"> |
src/app/components/sidebar/sidebar.component.html
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | <div class="overflow-auto overflow-scroll mb-2 w-100"> |
| 9 | 9 | <!-- PRODUCTOS CARRITO --> |
| 10 | 10 | <div |
| 11 | - class="fade-left my-2 bg-white border-0 rounded-sm" | |
| 11 | + class="slide-in-bl my-2 bg-white border-0 rounded-sm" | |
| 12 | 12 | *ngFor="let producto of productosCarrito.slice().reverse(); let i = index"> |
| 13 | 13 | <img class="w-100 m-auto rounded-sm shadow" src="{{apiUrl}}/imagenes/{{producto.imagenes[0].imagen}}"> |
| 14 | 14 | <div class="row m-0 p-0 px-1 py-1 shadow rounded-sm"> |
src/app/components/sidebar/sidebar.component.ts
| ... | ... | @@ -87,7 +87,7 @@ export class SidebarComponent implements OnInit { |
| 87 | 87 | this.cont -= this.productosCarrito[i].cantidad; |
| 88 | 88 | //Elimina del total el PreVen de todo el item |
| 89 | 89 | this.total = this.total - (this.productosCarrito[i].PreVen * this.productosCarrito[i].cantidad); |
| 90 | - this.productosCarrito.splice(i, 1); | |
| 90 | + this.productosCarrito.reverse().splice(i, 1); | |
| 91 | 91 | return; |
| 92 | 92 | } |
| 93 | 93 | } |
src/assets/scss/animation.scss
| ... | ... | @@ -144,3 +144,34 @@ |
| 144 | 144 | transform-origin: 100% 0%; |
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | + | |
| 148 | +.slide-in-bl { | |
| 149 | + -webkit-animation: slide-in-bl 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; | |
| 150 | + animation: slide-in-bl 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; | |
| 151 | +} | |
| 152 | + | |
| 153 | +@-webkit-keyframes slide-in-bl { | |
| 154 | + 0% { | |
| 155 | + -webkit-transform: translateY(1000px) translateX(-1000px); | |
| 156 | + transform: translateY(1000px) translateX(-1000px); | |
| 157 | + opacity: 0; | |
| 158 | + } | |
| 159 | + 100% { | |
| 160 | + -webkit-transform: translateY(0) translateX(0); | |
| 161 | + transform: translateY(0) translateX(0); | |
| 162 | + opacity: 1; | |
| 163 | + } | |
| 164 | +} | |
| 165 | + | |
| 166 | +@keyframes slide-in-bl { | |
| 167 | + 0% { | |
| 168 | + -webkit-transform: translateY(1000px) translateX(-1000px); | |
| 169 | + transform: translateY(1000px) translateX(-1000px); | |
| 170 | + opacity: 0; | |
| 171 | + } | |
| 172 | + 100% { | |
| 173 | + -webkit-transform: translateY(0) translateX(0); | |
| 174 | + transform: translateY(0) translateX(0); | |
| 175 | + opacity: 1; | |
| 176 | + } | |
| 177 | +} |