diff --git a/package.json b/package.json index 101d901..f0e9515 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,11 @@ "watch": "ng build --watch --configuration development", "test": "ng test", - "docker-build": "docker build -t b2rs-multi-stage-image .", - "docker-create": "docker run --name b2rs-app-container -d -p 80:80 b2rs-multi-stage-image", + "docker-build": "docker build -t b2rs-front-end-image .", + "docker-tag": "docker tag b2rs-front-end-image:latest 834628752744.dkr.ecr.ap-southeast-1.amazonaws.com/b2rs-front-end-image:latest", + "docker-push": "docker push 834628752744.dkr.ecr.ap-southeast-1.amazonaws.com/b2rs-front-end-image:latest", + + "docker-create": "docker run --name b2rs-app-container -d -p 80:80 b2rs-front-end-image", "docker-destroy": "docker container rm b2rs-app-container", "docker-start": "docker start b2rs-app-container", diff --git a/src/app/layout/navbar/navbar.component.ts b/src/app/layout/navbar/navbar.component.ts index 517e080..584630d 100644 --- a/src/app/layout/navbar/navbar.component.ts +++ b/src/app/layout/navbar/navbar.component.ts @@ -13,12 +13,16 @@ export class NavbarComponent implements OnInit, OnDestroy { showLogout: boolean = false; isShowingNotificationsSubscription: Subscription; + loginRoleSubscription: Subscription; loginName: string = ''; notificationsCount: number = 0; constructor(loginService: LoginService, private notificationService: NotificationService) { - this.loginName = loginService.getLoginName(); + this.loginRoleSubscription = loginService.getLoginRoleObservable().subscribe(loginRole => { + this.loginName = loginService.getLoginName(); + }); + this.notificationsCount = notificationService.getAllowedNotifications().length; this.isShowingNotificationsSubscription = this.notificationService.getIsShowingNotificationsObservable().subscribe(isShowingNotifications => this.isShowingNotifications = isShowingNotifications); @@ -35,6 +39,10 @@ export class NavbarComponent implements OnInit, OnDestroy { if (this.isShowingNotificationsSubscription) { this.isShowingNotificationsSubscription.unsubscribe(); } + + if (this.loginRoleSubscription) { + this.loginRoleSubscription.unsubscribe(); + } } } diff --git a/src/app/layout/notifications/notifications-list/notifications-list.component.html b/src/app/layout/notifications/notifications-list/notifications-list.component.html index 47b7eea..5256bda 100644 --- a/src/app/layout/notifications/notifications-list/notifications-list.component.html +++ b/src/app/layout/notifications/notifications-list/notifications-list.component.html @@ -1,6 +1,6 @@