Commit 0111a6921cfc3b3541fc391371c08abbca7ac82c

Authored by Marcelo Puebla
Exists in develop

Merge branch 'develop' into 'develop'

Develop

En respuesta a las tareas "Pantalla Silla de ruedas", "pantalla adaptada (silla de ruedas)" y "optimizar espacios en pantalla completa..."

See merge request !71
Showing 25 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 &#39;ngx-bootstrap/modal&#39;;
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
1 1 .mt-7 {
2 2 margin-top: 6rem;
3 3 }
  4 +
  5 +.qr-mt.media-pantalla {
  6 + margin-top: 2rem !important;;
  7 +}
src/app/modules/pago-electronico/pago-electronico.component.ts
... ... @@ -9,7 +9,7 @@ import { APP_SETTINGS } from &#39;src/etc/AppSettings&#39;;
9 9 styleUrls: ['./pago-electronico.component.scss']
10 10 })
11 11 export class PagoElectronicoComponent implements OnInit {
12   - urlQr = `${APP_SETTINGS.apiDeboSuite}/qr/${APP_SETTINGS.deploy}/${APP_SETTINGS.codigoP}/tienda/${APP_SETTINGS.terminal}`;
  12 + urlQr = `${APP_SETTINGS.apiDeboSuite}/qr/${APP_SETTINGS.numeroPlanilla}/${APP_SETTINGS.codigoP}/tienda/${APP_SETTINGS.terminal}`;
13 13  
14 14 constructor(
15 15 private articuloService: ArticuloService,
... ... @@ -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
1 1 #content.media-pantalla,
  2 +#cat-content.media-pantalla,
2 3 #boxCarrito.media-pantalla {
3 4 max-height: 60% !important;
4 5 }
  6 +
  7 +.modal-content.media-pantalla {
  8 + margin-top: auto !important;
  9 +}
  10 +
  11 +.d-contents {
  12 + display: contents !important;
  13 +}
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
1 1 #headerPublicidad.media-pantalla {
2   - max-height: 18% !important;
  2 + max-height: 280px !important;
3 3 padding-bottom: 0 !important;
4 4 }
5 5  
6 6 #headerPad.media-pantalla {
7   - padding: 0.3rem !important;
  7 + padding: 0 1rem !important;
8 8 }
src/app/shared/promocion/promocion.component.html
1   -<div class="modal-header bg-primary rounded-top pt-4 px-2">
2   - <div class="row mx-0 w-100 justify-content-between" *ngIf="articulosPromo.length">
3   - <div class="col-8">
4   - <p class="h3 text-white">{{articulosPromo[0].DetArt}}</p>
5   - </div>
6   - <div class="col-4 align-self-center">
7   - <div
8   - class="row mx-0 justify-content-between bg-white badge-pill"
9   - (click)="selectPromo(articulosPromo[0])">
10   - <div class="col px-0 align-self-center text-primary">
11   - <p class="font-weight-bold">{{articulosPromo[0].PreVen | currency}}</p>
12   - </div>
13   - <div class="col-3 px-0">
14   - <img
15   - draggable="false"
16   - ondragstart="return false;"
17   - (contextmenu)="false"
18   - class="d-block ml-auto py-1 icon-30 mr-2 pt-2"
19   - src="assets/img/ir-color.svg">
20   - </div>
21   - </div>
22   - </div>
  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>
23 5 </div>
24 6 </div>
25 7 <div class="modal-body bg-primary rounded-bottom pb-3 px-2" *ngIf="articulosPromo.length">
... ... @@ -55,11 +37,10 @@
55 37 draggable="false"
56 38 ondragstart="return false;"
57 39 (contextmenu)="false"
58   - class="d-block icon-30 py-1"
  40 + class="d-block ml-auto py-1 icon-30 mr-2 pt-2"
59 41 src="assets/img/ir-color.svg">
60 42 </div>
61 43 </div>
62 44 </div>
63 45 </div>
64 46 </div>
65   -</div>
src/app/shared/promocion/promocion.component.scss
... ... @@ -2,3 +2,8 @@
2 2 min-height: auto;
3 3 max-height: 25vh;
4 4 }
  5 +
  6 +.spinner-border {
  7 + width: 5rem;
  8 + height: 5rem;
  9 +}
src/app/shared/sinonimo/sinonimo.component.ts
... ... @@ -76,7 +76,7 @@ export class SinonimoComponent implements OnInit {
76 76  
77 77 scrollTo(index: number) {
78 78 const element = document.getElementById(index.toString());
79   - element.scrollIntoView({ behavior: "smooth", block: "center" });
  79 + element.scrollIntoView({ behavior: 'smooth', block: 'center' });
80 80 }
81 81  
82 82 }
... ... @@ -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 +}