Commit cdc952c974fa270cea7e881dc997abd44461d582
Exists in
develop
merge conflicts
Showing
27 changed files
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-75 carrito-content"> | |
| 5 | + <div class="h-75 carrito-content" #carritoContent> | |
| 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"> |
| ... | ... | @@ -23,6 +23,7 @@ |
| 23 | 23 | <!-- ARTICULOS --> |
| 24 | 24 | <div |
| 25 | 25 | class="col-12 col-xl-6 p-2 h-50 h-md-25 h-xl-40 text-center text-truncate carrito-articulo" |
| 26 | + [ngClass]="{'media-pantalla': carritoContent.classList.contains('media-pantalla')}" | |
| 26 | 27 | *ngFor="let articulo of articuloService.carrito; let i = index;" |
| 27 | 28 | @EnterLeaveX> |
| 28 | 29 | <!-- ARTICULO --> |
src/app/modules/carrito/carrito.component.ts
| ... | ... | @@ -30,7 +30,7 @@ export class CarritoComponent implements OnInit, OnDestroy { |
| 30 | 30 | this.router.navigate(['']); |
| 31 | 31 | return; |
| 32 | 32 | } |
| 33 | - this.mediaPantallaP(); | |
| 33 | + this.mediaPantalla(); | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | ngOnDestroy() { |
| ... | ... | @@ -57,9 +57,9 @@ export class CarritoComponent implements OnInit, OnDestroy { |
| 57 | 57 | this.inactiveScreen.startTimeOutInactividad(); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - mediaPantallaP() { | |
| 60 | + mediaPantalla() { | |
| 61 | 61 | if ($('body').hasClass('media-pantalla')) { |
| 62 | - $('.carrito-content,.carrito-articulo').addClass('media-pantalla'); | |
| 62 | + $(`.carrito-content`).addClass('media-pantalla').addBack('media-pantalla'); | |
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | } |
src/app/modules/forma-pago/forma-pago.component.html
| ... | ... | @@ -52,7 +52,7 @@ |
| 52 | 52 | </div> |
| 53 | 53 | <!-- OPCION PAGO CON TARJETA --> |
| 54 | 54 | <div class="row mt-5 h-auto justify-content-center mx-0"> |
| 55 | - <div class="col-5 px-0 h-auto align-self-start reduce-card-1"> | |
| 55 | + <div class="col-5 px-0 h-auto align-self-start reduce-card-2"> | |
| 56 | 56 | <div class="row justify-content-between"> |
| 57 | 57 | <div class="col-12"> |
| 58 | 58 | <div |
src/app/modules/forma-pago/forma-pago.component.scss
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | position: absolute; |
| 3 | 3 | bottom: 150px; |
| 4 | 4 | -webkit-box-flex: 0; |
| 5 | - flex: 0 0 41.6666666667%; | |
| 6 | - max-width: 41.6666666667%; | |
| 5 | + flex: 0 0 35%; | |
| 6 | + max-width: 35%; | |
| 7 | 7 | left: 10%; |
| 8 | 8 | margin-left: 0 !important; |
| 9 | 9 | } |
| ... | ... | @@ -12,8 +12,8 @@ |
| 12 | 12 | position: absolute; |
| 13 | 13 | bottom: 150px; |
| 14 | 14 | -webkit-box-flex: 0; |
| 15 | - flex: 0 0 41.6666666667%; | |
| 16 | - max-width: 41.6666666667%; | |
| 15 | + flex: 0 0 35%; | |
| 16 | + max-width: 35%; | |
| 17 | 17 | right: 10%; |
| 18 | 18 | margin-right: 0 !important; |
| 19 | 19 | } |
src/app/modules/info-formas-pago/info-formas-pago.component.ts
| ... | ... | @@ -7,14 +7,15 @@ import { BsModalService } from 'ngx-bootstrap/modal'; |
| 7 | 7 | styleUrls: ['./info-formas-pago.component.scss'] |
| 8 | 8 | }) |
| 9 | 9 | export class InfoFormasPagoComponent implements OnInit, OnDestroy { |
| 10 | - mediaPantalla = false; | |
| 11 | 10 | timer: any; |
| 12 | 11 | |
| 13 | 12 | constructor( |
| 14 | 13 | private modalService: BsModalService, |
| 15 | 14 | ) { } |
| 16 | 15 | |
| 17 | - ngOnInit() { } | |
| 16 | + ngOnInit() { | |
| 17 | + this.mediaPantalla(); | |
| 18 | + } | |
| 18 | 19 | |
| 19 | 20 | ngOnDestroy() { |
| 20 | 21 | if (this.timer) clearTimeout(this.timer); |
| ... | ... | @@ -26,4 +27,12 @@ export class InfoFormasPagoComponent implements OnInit, OnDestroy { |
| 26 | 27 | modalRef.hide(); |
| 27 | 28 | }, 3000); |
| 28 | 29 | } |
| 30 | + | |
| 31 | + mediaPantalla() { | |
| 32 | + if ($('body').hasClass('media-pantalla')) { | |
| 33 | + $('.reduce-card-1,.reduce-card-2') | |
| 34 | + .addClass('media-pantalla') | |
| 35 | + .addBack('media-pantalla'); | |
| 36 | + } | |
| 37 | + } | |
| 29 | 38 | } |
src/app/modules/mensaje-final/mensaje-final.component.html
| ... | ... | @@ -52,7 +52,8 @@ |
| 52 | 52 | <div class="row justify-content-center"> |
| 53 | 53 | <div class="col-auto"> |
| 54 | 54 | <div |
| 55 | - class="d-inline-block py-1 btn-effect bg-primary badge-pill text-white" | |
| 55 | + class="d-inline-block w-100 py-1 btn-effect | |
| 56 | + bg-primary badge-pill text-white text-center" | |
| 56 | 57 | (click)="goToSplash()"> |
| 57 | 58 | <span class="px-4">FINALIZAR</span> |
| 58 | 59 | <img |
src/app/modules/opcion-pedido/opcion-pedido.component.scss
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | position: absolute; |
| 3 | 3 | bottom: 150px; |
| 4 | 4 | -webkit-box-flex: 0; |
| 5 | - flex: 0 0 41.6666666667%; | |
| 6 | - max-width: 41.6666666667%; | |
| 5 | + flex: 0 0 35%; | |
| 6 | + max-width: 35%; | |
| 7 | 7 | left: 10%; |
| 8 | 8 | margin-left: 0 !important; |
| 9 | 9 | } |
| ... | ... | @@ -12,8 +12,8 @@ |
| 12 | 12 | position: absolute; |
| 13 | 13 | bottom: 150px; |
| 14 | 14 | -webkit-box-flex: 0; |
| 15 | - flex: 0 0 41.6666666667%; | |
| 16 | - max-width: 41.6666666667%; | |
| 15 | + flex: 0 0 35%; | |
| 16 | + max-width: 35%; | |
| 17 | 17 | right: 10%; |
| 18 | 18 | margin-right: 0 !important; |
| 19 | 19 | } |
src/app/modules/opcion-pedido/opcion-pedido.component.ts
| ... | ... | @@ -13,7 +13,7 @@ export class OpcionPedidoComponent implements OnInit { |
| 13 | 13 | ) { } |
| 14 | 14 | |
| 15 | 15 | ngOnInit() { |
| 16 | - this.reducirPantalla(); | |
| 16 | + this.mediaPantalla(); | |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | goTo(path) { |
| ... | ... | @@ -25,7 +25,7 @@ export class OpcionPedidoComponent implements OnInit { |
| 25 | 25 | localStorage.setItem('pedidoParaLlevar', lugar); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - reducirPantalla() { | |
| 28 | + mediaPantalla() { | |
| 29 | 29 | if ($('body').hasClass('media-pantalla')) { |
| 30 | 30 | $('.reduce-card-1,.reduce-card-2').addClass('media-pantalla'); |
| 31 | 31 | } |
src/app/modules/pago-electronico/pago-electronico.component.html
| ... | ... | @@ -27,12 +27,12 @@ |
| 27 | 27 | class="d-block mx-auto h-100 w-auto shadow rounded" |
| 28 | 28 | src="assets/img/qr-skin.jpg"> |
| 29 | 29 | </div> |
| 30 | - <div class="col-10 px-0 h-100 mt-7 mt-lg-5"> | |
| 30 | + <div class="col-10 px-0 h-100 mt-7 mt-5"> | |
| 31 | 31 | <img |
| 32 | 32 | draggable="false" |
| 33 | 33 | ondragstart="return false;" |
| 34 | 34 | (contextmenu)="false" |
| 35 | - class="d-block mx-auto h-40" | |
| 35 | + class="d-block mx-auto mt-7 qr-mt h-40" | |
| 36 | 36 | [src]="urlQr"> |
| 37 | 37 | </div> |
| 38 | 38 | </div> |
src/app/modules/pago-electronico/pago-electronico.component.scss
src/app/modules/pago-electronico/pago-electronico.component.ts
| ... | ... | @@ -30,6 +30,11 @@ export class PagoElectronicoComponent implements OnInit { |
| 30 | 30 | this.articuloService.idComanda = res.data; |
| 31 | 31 | this.router.navigate(['mensaje-final']); |
| 32 | 32 | }, err => console.error(err)); |
| 33 | + this.mediaPantalla(); | |
| 34 | + } | |
| 35 | + mediaPantalla() { | |
| 36 | + if ($('body').hasClass('media-pantalla')) { | |
| 37 | + $('.qr-mt').addClass('media-pantalla'); | |
| 38 | + } | |
| 33 | 39 | } |
| 34 | - | |
| 35 | 40 | } |
src/app/modules/seleccion-articulos/filtro-categorias/filtro-categorias.component.html
| ... | ... | @@ -19,27 +19,32 @@ |
| 19 | 19 | border-left-0 rounded-right scroll-y cat-box" |
| 20 | 20 | (scroll)="scrollEvent($event)"> |
| 21 | 21 | <div |
| 22 | - class="row mx-2 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab cat-content" | |
| 22 | + class="row mx-2 mb-2 h-25 h-lg-30 justify-content-center tab cat-content" | |
| 23 | 23 | [ngClass]="{ 'active rounded shadow px-2': allActive, 'border-bottom-effect': !allActive }" |
| 24 | 24 | (click)="selectCategoria(-1, 0)"> |
| 25 | 25 | <img |
| 26 | 26 | draggable="false" |
| 27 | 27 | ondragstart="return false;" |
| 28 | 28 | (contextmenu)="false" |
| 29 | - class="col-12 img-fluid align-self-end d-none d-sm-block rounded-circle" | |
| 29 | + class="col-12 img-fluid align-self-end d-none | |
| 30 | + d-sm-block rounded-circle w-100 h-auto" | |
| 30 | 31 | src="assets/img/logo-spot.svg"> |
| 31 | 32 | <small class="col-12 px-0 my-1 h-100 h-md-25 align-self-end text-center text-truncate">Todos</small> |
| 32 | 33 | </div> |
| 33 | 34 | <div |
| 34 | - class="row mx-2 mb-2 h-25 h-md-32 h-lg-45 justify-content-center tab cat-content" | |
| 35 | - [ngClass]="{ 'active rounded shadow px-2': categoria.selected, 'border-bottom-effect': !categoria.selected }" | |
| 35 | + class="row mx-2 mb-2 h-25 h-lg-30 justify-content-center tab cat-content" | |
| 36 | + [ngClass]="{ 'active rounded shadow px-2': categoria.selected, | |
| 37 | + 'border-bottom-effect': !categoria.selected, | |
| 38 | + 'media-pantalla': templateCategorias.classList.contains('media-pantalla')}" | |
| 36 | 39 | (click)="selectCategoria(i, categoria.id)" |
| 40 | + id="cat-content" | |
| 37 | 41 | *ngFor="let categoria of categorias; let i = index;"> |
| 38 | 42 | <img |
| 39 | 43 | draggable="false" |
| 40 | 44 | ondragstart="return false;" |
| 41 | 45 | (contextmenu)="false" |
| 42 | - class="col-12 img-fluid align-self-end d-none d-sm-block rounded-circle" | |
| 46 | + class="col-12 img-fluid align-self-end d-none | |
| 47 | + d-sm-block rounded-circle w-100 h-auto" | |
| 43 | 48 | src="{{urlImagenes}}{{categoria.path_imagen}}" |
| 44 | 49 | onerror="this.src='assets/img/imagen-no-encontrada.jpg'"> |
| 45 | 50 | <small class="col-12 px-1 my-1 h-100 h-md-25 align-self-end text-center text-truncate">{{categoria.detalle}}</small> |
src/app/modules/seleccion-articulos/filtro-categorias/filtro-categorias.component.scss
| ... | ... | @@ -35,9 +35,10 @@ $primary: #aa006b; |
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | -.cat-content.media-pantalla { | |
| 38 | +.cat-content.media-pantalla, | |
| 39 | +#cat-content.media-pantalla { | |
| 39 | 40 | margin: 0.5rem 0.7rem !important; |
| 40 | - height: 76% !important; | |
| 41 | + height: 95% !important; | |
| 41 | 42 | } |
| 42 | 43 | |
| 43 | 44 | .cat-box.media-pantalla { |
src/app/modules/seleccion-articulos/filtro-categorias/filtro-categorias.component.ts
| ... | ... | @@ -25,7 +25,9 @@ export class FiltroCategoriasComponent implements OnInit { |
| 25 | 25 | private inactiveScreen: InactiveScreenService, |
| 26 | 26 | ) { } |
| 27 | 27 | |
| 28 | - ngOnInit() { } | |
| 28 | + ngOnInit() { | |
| 29 | + this.mediaPantalla(); | |
| 30 | + } | |
| 29 | 31 | |
| 30 | 32 | getCategorias() { |
| 31 | 33 | this.categoriaService.getAll() |
| ... | ... | @@ -54,6 +56,7 @@ export class FiltroCategoriasComponent implements OnInit { |
| 54 | 56 | this.getProductos.emit() : |
| 55 | 57 | this.setProductos.emit(); |
| 56 | 58 | }); |
| 59 | + this.mediaPantalla(); | |
| 57 | 60 | } |
| 58 | 61 | |
| 59 | 62 | selectCategoria(index: number, idCategoria?: number) { |
| ... | ... | @@ -83,4 +86,12 @@ export class FiltroCategoriasComponent implements OnInit { |
| 83 | 86 | el.scroll({ behavior: 'smooth', top: value + el.scrollTop }); |
| 84 | 87 | }, 500); |
| 85 | 88 | } |
| 89 | + | |
| 90 | + mediaPantalla() { | |
| 91 | + if ($('body').hasClass('media-pantalla')) { | |
| 92 | + $('.cat-content,#cat-content') | |
| 93 | + .addClass('media-pantalla') | |
| 94 | + .addBack('media-pantalla'); | |
| 95 | + } | |
| 96 | + } | |
| 86 | 97 | } |
src/app/modules/seleccion-articulos/seleccion-articulos.component.html
| ... | ... | @@ -2,7 +2,9 @@ |
| 2 | 2 | <!-- PUBLICIDADES --> |
| 3 | 3 | <app-header-publicidad></app-header-publicidad> |
| 4 | 4 | |
| 5 | - <div class="row mx-0 h-80 align-items-end"> | |
| 5 | + <div class="row mx-0 align-items-end" | |
| 6 | + [ngClass]="boxCarrito.classList.contains('media-pantalla') | |
| 7 | + ? 'h-68' : 'h-80'"> | |
| 6 | 8 | <!-- CABECERA --> |
| 7 | 9 | <div class="row w-100 mx-3 h-auto border border-primary rounded-sm"> |
| 8 | 10 | <div class="col-12 p-2 align-self-center"> |
| ... | ... | @@ -40,7 +42,7 @@ |
| 40 | 42 | (contextmenu)="false" |
| 41 | 43 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" |
| 42 | 44 | onerror="this.src='assets/img/imagen-no-encontrada.jpg'" |
| 43 | - class="card-img-top h-30 h-md-55 rounded-sm"> | |
| 45 | + class="card-img-top w-100 h-auto h-md-55 rounded-sm"> | |
| 44 | 46 | <div class="row mx-0 py-1 h-auto justify-content-center"> |
| 45 | 47 | <p class="col-12 px-1 h6 h-auto text-primary text-center min-h-60"> |
| 46 | 48 | {{articulo.MKT_DESC ? articulo.MKT_DESC.toUpperCase() : articulo.DetArt.toUpperCase()}} |
| ... | ... | @@ -122,7 +124,7 @@ |
| 122 | 124 | draggable="false" |
| 123 | 125 | ondragstart="return false;" |
| 124 | 126 | (contextmenu)="false" |
| 125 | - class="d-block img-fluid p-2 mx-auto rounded" | |
| 127 | + class="d-block img-fluid p-2 mx-auto rounded w-100 h-auto" | |
| 126 | 128 | src="{{urlImagenes}}{{articulo.imagenes[0].imagen}}" |
| 127 | 129 | onerror="this.src='assets/img/imagen-no-encontrada.jpg'"> |
| 128 | 130 | <p class="d-block mt-auto text-center text-primary text-truncate"> |
| ... | ... | @@ -137,7 +139,8 @@ |
| 137 | 139 | </div> |
| 138 | 140 | </div> |
| 139 | 141 | <!-- BOTON SCROLL DERECHA --> |
| 140 | - <div *ngIf="articuloService.carrito.length" class="col-auto btn-effect h-20 align-self-center"> | |
| 142 | + <div *ngIf="articuloService.carrito.length" | |
| 143 | + class="col-auto btn-effect h-20 align-self-center d-contents"> | |
| 141 | 144 | <img |
| 142 | 145 | draggable="false" |
| 143 | 146 | ondragstart="return false;" |
src/app/modules/seleccion-articulos/seleccion-articulos.component.scss
src/app/modules/seleccion-articulos/seleccion-articulos.component.ts
| ... | ... | @@ -133,6 +133,7 @@ export class SeleccionArticulosComponent implements OnInit, AfterViewInit, OnDes |
| 133 | 133 | initialState: { articulosPromo: [articulo] }, |
| 134 | 134 | class: 'modal-promo modal-dialog-centered' |
| 135 | 135 | }); |
| 136 | + this.mediaPantalla(); | |
| 136 | 137 | } |
| 137 | 138 | |
| 138 | 139 | openModalSinonimos(sinonimosData: ISinonimo[], articulo: IArticulo) { |
| ... | ... | @@ -159,6 +160,7 @@ export class SeleccionArticulosComponent implements OnInit, AfterViewInit, OnDes |
| 159 | 160 | } |
| 160 | 161 | this.articuloService.setArticulo(articulo); |
| 161 | 162 | }); |
| 163 | + this.mediaPantalla(); | |
| 162 | 164 | } |
| 163 | 165 | |
| 164 | 166 | deleteArticulo(index: number) { |
| ... | ... | @@ -196,7 +198,8 @@ export class SeleccionArticulosComponent implements OnInit, AfterViewInit, OnDes |
| 196 | 198 | |
| 197 | 199 | mediaPantalla() { |
| 198 | 200 | if ($('body').hasClass('media-pantalla')) { |
| 199 | - $('.cat-content,#content,.cat-btn,#boxCarrito,.cat-box,.img-categoria') | |
| 201 | + $(`.cat-content,#cat-content,#content,.cat-btn,#boxCarrito, | |
| 202 | + .cat-box,.img-categoria, .modal-content`) | |
| 200 | 203 | .addClass('media-pantalla') |
| 201 | 204 | .addBack('media-pantalla'); |
| 202 | 205 | } |
src/app/shared/footer/footer.component.html
| 1 | -<div class="row w-90 mx-auto h-100 justify-content-between bg-white"> | |
| 1 | +<div class="row w-90 mx-auto h-100 w-100 justify-content-between bg-white"> | |
| 2 | 2 | <div class="col-auto align-self-center px-0 bg-white"> |
| 3 | 3 | <div class="btn-effect row mx-0 bg-light" (click)="reducirPantalla()"> |
| 4 | 4 | <div class="col-auto align-self-center text-primary">ADAPTAR PANTALLA</div> |
src/app/shared/footer/footer.component.ts
| ... | ... | @@ -16,8 +16,7 @@ export class FooterComponent implements OnInit { |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | reducirPantalla() { |
| 19 | - $(` | |
| 20 | - body, | |
| 19 | + $(`body, | |
| 21 | 20 | .reduce-card-1, |
| 22 | 21 | .reduce-card-2, |
| 23 | 22 | #content, |
| ... | ... | @@ -31,7 +30,9 @@ export class FooterComponent implements OnInit { |
| 31 | 30 | .carrito-articulo, |
| 32 | 31 | .carrito-content, |
| 33 | 32 | .pago-tarjeta, |
| 34 | - .modal-promo`) | |
| 33 | + .modal-promo, | |
| 34 | + .modal-content, | |
| 35 | + .qr-mt`) | |
| 35 | 36 | .toggleClass('media-pantalla'); |
| 36 | 37 | } |
| 37 | 38 | } |
src/app/shared/header-publicidad/header-publicidad.component.html
| 1 | -<div class="row mx-0 h-20" id="headerPublicidad"> | |
| 1 | +<div class="row mx-0" id="headerPublicidad" #headerPublicidad | |
| 2 | + [ngClass]="headerPublicidad.classList.contains('media-pantalla') | |
| 3 | + ? 'h-31' : 'h-20'" id="boxCarrito"> | |
| 2 | 4 | <div class="col-12 p-3 h-100" id="headerPad"> |
| 3 | 5 | <div class="h-100"> |
| 4 | 6 | <carousel [showIndicators]="false" [interval]="4000"> |
src/app/shared/header-publicidad/header-publicidad.component.scss
src/app/shared/header-publicidad/header-publicidad.component.ts
| ... | ... | @@ -10,6 +10,7 @@ import { ConfirmacionComponent } from '../confirmacion/confirmacion.component'; |
| 10 | 10 | import { SinonimoService } from 'src/app/services/sinonimo/sinonimo.service'; |
| 11 | 11 | import { ISinonimo } from 'src/app/interfaces/ISinonimo'; |
| 12 | 12 | import { SinonimoComponent } from '../sinonimo/sinonimo.component'; |
| 13 | +import * as _ from 'lodash'; | |
| 13 | 14 | |
| 14 | 15 | @Component({ |
| 15 | 16 | selector: 'app-header-publicidad', |
| ... | ... | @@ -84,6 +85,12 @@ export class HeaderPublicidadComponent implements OnInit { |
| 84 | 85 | this.sinonimoService.getSinonimos(articulo.CodSec, articulo.CodArt) |
| 85 | 86 | .subscribe((res: ISinonimo[]) => { |
| 86 | 87 | if (res.length) { |
| 88 | + const sinonimos = []; | |
| 89 | + const gruposArticulos = _.groupBy(res[0].productos, 'ID_SIN'); | |
| 90 | + Object.keys(gruposArticulos).forEach(key => { | |
| 91 | + sinonimos.push({ productos: gruposArticulos[key] }); | |
| 92 | + }); | |
| 93 | + res = sinonimos; | |
| 87 | 94 | this.openModalSinonimos(res, articulo); |
| 88 | 95 | } else { |
| 89 | 96 | articulo.cantidad = 1; |
| ... | ... | @@ -102,15 +109,17 @@ export class HeaderPublicidadComponent implements OnInit { |
| 102 | 109 | modalSinonimo.content.onClose |
| 103 | 110 | .subscribe((res: any) => { |
| 104 | 111 | for (const a of articulo.productos) { |
| 105 | - if (a.idSinonimo === res.ID_SIN) { | |
| 106 | - a.CODA = res.articulo.CodArt; | |
| 107 | - a.CodArt = res.articulo.CodArt; | |
| 108 | - a.SECA = res.articulo.CodSec; | |
| 109 | - a.CodSec = res.articulo.CodSec; | |
| 110 | - a.PreVen = res.articulo.PreVen; | |
| 111 | - a.id = res.articulo.id; | |
| 112 | - a.DET_LAR = res.articulo.DET_LAR; | |
| 113 | - a.DetArt = res.articulo.DetArt; | |
| 112 | + for (const aRes of res.articulos) { | |
| 113 | + if (a.idSinonimo === aRes.ID_SIN) { | |
| 114 | + a.CODA = aRes.CodArt; | |
| 115 | + a.CodArt = aRes.CodArt; | |
| 116 | + a.SECA = aRes.CodSec; | |
| 117 | + aRes.CodSec = aRes.CodSec; | |
| 118 | + a.PreVen = aRes.PreVen; | |
| 119 | + a.id = aRes.id; | |
| 120 | + a.DET_LAR = aRes.DET_LAR; | |
| 121 | + a.DetArt = aRes.DetArt; | |
| 122 | + } | |
| 114 | 123 | } |
| 115 | 124 | } |
| 116 | 125 | this.articuloService.setArticulo(articulo); |
src/app/shared/promocion/promocion.component.html
| 1 | +<!-- <div class="d-flex justify-content-center" | |
| 2 | + *ngIf="loading"> | |
| 3 | + <div class="spinner-border text-primary" role="status"> | |
| 4 | + <span class="sr-only">Loading...</span> | |
| 5 | + </div> | |
| 6 | +</div> --> | |
| 1 | 7 | <div class="modal-header bg-primary rounded-top pt-4 px-2"> |
| 2 | 8 | <div class="row mx-0 w-100 justify-content-between" *ngIf="articulosPromo.length"> |
| 3 | 9 | <div class="col-8"> |
| ... | ... | @@ -55,7 +61,7 @@ |
| 55 | 61 | draggable="false" |
| 56 | 62 | ondragstart="return false;" |
| 57 | 63 | (contextmenu)="false" |
| 58 | - class="d-block icon-30 py-1" | |
| 64 | + class="d-block ml-auto py-1 icon-30 mr-2 pt-2" | |
| 59 | 65 | src="assets/img/ir-color.svg"> |
| 60 | 66 | </div> |
| 61 | 67 | </div> |
src/app/shared/promocion/promocion.component.scss
src/app/shared/sinonimo/sinonimo.component.html
| ... | ... | @@ -4,10 +4,11 @@ |
| 4 | 4 | <div class="col-6 text-right"> |
| 5 | 5 | <p *ngFor="let s of sinonimos; let i = index"> |
| 6 | 6 | <span |
| 7 | - class="pr-2 btn-effect" | |
| 7 | + class="btn-effect" | |
| 8 | 8 | (click)="scrollTo(i)"> |
| 9 | - Ir a opción {{i+1}}</span> | |
| 10 | - <i class="far fa-hand-point-left"></i> | |
| 9 | + Ir a opción {{i+1}} | |
| 10 | + <i class="far fa-hand-point-left"></i> | |
| 11 | + </span> | |
| 11 | 12 | </p> |
| 12 | 13 | </div> |
| 13 | 14 | </div> |
src/app/shared/sinonimo/sinonimo.component.ts
| ... | ... | @@ -75,8 +75,8 @@ export class SinonimoComponent implements OnInit { |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | scrollTo(index: number) { |
| 78 | - const element = document.getElementById(index.toString()); | |
| 79 | - element.scrollIntoView({ behavior: "smooth", block: "center" }); | |
| 78 | + const el = document.getElementById(index.toString()); | |
| 79 | + el.scrollIntoView({ behavior: 'smooth', block: 'center' }); | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | } |
src/styles.scss
| ... | ... | @@ -23,10 +23,11 @@ body { |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | body.media-pantalla { |
| 26 | - height: 50% !important; | |
| 26 | + height: calc(50%) !important; | |
| 27 | 27 | position: absolute; |
| 28 | 28 | bottom: 0; |
| 29 | 29 | width: 100%; |
| 30 | + background-color: #3d3d3d; | |
| 30 | 31 | } |
| 31 | 32 | |
| 32 | 33 | .btn-effect { |
| ... | ... | @@ -84,3 +85,12 @@ p { |
| 84 | 85 | .disabled { |
| 85 | 86 | opacity: 0.5; |
| 86 | 87 | } |
| 88 | + | |
| 89 | +.modal-content.media-pantalla { | |
| 90 | + margin-top: auto !important; | |
| 91 | + margin-bottom: 50px !important; | |
| 92 | +} | |
| 93 | + | |
| 94 | +.modal-content { | |
| 95 | + background: transparent !important; | |
| 96 | +} |