UI: Add custom translate for notification message
This commit is contained in:
parent
733a2a03e4
commit
5509b93cc8
@ -28,8 +28,8 @@
|
||||
</mat-icon>
|
||||
</ng-template>
|
||||
<div class="content" fxFlex>
|
||||
<div class="title" [innerHTML]="(utils.customTranslation(notification.subject, notification.subject) | safe: 'html' )"></div>
|
||||
<div class="message" [innerHTML]="(notification.text | safe: 'html' )"></div>
|
||||
<div class="title" [innerHTML]="(title | safe: 'html' )"></div>
|
||||
<div class="message" [innerHTML]="(message | safe: 'html' )"></div>
|
||||
<button *ngIf="showButton" mat-stroked-button class="button" color="primary"
|
||||
(click)="navigate($event)">
|
||||
{{ buttonLabel }}
|
||||
|
||||
@ -62,6 +62,9 @@ export class NotificationComponent implements OnInit {
|
||||
|
||||
currentDate = Date.now();
|
||||
|
||||
title = '';
|
||||
message = '';
|
||||
|
||||
constructor(
|
||||
public utils: UtilsService,
|
||||
private router: Router
|
||||
@ -72,6 +75,8 @@ export class NotificationComponent implements OnInit {
|
||||
this.showIcon = this.notification.additionalConfig?.icon?.enabled;
|
||||
this.showButton = this.notification.additionalConfig?.actionButtonConfig?.enabled;
|
||||
this.hideMarkAsReadButton = this.notification.status === NotificationStatus.READ;
|
||||
this.title = this.utils.customTranslation(this.notification.subject, this.notification.subject);
|
||||
this.message = this.utils.customTranslation(this.notification.text, this.notification.text);
|
||||
if (this.showButton) {
|
||||
this.buttonLabel = this.utils.customTranslation(this.notification.additionalConfig.actionButtonConfig.text,
|
||||
this.notification.additionalConfig.actionButtonConfig.text);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user