feat: add KYC document renewal alerts, Aadhaar/PAN exceptions, and AML recurring alerts UI; remove old journal AML marking
This commit is contained in:
@@ -7,7 +7,16 @@
|
||||
-->
|
||||
|
||||
<h1 mat-dialog-title>{{ 'labels.heading.Session Timeout' | translate }}</h1>
|
||||
<mat-dialog-content>{{ 'labels.text.Session timed out after a period of inactivity' | translate }}.</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<button mat-raised-button color="primary" mat-dialog-close>{{ 'labels.buttons.Close' | translate }}</button>
|
||||
<mat-dialog-content>
|
||||
<div style="display: flex; flex-direction: column; gap: 8px; padding-top: 8px">
|
||||
<p>{{ 'labels.text.Session timed out after a period of inactivity' | translate }}.</p>
|
||||
<p>
|
||||
For your security, you will be logged out in
|
||||
<strong style="color: #f44336; font-size: 1.1em">{{ countdown }}</strong> seconds.
|
||||
</p>
|
||||
</div>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end" style="gap: 8px">
|
||||
<button mat-button color="warn" (click)="logoutNow()">Logout</button>
|
||||
<button mat-raised-button color="primary" (click)="keepSessionActive()">Stay Logged In</button>
|
||||
</mat-dialog-actions>
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { Component, inject, OnInit, OnDestroy } from '@angular/core';
|
||||
import {
|
||||
MatDialogRef,
|
||||
MatDialogTitle,
|
||||
MatDialogContent,
|
||||
MatDialogActions,
|
||||
MatDialogClose
|
||||
MatDialogClose,
|
||||
MAT_DIALOG_DATA
|
||||
} from '@angular/material/dialog';
|
||||
import { CdkScrollable } from '@angular/cdk/scrolling';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
@@ -30,6 +31,43 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
MatDialogClose
|
||||
]
|
||||
})
|
||||
export class SessionTimeoutDialogComponent {
|
||||
export class SessionTimeoutDialogComponent implements OnInit, OnDestroy {
|
||||
dialogRef = inject<MatDialogRef<SessionTimeoutDialogComponent>>(MatDialogRef);
|
||||
data = inject<{ countdownSeconds?: number }>(MAT_DIALOG_DATA, { optional: true });
|
||||
|
||||
countdown = this.data?.countdownSeconds ?? 60;
|
||||
private intervalId: any;
|
||||
|
||||
ngOnInit() {
|
||||
this.startCountdown();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.clearTimer();
|
||||
}
|
||||
|
||||
private startCountdown() {
|
||||
this.intervalId = setInterval(() => {
|
||||
this.countdown--;
|
||||
if (this.countdown <= 0) {
|
||||
this.clearTimer();
|
||||
this.dialogRef.close('logout');
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
private clearTimer() {
|
||||
if (this.intervalId) {
|
||||
clearInterval(this.intervalId);
|
||||
this.intervalId = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
keepSessionActive() {
|
||||
this.dialogRef.close('keep-alive');
|
||||
}
|
||||
|
||||
logoutNow() {
|
||||
this.dialogRef.close('logout');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user