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)'
|
(onError)='onErrorEmitter($event)'
|
||||||
(executeOutcome)='executeOutcomeEmitter($event)'
|
(executeOutcome)='executeOutcomeEmitter($event)'
|
||||||
#activitiForm>
|
#activitiForm>
|
||||||
|
|
||||||
</activiti-form>
|
</activiti-form>
|
||||||
|
<button type="button" class="mdl-button" *ngIf="!hasFormKey() && isTaskActive()" (click)="onComplete()">
|
||||||
|
{{ 'TASK_DETAILS.BUTTON.COMPLETE' | translate }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -133,6 +133,10 @@ export class ActivitiTaskDetails implements OnInit, OnChanges {
|
|||||||
&& this.taskDetails.formKey !== 'null';
|
&& this.taskDetails.formKey !== 'null';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isTaskActive() {
|
||||||
|
return this.taskDetails && this.taskDetails.duration === null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the activiti task details
|
* Load the activiti task details
|
||||||
* @param taskId
|
* @param taskId
|
||||||
@@ -176,6 +180,7 @@ export class ActivitiTaskDetails implements OnInit, OnChanges {
|
|||||||
this.activitiTaskList.completeTask(this.taskId).subscribe(
|
this.activitiTaskList.completeTask(this.taskId).subscribe(
|
||||||
(res) => {
|
(res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
this.formCompleted.emit(res);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -13,6 +13,9 @@
|
|||||||
"COMMENTS": "Comments",
|
"COMMENTS": "Comments",
|
||||||
"CHECKLIST": "Checklist"
|
"CHECKLIST": "Checklist"
|
||||||
},
|
},
|
||||||
|
"BUTTON": {
|
||||||
|
"COMPLETE": "Complete"
|
||||||
|
},
|
||||||
"MESSAGES": {
|
"MESSAGES": {
|
||||||
"NONE": "No task details found."
|
"NONE": "No task details found."
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user