Commit 2d44360e2e1dd5a98597a55224c3724444fb1b87

Authored by Marcelo Puebla
Exists in develop

Merge branch 'develop' into 'develop'

Develop

See merge request !53
src/app/modules/info-formas-pago/info-formas-pago.component.html
... ... @@ -14,7 +14,7 @@
14 14 <div
15 15 [routerLink]="['/opcion-pedido']"
16 16 class="col-11 col-sm-10 col-md-7 col-lg-4 p-5 m-5 h-auto
17   - btn-effect align-self-end border border-secondary rounded">
  17 + btn-effect align-self-end border border-secondary rounded reduce-card-1">
18 18 <img
19 19 draggable="false"
20 20 ondragstart="return false;"
... ... @@ -41,8 +41,10 @@
41 41 src="assets/img/ir.svg">
42 42 </div>
43 43 </div>
44   - <div class="col-11 col-sm-10 col-md-7 col-lg-4 p-5 m-5 h-auto align-self-center
45   - btn-effect border border-primary rounded reduce-card-2">
  44 + <div
  45 + class="col-11 col-sm-10 col-md-7 col-lg-4 p-5 m-5 h-auto align-self-center
  46 + btn-effect border border-primary rounded reduce-card-2"
  47 + (click)="openGoCaja(templateGoCaja)">
46 48 <img
47 49 draggable="false"
48 50 ondragstart="return false;"
... ... @@ -55,3 +57,11 @@
55 57 </div>
56 58 </div>
57 59 </div>
  60 +
  61 +<ng-template #templateGoCaja>
  62 + <div class="bg-primary rounded shadow text-white">
  63 + <div class="modal-body text-center">
  64 + Por favor, hace tu pedido en la caja.
  65 + </div>
  66 + </div>
  67 +</ng-template>
src/app/modules/info-formas-pago/info-formas-pago.component.scss
... ... @@ -3,22 +3,11 @@
3 3 }
4 4  
5 5 .reduce-card-1.media-pantalla {
6   - position: absolute;
7   - bottom: 0;
8   - -webkit-box-flex: 0;
9   - flex: 0 0 41.6666666667%;
10   - max-width: 41.6666666667%;
11   - left: 5%;
12   - margin-left: 0 !important;
  6 + flex: 0 0 35% !important;
  7 + max-width: 35% !important;
13 8 }
14 9  
15 10 .reduce-card-2.media-pantalla {
16   - position: absolute;
17   - bottom: 0;
18   - -webkit-box-flex: 0;
19   - flex: 0 0 41.6666666667%;
20   - max-width: 41.6666666667%;
21   - right: 5%;
22   - margin-right: 0 !important;
23   - height: 202px !important;
  11 + flex: 0 0 35% !important;
  12 + max-width: 35% !important;
24 13 }
src/app/modules/info-formas-pago/info-formas-pago.component.ts
1   -import { Component, OnInit } from '@angular/core';
  1 +import { Component, OnInit, TemplateRef } from '@angular/core';
  2 +import { BsModalService } from 'ngx-bootstrap/modal';
2 3  
3 4 @Component({
4 5 selector: 'app-formas-pago',
... ... @@ -8,15 +9,14 @@ import { Component, OnInit } from &#39;@angular/core&#39;;
8 9 export class InfoFormasPagoComponent implements OnInit {
9 10 mediaPantalla = false;
10 11  
11   - constructor() { }
  12 + constructor(
  13 + private modalService: BsModalService,
  14 + ) { }
12 15  
13 16 ngOnInit() {
14   - this.reducirPantalla();
15 17 }
16 18  
17   - reducirPantalla() {
18   - if ($('body').hasClass('media-pantalla')) {
19   - $('.reduce-card-1,.reduce-card-2').addClass('media-pantalla');
20   - }
  19 + openGoCaja(templateRef: TemplateRef<any>) {
  20 + this.modalService.show(templateRef, { class: 'modal-promo modal-sm modal-dialog-centered' });
21 21 }
22 22 }
src/scss/styles-bootstrap.scss
... ... @@ -61,4 +61,9 @@ $border-radius-sm: 0.5rem;
61 61 margin-left: 10px !important;
62 62 }
63 63  
  64 +.modal-content.media-pantalla {
  65 + margin-top: auto !important;
  66 + margin-bottom: 50px !important;
  67 +}
  68 +
64 69 @import "node_modules/bootstrap/scss/bootstrap";
... ... @@ -22,6 +22,13 @@ body {
22 22 user-select: none;
23 23 }
24 24  
  25 +body.media-pantalla {
  26 + height: 50% !important;
  27 + position: absolute;
  28 + bottom: 0;
  29 + width: 100%;
  30 +}
  31 +
25 32 .btn-effect {
26 33 transition: all 0.3s !important;
27 34 &:hover {
... ... @@ -77,15 +84,3 @@ p {
77 84 .disabled {
78 85 opacity: 0.5;
79 86 }
80   -
81   -body.media-pantalla {
82   - height: 50% !important;
83   - position: absolute;
84   - bottom: 0;
85   - width: 100%;
86   -}
87   -
88   -.modal-content.media-pantalla {
89   - margin-top: auto !important;
90   - margin-bottom: 50px !important;
91   -}