Commit 3155fcd2d72e2fdd62dd4b409235d6fe92c2190e
1 parent
c5c1df3b3c
Exists in
develop
borders rounded a modal promo
Showing
3 changed files
with
9 additions
and
9 deletions
Show diff stats
src/app/modules/admin/admin.component.ts
1 | import { Component, OnInit, HostListener } from '@angular/core'; | 1 | import { Component, OnInit, HostListener } from '@angular/core'; |
2 | import { Router } from '@angular/router'; | 2 | import { Router } from '@angular/router'; |
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'app-admin', | 5 | selector: 'app-admin', |
6 | templateUrl: './admin.component.html', | 6 | templateUrl: './admin.component.html', |
7 | styleUrls: ['./admin.component.scss'] | 7 | styleUrls: ['./admin.component.scss'] |
8 | }) | 8 | }) |
9 | 9 | ||
10 | export class AdminComponent implements OnInit { | 10 | export class AdminComponent implements OnInit { |
11 | timerReposo: any; | 11 | timerReposo: any; |
12 | 12 | ||
13 | constructor( | 13 | constructor( |
14 | private router: Router, | 14 | private router: Router, |
15 | ) { } | 15 | ) { } |
16 | 16 | ||
17 | ngOnInit() { | 17 | ngOnInit() { |
18 | this.startTimeOutInactividad(); | 18 | // this.startTimeOutInactividad(); |
19 | } | 19 | } |
20 | 20 | ||
21 | @HostListener('document:click', ['$event']) | 21 | @HostListener('document:click', ['$event']) |
22 | 22 | ||
23 | documentClick(event: MouseEvent) { | 23 | // documentClick(event: MouseEvent) { |
24 | if (event) { | 24 | // if (event) { |
25 | this.restartTimer(); | 25 | // this.restartTimer(); |
26 | } | 26 | // } |
27 | } | 27 | // } |
28 | 28 | ||
29 | restartTimer() { | 29 | restartTimer() { |
30 | clearTimeout(this.timerReposo); | 30 | clearTimeout(this.timerReposo); |
31 | this.startTimeOutInactividad(); | 31 | this.startTimeOutInactividad(); |
32 | } | 32 | } |
33 | 33 | ||
34 | startTimeOutInactividad() { | 34 | startTimeOutInactividad() { |
35 | this.timerReposo = setTimeout(() => { | 35 | this.timerReposo = setTimeout(() => { |
36 | this.router.navigate(['cancelar-compra']); | 36 | this.router.navigate(['cancelar-compra']); |
37 | }, 90000); | 37 | }, 90000); |
38 | } | 38 | } |
39 | 39 | ||
40 | } | 40 | } |
41 | 41 |
src/app/shared/promocion/promocion.component.html
1 | <div class="modal-header bg-primary"> | 1 | <div class="modal-header bg-primary rounded-top"> |
2 | <div class="col-12"> | 2 | <div class="col-12"> |
3 | <div class="row justify-content-between" *ngIf="articulosPromo.length"> | 3 | <div class="row justify-content-between" *ngIf="articulosPromo.length"> |
4 | <div> | 4 | <div> |
5 | <h3 class="ml-2 text-white mt-2">{{articulosPromo[0].DetArt}}</h3> | 5 | <h3 class="ml-2 text-white mt-2">{{articulosPromo[0].DetArt}}</h3> |
6 | </div> | 6 | </div> |
7 | <div> | 7 | <div> |
8 | <div | 8 | <div |
9 | class="row mr-3 justify-content-between bg-white badge-pill" | 9 | class="row mr-3 justify-content-between bg-white badge-pill" |
10 | (click)="elegirPromo(articulosPromo[0])"> | 10 | (click)="elegirPromo(articulosPromo[0])"> |
11 | <div class="col px-0 align-self-center text-primary"> | 11 | <div class="col px-0 align-self-center text-primary"> |
12 | <p class="font-weight-bold">{{articulosPromo[0].PreVen | currency}}</p> | 12 | <p class="font-weight-bold">{{articulosPromo[0].PreVen | currency}}</p> |
13 | </div> | 13 | </div> |
14 | <div class="col-3 px-0"> | 14 | <div class="col-3 px-0"> |
15 | <img | 15 | <img |
16 | draggable="false" | 16 | draggable="false" |
17 | ondragstart="return false;" | 17 | ondragstart="return false;" |
18 | (contextmenu)="false" | 18 | (contextmenu)="false" |
19 | class="d-block ml-auto py-1 icon-30 mr-2 pt-2" | 19 | class="d-block ml-auto py-1 icon-30 mr-2 pt-2" |
20 | src="assets/img/ir-color.svg"> | 20 | src="assets/img/ir-color.svg"> |
21 | </div> | 21 | </div> |
22 | </div> | 22 | </div> |
23 | </div> | 23 | </div> |
24 | </div> | 24 | </div> |
25 | </div> | 25 | </div> |
26 | </div> | 26 | </div> |
27 | <div class="modal-body bg-primary" *ngIf="articulosPromo.length"> | 27 | <div class="modal-body bg-primary rounded-bottom" *ngIf="articulosPromo.length"> |
28 | <div class="row"> | 28 | <div class="row"> |
29 | <div class="col-9"> | 29 | <div class="col-9"> |
30 | <p class="text-white"><small>¿TE GUSTARÍA LLEVAR ESTE ARTÍCULO</small></p> | 30 | <p class="text-white"><small>¿TE GUSTARÍA LLEVAR ESTE ARTÍCULO</small></p> |
31 | <h1 class="text-white mb-4">en un combo?</h1> | 31 | <h1 class="text-white mb-4">en un combo?</h1> |
32 | <div *ngFor="let promo of promociones"> | 32 | <div *ngFor="let promo of promociones"> |
33 | <div class="mx-0 mb-2 bg-white badge-pill text-primary" (click)="elegirPromo(promo)"> | 33 | <div class="mx-0 mb-2 bg-white badge-pill text-primary" (click)="elegirPromo(promo)"> |
34 | <div class="row mx-0 justify-content-between"> | 34 | <div class="row mx-0 justify-content-between"> |
35 | <p class="ml-4 text-truncate">{{promo.DetArt}}</p> | 35 | <p class="ml-4 text-truncate">{{promo.DetArt}}</p> |
36 | <p class="mr-4 font-weight-bold">{{promo.PreVen | currency}}</p> | 36 | <p class="mr-4 font-weight-bold">{{promo.PreVen | currency}}</p> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | </div> | 40 | </div> |
41 | <div class="col-3 rounded-circle"> | 41 | <div class="col-3 rounded-circle"> |
42 | <img | 42 | <img |
43 | draggable="false" | 43 | draggable="false" |
44 | ondragstart="return false;" | 44 | ondragstart="return false;" |
45 | (contextmenu)="false" | 45 | (contextmenu)="false" |
46 | src="{{urlImagenes}}{{articulosPromo[0].imagenes[0].imagen}}" | 46 | src="{{urlImagenes}}{{articulosPromo[0].imagenes[0].imagen}}" |
47 | onerror="this.src='assets/img/image-not-found.jpg'" | 47 | onerror="this.src='assets/img/image-not-found.jpg'" |
48 | class="card-img-top img-fluid rounded-circle"> | 48 | class="card-img-top img-fluid rounded-circle"> |
49 | </div> | 49 | </div> |
50 | </div> | 50 | </div> |
51 | </div> | 51 | </div> |
52 | 52 |
src/scss/styles-bootstrap.scss
1 | @import "node_modules/bootstrap/scss/functions"; | 1 | @import "node_modules/bootstrap/scss/functions"; |
2 | @import "node_modules/bootstrap/scss/variables"; | 2 | @import "node_modules/bootstrap/scss/variables"; |
3 | @import "node_modules/bootstrap/scss/mixins"; | 3 | @import "node_modules/bootstrap/scss/mixins"; |
4 | 4 | ||
5 | $primary: #aa006b; | 5 | $primary: #aa006b; |
6 | $secondary: #00acd8; | 6 | $secondary: #00acd8; |
7 | $info: #f4b223; | 7 | $info: #f4b223; |
8 | $light: #e6e7e9; | 8 | $light: #e6e7e9; |
9 | $dark: #61666c; | 9 | $dark: #61666c; |
10 | $theme-colors: ( | 10 | $theme-colors: ( |
11 | primary: $primary, | 11 | primary: $primary, |
12 | secondary: $secondary, | 12 | secondary: $secondary, |
13 | info: $info, | 13 | info: $info, |
14 | light: $light, | 14 | light: $light, |
15 | dark: $dark | 15 | dark: $dark |
16 | ); | 16 | ); |
17 | $border-radius: 1.5rem; | 17 | $border-radius: 1.5rem; |
18 | $border-radius-lg: 2.5rem; | 18 | $border-radius-lg: 2.5rem; |
19 | $border-radius-sm: 0.5rem; | 19 | $border-radius-sm: 0.5rem; |
20 | 20 | ||
21 | .custom-modal { | 21 | .custom-modal { |
22 | max-width: 90% !important; | 22 | max-width: 90% !important; |
23 | & > .modal-content { | 23 | & > .modal-content { |
24 | background-color: $primary !important; | 24 | background-color: $primary !important; |
25 | color: white; | 25 | color: white; |
26 | border: none !important; | 26 | border: none !important; |
27 | border-radius: $border-radius !important; | 27 | border-radius: $border-radius !important; |
28 | box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; | 28 | box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; |
29 | } | 29 | } |
30 | } | 30 | } |
31 | 31 | ||
32 | .carousel-control { | 32 | .carousel-control { |
33 | visibility: hidden !important; | 33 | visibility: hidden !important; |
34 | } | 34 | } |
35 | 35 | ||
36 | .carousel, | 36 | .carousel, |
37 | .carousel-inner, | 37 | .carousel-inner, |
38 | .carousel-item, | 38 | .carousel-item, |
39 | .item { | 39 | .item { |
40 | height: 100% !important; | 40 | height: 100% !important; |
41 | } | 41 | } |
42 | 42 | ||
43 | .modal-promo > div { | 43 | .modal-promo > div { |
44 | background-color: $primary !important; | 44 | // background-color: $primary !important; |
45 | border: none !important; | 45 | border: none !important; |
46 | border-radius: 10rem; | 46 | border-radius: 10rem; |
47 | margin-left: 10px !important; | 47 | margin-left: 10px !important; |
48 | } | 48 | } |
49 | 49 | ||
50 | @import "node_modules/bootstrap/scss/bootstrap"; | 50 | @import "node_modules/bootstrap/scss/bootstrap"; |
51 | 51 |