mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Add Complete Task button for tasks with no form
- Allows standalone tasks to be completed Refs #530
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
(onError)='onErrorEmitter($event)'
|
||||
(executeOutcome)='executeOutcomeEmitter($event)'
|
||||
#activitiForm>
|
||||
|
||||
</activiti-form>
|
||||
<button type="button" class="mdl-button" *ngIf="!hasFormKey() && isTaskActive()" (click)="onComplete()">
|
||||
{{ 'TASK_DETAILS.BUTTON.COMPLETE' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
@@ -133,6 +133,10 @@ export class ActivitiTaskDetails implements OnInit, OnChanges {
|
||||
&& this.taskDetails.formKey !== 'null';
|
||||
}
|
||||
|
||||
isTaskActive() {
|
||||
return this.taskDetails && this.taskDetails.duration === null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the activiti task details
|
||||
* @param taskId
|
||||
@@ -176,6 +180,7 @@ export class ActivitiTaskDetails implements OnInit, OnChanges {
|
||||
this.activitiTaskList.completeTask(this.taskId).subscribe(
|
||||
(res) => {
|
||||
console.log(res);
|
||||
this.formCompleted.emit(res);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@@ -13,6 +13,9 @@
|
||||
"COMMENTS": "Comments",
|
||||
"CHECKLIST": "Checklist"
|
||||
},
|
||||
"BUTTON": {
|
||||
"COMPLETE": "Complete"
|
||||
},
|
||||
"MESSAGES": {
|
||||
"NONE": "No task details found."
|
||||
},
|
||||
|
Reference in New Issue
Block a user