Files
dspace-angular/src/app/+item-page/edit-item-page/edit-item-page.component.ts
Yana De Pauw d9a393c8e6 Add Item Status Edit Actions
Add the Item Withdraw and Reistate action
Add the make Item Private and Public action
Add the Permanently Delete action
2018-12-18 16:52:11 +01:00

36 lines
884 B
TypeScript

import {fadeIn, fadeInOut} from '../../shared/animations/fade';
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {RemoteData} from '../../core/data/remote-data';
import {Item} from '../../core/shared/item.model';
import {Observable} from 'rxjs';
import {map} from 'rxjs/operators';
@Component({
selector: 'ds-edit-item-page',
templateUrl: './edit-item-page.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [
fadeIn,
fadeInOut
]
})
/**
* Page component for editing an item
*/
export class EditItemPageComponent implements OnInit {
/**
* The item to edit
*/
itemRD$: Observable<RemoteData<Item>>;
constructor(private route: ActivatedRoute) {
}
ngOnInit(): void {
this.itemRD$ = this.route.data.pipe(map((data) => data.item));
}
}