69305: Refactor workflow-actions to be resolved as HAL links

This commit is contained in:
Kristof De Langhe
2020-03-04 16:22:05 +01:00
parent 496bedfe2e
commit c087b8859f
10 changed files with 40 additions and 19 deletions

View File

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