Commit 64b46fe492515ba89741aed3e78d545dabfe54d5
1 parent
c46216a6bb
Exists in
develop
agrego padding al modal promo
Showing
2 changed files
with
3 additions
and
3 deletions
 
Show diff stats
src/app/modules/admin/admin.component.ts
| 1 | import { Component, OnInit, HostListener, OnDestroy } from '@angular/core'; | 1 | import { Component, OnInit, HostListener, OnDestroy } 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, OnDestroy { | 10 | export class AdminComponent implements OnInit, OnDestroy { | 
| 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 | ngOnDestroy() { | 21 | ngOnDestroy() { | 
| 22 | clearTimeout(this.timerReposo); | 22 | clearTimeout(this.timerReposo); | 
| 23 | } | 23 | } | 
| 24 | 24 | ||
| 25 | @HostListener('document:click', ['$event']) | 25 | @HostListener('document:click', ['$event']) | 
| 26 | documentClick(event: MouseEvent) { | 26 | documentClick(event: MouseEvent) { | 
| 27 | clearTimeout(this.timerReposo); | 27 | clearTimeout(this.timerReposo); | 
| 28 | this.startTimeOutInactividad(); | 28 | this.startTimeOutInactividad(); | 
| 29 | } | 29 | } | 
| 30 | 30 | ||
| 31 | startTimeOutInactividad() { | 31 | startTimeOutInactividad() { | 
| 32 | this.timerReposo = setTimeout(() => { | 32 | this.timerReposo = setTimeout(() => { | 
| 33 | this.router.navigate(['cancelar-compra']); | 33 | this.router.navigate(['cancelar-compra']); | 
| 34 | }, 5000); | 34 | }, 90000); | 
| 35 | } | 35 | } | 
| 36 | 36 | ||
| 37 | } | 37 | } | 
| 38 | 38 | 
src/app/shared/promocion/promocion.component.html
| 1 | <div class="modal-header px-0 bg-primary rounded-top"> | 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"> | 2 | <div class="row mx-0 w-100 justify-content-between" *ngIf="articulosPromo.length"> | 
| 3 | <div class="col-8"> | 3 | <div class="col-8"> | 
| 4 | <p class="h3 text-white">{{articulosPromo[0].DetArt}}</p> | 4 | <p class="h3 text-white">{{articulosPromo[0].DetArt}}</p> | 
| 5 | </div> | 5 | </div> | 
| 6 | <div class="col-4 align-self-center"> | 6 | <div class="col-4 align-self-center"> | 
| 7 | <div | 7 | <div | 
| 8 | class="row mx-0 justify-content-between bg-white badge-pill" | 8 | class="row mx-0 justify-content-between bg-white badge-pill" | 
| 9 | (click)="elegirPromo(articulosPromo[0])"> | 9 | (click)="elegirPromo(articulosPromo[0])"> | 
| 10 | <div class="col px-0 align-self-center text-primary"> | 10 | <div class="col px-0 align-self-center text-primary"> | 
| 11 | <p class="font-weight-bold">{{articulosPromo[0].PreVen | currency}}</p> | 11 | <p class="font-weight-bold">{{articulosPromo[0].PreVen | currency}}</p> | 
| 12 | </div> | 12 | </div> | 
| 13 | <div class="col-3 px-0"> | 13 | <div class="col-3 px-0"> | 
| 14 | <img | 14 | <img | 
| 15 | draggable="false" | 15 | draggable="false" | 
| 16 | ondragstart="return false;" | 16 | ondragstart="return false;" | 
| 17 | (contextmenu)="false" | 17 | (contextmenu)="false" | 
| 18 | class="d-block ml-auto py-1 icon-30 mr-2 pt-2" | 18 | class="d-block ml-auto py-1 icon-30 mr-2 pt-2" | 
| 19 | src="assets/img/ir-color.svg"> | 19 | src="assets/img/ir-color.svg"> | 
| 20 | </div> | 20 | </div> | 
| 21 | </div> | 21 | </div> | 
| 22 | </div> | 22 | </div> | 
| 23 | </div> | 23 | </div> | 
| 24 | </div> | 24 | </div> | 
| 25 | <div class="modal-body px-0 bg-primary rounded-bottom" *ngIf="articulosPromo.length"> | 25 | <div class="modal-body bg-primary rounded-bottom pb-3 px-2" *ngIf="articulosPromo.length"> | 
| 26 | <div class="row mx-0 w-100"> | 26 | <div class="row mx-0 w-100"> | 
| 27 | <div class="col-9"> | 27 | <div class="col-9"> | 
| 28 | <p class="text-white"><small>¿TE GUSTARÍA LLEVAR ESTE ARTÍCULO</small></p> | 28 | <p class="text-white"><small>¿TE GUSTARÍA LLEVAR ESTE ARTÍCULO</small></p> | 
| 29 | <h1 class="text-white mb-4">en un combo?</h1> | 29 | <h1 class="text-white mb-4">en un combo?</h1> | 
| 30 | </div> | 30 | </div> | 
| 31 | <div class="col-3 rounded-circle"> | 31 | <div class="col-3 rounded-circle"> | 
| 32 | <img | 32 | <img | 
| 33 | draggable="false" | 33 | draggable="false" | 
| 34 | ondragstart="return false;" | 34 | ondragstart="return false;" | 
| 35 | (contextmenu)="false" | 35 | (contextmenu)="false" | 
| 36 | src="{{urlImagenes}}{{articulosPromo[0].imagenes[0].imagen}}" | 36 | src="{{urlImagenes}}{{articulosPromo[0].imagenes[0].imagen}}" | 
| 37 | onerror="this.src='assets/img/image-not-found.jpg'" | 37 | onerror="this.src='assets/img/image-not-found.jpg'" | 
| 38 | class="card-img-top img-fluid rounded-circle"> | 38 | class="card-img-top img-fluid rounded-circle"> | 
| 39 | </div> | 39 | </div> | 
| 40 | </div> | 40 | </div> | 
| 41 | <div class="row mx-0 lista-promociones scroll-y-visible"> | 41 | <div class="row mx-0 lista-promociones scroll-y-visible"> | 
| 42 | <div class="col-12"> | 42 | <div class="col-12"> | 
| 43 | <div *ngFor="let promo of promociones"> | 43 | <div *ngFor="let promo of promociones"> | 
| 44 | <div class="mx-0 mb-2 bg-white badge-pill text-primary" (click)="elegirPromo(promo)"> | 44 | <div class="mx-0 mb-2 bg-white badge-pill text-primary" (click)="elegirPromo(promo)"> | 
| 45 | <div class="d-flex"> | 45 | <div class="d-flex"> | 
| 46 | <p class="text-truncate mr-auto my-auto"><small>{{promo.DetArt}}</small></p> | 46 | <p class="text-truncate mr-auto my-auto"><small>{{promo.DetArt}}</small></p> | 
| 47 | <p class="font-weight-bold my-auto pr-2"> | 47 | <p class="font-weight-bold my-auto pr-2"> | 
| 48 | <span>{{promo.PreVen | currency}}</span> | 48 | <span>{{promo.PreVen | currency}}</span> | 
| 49 | </p> | 49 | </p> | 
| 50 | <img | 50 | <img | 
| 51 | draggable="false" | 51 | draggable="false" | 
| 52 | ondragstart="return false;" | 52 | ondragstart="return false;" | 
| 53 | (contextmenu)="false" | 53 | (contextmenu)="false" | 
| 54 | class="d-block icon-30 py-1" | 54 | class="d-block icon-30 py-1" | 
| 55 | src="assets/img/ir-color.svg"> | 55 | src="assets/img/ir-color.svg"> | 
| 56 | </div> | 56 | </div> | 
| 57 | </div> | 57 | </div> | 
| 58 | </div> | 58 | </div> | 
| 59 | </div> | 59 | </div> | 
| 60 | </div> | 60 | </div> | 
| 61 | </div> | 61 | </div> | 
| 62 | 62 |