mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 14:03:06 +00:00
69305: Refactor workflow-actions to be resolved as HAL links
This commit is contained in:
@@ -13,6 +13,8 @@ import { HALLink } from '../../shared/hal-link.model';
|
||||
import { WorkflowItem } from '../../submission/models/workflowitem.model';
|
||||
import { TASK_OBJECT } from './task-object.resource-type';
|
||||
import { WORKFLOWITEM } from '../../eperson/models/workflowitem.resource-type';
|
||||
import { WORKFLOW_ACTION } from './workflow-action-object.resource-type';
|
||||
import { WorkflowAction } from './workflow-action-object.model';
|
||||
|
||||
/**
|
||||
* An abstract model class for a TaskObject.
|
||||
@@ -34,12 +36,6 @@ export class TaskObject extends DSpaceObject implements CacheableObject {
|
||||
@autoserialize
|
||||
step: string;
|
||||
|
||||
/**
|
||||
* The task action type
|
||||
*/
|
||||
@autoserialize
|
||||
action: string;
|
||||
|
||||
/**
|
||||
* The {@link HALLink}s for this TaskObject
|
||||
*/
|
||||
@@ -49,6 +45,7 @@ export class TaskObject extends DSpaceObject implements CacheableObject {
|
||||
owner: HALLink;
|
||||
group: HALLink;
|
||||
workflowitem: HALLink;
|
||||
action: HALLink;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -72,4 +69,11 @@ export class TaskObject extends DSpaceObject implements CacheableObject {
|
||||
@link(WORKFLOWITEM)
|
||||
workflowitem?: Observable<RemoteData<WorkflowItem>> | WorkflowItem;
|
||||
|
||||
/**
|
||||
* The task action type
|
||||
* Will be undefined unless the group {@link HALLink} has been resolved.
|
||||
*/
|
||||
@link(WORKFLOW_ACTION, false, 'action')
|
||||
action: Observable<RemoteData<WorkflowAction>>;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user