feat: add KYC document renewal alerts, Aadhaar/PAN exceptions, and AML recurring alerts UI; remove old journal AML marking
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<div class="ed-icon">
|
||||
<fa-icon icon="exclamation-circle"></fa-icon>
|
||||
</div>
|
||||
<h2 class="ed-title">We encountered an issue. Please try again.</h2>
|
||||
<h2 class="ed-title">{{ title }}</h2>
|
||||
@if (!showAsCode) {
|
||||
<p class="ed-message">{{ displayData }}</p>
|
||||
}
|
||||
|
||||
@@ -45,10 +45,17 @@ export class ErrorDialogComponent {
|
||||
* @param {DomSanitizer} sanitizer Service to sanitize HTML content.
|
||||
*/
|
||||
constructor() {
|
||||
const data = this.data;
|
||||
|
||||
// Guard for non-string data to avoid runtime error
|
||||
this.showAsCode = typeof data === 'string' && data.startsWith('<pre><code>');
|
||||
this.showAsCode = this.displayData.startsWith('<pre><code>');
|
||||
}
|
||||
|
||||
/**
|
||||
* Heading for the dialog. Callers passing a plain string (the long-standing contract) keep the
|
||||
* generic wording; callers with a specific failure to name can pass { title, message }.
|
||||
*/
|
||||
get title(): string {
|
||||
const title = typeof this.data === 'object' && this.data !== null ? this.data.title : null;
|
||||
return title || 'We encountered an issue. Please try again.';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,6 +66,9 @@ export class ErrorDialogComponent {
|
||||
if (typeof this.data === 'string') {
|
||||
return this.data;
|
||||
}
|
||||
if (typeof this.data === 'object' && this.data !== null && 'message' in this.data) {
|
||||
return this.data.message ?? '';
|
||||
}
|
||||
// Convert non-string data to string representation for display
|
||||
return this.data != null ? JSON.stringify(this.data) : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user