WEB-639: Refactor redundant boolean comparisons (#3063)
improve improve improve improve
This commit is contained in:
@@ -187,7 +187,7 @@ export class CreateUserComponent implements OnInit, AfterViewInit {
|
||||
delete user.staffId;
|
||||
}
|
||||
this.usersService.createUser(user).subscribe((response: any) => {
|
||||
if (this.configurationWizardService.showUsersForm === true) {
|
||||
if (this.configurationWizardService.showUsersForm) {
|
||||
this.configurationWizardService.showUsersForm = false;
|
||||
this.openDialog();
|
||||
} else {
|
||||
@@ -222,7 +222,7 @@ export class CreateUserComponent implements OnInit, AfterViewInit {
|
||||
* To show popover.
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showUsersForm === true) {
|
||||
if (this.configurationWizardService.showUsersForm) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateUserFormRef, this.userFormRef.nativeElement, 'top', true);
|
||||
});
|
||||
|
||||
@@ -150,13 +150,13 @@ export class UsersComponent implements OnInit, AfterViewInit {
|
||||
* To show popover.
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
if (this.configurationWizardService.showUsers === true) {
|
||||
if (this.configurationWizardService.showUsers) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateButtonCreateUser, this.buttonCreateUser.nativeElement, 'bottom', true);
|
||||
});
|
||||
}
|
||||
|
||||
if (this.configurationWizardService.showUsersList === true) {
|
||||
if (this.configurationWizardService.showUsersList) {
|
||||
setTimeout(() => {
|
||||
this.showPopover(this.templateUsersTable, this.usersTable.nativeElement, 'top', true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user