Skip to content

Commit

Permalink
119915: Restored functionality to hide the research profile section o…
Browse files Browse the repository at this point in the history
…n the profile page

(cherry picked from commit ded0079)
  • Loading branch information
alexandrevryghem committed Dec 9, 2024
1 parent d740b5d commit 5ff4750
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/app/profile-page/profile-page.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ng-container *ngVar="(user$ | async) as user">
<div class="container" *ngIf="user">
<h1>{{'profile.title' | translate}}</h1>
<ng-container>
<ng-container *ngIf="isResearcherProfileEnabled$ | async">
<div class="card mb-4">
<div class="card-header">{{'profile.card.researcher' | translate}}</div>
<div class="card-body">
Expand Down
6 changes: 3 additions & 3 deletions src/app/profile-page/profile-page.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ describe('ProfilePageComponent', () => {
});

it('should return true', () => {
const result = component.isResearcherProfileEnabled();
const result = component.isResearcherProfileEnabled$;
const expected = cold('a', {
a: true,
});
Expand All @@ -385,7 +385,7 @@ describe('ProfilePageComponent', () => {
});

it('should return false', () => {
const result = component.isResearcherProfileEnabled();
const result = component.isResearcherProfileEnabled$;
const expected = cold('a', {
a: false,
});
Expand All @@ -401,7 +401,7 @@ describe('ProfilePageComponent', () => {
});

it('should return false', () => {
const result = component.isResearcherProfileEnabled();
const result = component.isResearcherProfileEnabled$;
const expected = cold('a', {
a: false,
});
Expand Down
7 changes: 0 additions & 7 deletions src/app/profile-page/profile-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,6 @@ export class ProfilePageComponent implements OnInit {
this.updateProfile();
}

/**
* Returns true if the researcher profile feature is enabled, false otherwise.
*/
isResearcherProfileEnabled(): Observable<boolean> {
return this.isResearcherProfileEnabled$.asObservable();
}

/**
* Returns an error message from a password validation request with a specific reason or
* a default message without specific reason.
Expand Down

0 comments on commit 5ff4750

Please sign in to comment.