feat: add KYC document renewal alerts, Aadhaar/PAN exceptions, and AML recurring alerts UI; remove old journal AML marking
This commit is contained in:
@@ -33,6 +33,7 @@ import { SettingsService } from './settings/settings.service';
|
||||
import { DocumentationLinksService } from 'app/shared/services/documentation-links.service';
|
||||
import { IdleTimeoutService } from './home/timeout-dialog/idle-timeout.service';
|
||||
import { SessionTimeoutDialogComponent } from './home/timeout-dialog/session-timeout-dialog.component';
|
||||
import { ErrorDialogComponent } from './shared/error-dialog/error-dialog.component';
|
||||
|
||||
/** Custom Items */
|
||||
import { Alert } from './core/alert/alert.model';
|
||||
@@ -229,6 +230,16 @@ export class WebAppComponent implements OnInit, OnDestroy {
|
||||
|
||||
// Setup alerts
|
||||
this.alertService.alertEvent.subscribe((alertEvent: Alert) => {
|
||||
if (alertEvent.severity === 'error') {
|
||||
// Errors go to a centred modal instead of the corner snack bar: they need to be read and
|
||||
// acknowledged, and a toast that self-dismisses after 2s was being missed entirely.
|
||||
this.dialog.open(ErrorDialogComponent, {
|
||||
data: { title: alertEvent.type, message: alertEvent.message },
|
||||
autoFocus: true,
|
||||
restoreFocus: true
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.snackBar.open(`${alertEvent.message}`, 'Close', {
|
||||
duration: 2000,
|
||||
horizontalPosition: 'right',
|
||||
@@ -264,14 +275,23 @@ export class WebAppComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
|
||||
this.idle.$onSessionTimeout.subscribe(() => {
|
||||
this.alertService.alert({
|
||||
type: 'Session timeout',
|
||||
message: this.translateService.instant('labels.text.Session timed out')
|
||||
const warningCountdown = (environment.session.timeout as any).warningCountdown || 60;
|
||||
const dialogRef = this.dialog.open(SessionTimeoutDialogComponent, {
|
||||
disableClose: true,
|
||||
data: { countdownSeconds: warningCountdown }
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe((result) => {
|
||||
if (result === 'keep-alive') {
|
||||
this.idle.start();
|
||||
} else {
|
||||
this.alertService.alert({
|
||||
type: 'Session timeout',
|
||||
message: this.translateService.instant('labels.text.Session timed out')
|
||||
});
|
||||
this.logout();
|
||||
}
|
||||
});
|
||||
this.dialog.open(SessionTimeoutDialogComponent);
|
||||
setTimeout(() => {
|
||||
this.logout();
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user