Commit 62d69e27cf8659b567842abebae9581f2a926444
1 parent
67f80d2cf5
Exists in
master
and in
1 other branch
Seteo de la info de las promociones.
Showing
2 changed files
with
21 additions
and
12 deletions
Show diff stats
src/app/components/popover/popover.component.html
1 | <div class="card-body"> | 1 | <div class="card-body"> |
2 | <div class="row"> | 2 | <div class="row"> |
3 | <div class="col"> | 3 | <div class="col text-left"> |
4 | <p class="h5 card-title"> | 4 | <p class="h5 card-title"> |
5 | Este producto forma parte<br> | 5 | Este producto forma parte<br> |
6 | de Combos y Promociones | 6 | de Combos y Promociones |
7 | </p> | 7 | </p> |
8 | </div> | 8 | </div> |
9 | </div> | 9 | </div> |
10 | 10 | ||
11 | <div class="row"> | 11 | <div class="overflow-scroll popover-size pr-2"> |
12 | <div class="col text-dark"> | 12 | <div |
13 | <div class="bg-white rounded-sm p-2 px-3"> | 13 | class="row my-2" |
14 | <div class="row justify-content-between"> | 14 | *ngFor="let promo of popoverContent"> |
15 | <div class="col-auto"> | 15 | <div class="col text-dark"> |
16 | <p class="h4 font-weight-bold mb-0">Promo 2x1</p> | 16 | <div class="bg-white rounded-sm p-2 px-3"> |
17 | <p class="h6 mb-0">{{popoverContent}}</p> | 17 | <div class="row justify-content-between"> |
18 | </div> | 18 | <div class="col-auto text-left"> |
19 | <div class="col-4 text-right my-auto"> | 19 | <p class="h5 font-weight-bold mb-0">{{promo.nombrePromo}}</p> |
20 | <p class="h3 font-weight-bold mb-0">{{28 | currency}}</p> | 20 | <p |
21 | class="h6 mb-0" | ||
22 | *ngFor="let producto of promo.productos"> | ||
23 | {{producto.DetArt}} | ||
24 | </p> | ||
25 | </div> | ||
26 | <div class="col-auto text-right align-self-end"> | ||
27 | <p class="h4 font-weight-bold mb-0">{{28 | currency}}</p> | ||
28 | </div> | ||
21 | </div> | 29 | </div> |
22 | </div> | 30 | </div> |
23 | </div> | 31 | </div> |
24 | </div> | 32 | </div> |
25 | </div> | 33 | </div> |
26 | 34 | ||
27 | <div class="row mt-3 justify-content-end"> | 35 | <div class="row mt-3 justify-content-end"> |
28 | <div class="col-auto"> | 36 | <div class="col-auto"> |
29 | <button | 37 | <button |
30 | type="button" | 38 | type="button" |
31 | class="btn btn-sm btn-light shadow" | 39 | class="btn btn-sm btn-light shadow" |
32 | (click)="hide()"> | 40 | (click)="hide()"> |
33 | <span class="pr-2">No, gracias</span> | 41 | <span class="pr-2">No, gracias</span> |
34 | <i class="fa fa-times text-danger" aria-hidden="true"></i> | 42 | <i class="fa fa-times text-danger" aria-hidden="true"></i> |
35 | </button> | 43 | </button> |
36 | </div> | 44 | </div> |
37 | </div> | 45 | </div> |
38 | 46 | ||
39 | </div> | 47 | </div> |
40 | 48 |
src/app/components/popover/popover.component.ts
1 | import { Component, OnInit, Input } from '@angular/core'; | 1 | import { Component, OnInit, Input } from '@angular/core'; |
2 | import { PopoverDirective } from 'ngx-bootstrap/popover'; | 2 | import { PopoverDirective } from 'ngx-bootstrap/popover'; |
3 | import { Promocion } from 'src/app/wrappers/promocion'; | ||
3 | 4 | ||
4 | @Component({ | 5 | @Component({ |
5 | selector: 'app-popover', | 6 | selector: 'app-popover', |
6 | templateUrl: './popover.component.html', | 7 | templateUrl: './popover.component.html', |
7 | styleUrls: ['./popover.component.scss'] | 8 | styleUrls: ['./popover.component.scss'] |
8 | }) | 9 | }) |
9 | export class PopoverComponent implements OnInit { | 10 | export class PopoverComponent implements OnInit { |
10 | 11 | ||
11 | @Input() popover: PopoverDirective; | 12 | @Input() popover: PopoverDirective; |
12 | @Input() popoverContent: string; | 13 | @Input() popoverContent: Promocion[]; |
13 | 14 | ||
14 | constructor() { } | 15 | constructor() { } |
15 | 16 | ||
16 | ngOnInit() { | 17 | ngOnInit() { |
17 | } | 18 | } |
18 | 19 | ||
19 | hide() { | 20 | hide() { |
20 | this.popover.hide(); | 21 | this.popover.hide(); |
21 | } | 22 | } |
22 | 23 | ||
23 | } | 24 | } |
24 | 25 |