diff --git a/ui/src/app/account/login/login.component.ts b/ui/src/app/account/login/login.component.ts index 9969e4782..f8b06be60 100644 --- a/ui/src/app/account/login/login.component.ts +++ b/ui/src/app/account/login/login.component.ts @@ -38,7 +38,7 @@ export class LoginComponent implements AfterViewInit, OnDestroy { private ngZone: NgZone ) { this.sub = this.eventService.on(EventType.LOG_IN_SUCCESS).subscribe((e) => { - console.log(e.payload) + console.log('login success') }) } @@ -109,7 +109,7 @@ export class LoginComponent implements AfterViewInit, OnDestroy { this.router.navigate(['']) }) - this.eventService.broadcast(new Event(EventType.LOG_IN_SUCCESS, 'logged in')) + this.eventService.broadcast(new Event(EventType.LOG_IN_SUCCESS)) // previousState was set in the authExpiredInterceptor before being redirected to login modal. // since login is successful, go to stored previousState and clear previousState diff --git a/ui/src/app/affiliation/affiliation-delete.component.ts b/ui/src/app/affiliation/affiliation-delete.component.ts index 8dcf23cfe..cedb715f0 100644 --- a/ui/src/app/affiliation/affiliation-delete.component.ts +++ b/ui/src/app/affiliation/affiliation-delete.component.ts @@ -45,12 +45,10 @@ export class AffiliationDeleteDialogComponent implements OnInit { if (id) { this.affiliationService.delete(id).subscribe((response) => { if (response) { - this.eventService.broadcast(new Event(EventType.AFFILIATION_LIST_MODIFICATION, 'Deleted an affiliation')) + this.eventService.broadcast(new Event(EventType.AFFILIATION_LIST_MODIFICATION)) this.alertService.broadcast(AlertType.AFFILIATION_DELETED) } else { - this.eventService.broadcast( - new Event(EventType.AFFILIATION_LIST_MODIFICATION, 'Failed to delete an affiliation') - ) + this.eventService.broadcast(new Event(EventType.AFFILIATION_LIST_MODIFICATION)) this.alertService.broadcast(AlertType.AFFILIATION_DELETE_FAILURE) } this.activeModal.dismiss(true) diff --git a/ui/src/app/affiliation/affiliation-import-dialog.component.ts b/ui/src/app/affiliation/affiliation-import-dialog.component.ts index 2daf0db93..4b8a04fe9 100644 --- a/ui/src/app/affiliation/affiliation-import-dialog.component.ts +++ b/ui/src/app/affiliation/affiliation-import-dialog.component.ts @@ -63,7 +63,7 @@ export class AffiliationImportDialogComponent { } close() { - this.eventService.broadcast(new Event(EventType.IMPORT_AFFILIATIONS, '')) + this.eventService.broadcast(new Event(EventType.IMPORT_AFFILIATIONS)) this.activeModal.dismiss(true) } } diff --git a/ui/src/app/affiliation/send-notifications-dialog.component.ts b/ui/src/app/affiliation/send-notifications-dialog.component.ts index 068f7de96..7d8d4d84e 100644 --- a/ui/src/app/affiliation/send-notifications-dialog.component.ts +++ b/ui/src/app/affiliation/send-notifications-dialog.component.ts @@ -70,7 +70,6 @@ export class SendNotificationsDialogComponent implements OnInit { close() { this.eventService.broadcast({ type: EventType.SEND_NOTIFICATIONS, - payload: 'Send notifications', }) this.activeModal.dismiss(true) } diff --git a/ui/src/app/member/member-import-dialog.component.ts b/ui/src/app/member/member-import-dialog.component.ts index a60ac72b6..a7db1aeb2 100644 --- a/ui/src/app/member/member-import-dialog.component.ts +++ b/ui/src/app/member/member-import-dialog.component.ts @@ -50,7 +50,7 @@ export class MemberImportDialogComponent { this.csvErrors = JSON.parse(res) this.loading = false if (this.csvErrors.length === 0) { - this.eventService.broadcast(new Event(EventType.MEMBER_LIST_MODIFICATION, 'New member uploaded')) + this.eventService.broadcast(new Event(EventType.MEMBER_LIST_MODIFICATION)) this.activeModal.dismiss(true) } } diff --git a/ui/src/app/shared/model/event.model.ts b/ui/src/app/shared/model/event.model.ts index 5643c6f10..3fce64cd6 100644 --- a/ui/src/app/shared/model/event.model.ts +++ b/ui/src/app/shared/model/event.model.ts @@ -1,8 +1,5 @@ import { EventType } from 'src/app/app.constants' export class Event { - constructor( - public type: EventType, - public payload: string - ) {} + constructor(public type: EventType) {} } diff --git a/ui/src/app/user/user-delete.component.ts b/ui/src/app/user/user-delete.component.ts index 549765efe..1a1e9f8ef 100644 --- a/ui/src/app/user/user-delete.component.ts +++ b/ui/src/app/user/user-delete.component.ts @@ -33,7 +33,7 @@ export class UserDeleteDialogComponent implements OnInit { confirmDelete(id: string | undefined) { if (id) { this.userService.delete(id).subscribe(() => { - this.eventService.broadcast(new Event(EventType.USER_LIST_MODIFIED, 'Deleted a user')) + this.eventService.broadcast(new Event(EventType.USER_LIST_MODIFIED)) this.activeModal.dismiss(true) this.alertService.broadcast(AlertType.USER_DELETED) }) diff --git a/ui/src/app/user/user-import-dialog.component.ts b/ui/src/app/user/user-import-dialog.component.ts index d9ef0ecb7..5c6f2e11f 100644 --- a/ui/src/app/user/user-import-dialog.component.ts +++ b/ui/src/app/user/user-import-dialog.component.ts @@ -52,7 +52,7 @@ export class UserImportDialogComponent { this.csvErrors = JSON.parse(res) this.loading = false if (this.csvErrors.length === 0) { - this.eventService.broadcast(new Event(EventType.USER_LIST_MODIFIED, 'New user settings uploaded')) + this.eventService.broadcast(new Event(EventType.USER_LIST_MODIFIED)) this.activeModal.dismiss(true) } }