mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 04:23:04 +00:00
68954: Display claimed task actions depending on config from REST API
Conflicts: src/app/core/core.module.ts src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.html
This commit is contained in:
40
src/app/core/data/workflow-action-data.service.ts
Normal file
40
src/app/core/data/workflow-action-data.service.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { DataService } from './data.service';
|
||||
import { WorkflowAction } from '../tasks/models/workflow-action-object.model';
|
||||
import { RequestService } from './request.service';
|
||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||
import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { CoreState } from '../core.reducers';
|
||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { DefaultChangeAnalyzer } from './default-change-analyzer.service';
|
||||
import { FindListOptions } from './request.models';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
/**
|
||||
* A service responsible for fetching/sending data from/to the REST API on the workflowactions endpoint
|
||||
*/
|
||||
@Injectable()
|
||||
export class WorkflowActionDataService extends DataService<WorkflowAction> {
|
||||
protected linkPath = 'workflowactions';
|
||||
|
||||
constructor(
|
||||
protected requestService: RequestService,
|
||||
protected rdbService: RemoteDataBuildService,
|
||||
protected dataBuildService: NormalizedObjectBuildService,
|
||||
protected store: Store<CoreState>,
|
||||
protected objectCache: ObjectCacheService,
|
||||
protected halService: HALEndpointService,
|
||||
protected notificationsService: NotificationsService,
|
||||
protected http: HttpClient,
|
||||
protected comparator: DefaultChangeAnalyzer<WorkflowAction>) {
|
||||
super();
|
||||
}
|
||||
|
||||
getBrowseEndpoint(options: FindListOptions, linkPath?: string): Observable<string> {
|
||||
return this.halService.getEndpoint(this.linkPath);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user