[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:
Maurizio Vitale
2019-01-24 14:18:35 +00:00
committed by GitHub
parent c34ff07dd4
commit a872c6d8fa
11 changed files with 35 additions and 13 deletions

View File

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