From 69aafef56837a204eb58af1b197a79d0fe560814 Mon Sep 17 00:00:00 2001 From: rusikv Date: Tue, 28 Feb 2023 15:04:03 +0200 Subject: [PATCH] Changed display comments button position, moved comments dialog actions on top, added ignore loading on writing comments and reassign --- .../alarm/alarm-assignee-panel.component.ts | 4 +-- .../alarm/alarm-comment-dialog.component.html | 15 ++--------- .../alarm/alarm-comment-dialog.component.ts | 14 ++-------- .../alarm/alarm-comment.component.html | 10 ++++--- .../alarm/alarm-comment.component.ts | 12 ++++----- .../alarm/alarm-details-dialog.component.ts | 2 +- .../lib/alarms-table-widget.component.html | 4 ++- .../lib/alarms-table-widget.component.ts | 26 +++++++++---------- ...larms-table-widget-settings.component.html | 6 ++--- 9 files changed, 38 insertions(+), 55 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-panel.component.ts b/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-panel.component.ts index 2cf382afcf..bd50beef31 100644 --- a/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-panel.component.ts +++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-assignee-panel.component.ts @@ -129,12 +129,12 @@ export class AlarmAssigneePanelComponent implements OnInit, AfterViewInit, OnDe } assign(user: User): void { - this.alarmService.assignAlarm(this.alarmId, user.id.id).subscribe( + this.alarmService.assignAlarm(this.alarmId, user.id.id, {ignoreLoading: true}).subscribe( () => this.overlayRef.dispose()); } unassign(): void { - this.alarmService.unassignAlarm(this.alarmId).subscribe( + this.alarmService.unassignAlarm(this.alarmId, {ignoreLoading: true}).subscribe( () => this.overlayRef.dispose()); } diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.html b/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.html index 76fac3aaae..94f8f47eb1 100644 --- a/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.html +++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.html @@ -33,23 +33,12 @@ [commentsHeaderEnabled]="commentsHeaderEnabled"> -
- - - -
diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.ts b/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.ts index 5f28ce905e..026ebae8c0 100644 --- a/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-comment-dialog.component.ts @@ -14,14 +14,13 @@ /// limitations under the License. /// -import { Component, Inject, ViewChild } from '@angular/core'; +import { Component, Inject } from '@angular/core'; import { DialogComponent } from '@shared/components/dialog.component'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { Router } from '@angular/router'; import { AlarmInfo } from '@shared/models/alarm.models'; -import { AlarmCommentComponent } from '@home/components/alarm/alarm-comment.component'; export interface AlarmCommentDialogData { alarmId?: string; @@ -37,9 +36,8 @@ export interface AlarmCommentDialogData { export class AlarmCommentDialogComponent extends DialogComponent { alarmId: string; - commentsHeaderEnabled: boolean = false; - @ViewChild('alarmCommentComponent', { static: true }) alarmCommentComponent: AlarmCommentComponent; + commentsHeaderEnabled: boolean = false; constructor(protected store: Store, protected router: Router, @@ -50,14 +48,6 @@ export class AlarmCommentDialogComponent extends DialogComponent -
-
- {{ 'alarm-comment.comments' | translate }} -
+
+
+ + {{ 'alarm-comment.comments' | translate }} + +