Commit b17d5cb584f9062785bf704aecde78d60e6f3d11
Exists in
develop
Merge branch 'master' into 'develop'
Master(benjamin) See merge request !52
Showing
3 changed files
Show diff stats
src/app/modules/opcion-pedido/opcion-pedido.component.html
1 | 1 | <div class="h-92 bg-white fade-in-left"> |
2 | - <div class="row mx-0 h-15"> | |
2 | + <div class="row mx-0 h-20"> | |
3 | 3 | <div class="col-12 px-0 h-80 my-auto"> |
4 | 4 | <img |
5 | 5 | draggable="false" |
... | ... | @@ -9,64 +9,74 @@ |
9 | 9 | src="assets/img/logo-spot.svg"> |
10 | 10 | </div> |
11 | 11 | </div> |
12 | - <div class="h-85"> | |
12 | + <div class="h-100"> | |
13 | + <div class="h-10"></div> | |
13 | 14 | <div class="row mt-5 mx-3 h-auto"> |
14 | 15 | <div class="col-12 px-0 py-2 align-self-center"> |
15 | - <p class="h6 text-truncate text-center">TU PEDIDO ES PARA</p> | |
16 | + <p class="col-auto h4 text-truncate text-center">TU PEDIDO ES PARA</p> | |
16 | 17 | </div> |
17 | 18 | </div> |
18 | 19 | <div class="row mt-5 h-auto justify-content-center mx-0"> |
19 | - <div class="col-auto px-0 h-auto align-self-start reduce-card-1"> | |
20 | - <div | |
21 | - class="btn-effect col-auto align-self-center px-0 bg-white" | |
22 | - (click)="goTo('/seleccion-articulos'); seleccionPedido('false')"> | |
23 | - <div class="row mx-0 bg-primary badge-pill"> | |
24 | - <div class="col-auto p-0"> | |
25 | - <img | |
26 | - draggable="false" | |
27 | - ondragstart="return false;" | |
28 | - (contextmenu)="false" | |
29 | - class="p-1 icon-50" | |
30 | - src="assets/img/icono-plato.svg"> | |
31 | - </div> | |
32 | - <div class="col-auto align-self-center text-white">comer acá</div> | |
33 | - <div class="col-auto align-self-center p-0"> | |
34 | - <img | |
35 | - draggable="false" | |
36 | - ondragstart="return false;" | |
37 | - (contextmenu)="false" | |
38 | - class="p-1 icon-30" | |
39 | - src="assets/img/ir.svg"> | |
20 | + <div class="col-5 px-0 h-auto align-self-start reduce-card-1"> | |
21 | + <div class="row justify-content-between"> | |
22 | + <div class="col-12"> | |
23 | + <div | |
24 | + class="btn-effect col-12 px-0 bg-white" | |
25 | + (click)="goTo('/seleccion-articulos'); seleccionPedido('false')"> | |
26 | + <div class="row mx-0 bg-primary badge-pill"> | |
27 | + <div class="col-2 p-0"> | |
28 | + <img | |
29 | + draggable="false" | |
30 | + ondragstart="return false;" | |
31 | + (contextmenu)="false" | |
32 | + class="p-1 icon-50" | |
33 | + src="assets/img/icono-plato.svg"> | |
34 | + </div> | |
35 | + <div class="col-8 align-self-center text-center text-white">comer acá</div> | |
36 | + <div class="col-2 align-self-center p-0"> | |
37 | + <img | |
38 | + draggable="false" | |
39 | + ondragstart="return false;" | |
40 | + (contextmenu)="false" | |
41 | + class="p-1 icon-30" | |
42 | + src="assets/img/ir.svg"> | |
43 | + </div> | |
44 | + </div> | |
40 | 45 | </div> |
41 | 46 | </div> |
42 | 47 | </div> |
43 | 48 | </div> |
44 | 49 | </div> |
45 | - <div class="row mt-4 h-auto justify-content-center mx-0"> | |
46 | - <div class="col-auto px-0 h-auto align-self-start reduce-card-2"> | |
47 | - <div | |
48 | - class="btn-effect col-auto align-self-center px-0 bg-white" | |
49 | - (click)="goTo('/seleccion-articulos'); seleccionPedido('true')"> | |
50 | - <div class="row mx-0 bg-primary badge-pill"> | |
51 | - <div class="col-auto p-0"> | |
52 | - <img | |
53 | - draggable="false" | |
54 | - ondragstart="return false;" | |
55 | - (contextmenu)="false" | |
56 | - class="p-1 icon-50" | |
57 | - src="assets/img/icono-take-away.svg"> | |
58 | - </div> | |
59 | - <div class="col-auto align-self-center text-white">para llevar</div> | |
60 | - <div class="col-auto align-self-center p-0"> | |
61 | - <img | |
62 | - draggable="false" | |
63 | - ondragstart="return false;" | |
64 | - (contextmenu)="false" | |
65 | - class="p-1 icon-30" | |
66 | - src="assets/img/ir.svg"> | |
50 | + <div class="row mt-5 h-auto justify-content-center mx-0"> | |
51 | + <div class="col-5 px-0 h-auto align-self-start reduce-card-2"> | |
52 | + <div class="row justify-content-between"> | |
53 | + <div class="col-12"> | |
54 | + <div | |
55 | + class="btn-effect col-12 align-self-center px-0 bg-white" | |
56 | + (click)="goTo('/seleccion-articulos'); seleccionPedido('true')"> | |
57 | + <div class="row mx-0 bg-primary badge-pill"> | |
58 | + <div class="col-2 p-0"> | |
59 | + <img | |
60 | + draggable="false" | |
61 | + ondragstart="return false;" | |
62 | + (contextmenu)="false" | |
63 | + class="p-1 icon-50" | |
64 | + src="assets/img/icono-take-away.svg"> | |
65 | + </div> | |
66 | + <div class="col-8 align-self-center text-center text-white">para llevar</div> | |
67 | + <div class="col-2 align-self-center p-0"> | |
68 | + <img | |
69 | + draggable="false" | |
70 | + ondragstart="return false;" | |
71 | + (contextmenu)="false" | |
72 | + class="p-1 icon-30" | |
73 | + src="assets/img/ir.svg"> | |
74 | + </div> | |
75 | + </div> | |
67 | 76 | </div> |
68 | 77 | </div> |
69 | 78 | </div> |
79 | + | |
70 | 80 | </div> |
71 | 81 | </div> |
72 | 82 | </div> |
src/app/modules/seleccion-articulos/seleccion-articulos.component.html
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | <!-- CATEGORIAS --> |
34 | 34 | <div |
35 | 35 | #templateCategorias |
36 | - class="col-12 px-0 box-categorias border border-primary | |
36 | + class="col-12 px-0 box-categorias border border-primary py-1 | |
37 | 37 | border-left-0 rounded-right scroll-y cat-box" |
38 | 38 | (scroll)="scrollEvent($event)"> |
39 | 39 | <div |
src/app/shared/header-publicidad/header-publicidad.component.ts
... | ... | @@ -7,6 +7,9 @@ import { PromocionComponent } from '../promocion/promocion.component'; |
7 | 7 | import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal'; |
8 | 8 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; |
9 | 9 | import { ConfirmacionComponent } from '../confirmacion/confirmacion.component'; |
10 | +import { SinonimoService } from 'src/app/services/sinonimo/sinonimo.service'; | |
11 | +import { ISinonimo } from 'src/app/interfaces/ISinonimo'; | |
12 | +import { SinonimoComponent } from '../sinonimo/sinonimo.component'; | |
10 | 13 | |
11 | 14 | @Component({ |
12 | 15 | selector: 'app-header-publicidad', |
... | ... | @@ -22,6 +25,7 @@ export class HeaderPublicidadComponent implements OnInit { |
22 | 25 | private publicidadService: PublicidadService, |
23 | 26 | private articuloService: ArticuloService, |
24 | 27 | private modalService: BsModalService, |
28 | + private sinonimoService: SinonimoService | |
25 | 29 | ) { } |
26 | 30 | |
27 | 31 | ngOnInit() { |
... | ... | @@ -77,10 +81,42 @@ export class HeaderPublicidadComponent implements OnInit { |
77 | 81 | class: 'modal-promo modal-dialog-centered' |
78 | 82 | }); |
79 | 83 | this.modalRef.content.onClose.subscribe(() => { |
80 | - this.articuloService.setArticulo(articulo); | |
84 | + this.sinonimoService.getSinonimos(articulo.CodSec, articulo.CodArt) | |
85 | + .subscribe((res: ISinonimo[]) => { | |
86 | + if (res.length) { | |
87 | + this.openModalSinonimos(res, articulo); | |
88 | + } else { | |
89 | + articulo.cantidad = 1; | |
90 | + this.articuloService.setArticulo(articulo); | |
91 | + } | |
92 | + }, err => console.error(err)); | |
81 | 93 | }); |
94 | + this.mediaPantalla(); | |
82 | 95 | } |
83 | 96 | |
97 | + openModalSinonimos(sinonimosData: ISinonimo[], articulo: IArticulo) { | |
98 | + const modalSinonimo = this.modalService.show(SinonimoComponent, { | |
99 | + initialState: { sinonimos: sinonimosData }, | |
100 | + class: 'modal-promo modal-dialog-centered' | |
101 | + }); | |
102 | + modalSinonimo.content.onClose | |
103 | + .subscribe((res: any) => { | |
104 | + 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; | |
114 | + } | |
115 | + } | |
116 | + this.articuloService.setArticulo(articulo); | |
117 | + }); | |
118 | +} | |
119 | + | |
84 | 120 | mediaPantalla() { |
85 | 121 | if ($('body').hasClass('media-pantalla')) { |
86 | 122 | $('#headerPublicidad,#headerPad').addClass('media-pantalla'); |