workflow delete/sendback

This commit is contained in:
lotte
2020-04-03 18:13:22 +02:00
parent 2eb3d11cd2
commit de1b57d8d9
24 changed files with 271 additions and 127 deletions

View File

@@ -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();
});
});

View File

@@ -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);
}
}