mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
119915: Restored functionality to hide the research profile section on the profile page
This commit is contained in:
@@ -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">
|
||||||
|
@@ -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,
|
||||||
});
|
});
|
||||||
|
@@ -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.
|
||||||
|
Reference in New Issue
Block a user