mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3946] Add the GroupCloudComponent to the StartTaskCloudComponent (#4202)
* Add GroupComponent to the start task cloud * [ADF-3946] Exported unexported componentes in group module * [ADF-3946] Used group module in start task module * Fix import * Fix build name * Fix build name unit tests * Fix unit test * Add space to rebuild travis
This commit is contained in:
@@ -84,6 +84,7 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy {
|
||||
submitted = false;
|
||||
|
||||
assigneeName: string;
|
||||
candidateGroups: string [] = [];
|
||||
|
||||
dateError: boolean;
|
||||
|
||||
@@ -145,6 +146,8 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy {
|
||||
newTask.appName = this.getAppName();
|
||||
newTask.dueDate = this.getDueDate();
|
||||
newTask.assignee = this.assigneeName;
|
||||
|
||||
newTask.candidateGroups = this.candidateGroups;
|
||||
this.createNewTask(new TaskDetailsCloudModel(newTask));
|
||||
}
|
||||
|
||||
@@ -193,6 +196,16 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy {
|
||||
this.assigneeName = null;
|
||||
}
|
||||
|
||||
onSelectGroup(group) {
|
||||
this.candidateGroups.push(group.name);
|
||||
}
|
||||
|
||||
onRemoveGroup(group) {
|
||||
this.candidateGroups = this.candidateGroups.filter( (name) => {
|
||||
return name !== group.name;
|
||||
});
|
||||
}
|
||||
|
||||
public whitespaceValidator(control: FormControl) {
|
||||
const isWhitespace = (control.value || '').trim().length === 0;
|
||||
const isValid = !isWhitespace;
|
||||
|
Reference in New Issue
Block a user