Browse Source

UI: Fix after change slack

pull/8265/head
Vladyslav_Prykhodko 3 years ago
parent
commit
4e8e33ca1c
  1. 2
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.html
  2. 13
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.ts
  3. 2
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts
  4. 4
      ui-ngx/src/assets/locale/locale.constant-en_US.json

2
ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.html

@ -26,7 +26,7 @@
</mat-toolbar>
<div mat-dialog-content>
<div *ngFor="let errorStat of errorStats | keyvalue; last as isLast">
<h6>{{ notificationDeliveryMethodErrorTranslateMap.get(errorStat.key) | translate }}</h6>
<h6>{{ notificationDeliveryMethodTranslateMap.get(errorStat.key) | translate }}</h6>
<table class="tb-table-list">
<tr *ngFor="let error of errorStat.value | keyvalue">
<td>

13
ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.ts

@ -20,7 +20,11 @@ import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { Router } from '@angular/router';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { NotificationDeliveryMethod, NotificationRequest } from '@shared/models/notification.models';
import {
NotificationDeliveryMethod,
NotificationDeliveryMethodTranslateMap,
NotificationRequest
} from '@shared/models/notification.models';
export interface NotificationRequestErrorDialogData {
notificationRequest: NotificationRequest;
@ -35,12 +39,7 @@ export class SentErrorDialogComponent extends DialogComponent<SentErrorDialogCom
errorStats: { [key in NotificationDeliveryMethod]: {[errorKey in string]: string}};
notificationDeliveryMethodErrorTranslateMap = new Map<NotificationDeliveryMethod, string>([
[NotificationDeliveryMethod.WEB, 'notification.delivery-method.web-failed-sent'],
[NotificationDeliveryMethod.SMS, 'notification.delivery-method.sms-failed-sent'],
[NotificationDeliveryMethod.EMAIL, 'notification.delivery-method.email-failed-sent'],
[NotificationDeliveryMethod.SLACK, 'notification.delivery-method.slack-failed-sent'],
]);
notificationDeliveryMethodTranslateMap = NotificationDeliveryMethodTranslateMap;
constructor(protected store: Store<AppState>,
protected router: Router,

2
ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts

@ -172,7 +172,7 @@ export class SentTableConfigResolver implements Resolve<EntityTableConfig<Notifi
}
return `<div style="border-radius: 12px; height: 24px; line-height: 24px; padding: 0 10px; width: max-content; cursor: pointer;
background-color: #D12730; color: #fff; font-weight: 500; margin-left: 8px" class="stats">
${this.translate.instant('notification.fails', {count: countError})}
${this.translate.instant('notification.fails', {count: countError})} >
</div>`;
}

4
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -2785,16 +2785,12 @@
"delivery-method": {
"delivery-method": "Delivery method",
"email": "Email",
"email-failed-sent": "Email",
"email-preview": "Email notification preview",
"slack": "Slack",
"slack-failed-sent": "Slack",
"slack-preview": "Slack notification preview",
"sms": "SMS",
"sms-failed-sent": "SMS",
"sms-preview": "SMS notification preview",
"web": "Web",
"web-failed-sent": "Web",
"web-preview": "Web notification preview"
},
"delivery-methods": "Delivery methods",

Loading…
Cancel
Save