mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
39 lines
1016 B
TypeScript
39 lines
1016 B
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { ActivatedRoute } from '@angular/router';
|
|
import { Observable } from 'rxjs';
|
|
import { first, map } from 'rxjs/operators';
|
|
import { RemoteData } from '../../../core/data/remote-data';
|
|
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
|
|
|
@Component({
|
|
selector: 'ds-community-authorizations',
|
|
templateUrl: './community-authorizations.component.html',
|
|
})
|
|
/**
|
|
* Component that handles the community Authorizations
|
|
*/
|
|
export class CommunityAuthorizationsComponent<TDomain extends DSpaceObject> implements OnInit {
|
|
|
|
/**
|
|
* The initial DSO object
|
|
*/
|
|
public dsoRD$: Observable<RemoteData<TDomain>>;
|
|
|
|
/**
|
|
* Initialize instance variables
|
|
*
|
|
* @param {ActivatedRoute} route
|
|
*/
|
|
constructor(
|
|
private route: ActivatedRoute
|
|
) {
|
|
}
|
|
|
|
/**
|
|
* Initialize the component, setting up the community
|
|
*/
|
|
ngOnInit(): void {
|
|
this.dsoRD$ = this.route.parent.parent.data.pipe(first(), map((data) => data.dso));
|
|
}
|
|
}
|