119915: Restored functionality to hide the research profile section on the profile page

This commit is contained in:
Alexandre Vryghem
2024-11-06 14:07:58 +01:00
parent 0cb5b76159
commit ded0079f24
3 changed files with 4 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
<ng-container *ngVar="(user$ | async) as user"> <ng-container *ngVar="(user$ | async) as user">
<div class="container" *ngIf="user"> <div class="container" *ngIf="user">
<h1>{{'profile.title' | translate}}</h1> <h1>{{'profile.title' | translate}}</h1>
<ng-container> <ng-container *ngIf="isResearcherProfileEnabled$ | async">
<div class="card mb-4"> <div class="card mb-4">
<div class="card-header">{{'profile.card.researcher' | translate}}</div> <div class="card-header">{{'profile.card.researcher' | translate}}</div>
<div class="card-body"> <div class="card-body">

View File

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

View File

@@ -235,13 +235,6 @@ export class ProfilePageComponent implements OnInit {
this.updateProfile(); 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 * Returns an error message from a password validation request with a specific reason or
* a default message without specific reason. * a default message without specific reason.