Browse Source

UI: Fixed after merge develop/3.5

pull/7911/head
Vladyslav_Prykhodko 3 years ago
parent
commit
d4547ade3d
  1. 100
      ui-ngx/src/app/core/services/menu.service.ts
  2. 2
      ui-ngx/src/app/modules/home/components/notification/show-notification-popover.component.ts
  3. 1
      ui-ngx/src/app/modules/home/pages/home-pages.module.ts
  4. 41
      ui-ngx/src/app/modules/home/pages/notification-center/notification-center-routing.module.ts
  5. 69
      ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.html
  6. 101
      ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.scss
  7. 74
      ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.ts
  8. 83
      ui-ngx/src/app/modules/home/pages/notification-center/notification-center.module.ts
  9. 18
      ui-ngx/src/app/modules/home/pages/notification-center/notification-table/notification-table.component.html
  10. 98
      ui-ngx/src/app/modules/home/pages/notification-center/notification-table/notification-table.component.ts
  11. 0
      ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-notification-dialog.component.html
  12. 0
      ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-notification-dialog.component.scss
  13. 0
      ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-notification-dialog.component.ts
  14. 66
      ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts
  15. 0
      ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.html
  16. 0
      ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.scss
  17. 0
      ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.ts
  18. 89
      ui-ngx/src/app/modules/home/pages/notification/notification-routing.module.ts
  19. 37
      ui-ngx/src/app/modules/home/pages/notification/notification.module.ts
  20. 0
      ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.component.html
  21. 0
      ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.scss
  22. 14
      ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.ts
  23. 59
      ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts
  24. 0
      ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-header.component.html
  25. 2
      ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-header.component.scss
  26. 8
      ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-header.component.ts
  27. 0
      ui-ngx/src/app/modules/home/pages/notification/rule/escalation-form.component.html
  28. 0
      ui-ngx/src/app/modules/home/pages/notification/rule/escalation-form.component.scss
  29. 10
      ui-ngx/src/app/modules/home/pages/notification/rule/escalation-form.component.ts
  30. 0
      ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.html
  31. 0
      ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.ts
  32. 0
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html
  33. 0
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.scss
  34. 10
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.ts
  35. 49
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts
  36. 0
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-header.component.html
  37. 2
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-header.component.scss
  38. 0
      ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-header.component.ts
  39. 0
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.html
  40. 0
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.scss
  41. 10
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.ts
  42. 0
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html
  43. 0
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss
  44. 24
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts
  45. 69
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts
  46. 0
      ui-ngx/src/app/modules/home/pages/notification/template/template-autocomplete.component.html
  47. 0
      ui-ngx/src/app/modules/home/pages/notification/template/template-autocomplete.component.scss
  48. 2
      ui-ngx/src/app/modules/home/pages/notification/template/template-autocomplete.component.ts
  49. 0
      ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts
  50. 0
      ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html
  51. 0
      ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.scss
  52. 2
      ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts
  53. 51
      ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts
  54. 0
      ui-ngx/src/app/modules/home/pages/notification/template/template-table-header.component.html
  55. 2
      ui-ngx/src/app/modules/home/pages/notification/template/template-table-header.component.scss
  56. 0
      ui-ngx/src/app/modules/home/pages/notification/template/template-table-header.component.ts
  57. 8
      ui-ngx/src/app/shared/models/notification.models.ts
  58. 10
      ui-ngx/src/assets/locale/locale.constant-en_US.json

100
ui-ngx/src/app/core/services/menu.service.ts

@ -140,8 +140,48 @@ export class MenuService {
id: guid(),
name: 'notification.notification-center',
type: 'link',
path: '/notification-center',
icon: 'notifications'
path: '/notification',
icon: 'mdi:message-badge',
isMdiIcon: true,
pages: [
{
id: guid(),
name: 'notification.inbox',
type: 'link',
path: '/notification/inbox',
icon: 'inbox'
},
{
id: guid(),
name: 'notification.sent',
type: 'link',
path: '/notification/sent',
icon: 'outbox'
},
{
id: guid(),
name: 'notification.templates',
type: 'link',
path: '/notification/templates',
icon: 'mdi:message-draw',
isMdiIcon: true
},
{
id: guid(),
name: 'notification.recipients',
type: 'link',
path: '/notification/recipients',
icon: 'contacts'
},
{
id: guid(),
name: 'notification.rules',
type: 'link',
path: '/notification/rules',
icon: 'mdi:message-cog',
isMdiIcon: true
}
]
},
{
id: guid(),
@ -253,16 +293,6 @@ export class MenuService {
}
]
},
{
name: 'notification.management',
places: [
{
name: 'notification.notification-center',
path: '/notification-center',
icon: 'notifications'
},
]
},
{
name: 'admin.system-settings',
places: [
@ -541,13 +571,6 @@ export class MenuService {
path: '/usage',
icon: 'insert_chart'
},
{
id: guid(),
name: 'notification.notification-center',
type: 'link',
path: '/notification-center',
icon: 'notifications'
},
{
id: guid(),
name: 'admin.settings',
@ -721,16 +744,6 @@ export class MenuService {
}
]
},
{
name: 'notification.management',
places: [
{
name: 'notification.notification-center',
path: '/notification-center',
icon: 'notifications'
},
]
},
{
name: 'audit-log.audit',
places: [
@ -855,6 +868,25 @@ export class MenuService {
icon: 'dashboard'
}
);
sections.push(
{
id: guid(),
name: 'notification.notification-center',
type: 'link',
path: '/notification',
icon: 'mdi:message-badge',
isMdiIcon: true,
pages: [
{
id: guid(),
name: 'notification.inbox',
type: 'link',
path: '/notification/inbox',
icon: 'inbox'
}
]
}
);
return sections;
}
@ -916,16 +948,6 @@ export class MenuService {
path: '/dashboards'
}
]
},
{
name: 'notification.management',
places: [
{
name: 'notification.notification-center',
path: '/notification-center',
icon: 'notifications'
},
]
}
);
return homeSections;

2
ui-ngx/src/app/modules/home/components/notification/show-notification-popover.component.ts

@ -92,7 +92,7 @@ export class ShowNotificationPopoverComponent extends PageComponent implements O
$event.stopPropagation();
}
this.onClose();
this.router.navigateByUrl(this.router.createUrlTree(['notification-center'])).then(() => {});
this.router.navigateByUrl(this.router.parseUrl('/notification/inbox')).then(() => {});
}
trackById(index: number, item: NotificationRequest): string {

1
ui-ngx/src/app/modules/home/pages/home-pages.module.ts

@ -42,7 +42,6 @@ import { AlarmModule } from '@home/pages/alarm/alarm.module';
import { EntitiesModule } from '@home/pages/entities/entities.module';
import { FeaturesModule } from '@home/pages/features/features.module';
import { NotificationModule } from '@home/pages/notification/notification.module';
import { NotificationCenterModule } from '@home/pages/notification-center/notification-center.module';
@NgModule({
exports: [

41
ui-ngx/src/app/modules/home/pages/notification-center/notification-center-routing.module.ts

@ -1,41 +0,0 @@
///
/// Copyright © 2016-2023 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { Authority } from '@shared/models/authority.enum';
import { NotificationCenterComponent } from '@home/pages/notification-center/notification-center.component';
const routes: Routes = [
{
path: 'notification-center',
component: NotificationCenterComponent,
data: {
auth: [Authority.SYS_ADMIN, Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
title: 'notification.notification-center',
breadcrumb: {
label: 'notification.notification-center',
icon: 'notifications'
}
}
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class NotificationCenterRoutingModule { }

69
ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.html

@ -1,69 +0,0 @@
<!--
Copyright © 2016-2023 The Thingsboard Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="tb-notification-center">
<div class="tb-notification-center-content">
<div class="tabs-container">
<ng-container *ngIf="isCustomerUser(); else notificationTabs">
<tb-notification-table
[notificationType]="entityType.NOTIFICATION">
</tb-notification-table>
</ng-container>
<ng-template #notificationTabs>
<mat-tab-group #matTabGroup (selectedIndexChange)="updateData()" mat-stretch-tabs="false">
<mat-tab label="{{ 'notification.inbox' | translate }}">
<tb-notification-table
[notificationType]="entityType.NOTIFICATION">
</tb-notification-table>
</mat-tab>
<mat-tab label="{{ 'notification.sent' | translate }}" #requestTab="matTab">
<tb-notification-table
#notificationRequest
[notificationType]="entityType.NOTIFICATION_REQUEST">
</tb-notification-table>
</mat-tab>
<mat-tab label="{{ 'notification.templates' | translate }}">
<tb-notification-table
[notificationType]="entityType.NOTIFICATION_TEMPLATE">
</tb-notification-table>
</mat-tab>
<mat-tab label="{{ 'notification.targets' | translate }}">
<tb-notification-table
[notificationType]="entityType.NOTIFICATION_TARGET">
</tb-notification-table>
</mat-tab>
<mat-tab label="{{ 'notification.rules' | translate }}">
<tb-notification-table
[notificationType]="entityType.NOTIFICATION_RULE">
</tb-notification-table>
</mat-tab>
<mat-tab disabled>
<ng-template mat-tab-label>
<div fxFlex="100" fxLayout="row" fxLayoutAlign="end center">
<button mat-flat-button color="primary" (click)="sendNotification($event)">
<div fxLayout="row" fxLayoutAlign="start center">
<mat-icon>send</mat-icon>{{ 'notification.send-notification' | translate }}
</div>
</button>
</div>
</ng-template>
</mat-tab>
</mat-tab-group>
</ng-template>
</div>
</div>
</div>

101
ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.scss

@ -1,101 +0,0 @@
/**
* Copyright © 2016-2023 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@import '../../../../../scss/constants';
:host {
width: 100%;
height: 100%;
display: block;
.tb-notification-center {
padding: 8px;
width: 100%;
height: 100%;
display: block;
.tb-notification-center-content {
width: 100%;
height: 100%;
background: #fff;
border-radius: 4px;
box-shadow: 0 4px 10px rgba(23, 33, 90, 0.08);
display: flex;
flex-direction: column;
.tabs-container {
position: relative;
flex-direction: column;
flex: 1 1 100%;
}
}
}
}
:host ::ng-deep {
.tabs-container {
> .mat-mdc-tab-group {
> .mat-mdc-tab-body-wrapper {
position: absolute;
top: 49px;
left: 0;
right: 0;
bottom: 0;
}
> .mat-mdc-tab-header {
.mat-mdc-tab {
&.mat-mdc-tab-disabled {
opacity: 1;
flex: 1;
.mdc-tab__content, .mdc-tab__text-label {
flex: 1;
}
}
}
}
}
.tb-entity-table {
padding: 0;
.mat-toolbar-single-row, .mat-toolbar-tools {
height: 56px;
}
.mat-toolbar-tools > div {
width: 100%;
}
.mat-toolbar-single-row {
padding: 0 24px 0 12px;
}
}
}
@media #{$mat-xs} {
.tabs-container {
> .mat-mdc-tab-group {
> .mat-mdc-tab-header {
.mat-mdc-tab {
&.mat-tab-disabled {
width: auto;
}
}
}
}
}
}
}

74
ui-ngx/src/app/modules/home/pages/notification-center/notification-center.component.ts

@ -1,74 +0,0 @@
///
/// Copyright © 2016-2023 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { Component, QueryList, ViewChild, ViewChildren } from '@angular/core';
import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { MatTab, MatTabGroup } from '@angular/material/tabs';
import {
NotificationTableComponent
} from '@home/pages/notification-center/notification-table/notification-table.component';
import { EntityType } from '@shared/models/entity-type.models';
import { Authority } from '@shared/models/authority.enum';
import { AuthState } from '@core/auth/auth.models';
import { getCurrentAuthState } from '@core/auth/auth.selectors';
import { AuthUser } from '@shared/models/user.model';
@Component({
selector: 'tb-notification-center',
templateUrl: './notification-center.component.html',
styleUrls: ['notification-center.component.scss']
})
export class NotificationCenterComponent extends PageComponent {
private authState: AuthState = getCurrentAuthState(this.store);
private authUser: AuthUser = this.authState.authUser;
entityType = EntityType;
@ViewChild('matTabGroup') matTabs: MatTabGroup;
@ViewChild('requestTab') requestTab: MatTab;
@ViewChild('notificationRequest') notificationRequestTable: NotificationTableComponent;
@ViewChildren(NotificationTableComponent) tableComponent: QueryList<NotificationTableComponent>;
constructor(
protected store: Store<AppState>) {
super(store);
}
updateData() {
this.currentTableComponent?.updateData();
}
openSetting() {
}
private get currentTableComponent(): NotificationTableComponent {
return this.tableComponent.get(this.matTabs.selectedIndex);
}
sendNotification($event: Event) {
this.notificationRequestTable.entityTableConfig
.onEntityAction({event: $event, action: this.requestTab.isActive ? 'add' : 'add-without-update', entity: null});
}
public isCustomerUser(): boolean {
return this.authUser.authority === Authority.CUSTOMER_USER;
}
}

83
ui-ngx/src/app/modules/home/pages/notification-center/notification-center.module.ts

@ -1,83 +0,0 @@
///
/// Copyright © 2016-2023 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared/shared.module';
import { NotificationCenterRoutingModule } from './notification-center-routing.module';
import { NotificationCenterComponent } from './notification-center.component';
import { HomeComponentsModule } from '@home/components/home-components.module';
import {
TargetNotificationDialogComponent
} from '@home/pages/notification-center/targets-table/target-notification-dialog.componet';
import {
NotificationTableComponent
} from '@home/pages/notification-center/notification-table/notification-table.component';
import {
TemplateNotificationDialogComponent
} from '@home/pages/notification-center/template-table/template-notification-dialog.component';
import {
TargetTableHeaderComponent
} from '@home/pages/notification-center/targets-table/target-table-header.component';
import {
TemplateTableHeaderComponent
} from '@home/pages/notification-center/template-table/template-table-header.component';
import {
RequestNotificationDialogComponent
} from '@home/pages/notification-center/request-table/request-notification-dialog.componet';
import {
TemplateAutocompleteComponent
} from '@home/pages/notification-center/template-table/template-autocomplete.component';
import { InboxTableHeaderComponent } from '@home/pages/notification-center/inbox-table/inbox-table-header.component';
import { RuleTableHeaderComponent } from '@home/pages/notification-center/rule-table/rule-table-header.component';
import {
RuleNotificationDialogComponent
} from '@home/pages/notification-center/rule-table/rule-notification-dialog.component';
import { EscalationsComponent } from '@home/pages/notification-center/rule-table/escalations.component';
import { EscalationFormComponent } from '@home/pages/notification-center/rule-table/escalation-form.component';
import {
InboxNotificationDialogComponent
} from '@home/pages/notification-center/inbox-table/inbox-notification-dialog.component';
import {
NotificationRequestErrorDialogComponent
} from '@home/pages/notification-center/request-table/notification-request-error-dialog.component';
@NgModule({
declarations: [
NotificationCenterComponent,
TargetNotificationDialogComponent,
TemplateNotificationDialogComponent,
RequestNotificationDialogComponent,
TargetTableHeaderComponent,
TemplateTableHeaderComponent,
NotificationTableComponent,
TemplateAutocompleteComponent,
InboxTableHeaderComponent,
RuleTableHeaderComponent,
RuleNotificationDialogComponent,
EscalationsComponent,
EscalationFormComponent,
InboxNotificationDialogComponent,
NotificationRequestErrorDialogComponent
],
imports: [
CommonModule,
SharedModule,
NotificationCenterRoutingModule,
HomeComponentsModule
]
})
export class NotificationCenterModule { }

18
ui-ngx/src/app/modules/home/pages/notification-center/notification-table/notification-table.component.html

@ -1,18 +0,0 @@
<!--
Copyright © 2016-2023 The Thingsboard Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<tb-entities-table [entitiesTableConfig]="entityTableConfig"></tb-entities-table>

98
ui-ngx/src/app/modules/home/pages/notification-center/notification-table/notification-table.component.ts

@ -1,98 +0,0 @@
///
/// Copyright © 2016-2023 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { EntitiesTableComponent } from '@home/components/entity/entities-table.component';
import { NotificationService } from '@core/http/notification.service';
import { TargetsTableConfig } from '@home/pages/notification-center/notification-table/targets-table-config';
import { TranslateService } from '@ngx-translate/core';
import { MatDialog } from '@angular/material/dialog';
import { EntityType } from '@shared/models/entity-type.models';
import { EntityTableConfig } from '@home/models/entity/entities-table-config.models';
import { InboxTableConfig } from '@home/pages/notification-center/notification-table/inbox-table-config';
import { DatePipe } from '@angular/common';
import { TemplateTableConfig } from '@home/pages/notification-center/notification-table/template-table-config';
import { RequestTableConfig } from '@home/pages/notification-center/notification-table/request-table-config';
import { RuleTableConfig } from '@home/pages/notification-center/notification-table/rule-table-config';
@Component({
selector: 'tb-notification-table',
templateUrl: './notification-table.component.html'
})
export class NotificationTableComponent implements OnInit {
@Input()
notificationType = EntityType.NOTIFICATION;
@ViewChild(EntitiesTableComponent, {static: true}) entitiesTable: EntitiesTableComponent;
entityTableConfig: EntityTableConfig<any>;
constructor(private notificationService: NotificationService,
private translate: TranslateService,
private datePipe: DatePipe,
private dialog: MatDialog) {
}
ngOnInit() {
this.entityTableConfig = this.getTableConfig();
this.entityTableConfig.pageMode = false;
this.entityTableConfig.detailsPanelEnabled = false;
this.entityTableConfig.selectionEnabled = false;
this.entityTableConfig.addEnabled = false;
}
updateData() {
this.entitiesTable.updateData();
}
private getTableConfig(): EntityTableConfig<any> {
switch (this.notificationType) {
case EntityType.NOTIFICATION_TARGET:
return new TargetsTableConfig(
this.notificationService,
this.translate,
this.dialog
);
case EntityType.NOTIFICATION:
return new InboxTableConfig(
this.notificationService,
this.translate,
this.dialog,
this.datePipe
);
case EntityType.NOTIFICATION_TEMPLATE:
return new TemplateTableConfig(
this.notificationService,
this.translate,
this.dialog
);
case EntityType.NOTIFICATION_REQUEST:
return new RequestTableConfig(
this.notificationService,
this.translate,
this.dialog,
this.datePipe
);
case EntityType.NOTIFICATION_RULE:
return new RuleTableConfig(
this.notificationService,
this.translate,
this.dialog
);
}
}
}

0
ui-ngx/src/app/modules/home/pages/notification-center/inbox-table/inbox-notification-dialog.component.html → ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-notification-dialog.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/inbox-table/inbox-notification-dialog.component.scss → ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-notification-dialog.component.scss

0
ui-ngx/src/app/modules/home/pages/notification-center/inbox-table/inbox-notification-dialog.component.ts → ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-notification-dialog.component.ts

66
ui-ngx/src/app/modules/home/pages/notification-center/notification-table/inbox-table-config.ts → ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-config.resolver.ts

@ -29,54 +29,64 @@ import {
NotificationTemplateTypeTranslateMap
} from '@shared/models/notification.models';
import { NotificationService } from '@core/http/notification.service';
import { InboxTableHeaderComponent } from '@home/pages/notification-center/inbox-table/inbox-table-header.component';
import { InboxTableHeaderComponent } from '@home/pages/notification/inbox/inbox-table-header.component';
import { TranslateService } from '@ngx-translate/core';
import { take } from 'rxjs/operators';
import { MatDialog } from '@angular/material/dialog';
import {
InboxNotificationDialogComponent, InboxNotificationDialogData
} from '@home/pages/notification-center/inbox-table/inbox-notification-dialog.component';
InboxNotificationDialogComponent,
InboxNotificationDialogData
} from '@home/pages/notification/inbox/inbox-notification-dialog.component';
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
export class InboxTableConfig extends EntityTableConfig<Notification> {
@Injectable()
export class InboxTableConfigResolver implements Resolve<EntityTableConfig<Notification>> {
private readonly config: EntityTableConfig<Notification> = new EntityTableConfig<Notification>();
constructor(private notificationService: NotificationService,
private translate: TranslateService,
private dialog: MatDialog,
private datePipe: DatePipe) {
super();
this.entitiesDeleteEnabled = false;
this.rowPointer = true;
this.entityTranslations = {
this.config.detailsPanelEnabled = false;
this.config.selectionEnabled = false;
this.config.addEnabled = false;
this.config.entitiesDeleteEnabled = false;
this.config.rowPointer = true;
this.config.entityTranslations = {
noEntities: 'notification.no-inbox-notification',
search: 'notification.search-notification'
};
this.entityResources = {} as EntityTypeResource<Notification>;
this.config.entityResources = {} as EntityTypeResource<Notification>;
this.entitiesFetchFunction = pageLink => this.notificationService.getNotifications(pageLink, this.componentsData.unreadOnly);
this.config.entitiesFetchFunction = pageLink =>
this.notificationService.getNotifications(pageLink, this.config.componentsData.unreadOnly);
this.defaultSortOrder = {property: 'createdTime', direction: Direction.DESC};
this.config.defaultSortOrder = {property: 'createdTime', direction: Direction.DESC};
this.handleRowClick = ($event, notification) => {
this.config.handleRowClick = ($event, notification) => {
this.showNotification($event, notification);
return true;
};
this.componentsData = {
this.config.componentsData = {
unreadOnly: true
};
this.cellActionDescriptors = this.configureCellActions();
this.config.cellActionDescriptors = this.configureCellActions();
this.headerComponent = InboxTableHeaderComponent;
this.config.headerComponent = InboxTableHeaderComponent;
this.headerActionDescriptors = [{
this.config.headerActionDescriptors = [{
name: this.translate.instant('notification.mark-all-as-read'),
icon: 'done_all',
isEnabled: () => true,
onAction: $event => this.markAllRead($event)
}];
this.columns.push(
this.config.columns.push(
new DateEntityTableColumn<Notification>('createdTime', 'notification.created-time', this.datePipe, '170px'),
new EntityTableColumn<Notification>('type', 'notification.type', '10%', (notification) =>
this.translate.instant(NotificationTemplateTypeTranslateMap.get(notification.type).name)),
@ -86,6 +96,10 @@ export class InboxTableConfig extends EntityTableConfig<Notification> {
}
resolve(route: ActivatedRouteSnapshot): EntityTableConfig<Notification> {
return this.config;
}
private configureCellActions(): Array<CellActionDescriptor<Notification>> {
return [{
name: this.translate.instant('notification.mark-as-read'),
@ -100,10 +114,10 @@ export class InboxTableConfig extends EntityTableConfig<Notification> {
$event.stopPropagation();
}
this.notificationService.markAllNotificationsAsRead().subscribe(() => {
if (this.componentsData.unreadOnly) {
this.getTable().resetSortAndFilter(true);
if (this.config.componentsData.unreadOnly) {
this.config.getTable().resetSortAndFilter(true);
} else {
this.updateData();
this.config.updateData();
}
});
}
@ -113,18 +127,18 @@ export class InboxTableConfig extends EntityTableConfig<Notification> {
$event.stopPropagation();
}
this.notificationService.markNotificationAsRead(entity.id.id).subscribe(() => {
if (this.componentsData.unreadOnly) {
this.getTable().dataSource.pageData$.pipe(take(1)).subscribe(
if (this.config.componentsData.unreadOnly) {
this.config.getTable().dataSource.pageData$.pipe(take(1)).subscribe(
(value) => {
if (value.data.length === 1 && this.getTable().pageLink.page) {
this.getTable().pageLink.page--;
if (value.data.length === 1 && this.config.getTable().pageLink.page) {
this.config.getTable().pageLink.page--;
}
this.updateData();
this.config.updateData();
}
);
} else {
entity.status = NotificationStatus.READ;
this.getTable().detectChanges();
this.config.getTable().detectChanges();
}
});
}

0
ui-ngx/src/app/modules/home/pages/notification-center/inbox-table/inbox-table-header.component.html → ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/inbox-table/inbox-table-header.component.scss → ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.scss

0
ui-ngx/src/app/modules/home/pages/notification-center/inbox-table/inbox-table-header.component.ts → ui-ngx/src/app/modules/home/pages/notification/inbox/inbox-table-header.component.ts

89
ui-ngx/src/app/modules/home/pages/notification/notification-routing.module.ts

@ -14,36 +14,23 @@
/// limitations under the License.
///
import { ActivatedRoute, RouterModule, Routes } from '@angular/router';
import { RouterModule, Routes } from '@angular/router';
import { Authority } from '@shared/models/authority.enum';
import { Component, NgModule, OnInit } from '@angular/core';
import { NgModule } from '@angular/core';
import { RouterTabsComponent } from '@home/components/router-tabs.component';
import { isDefinedAndNotNull } from '@core/utils';
@Component({
selector: 'tb-notification-temp-component',
template: '<div>{{text}}</div>',
styleUrls: []
})
class NotificationTempComponent implements OnInit {
text: string;
constructor(private route: ActivatedRoute) {}
ngOnInit() {
if (isDefinedAndNotNull(this.route.snapshot.data.text)) {
this.text = this.route.snapshot.data.text;
}
}
}
import { EntitiesTableComponent } from '@home/components/entity/entities-table.component';
import { InboxTableConfigResolver } from '@home/pages/notification/inbox/inbox-table-config.resolver';
import { SentTableConfigResolver } from '@home/pages/notification/sent/sent-table-config.resolver';
import { RecipientTableConfigResolver } from '@home/pages/notification/recipient/recipient-table-config.resolver';
import { TemplateTableConfigResolver } from '@home/pages/notification/template/template-table-config.resolver';
import { RuleTableConfigResolver } from '@home/pages/notification/rule/rule-table-config.resolver';
const routes: Routes = [
{
path: 'notification',
component: RouterTabsComponent,
data: {
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER, Authority.SYS_ADMIN],
breadcrumb: {
label: 'notification.notification-center',
icon: 'mdi:message-badge'
@ -54,73 +41,83 @@ const routes: Routes = [
path: '',
children: [],
data: {
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER, Authority.SYS_ADMIN],
redirectTo: '/notification/inbox'
}
},
{
path: 'inbox',
component: NotificationTempComponent,
component: EntitiesTableComponent,
data: {
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER],
auth: [Authority.TENANT_ADMIN, Authority.CUSTOMER_USER, Authority.SYS_ADMIN],
title: 'notification.inbox',
breadcrumb: {
label: 'notification.inbox',
icon: 'inbox'
},
text: 'TODO: Implement inbox'
}
},
resolve: {
entitiesTableConfig: InboxTableConfigResolver
}
},
{
path: 'sent',
component: NotificationTempComponent,
component: EntitiesTableComponent,
data: {
auth: [Authority.TENANT_ADMIN],
auth: [Authority.TENANT_ADMIN, Authority.SYS_ADMIN],
title: 'notification.sent',
breadcrumb: {
label: 'notification.sent',
icon: 'outbox'
},
text: 'TODO: Implement sent'
}
},
resolve: {
entitiesTableConfig: SentTableConfigResolver
}
},
{
path: 'templates',
component: NotificationTempComponent,
component: EntitiesTableComponent,
data: {
auth: [Authority.TENANT_ADMIN],
auth: [Authority.TENANT_ADMIN, Authority.SYS_ADMIN],
title: 'notification.templates',
breadcrumb: {
label: 'notification.templates',
icon: 'mdi:message-draw'
},
text: 'TODO: Implement templates'
}
},
resolve: {
entitiesTableConfig: TemplateTableConfigResolver
}
},
{
path: 'recipients',
component: NotificationTempComponent,
component: EntitiesTableComponent,
data: {
auth: [Authority.TENANT_ADMIN],
auth: [Authority.TENANT_ADMIN, Authority.SYS_ADMIN],
title: 'notification.recipients',
breadcrumb: {
label: 'notification.recipients',
icon: 'contacts'
},
text: 'TODO: Implement recipients'
},
resolve: {
entitiesTableConfig: RecipientTableConfigResolver
}
},
{
path: 'rules',
component: NotificationTempComponent,
component: EntitiesTableComponent,
data: {
auth: [Authority.TENANT_ADMIN],
auth: [Authority.TENANT_ADMIN, Authority.SYS_ADMIN],
title: 'notification.rules',
breadcrumb: {
label: 'notification.rules',
icon: 'mdi:message-cog'
},
text: 'TODO: Implement rules'
}
},
resolve: {
entitiesTableConfig: RuleTableConfigResolver
}
}
]
@ -128,7 +125,13 @@ const routes: Routes = [
];
@NgModule({
declarations: [NotificationTempComponent],
providers: [
InboxTableConfigResolver,
SentTableConfigResolver,
RecipientTableConfigResolver,
TemplateTableConfigResolver,
RuleTableConfigResolver
],
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})

37
ui-ngx/src/app/modules/home/pages/notification/notification.module.ts

@ -18,13 +18,46 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared/shared.module';
import { NotificationRoutingModule } from '@home/pages/notification/notification-routing.module';
import { InboxTableHeaderComponent } from '@home/pages/notification/inbox/inbox-table-header.component';
import { InboxNotificationDialogComponent } from '@home/pages/notification/inbox/inbox-notification-dialog.component';
import { HomeComponentsModule } from '@home/components/home-components.module';
import { SentErrorDialogComponent } from '@home/pages/notification/sent/sent-error-dialog.component';
import { SentNotificationDialogComponent } from '@home/pages/notification/sent/sent-notification-dialog.componet';
import {
RecipientNotificationDialogComponent
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet';
import { RecipientTableHeaderComponent } from '@home/pages/notification/recipient/recipient-table-header.component';
import { TemplateAutocompleteComponent } from '@home/pages/notification/template/template-autocomplete.component';
import {
TemplateNotificationDialogComponent
} from '@home/pages/notification/template/template-notification-dialog.component';
import { TemplateTableHeaderComponent } from '@home/pages/notification/template/template-table-header.component';
import { EscalationFormComponent } from '@home/pages/notification/rule/escalation-form.component';
import { EscalationsComponent } from '@home/pages/notification/rule/escalations.component';
import { RuleNotificationDialogComponent } from '@home/pages/notification/rule/rule-notification-dialog.component';
import { RuleTableHeaderComponent } from '@home/pages/notification/rule/rule-table-header.component';
@NgModule({
declarations: [],
declarations: [
InboxTableHeaderComponent,
InboxNotificationDialogComponent,
SentErrorDialogComponent,
SentNotificationDialogComponent,
RecipientNotificationDialogComponent,
RecipientTableHeaderComponent,
TemplateAutocompleteComponent,
TemplateNotificationDialogComponent,
TemplateTableHeaderComponent,
EscalationFormComponent,
EscalationsComponent,
RuleNotificationDialogComponent,
RuleTableHeaderComponent
],
imports: [
CommonModule,
SharedModule,
NotificationRoutingModule
NotificationRoutingModule,
HomeComponentsModule
]
})
export class NotificationModule { }

0
ui-ngx/src/app/modules/home/pages/notification-center/targets-table/target-notification-dialog.component.html → ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/targets-table/target-notification-dialog.componet.scss → ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.scss

14
ui-ngx/src/app/modules/home/pages/notification-center/targets-table/target-notification-dialog.componet.ts → ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-notification-dialog.componet.ts

@ -40,18 +40,18 @@ import { AuthState } from '@core/auth/auth.models';
import { getCurrentAuthState } from '@core/auth/auth.selectors';
import { AuthUser } from '@shared/models/user.model';
export interface TargetsNotificationDialogData {
export interface RecipientNotificationDialogData {
target?: NotificationTarget;
isAdd?: boolean;
}
@Component({
selector: 'tb-target-notification-dialog',
templateUrl: './target-notification-dialog.component.html',
styleUrls: ['target-notification-dialog.componet.scss']
templateUrl: './recipient-notification-dialog.component.html',
styleUrls: ['recipient-notification-dialog.componet.scss']
})
export class TargetNotificationDialogComponent extends
DialogComponent<TargetNotificationDialogComponent, NotificationTarget> implements OnDestroy {
export class RecipientNotificationDialogComponent extends
DialogComponent<RecipientNotificationDialogComponent, NotificationTarget> implements OnDestroy {
private authState: AuthState = getCurrentAuthState(this.store);
private authUser: AuthUser = this.authState.authUser;
@ -73,8 +73,8 @@ export class TargetNotificationDialogComponent extends
constructor(protected store: Store<AppState>,
protected router: Router,
protected dialogRef: MatDialogRef<TargetNotificationDialogComponent, NotificationTarget>,
@Inject(MAT_DIALOG_DATA) public data: TargetsNotificationDialogData,
protected dialogRef: MatDialogRef<RecipientNotificationDialogComponent, NotificationTarget>,
@Inject(MAT_DIALOG_DATA) public data: RecipientNotificationDialogData,
private fb: FormBuilder,
private notificationService: NotificationService) {
super(store, router, dialogRef);

59
ui-ngx/src/app/modules/home/pages/notification-center/notification-table/targets-table-config.ts → ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-config.resolver.ts

@ -25,49 +25,54 @@ import { NotificationTarget, NotificationTargetTypeTranslationMap } from '@share
import { NotificationService } from '@core/http/notification.service';
import { TranslateService } from '@ngx-translate/core';
import {
TargetNotificationDialogComponent,
TargetsNotificationDialogData
} from '@home/pages/notification-center/targets-table/target-notification-dialog.componet';
RecipientNotificationDialogComponent,
RecipientNotificationDialogData
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet';
import { MatDialog } from '@angular/material/dialog';
import { EntityAction } from '@home/models/entity/entity-component.models';
import {
TargetTableHeaderComponent
} from '@home/pages/notification-center/targets-table/target-table-header.component';
import { RecipientTableHeaderComponent } from '@home/pages/notification/recipient/recipient-table-header.component';
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
import { Injectable } from '@angular/core';
@Injectable()
export class RecipientTableConfigResolver implements Resolve<EntityTableConfig<NotificationTarget>> {
export class TargetsTableConfig extends EntityTableConfig<NotificationTarget> {
private readonly config: EntityTableConfig<NotificationTarget> = new EntityTableConfig<NotificationTarget>();
constructor(private notificationService: NotificationService,
private translate: TranslateService,
private dialog: MatDialog) {
super();
this.loadDataOnInit = false;
this.rowPointer = true;
this.entityTranslations = {
this.config.detailsPanelEnabled = false;
this.config.selectionEnabled = false;
this.config.addEnabled = false;
this.config.rowPointer = true;
this.config.entityTranslations = {
noEntities: 'notification.no-targets-notification',
search: 'notification.search-targets'
};
this.entityResources = {} as EntityTypeResource<NotificationTarget>;
this.config.entityResources = {} as EntityTypeResource<NotificationTarget>;
this.entitiesFetchFunction = pageLink => this.notificationService.getNotificationTargets(pageLink);
this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotificationTargets(pageLink);
this.deleteEntityTitle = target => this.translate.instant('notification.delete-target-title', {targetName: target.name});
this.deleteEntityContent = () => this.translate.instant('notification.delete-target-text');
this.deleteEntity = id => this.notificationService.deleteNotificationTarget(id.id);
this.config.deleteEntityTitle = target => this.translate.instant('notification.delete-target-title', {targetName: target.name});
this.config.deleteEntityContent = () => this.translate.instant('notification.delete-target-text');
this.config.deleteEntity = id => this.notificationService.deleteNotificationTarget(id.id);
this.cellActionDescriptors = this.configureCellActions();
this.config.cellActionDescriptors = this.configureCellActions();
this.headerComponent = TargetTableHeaderComponent;
this.onEntityAction = action => this.onTargetAction(action);
this.config.headerComponent = RecipientTableHeaderComponent;
this.config.onEntityAction = action => this.onTargetAction(action);
this.defaultSortOrder = {property: 'name', direction: Direction.ASC};
this.config.defaultSortOrder = {property: 'name', direction: Direction.ASC};
this.handleRowClick = ($event, target) => {
this.config.handleRowClick = ($event, target) => {
this.editTarget($event, target);
return true;
};
this.columns.push(
this.config.columns.push(
new EntityTableColumn<NotificationTarget>('name', 'notification.notification-target', '20%'),
new EntityTableColumn<NotificationTarget>('configuration.type', 'notification.type', '20%',
(target) => this.translate.instant(NotificationTargetTypeTranslationMap.get(target.configuration.type)),
@ -78,6 +83,10 @@ export class TargetsTableConfig extends EntityTableConfig<NotificationTarget> {
);
}
resolve(route: ActivatedRouteSnapshot): EntityTableConfig<NotificationTarget> {
return this.config;
}
private configureCellActions(): Array<CellActionDescriptor<NotificationTarget>> {
return [];
}
@ -86,8 +95,8 @@ export class TargetsTableConfig extends EntityTableConfig<NotificationTarget> {
if ($event) {
$event.stopPropagation();
}
this.dialog.open<TargetNotificationDialogComponent, TargetsNotificationDialogData,
NotificationTarget>(TargetNotificationDialogComponent, {
this.dialog.open<RecipientNotificationDialogComponent, RecipientNotificationDialogData,
NotificationTarget>(RecipientNotificationDialogComponent, {
disableClose: true,
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
data: {
@ -97,7 +106,7 @@ export class TargetsTableConfig extends EntityTableConfig<NotificationTarget> {
}).afterClosed()
.subscribe((res) => {
if (res) {
this.updateData();
this.config.updateData();
}
});
}

0
ui-ngx/src/app/modules/home/pages/notification-center/targets-table/target-table-header.component.html → ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-header.component.html

2
ui-ngx/src/app/modules/home/pages/notification-center/targets-table/target-table-header.component.scss → ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-header.component.scss

@ -14,5 +14,5 @@
* limitations under the License.
*/
:host{
width: 100%;
width: 10000px;
}

8
ui-ngx/src/app/modules/home/pages/notification-center/targets-table/target-table-header.component.ts → ui-ngx/src/app/modules/home/pages/notification/recipient/recipient-table-header.component.ts

@ -21,11 +21,11 @@ import { AppState } from '@core/core.state';
import { NotificationTarget } from '@shared/models/notification.models';
@Component({
selector: 'tb-target-table-header',
templateUrl: './target-table-header.component.html',
styleUrls: ['target-table-header.component.scss']
selector: 'tb-recipient-table-header',
templateUrl: './recipient-table-header.component.html',
styleUrls: ['recipient-table-header.component.scss']
})
export class TargetTableHeaderComponent extends EntityTableHeaderComponent<NotificationTarget> {
export class RecipientTableHeaderComponent extends EntityTableHeaderComponent<NotificationTarget> {
constructor(protected store: Store<AppState>) {
super(store);

0
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/escalation-form.component.html → ui-ngx/src/app/modules/home/pages/notification/rule/escalation-form.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/escalation-form.component.scss → ui-ngx/src/app/modules/home/pages/notification/rule/escalation-form.component.scss

10
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/escalation-form.component.ts → ui-ngx/src/app/modules/home/pages/notification/rule/escalation-form.component.ts

@ -31,9 +31,9 @@ import { NonConfirmedNotificationEscalation, NotificationTarget } from '@shared/
import { EntityType } from '@shared/models/entity-type.models';
import { takeUntil } from 'rxjs/operators';
import {
TargetNotificationDialogComponent,
TargetsNotificationDialogData
} from '@home/pages/notification-center/targets-table/target-notification-dialog.componet';
RecipientNotificationDialogComponent,
RecipientNotificationDialogData
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet';
import { MatDialog } from '@angular/material/dialog';
import { MatButton } from '@angular/material/button';
@ -130,8 +130,8 @@ export class EscalationFormComponent implements ControlValueAccessor, OnInit, On
$event.stopPropagation();
}
button._elementRef.nativeElement.blur();
this.dialog.open<TargetNotificationDialogComponent, TargetsNotificationDialogData,
NotificationTarget>(TargetNotificationDialogComponent, {
this.dialog.open<RecipientNotificationDialogComponent, RecipientNotificationDialogData,
NotificationTarget>(RecipientNotificationDialogComponent, {
disableClose: true,
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
data: {}

0
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/escalations.component.html → ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/escalations.component.ts → ui-ngx/src/app/modules/home/pages/notification/rule/escalations.component.ts

0
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-notification-dialog.component.html → ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-notification-dialog.component.scss → ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.scss

10
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-notification-dialog.component.ts → ui-ngx/src/app/modules/home/pages/notification/rule/rule-notification-dialog.component.ts

@ -50,9 +50,9 @@ import {
} from '@shared/models/alarm.models';
import { TranslateService } from '@ngx-translate/core';
import {
TargetNotificationDialogComponent,
TargetsNotificationDialogData
} from '@home/pages/notification-center/targets-table/target-notification-dialog.componet';
RecipientNotificationDialogComponent,
RecipientNotificationDialogData
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet';
import { MatButton } from '@angular/material/button';
import { AuthState } from '@core/auth/auth.models';
import { getCurrentAuthState } from '@core/auth/auth.selectors';
@ -364,8 +364,8 @@ export class RuleNotificationDialogComponent extends
$event.stopPropagation();
}
button._elementRef.nativeElement.blur();
this.dialog.open<TargetNotificationDialogComponent, TargetsNotificationDialogData,
NotificationTarget>(TargetNotificationDialogComponent, {
this.dialog.open<RecipientNotificationDialogComponent, RecipientNotificationDialogData,
NotificationTarget>(RecipientNotificationDialogComponent, {
disableClose: true,
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
data: {}

49
ui-ngx/src/app/modules/home/pages/notification-center/notification-table/rule-table-config.ts → ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-config.resolver.ts

@ -26,45 +26,52 @@ import { NotificationService } from '@core/http/notification.service';
import { TranslateService } from '@ngx-translate/core';
import { MatDialog } from '@angular/material/dialog';
import { EntityAction } from '@home/models/entity/entity-component.models';
import { RuleTableHeaderComponent } from '@home/pages/notification-center/rule-table/rule-table-header.component';
import { RuleTableHeaderComponent } from '@home/pages/notification/rule/rule-table-header.component';
import {
RuleNotificationDialogComponent,
RuleNotificationDialogData
} from '@home/pages/notification-center/rule-table/rule-notification-dialog.component';
} from '@home/pages/notification/rule/rule-notification-dialog.component';
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
import { Injectable } from '@angular/core';
export class RuleTableConfig extends EntityTableConfig<NotificationRule> {
@Injectable()
export class RuleTableConfigResolver implements Resolve<EntityTableConfig<NotificationRule>> {
private readonly config: EntityTableConfig<NotificationRule> = new EntityTableConfig<NotificationRule>();
constructor(private notificationService: NotificationService,
private translate: TranslateService,
private dialog: MatDialog) {
super();
this.loadDataOnInit = false;
this.rowPointer = true;
this.entityTranslations = {
this.config.detailsPanelEnabled = false;
this.config.selectionEnabled = false;
this.config.addEnabled = false;
this.config.rowPointer = true;
this.config.entityTranslations = {
noEntities: 'notification.no-rules-notification',
search: 'notification.search-rules'
};
this.entityResources = {} as EntityTypeResource<NotificationRule>;
this.config.entityResources = {} as EntityTypeResource<NotificationRule>;
this.entitiesFetchFunction = pageLink => this.notificationService.getNotificationRules(pageLink);
this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotificationRules(pageLink);
this.deleteEntityTitle = rule => this.translate.instant('notification.delete-rule-title', {ruleName: rule.name});
this.deleteEntityContent = () => this.translate.instant('notification.delete-rule-text');
this.deleteEntity = id => this.notificationService.deleteNotificationRule(id.id);
this.config.deleteEntityTitle = rule => this.translate.instant('notification.delete-rule-title', {ruleName: rule.name});
this.config.deleteEntityContent = () => this.translate.instant('notification.delete-rule-text');
this.config.deleteEntity = id => this.notificationService.deleteNotificationRule(id.id);
this.cellActionDescriptors = this.configureCellActions();
this.headerComponent = RuleTableHeaderComponent;
this.onEntityAction = action => this.onTargetAction(action);
this.config.cellActionDescriptors = this.configureCellActions();
this.config.headerComponent = RuleTableHeaderComponent;
this.config.onEntityAction = action => this.onTargetAction(action);
this.defaultSortOrder = {property: 'name', direction: Direction.ASC};
this.config.defaultSortOrder = {property: 'name', direction: Direction.ASC};
this.handleRowClick = ($event, rule) => {
this.config.handleRowClick = ($event, rule) => {
this.editRule($event, rule);
return true;
};
this.columns.push(
this.config.columns.push(
new EntityTableColumn<NotificationRule>('name', 'notification.rule-name', '30%'),
new EntityTableColumn<NotificationRule>('templateName', 'notification.template', '20%'),
new EntityTableColumn<NotificationRule>('triggerType', 'notification.trigger.trigger', '20%',
@ -76,6 +83,10 @@ export class RuleTableConfig extends EntityTableConfig<NotificationRule> {
);
}
resolve(route: ActivatedRouteSnapshot): EntityTableConfig<NotificationRule> {
return this.config;
}
private configureCellActions(): Array<CellActionDescriptor<NotificationRule>> {
return [{
name: this.translate.instant('notification.copy-rule'),
@ -101,7 +112,7 @@ export class RuleTableConfig extends EntityTableConfig<NotificationRule> {
}).afterClosed()
.subscribe((res) => {
if (res) {
this.updateData();
this.config.updateData();
}
});
}

0
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-table-header.component.html → ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-header.component.html

2
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-table-header.component.scss → ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-header.component.scss

@ -14,5 +14,5 @@
* limitations under the License.
*/
:host{
width: 100%;
width: 10000px;
}

0
ui-ngx/src/app/modules/home/pages/notification-center/rule-table/rule-table-header.component.ts → ui-ngx/src/app/modules/home/pages/notification/rule/rule-table-header.component.ts

0
ui-ngx/src/app/modules/home/pages/notification-center/request-table/notification-request-error-dialog.component.html → ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/request-table/notification-request-error-dialog.component.scss → ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.scss

10
ui-ngx/src/app/modules/home/pages/notification-center/request-table/notification-request-error-dialog.component.ts → ui-ngx/src/app/modules/home/pages/notification/sent/sent-error-dialog.component.ts

@ -27,11 +27,11 @@ export interface NotificationRequestErrorDialogData {
}
@Component({
selector: 'tb-notification-request-error-dialog',
templateUrl: './notification-request-error-dialog.component.html',
styleUrls: ['notification-request-error-dialog.component.scss']
selector: 'tb-notification-send-error-dialog',
templateUrl: './sent-error-dialog.component.html',
styleUrls: ['sent-error-dialog.component.scss']
})
export class NotificationRequestErrorDialogComponent extends DialogComponent<NotificationRequestErrorDialogComponent, void> {
export class SentErrorDialogComponent extends DialogComponent<SentErrorDialogComponent, void> {
errorStats: { [key in NotificationDeliveryMethod]: {[errorKey in string]: string}};
@ -44,7 +44,7 @@ export class NotificationRequestErrorDialogComponent extends DialogComponent<Not
constructor(protected store: Store<AppState>,
protected router: Router,
protected dialogRef: MatDialogRef<NotificationRequestErrorDialogComponent, void>,
protected dialogRef: MatDialogRef<SentErrorDialogComponent, void>,
@Inject(MAT_DIALOG_DATA) public data: NotificationRequestErrorDialogData) {
super(store, router, dialogRef);

0
ui-ngx/src/app/modules/home/pages/notification-center/request-table/request-notification-dialog.component.html → ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/request-table/request-notification-dialog.component.scss → ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss

24
ui-ngx/src/app/modules/home/pages/notification-center/request-table/request-notification-dialog.componet.ts → ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts

@ -39,11 +39,11 @@ import { MediaBreakpoints } from '@shared/models/constants';
import { map, takeUntil } from 'rxjs/operators';
import { getCurrentTime } from '@shared/models/time/time.models';
import {
TargetNotificationDialogComponent,
TargetsNotificationDialogData
} from '@home/pages/notification-center/targets-table/target-notification-dialog.componet';
RecipientNotificationDialogComponent,
RecipientNotificationDialogData
} from '@home/pages/notification/recipient/recipient-notification-dialog.componet';
import { MatButton } from '@angular/material/button';
import { TemplateConfiguration } from '@home/pages/notification-center/template-table/template-configuration';
import { TemplateConfiguration } from '@home/pages/notification/template/template-configuration';
export interface RequestNotificationDialogData {
request?: NotificationRequest;
@ -51,12 +51,12 @@ export interface RequestNotificationDialogData {
}
@Component({
selector: 'tb-request-notification-dialog',
templateUrl: './request-notification-dialog.component.html',
styleUrls: ['./request-notification-dialog.component.scss']
selector: 'tb-sent-notification-dialog',
templateUrl: './sent-notification-dialog.component.html',
styleUrls: ['./sent-notification-dialog.component.scss']
})
export class RequestNotificationDialogComponent extends
TemplateConfiguration<RequestNotificationDialogComponent, NotificationRequest> implements OnDestroy {
export class SentNotificationDialogComponent extends
TemplateConfiguration<SentNotificationDialogComponent, NotificationRequest> implements OnDestroy {
@ViewChild('createNotification', {static: true}) createNotification: MatStepper;
stepperOrientation: Observable<StepperOrientation>;
@ -76,7 +76,7 @@ export class RequestNotificationDialogComponent extends
constructor(protected store: Store<AppState>,
protected router: Router,
protected dialogRef: MatDialogRef<RequestNotificationDialogComponent, NotificationRequest>,
protected dialogRef: MatDialogRef<SentNotificationDialogComponent, NotificationRequest>,
@Inject(MAT_DIALOG_DATA) public data: RequestNotificationDialogData,
private breakpointObserver: BreakpointObserver,
protected fb: FormBuilder,
@ -242,8 +242,8 @@ export class RequestNotificationDialogComponent extends
$event.stopPropagation();
}
button._elementRef.nativeElement.blur();
this.dialog.open<TargetNotificationDialogComponent, TargetsNotificationDialogData,
NotificationTarget>(TargetNotificationDialogComponent, {
this.dialog.open<RecipientNotificationDialogComponent, RecipientNotificationDialogData,
NotificationTarget>(RecipientNotificationDialogComponent, {
disableClose: true,
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
data: {}

69
ui-ngx/src/app/modules/home/pages/notification-center/notification-table/request-table-config.ts → ui-ngx/src/app/modules/home/pages/notification/sent/sent-table-config.resolver.ts

@ -37,50 +37,58 @@ import { Direction } from '@shared/models/page/sort-order';
import { DatePipe } from '@angular/common';
import { EntityAction } from '@home/models/entity/entity-component.models';
import {
RequestNotificationDialogComponent,
RequestNotificationDialogData
} from '@home/pages/notification-center/request-table/request-notification-dialog.componet';
RequestNotificationDialogData,
SentNotificationDialogComponent
} from '@home/pages/notification/sent/sent-notification-dialog.componet';
import { PageLink } from '@shared/models/page/page-link';
import {
NotificationRequestErrorDialogComponent,
NotificationRequestErrorDialogData
} from '@home/pages/notification-center/request-table/notification-request-error-dialog.component';
NotificationRequestErrorDialogData,
SentErrorDialogComponent
} from '@home/pages/notification/sent/sent-error-dialog.component';
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
import { Injectable } from '@angular/core';
export class RequestTableConfig extends EntityTableConfig<NotificationRequest, PageLink, NotificationRequestInfo> {
@Injectable()
export class SentTableConfigResolver implements Resolve<EntityTableConfig<NotificationRequest, PageLink, NotificationRequestInfo>> {
private readonly config: EntityTableConfig<NotificationRequest, PageLink, NotificationRequestInfo> =
new EntityTableConfig<NotificationRequest, PageLink, NotificationRequestInfo>();
constructor(private notificationService: NotificationService,
private translate: TranslateService,
private dialog: MatDialog,
private datePipe: DatePipe) {
super();
this.loadDataOnInit = false;
this.searchEnabled = false;
this.entityTranslations = {
this.config.detailsPanelEnabled = false;
this.config.selectionEnabled = false;
this.config.addEnabled = false;
this.config.searchEnabled = false;
this.config.entityTranslations = {
noEntities: 'notification.no-notification-request',
};
this.entityResources = {} as EntityTypeResource<NotificationRequest>;
this.config.entityResources = {} as EntityTypeResource<NotificationRequest>;
this.entitiesFetchFunction = pageLink => this.notificationService.getNotificationRequests(pageLink);
this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotificationRequests(pageLink);
this.deleteEnabled = (request) => request.status === NotificationRequestStatus.SCHEDULED;
this.deleteEntityTitle = () => this.translate.instant('notification.delete-request-title');
this.deleteEntityContent = () => this.translate.instant('notification.delete-request-text');
this.deleteEntity = id => this.notificationService.deleteNotificationRequest(id.id);
this.config.deleteEnabled = (request) => request.status === NotificationRequestStatus.SCHEDULED;
this.config.deleteEntityTitle = () => this.translate.instant('notification.delete-request-title');
this.config.deleteEntityContent = () => this.translate.instant('notification.delete-request-text');
this.config.deleteEntity = id => this.notificationService.deleteNotificationRequest(id.id);
this.cellActionDescriptors = this.configureCellActions();
this.config.cellActionDescriptors = this.configureCellActions();
this.onEntityAction = action => this.onRequestAction(action);
this.config.onEntityAction = action => this.onRequestAction(action);
this.handleRowClick = (event, entity) => {
this.config.handleRowClick = (event, entity) => {
if ((event.target as HTMLElement).getElementsByClassName('stats').length || (event.target as HTMLElement).className === 'stats') {
this.openStatsErrorDialog(event, entity);
}
return true;
};
this.defaultSortOrder = {property: 'createdTime', direction: Direction.DESC};
this.config.defaultSortOrder = {property: 'createdTime', direction: Direction.DESC};
this.columns.push(
this.config.columns.push(
new DateEntityTableColumn<NotificationRequestInfo>('createdTime', 'notification.created-time', this.datePipe, '170px'),
new EntityTableColumn<NotificationRequestInfo>('status', 'notification.status', '15%',
request => `<span style="display: flex;">${this.requestStatus(request.status)}${this.requestStats(request.stats)}</span>`,
@ -93,6 +101,10 @@ export class RequestTableConfig extends EntityTableConfig<NotificationRequest, P
);
}
resolve(route: ActivatedRouteSnapshot): EntityTableConfig<NotificationRequest, PageLink, NotificationRequestInfo> {
return this.config;
}
private configureCellActions(): Array<CellActionDescriptor<NotificationRequestInfo>> {
return [{
name: this.translate.instant('notification.notify-again'),
@ -106,8 +118,8 @@ export class RequestTableConfig extends EntityTableConfig<NotificationRequest, P
if ($event) {
$event.stopPropagation();
}
this.dialog.open<RequestNotificationDialogComponent, RequestNotificationDialogData,
NotificationTemplate>(RequestNotificationDialogComponent, {
this.dialog.open<SentNotificationDialogComponent, RequestNotificationDialogData,
NotificationTemplate>(SentNotificationDialogComponent, {
disableClose: true,
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
data: {
@ -116,7 +128,7 @@ export class RequestTableConfig extends EntityTableConfig<NotificationRequest, P
}
}).afterClosed().subscribe((res) => {
if (res && updateData) {
this.updateData();
this.config.updateData();
}
});
}
@ -151,6 +163,9 @@ export class RequestTableConfig extends EntityTableConfig<NotificationRequest, P
}
private requestStats(stats: NotificationRequestStats): string {
if (!stats?.errors) {
return '';
}
let countError = 0;
Object.keys(stats.errors).forEach(method => countError += Object.keys(stats.errors[method]).length);
if (countError === 0) {
@ -183,8 +198,8 @@ export class RequestTableConfig extends EntityTableConfig<NotificationRequest, P
if ($event) {
$event.stopPropagation();
}
this.dialog.open<NotificationRequestErrorDialogComponent, NotificationRequestErrorDialogData,
void>(NotificationRequestErrorDialogComponent, {
this.dialog.open<SentErrorDialogComponent, NotificationRequestErrorDialogData,
void>(SentErrorDialogComponent, {
disableClose: true,
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
data: {

0
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-autocomplete.component.html → ui-ngx/src/app/modules/home/pages/notification/template/template-autocomplete.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-autocomplete.component.scss → ui-ngx/src/app/modules/home/pages/notification/template/template-autocomplete.component.scss

2
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-autocomplete.component.ts → ui-ngx/src/app/modules/home/pages/notification/template/template-autocomplete.component.ts

@ -37,7 +37,7 @@ import { isEqual } from '@core/utils';
import {
TemplateNotificationDialogComponent,
TemplateNotificationDialogData
} from '@home/pages/notification-center/template-table/template-notification-dialog.component';
} from '@home/pages/notification/template/template-notification-dialog.component';
import { MatDialog } from '@angular/material/dialog';
import { MatButton } from '@angular/material/button';
import { coerceBoolean } from '@shared/decorators/coerce-boolean';

0
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-configuration.ts → ui-ngx/src/app/modules/home/pages/notification/template/template-configuration.ts

0
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-notification-dialog.component.html → ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html

0
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-notification-dialog.component.scss → ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.scss

2
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-notification-dialog.component.ts → ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts

@ -30,7 +30,7 @@ import { MatStepper } from '@angular/material/stepper';
import { BreakpointObserver } from '@angular/cdk/layout';
import { MediaBreakpoints } from '@shared/models/constants';
import { TranslateService } from '@ngx-translate/core';
import { TemplateConfiguration } from '@home/pages/notification-center/template-table/template-configuration';
import { TemplateConfiguration } from '@home/pages/notification/template/template-configuration';
import { AuthState } from '@core/auth/auth.models';
import { getCurrentAuthState } from '@core/auth/auth.selectors';
import { AuthUser } from '@shared/models/user.model';

51
ui-ngx/src/app/modules/home/pages/notification-center/notification-table/template-table-config.ts → ui-ngx/src/app/modules/home/pages/notification/template/template-table-config.resolver.ts

@ -28,46 +28,51 @@ import { MatDialog } from '@angular/material/dialog';
import {
TemplateNotificationDialogComponent,
TemplateNotificationDialogData
} from '@home/pages/notification-center/template-table/template-notification-dialog.component';
} from '@home/pages/notification/template/template-notification-dialog.component';
import { TranslateService } from '@ngx-translate/core';
import {
TemplateTableHeaderComponent
} from '@home/pages/notification-center/template-table/template-table-header.component';
import { TemplateTableHeaderComponent } from '@home/pages/notification/template/template-table-header.component';
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
@Injectable()
export class TemplateTableConfigResolver implements Resolve<EntityTableConfig<NotificationTemplate>> {
export class TemplateTableConfig extends EntityTableConfig<NotificationTemplate> {
private readonly config: EntityTableConfig<NotificationTemplate> = new EntityTableConfig<NotificationTemplate>();
constructor(private notificationService: NotificationService,
private translate: TranslateService,
private dialog: MatDialog) {
super();
this.loadDataOnInit = false;
this.rowPointer = true;
this.entityTranslations = {
this.config.detailsPanelEnabled = false;
this.config.selectionEnabled = false;
this.config.addEnabled = false;
this.config.rowPointer = true;
this.config.entityTranslations = {
noEntities: 'notification.no-notification-templates',
search: 'notification.search-templates'
};
this.entityResources = {} as EntityTypeResource<NotificationTemplate>;
this.config.entityResources = {} as EntityTypeResource<NotificationTemplate>;
this.entitiesFetchFunction = pageLink => this.notificationService.getNotificationTemplates(pageLink);
this.config.entitiesFetchFunction = pageLink => this.notificationService.getNotificationTemplates(pageLink);
this.deleteEntityTitle = template => this.translate.instant('notification.delete-template-title', {templateName: template.name});
this.deleteEntityContent = () => this.translate.instant('notification.delete-template-text');
this.deleteEntity = id => this.notificationService.deleteNotificationTemplate(id.id);
this.config.deleteEntityTitle = template => this.translate.instant('notification.delete-template-title', {templateName: template.name});
this.config.deleteEntityContent = () => this.translate.instant('notification.delete-template-text');
this.config.deleteEntity = id => this.notificationService.deleteNotificationTemplate(id.id);
this.cellActionDescriptors = this.configureCellActions();
this.config.cellActionDescriptors = this.configureCellActions();
this.headerComponent = TemplateTableHeaderComponent;
this.onEntityAction = action => this.onTemplateAction(action);
this.config.headerComponent = TemplateTableHeaderComponent;
this.config.onEntityAction = action => this.onTemplateAction(action);
this.defaultSortOrder = {property: 'notificationType', direction: Direction.ASC};
this.config.defaultSortOrder = {property: 'notificationType', direction: Direction.ASC};
this.handleRowClick = ($event, template) => {
this.config.handleRowClick = ($event, template) => {
this.editTemplate($event, template);
return true;
};
this.columns.push(
this.config.columns.push(
new EntityTableColumn<NotificationTemplate>('notificationType', 'notification.type', '15%',
(template) => this.translate.instant(NotificationTemplateTypeTranslateMap.get(template.notificationType).name)),
new EntityTableColumn<NotificationTemplate>('name', 'notification.template', '25%'),
@ -78,6 +83,10 @@ export class TemplateTableConfig extends EntityTableConfig<NotificationTemplate>
);
}
resolve(route: ActivatedRouteSnapshot): EntityTableConfig<NotificationTemplate> {
return this.config;
}
private configureCellActions(): Array<CellActionDescriptor<NotificationTemplate>> {
return [
{
@ -105,7 +114,7 @@ export class TemplateTableConfig extends EntityTableConfig<NotificationTemplate>
}).afterClosed()
.subscribe((res) => {
if (res) {
this.updateData();
this.config.updateData();
}
});
}

0
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-table-header.component.html → ui-ngx/src/app/modules/home/pages/notification/template/template-table-header.component.html

2
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-table-header.component.scss → ui-ngx/src/app/modules/home/pages/notification/template/template-table-header.component.scss

@ -14,5 +14,5 @@
* limitations under the License.
*/
:host{
width: 100%;
width: 10000px;
}

0
ui-ngx/src/app/modules/home/pages/notification-center/template-table/template-table-header.component.ts → ui-ngx/src/app/modules/home/pages/notification/template/template-table-header.component.ts

8
ui-ngx/src/app/shared/models/notification.models.ts

@ -388,14 +388,14 @@ export const NotificationTargetConfigTypeInfoMap = new Map<NotificationTargetCon
],
[NotificationTargetConfigType.ORIGINATOR_ENTITY_OWNER_USERS,
{
name: 'notification.target-type.originator-entity-owner-users',
hint: 'notification.target-type.originator-entity-owner-users-hint'
name: 'notification.target-type.users-entity-owner',
hint: 'notification.target-type.users-entity-owner-hint'
}
],
[NotificationTargetConfigType.ACTION_TARGET_USER,
{
name: 'notification.target-type.action-target-user',
hint: 'notification.target-type.action-target-user-hint'
name: 'notification.target-type.affected-user',
hint: 'notification.target-type.affected-user-hint'
}
]
]);

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

@ -2813,7 +2813,7 @@
"new-notification": "New notification",
"no-inbox-notification": "No notification found",
"no-notification-request": "No notification request",
"no-notification-templates": "Not found notification templates",
"no-notification-templates": "No notification templates found",
"no-notifications-yet": "No notifications yet",
"no-rule": "No rule configured",
"no-rules-notification": "No rules notification",
@ -2886,12 +2886,12 @@
"target-name": "Name",
"target-name-required": "Name is required",
"target-type": {
"action-target-user": "Action target user",
"action-target-user-hint": "Action target user hint",
"affected-user": "Affected user",
"affected-user-hint": "Affected user hint",
"all-users": "All users",
"customer-users": "Customer users",
"originator-entity-owner-users": "Users of originator entity owner",
"originator-entity-owner-users-hint": "Users of originator entity owner hint",
"users-entity-owner": "Users of the entity owner",
"users-entity-owner-hint": "Users of the entity owner hint",
"tenant-administrators": "Tenant administrators",
"user-filters": "User filter",
"user-list": "User list"

Loading…
Cancel
Save