[ADF-1138] Start Task Form Assignee dropdown show null value inside (#2118)

* [ADF-1138] Start Task Form Assignee dropdown show null value inside

* Changed Form Assignee dropdown show null value.

* [ADF-1138] Start Task Form Assignee dropdown show null value inside

* Refactored unit testcases.
This commit is contained in:
siva kumar
2017-07-24 20:42:48 +05:30
committed by Eugenio Romano
parent 2e3b081bc4
commit d5bdadde0d
3 changed files with 60 additions and 3 deletions

View File

@@ -119,4 +119,18 @@ export class StartTaskComponent implements OnInit {
this.logService.error('Could not load users');
});
}
isUserNameEmpty(user: any) {
return !user || (this.isEmpty(user.firstName) && this.isEmpty(user.lastName));
}
private isEmpty(data: string) {
return data === undefined || data === null || data.trim().length === 0;
}
getDisplayUser(firstName: string, lastName: string, delimiter: string = '-'): string {
firstName = (firstName !== null ? firstName : '');
lastName = (lastName !== null ? lastName : '');
return firstName + delimiter + lastName;
}
}