Commit 1e1ee7e3a8f409a03eb1327d11465d258d5b3b73
1 parent
e18efd4d6a
Exists in
develop
and in
1 other branch
Agregado banners publicitarios y arreglo para cuando no se encuentre imagenes de articulos
Showing
7 changed files
with
52 additions
and
8 deletions
Show diff stats
src/app/modules/carrito/carrito.component.html
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <!-- PUBLICIDADES --> |
| 3 | 3 | <app-header-publicidad></app-header-publicidad> |
| 4 | 4 | |
| 5 | - <div class="h-85"> | |
| 5 | + <div class="h-75"> | |
| 6 | 6 | <!-- CABECERA --> |
| 7 | 7 | <div class="row mx-3 h-auto border border-primary rounded-sm"> |
| 8 | 8 | <div class="col-12 px-0 py-2 align-self-center"> |
| ... | ... | @@ -33,7 +33,8 @@ |
| 33 | 33 | ondragstart="return false;" |
| 34 | 34 | (contextmenu)="false" |
| 35 | 35 | class="d-block mx-auto h-55 rounded-sm shadow-sm" |
| 36 | - src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}"> | |
| 36 | + src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" | |
| 37 | + onerror="this.src='assets/img/image-not-found.jpg'"> | |
| 37 | 38 | <div class="row mx-0 h-45"> |
| 38 | 39 | <p class="col text-primary text-truncate align-self-end"> |
| 39 | 40 | <small>{{articulo.DetArt}}</small> |
src/app/modules/seleccion-articulos/seleccion-articulos.component.html
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <!-- PUBLICIDADES --> |
| 3 | 3 | <app-header-publicidad></app-header-publicidad> |
| 4 | 4 | |
| 5 | - <div class="row mx-0 h-90 align-items-end"> | |
| 5 | + <div class="row mx-0 h-80 align-items-end"> | |
| 6 | 6 | <!-- CABECERA --> |
| 7 | 7 | <div class="row w-100 mx-3 h-auto border border-primary rounded-sm"> |
| 8 | 8 | <div class="col-12 p-2 align-self-center"> |
| ... | ... | @@ -86,6 +86,7 @@ |
| 86 | 86 | ondragstart="return false;" |
| 87 | 87 | (contextmenu)="false" |
| 88 | 88 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" |
| 89 | + onerror="this.src='assets/img/image-not-found.jpg'" | |
| 89 | 90 | class="card-img-top h-55 rounded-sm"> |
| 90 | 91 | <div class="row mx-0 py-1 h-auto justify-content-center"> |
| 91 | 92 | <p class="col-12 px-1 h6 h-auto text-primary text-center">{{articulo.DetArt}}</p> |
| ... | ... | @@ -168,7 +169,8 @@ |
| 168 | 169 | ondragstart="return false;" |
| 169 | 170 | (contextmenu)="false" |
| 170 | 171 | class="d-block img-fluid p-2 mx-auto rounded" |
| 171 | - src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}"> | |
| 172 | + src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" | |
| 173 | + onerror="this.src='assets/img/image-not-found.jpg'"> | |
| 172 | 174 | <p class="d-block mt-auto text-center text-primary text-truncate"> |
| 173 | 175 | <small>{{articulo.DetArt}}</small> |
| 174 | 176 | </p> |
| ... | ... | @@ -191,7 +193,9 @@ |
| 191 | 193 | </div> |
| 192 | 194 | </div> |
| 193 | 195 | <!-- VER CARRITO --> |
| 194 | - <div class="col-auto p-0 mt-2 ml-auto h-20"> | |
| 196 | + <div | |
| 197 | + class="col-auto p-0 mt-2 ml-auto h-20" | |
| 198 | + *ngIf="articuloService.carrito.length"> | |
| 195 | 199 | <div |
| 196 | 200 | class="btn-effect col-auto align-self-center px-0 bg-white" |
| 197 | 201 | [routerLink]="['/carrito']"> |
| ... | ... | @@ -208,6 +212,7 @@ |
| 208 | 212 | </div> |
| 209 | 213 | </div> |
| 210 | 214 | </div> |
| 215 | + | |
| 211 | 216 | </div> |
| 212 | 217 | </div> |
| 213 | 218 |
src/app/modules/seleccion-articulos/seleccion-articulos.module.ts
| ... | ... | @@ -4,6 +4,7 @@ import { SeleccionArticulosRoutingModule } from './seleccion-articulos-routing.m |
| 4 | 4 | import { SeleccionArticulosComponent } from './seleccion-articulos.component'; |
| 5 | 5 | import { HeaderPublicidadComponent } from 'src/app/shared/header-publicidad/header-publicidad.component'; |
| 6 | 6 | import { ModalModule } from 'ngx-bootstrap/modal'; |
| 7 | +import { CarouselModule } from 'ngx-bootstrap/carousel'; | |
| 7 | 8 | import { PromocionComponent } from 'src/app/shared/promocion/promocion.component'; |
| 8 | 9 | import { SharedModule } from '../shared/shared.module'; |
| 9 | 10 | |
| ... | ... | @@ -17,6 +18,7 @@ import { SharedModule } from '../shared/shared.module'; |
| 17 | 18 | CommonModule, |
| 18 | 19 | SeleccionArticulosRoutingModule, |
| 19 | 20 | ModalModule.forRoot(), |
| 21 | + CarouselModule.forRoot(), | |
| 20 | 22 | SharedModule |
| 21 | 23 | ], |
| 22 | 24 | exports: [HeaderPublicidadComponent], |
src/app/shared/header-publicidad/header-publicidad.component.html
| 1 | -<div class="row mx-0 h-10"> | |
| 1 | +<div class="row mx-0 h-20"> | |
| 2 | 2 | <div class="col-12 p-3 h-100"> |
| 3 | - <div class="bg-dark h-100"></div> | |
| 3 | + <div class="h-100"> | |
| 4 | + <carousel [showIndicators]="false" [interval]="4000"> | |
| 5 | + <slide> | |
| 6 | + <img | |
| 7 | + class="d-block h-100 w-auto mx-auto" | |
| 8 | + src="{{urlImagenes}}spot-promos-combos-02.png"> | |
| 9 | + </slide> | |
| 10 | + <!-- <slide> | |
| 11 | + <img | |
| 12 | + class="d-block h-100 w-auto mx-auto" | |
| 13 | + src="{{urlImagenes}}spot-promos-combos-03.png"> | |
| 14 | + </slide> | |
| 15 | + <slide> | |
| 16 | + <img | |
| 17 | + class="d-block h-100 w-auto mx-auto" | |
| 18 | + src="{{urlImagenes}}spot-promos-combos-04.png"> | |
| 19 | + </slide> | |
| 20 | + <slide> | |
| 21 | + <img | |
| 22 | + class="d-block h-100 w-auto mx-auto" | |
| 23 | + src="{{urlImagenes}}spot-promos-combos-05.png"> | |
| 24 | + </slide> --> | |
| 25 | + </carousel> | |
| 26 | + </div> | |
| 4 | 27 | </div> |
| 5 | -</div> | |
| 6 | 28 | \ No newline at end of file |
| 29 | +</div> |
src/app/shared/header-publicidad/header-publicidad.component.ts
| 1 | 1 | import { Component, OnInit } from '@angular/core'; |
| 2 | +import { APP_SETTINGS } from 'src/etc/AppSettings'; | |
| 2 | 3 | |
| 3 | 4 | @Component({ |
| 4 | 5 | selector: 'app-header-publicidad', |
| ... | ... | @@ -6,6 +7,7 @@ import { Component, OnInit } from '@angular/core'; |
| 6 | 7 | styleUrls: ['./header-publicidad.component.scss'] |
| 7 | 8 | }) |
| 8 | 9 | export class HeaderPublicidadComponent implements OnInit { |
| 10 | + urlImagenes = `${APP_SETTINGS.apiDeboSuite}/imagenes/`; | |
| 9 | 11 | |
| 10 | 12 | constructor() { } |
| 11 | 13 |
src/assets/img/image-not-found.jpg
41.5 KB
src/scss/styles-bootstrap.scss
| ... | ... | @@ -29,4 +29,15 @@ $border-radius-sm: 0.5rem; |
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | +.carousel-control { | |
| 33 | + visibility: hidden !important; | |
| 34 | +} | |
| 35 | + | |
| 36 | +.carousel, | |
| 37 | +.carousel-inner, | |
| 38 | +.carousel-item, | |
| 39 | +.item { | |
| 40 | + height: 100% !important; | |
| 41 | +} | |
| 42 | + | |
| 32 | 43 | @import "node_modules/bootstrap/scss/bootstrap"; |