[ADF-4269] ProcessCloud - fix start task with invalid Asignee or Candidat… (#4727)

* [ADF-4269] - prevent starting a task with invalid Asignee or CandidateUser

* [ADF-4269] - refractor people/group cloud

* [ADF-4269] - change docs
This commit is contained in:
Silviu Popa
2019-05-15 17:49:46 +03:00
committed by Maurizio Vitale
parent 4a363c731b
commit b4e3a71bef
7 changed files with 49 additions and 9 deletions

View File

@@ -71,6 +71,10 @@ export class GroupCloudComponent implements OnInit, OnChanges {
@Input()
preSelectGroups: GroupModel[] = [];
/** FormControl to search the group */
@Input()
searchGroupsControl: FormControl = new FormControl();
/** Role names of the groups to be listed. */
@Input()
roles: string[] = [];
@@ -98,8 +102,6 @@ export class GroupCloudComponent implements OnInit, OnChanges {
selectedGroups$: Observable<GroupModel[]>;
searchGroupsControl: FormControl = new FormControl('');
_subscriptAnimationState = 'enter';
clientId: string;
@@ -154,8 +156,6 @@ export class GroupCloudComponent implements OnInit, OnChanges {
this.searchedValue = value;
if (value) {
this.setError();
} else {
this.clearError();
}
}),
debounceTime(500),
@@ -300,7 +300,7 @@ export class GroupCloudComponent implements OnInit, OnChanges {
}
hasError(): boolean {
return this.searchGroupsControl && this.searchGroupsControl.errors && this.searchGroupsControl.errors.invalid;
return this.searchGroupsControl && this.searchGroupsControl.errors && (this.searchGroupsControl.errors.invalid || this.searchGroupsControl.errors.required);
}
setFocus(isFocused: boolean) {