-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CST-12109] request reinstate for normal users
- Loading branch information
1 parent
ad5e3af
commit 8cc45e8
Showing
10 changed files
with
143 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
import { Observable, tap } from 'rxjs'; | ||
import { EPersonDataService } from '../../../core/eperson/eperson-data.service'; | ||
import { EPerson } from '../../../core/eperson/models/eperson.model'; | ||
import { getFirstCompletedRemoteData, getRemoteDataPayload } from '../../../core/shared/operators'; | ||
|
||
@Pipe({ | ||
name: 'dsGetEPersonData' | ||
}) | ||
export class GetEPersonDataPipe implements PipeTransform { | ||
constructor(private ePersonDataService: EPersonDataService) { } | ||
|
||
/** | ||
* Transforms the personId into an Observable of EPerson. | ||
* @param personId The ID of the person. | ||
* @returns An Observable of EPerson. | ||
*/ | ||
transform(personId: string): Observable<EPerson> { | ||
return this.ePersonDataService.findById(personId, true).pipe( | ||
getFirstCompletedRemoteData(), | ||
getRemoteDataPayload(), | ||
tap((ePerson: EPerson) => {console.log(ePerson)}) | ||
); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters