mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4128] ProcessCloud - add complete task directive (#4364)
* [ADF-4128] ProcessCloud - add complete task directive * [ADF-4128] ProcessCloud - fix completion functionality and add documentation * [ADF-4128] ProcessCloud - PR changes * [ADF-4128] ProcessCloud - lint * [ADF-4148] ProcessServicesCloud - change layout * [ADF-4128] fix PR changes * [ADF-4128] - refractor complete task directive * [ADF-4128] - fix lint * [ADF-4128] - PR changes * [ADF-4128] - replace isCompleted method from service with model method * [ADF-4128] fix unit tests * [ADF-4128] - change travis yml * [ADF-4128] - fix travis.yml * [ADF-4128] - travis lint
This commit is contained in:
committed by
Eugenio Romano
parent
e586ee17d5
commit
791051edee
26
docs/process-services-cloud/complete-task.directive.md
Normal file
26
docs/process-services-cloud/complete-task.directive.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
Title: Complete Cloud Task
|
||||
Added: v3.1.0
|
||||
Status: Experimental
|
||||
Last reviewed: 2019-02-28
|
||||
---
|
||||
|
||||
# [Complete task directive](../../lib/process-services-cloud/src/lib/task/task-header/directives/complete-task.directive.ts "Defined in complete-task.directive.ts")
|
||||
|
||||
Complete a task
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<button adf-cloud-complete-task [appName]="appName" [taskId]="taskId" (success)="onTaskCompleted()">Complete</button>
|
||||
```
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| taskId | `string` | empty |(Required) The id of the task. |
|
||||
| appName | `string` | empty | (Required) The name of the application. |
|
||||
| success | `EventEmitter<any>` | empty | Emitted when the task is completed. |
|
||||
| error | `EventEmitter<any>` | empty | Emitted when the task cannot be completed. |
|
57
docs/process-services-cloud/task-cloud.service.md
Normal file
57
docs/process-services-cloud/task-cloud.service.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
Title: Task Cloud Service
|
||||
Added: v3.1.0
|
||||
Status: Experimental
|
||||
Last reviewed: 2019-02-28
|
||||
---
|
||||
|
||||
# [Task Cloud Service](../../lib/process-services-cloud/src/lib/task/task-header/services/task-cloud.service.ts "Defined in task-cloud.service.ts")
|
||||
|
||||
Manage task cloud.
|
||||
|
||||
## Class members
|
||||
|
||||
### Methods
|
||||
|
||||
- **completeTask**(appName: `string`, taskId: `string`)<br/>
|
||||
Complete a task
|
||||
- _appName:_ `string` - Name of the app
|
||||
- _taskId:_ `string` - ID of the task to complete
|
||||
|
||||
- **canCompleteTask**(taskDetails: [`TaskDetailsCloudModel`](../../lib/process-services-cloud/src/lib/task/start-filters/models/task-details-cloud.model.ts))<br/>
|
||||
Validate if a task can be completed.
|
||||
- _taskDetails:_ [`TaskDetailsCloudModel`](../../lib/process-services-cloud/src/lib/task/start-filters/models/task-details-cloud.model.ts) - Task details object
|
||||
|
||||
- **claimTask**(appName: `string`, taskId: `string`, assignee: `string`): `any`<br/>
|
||||
Claims a task for an assignee.
|
||||
- _appName:_ `string` - Name of the app
|
||||
- _taskId:_ `string` - ID of the task to claim
|
||||
- _assignee:_ `string` - User to assign the task to
|
||||
- **Returns** `any` - Details of the claimed task
|
||||
- **getTaskById**(appName: `string`, taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>`<br/>
|
||||
Gets details of a task.
|
||||
- _appName:_ `string` - Name of the app
|
||||
- _taskId:_ `string` - ID of the task whose details you want
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsCloudModel`](../../lib/process-services-cloud/src/lib/task/start-task/models/task-details-cloud.model.ts)`>` - Task details
|
||||
- **unclaimTask**(appName: `string`, taskId: `string`): `any`<br/>
|
||||
Un-claims a task.
|
||||
- _appName:_ `string` - Name of the app
|
||||
- _taskId:_ `string` - ID of the task to unclaim
|
||||
- **Returns** `any` - Details of the task that was unclaimed
|
||||
- **updateTask**(appName: `string`, taskId: `string`, updatePayload: `any`): `any`<br/>
|
||||
Updates the details (name, description, due date) for a task.
|
||||
- _appName:_ `string` - Name of the app
|
||||
- _taskId:_ `string` - ID of the task to update
|
||||
- _updatePayload:_ `any` - Data to update the task
|
||||
- **Returns** `any` - Updated task details
|
||||
|
||||
## Details
|
||||
|
||||
The methods work in much the same way as the equivalent methods in the
|
||||
[Tasklist service](../process-services/tasklist.service.md)
|
||||
but they use the cloud variants of the classes for return values. See the
|
||||
[Tasklist service](../process-services/tasklist.service.md) page for usage examples.
|
||||
|
||||
## See also
|
||||
|
||||
- [Tasklist service](../process-services/tasklist.service.md)
|
Reference in New Issue
Block a user