mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
workflow delete/sendback
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { WorkflowItemDeleteComponent } from './workflow-item-send-back.component';
|
||||
|
||||
describe('WorkflowItemDeleteComponent', () => {
|
||||
let component: WorkflowItemDeleteComponent;
|
||||
let fixture: ComponentFixture<WorkflowItemDeleteComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ WorkflowItemDeleteComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(WorkflowItemDeleteComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@@ -0,0 +1,31 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { WorkflowItemActionPageComponent } from '../workflow-item-action-page.component';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { WorkflowItemDataService } from '../../core/submission/workflowitem-data.service';
|
||||
import { RouteService } from '../../core/services/route.service';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-workflow-item-send-back',
|
||||
templateUrl: '../workflow-item-action-page.component.html'
|
||||
})
|
||||
export class WorkflowItemSendBackComponent extends WorkflowItemActionPageComponent {
|
||||
constructor(protected route: ActivatedRoute,
|
||||
protected workflowItemService: WorkflowItemDataService,
|
||||
protected router: Router,
|
||||
protected routeService: RouteService,
|
||||
protected notificationsService: NotificationsService,
|
||||
protected translationService: TranslateService) {
|
||||
super(route, workflowItemService, router, routeService, notificationsService, translationService);
|
||||
}
|
||||
|
||||
getType(): string {
|
||||
return 'send-back';
|
||||
}
|
||||
|
||||
sendRequest(id: string): Observable<boolean> {
|
||||
return this.workflowItemService.sendBack(id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user