mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00

Add the Item Withdraw and Reistate action Add the make Item Private and Public action Add the Permanently Delete action
36 lines
884 B
TypeScript
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));
|
|
}
|
|
|
|
}
|