confirmacion.component.ts
1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { Component, OnInit, HostListener } from '@angular/core';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { InactiveScreenService } from 'src/app/services/inactive-screen/inactive-screen.service';
import { Subject } from 'rxjs';
import { APP_SETTINGS } from 'src/etc/AppSettings';
@Component({
selector: 'app-confirmacion',
templateUrl: './confirmacion.component.html',
styleUrls: ['./confirmacion.component.scss']
})
export class ConfirmacionComponent implements OnInit {
titleMessage: string;
imagenPath: any;
footerMessageFirst: string;
footerMessageSecond: string;
footerConfirmation: number;
footerClose: string;
onClose: Subject<any>;
urlImagenes = `${APP_SETTINGS.apiImagenes}/imagenes/`;
constructor(
public modalRef: BsModalRef,
private inactiveScreen: InactiveScreenService,
) {
this.onClose = new Subject();
}
ngOnInit() {
}
confirmar() {
this.onClose.next();
this.modalRef.hide();
}
close() {
this.modalRef.hide();
}
@HostListener('document:click', ['$event'])
eventListener(event: Event) {
clearTimeout(this.inactiveScreen.timerReposo);
this.inactiveScreen.startTimeOutInactividad();
}
}