Skip to content

Commit 24b4dc8

Browse files
committed
PD-3855
1 parent e2b4539 commit 24b4dc8

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/app/core/inbox/permission-notifications.service.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ describe('PermissionNotificationsService', () => {
4646
providers: [
4747
PermissionNotificationsService,
4848
{ provide: InboxService, useValue: inboxSpy },
49-
{ provide: AccountTrustedOrganizationsService, useValue: trustedOrgsSpy },
49+
{
50+
provide: AccountTrustedOrganizationsService,
51+
useValue: trustedOrgsSpy,
52+
},
5053
],
5154
})
5255
service = TestBed.inject(PermissionNotificationsService)

src/app/core/inbox/permission-notifications.service.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import { Injectable } from '@angular/core'
22
import { Observable, of } from 'rxjs'
3-
import { catchError, first, last, map, switchMap, takeWhile } from 'rxjs/operators'
3+
import {
4+
catchError,
5+
first,
6+
last,
7+
map,
8+
switchMap,
9+
takeWhile,
10+
} from 'rxjs/operators'
411
import { InboxService } from './inbox.service'
512
import {
613
InboxNotification,

src/app/record/components/top-bar/top-bar.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class TopBarComponent implements OnInit, OnDestroy {
157157
.getStateOf(TogglzFlag.PERMISSION_NOTIFICATIONS)
158158
.pipe(take(1))
159159
.subscribe((value) => {
160-
if (!value) {
160+
if (value) {
161161
if (
162162
!this.isPublicRecord &&
163163
!this.recordWithIssues &&
@@ -212,7 +212,7 @@ export class TopBarComponent implements OnInit, OnDestroy {
212212
.subscribe((grouped) => {
213213
this.permissionPanelRaw = grouped
214214
this.permissionPanelNotifications = grouped.map((n) => {
215-
const orgName = n?.source?.sourceName?.content || ''
215+
const orgName = n?.sourceDescription || ''
216216
const escaped = orgName
217217
.replace(/&/g, '&')
218218
.replace(/</g, '&lt;')

0 commit comments

Comments
 (0)