Skip to content

Commit 5ff4750

Browse files
119915: Restored functionality to hide the research profile section on the profile page
(cherry picked from commit ded0079)
1 parent d740b5d commit 5ff4750

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

src/app/profile-page/profile-page.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ng-container *ngVar="(user$ | async) as user">
22
<div class="container" *ngIf="user">
33
<h1>{{'profile.title' | translate}}</h1>
4-
<ng-container>
4+
<ng-container *ngIf="isResearcherProfileEnabled$ | async">
55
<div class="card mb-4">
66
<div class="card-header">{{'profile.card.researcher' | translate}}</div>
77
<div class="card-body">

src/app/profile-page/profile-page.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ describe('ProfilePageComponent', () => {
369369
});
370370

371371
it('should return true', () => {
372-
const result = component.isResearcherProfileEnabled();
372+
const result = component.isResearcherProfileEnabled$;
373373
const expected = cold('a', {
374374
a: true,
375375
});
@@ -385,7 +385,7 @@ describe('ProfilePageComponent', () => {
385385
});
386386

387387
it('should return false', () => {
388-
const result = component.isResearcherProfileEnabled();
388+
const result = component.isResearcherProfileEnabled$;
389389
const expected = cold('a', {
390390
a: false,
391391
});
@@ -401,7 +401,7 @@ describe('ProfilePageComponent', () => {
401401
});
402402

403403
it('should return false', () => {
404-
const result = component.isResearcherProfileEnabled();
404+
const result = component.isResearcherProfileEnabled$;
405405
const expected = cold('a', {
406406
a: false,
407407
});

src/app/profile-page/profile-page.component.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,6 @@ export class ProfilePageComponent implements OnInit {
235235
this.updateProfile();
236236
}
237237

238-
/**
239-
* Returns true if the researcher profile feature is enabled, false otherwise.
240-
*/
241-
isResearcherProfileEnabled(): Observable<boolean> {
242-
return this.isResearcherProfileEnabled$.asObservable();
243-
}
244-
245238
/**
246239
* Returns an error message from a password validation request with a specific reason or
247240
* a default message without specific reason.

0 commit comments

Comments
 (0)