|
|
|
|
@ -84,9 +84,11 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
public previousActiveIndex = 0;
|
|
|
|
|
public currentActiveIndex = 0;
|
|
|
|
|
public searchNameOrUserName = '';
|
|
|
|
|
public searchUserName = '';
|
|
|
|
|
public searchEmail = '';
|
|
|
|
|
public showEmailInput = false;
|
|
|
|
|
public showUserNameOrNameInput = true;
|
|
|
|
|
public showUserNameInput = false;
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
|
public ts: TranslatorService,
|
|
|
|
|
@ -140,7 +142,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
getEmpSubordinate() {
|
|
|
|
|
this.pageNum = 1;
|
|
|
|
|
this.isReachEnd = false;
|
|
|
|
|
const searchEmpNum = (this.searchKeySelect === 'User Name') ? this.searchNameOrUserName : '';
|
|
|
|
|
const searchEmpNum = (this.searchKeySelect === 'User Name') ? this.searchUserName : '';
|
|
|
|
|
const searchEmpName = (this.searchKeySelect === 'Name') ? this.searchNameOrUserName : '';
|
|
|
|
|
const searchEmpEmail = (this.searchKeySelect === 'Email') ? this.searchEmail : '';
|
|
|
|
|
|
|
|
|
|
@ -220,6 +222,7 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
this.empSubordinate = [];
|
|
|
|
|
this.isReachEnd = false;
|
|
|
|
|
this.searchNameOrUserName = '';
|
|
|
|
|
this.searchUserName = '';
|
|
|
|
|
this.searchEmail = '';
|
|
|
|
|
this.getEmpSubordinate();
|
|
|
|
|
}
|
|
|
|
|
@ -235,12 +238,18 @@ export class HomeComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showSelectedField(value: any) {
|
|
|
|
|
if (this.searchKeySelect === 'User Name' || this.searchKeySelect === 'User Name') {
|
|
|
|
|
if (this.searchKeySelect === 'Name') {
|
|
|
|
|
this.showEmailInput = false;
|
|
|
|
|
this.showUserNameInput = false;
|
|
|
|
|
this.showUserNameOrNameInput = true;
|
|
|
|
|
} else if (this.searchKeySelect === 'Email') {
|
|
|
|
|
this.showUserNameOrNameInput = false;
|
|
|
|
|
this.showUserNameInput = false;
|
|
|
|
|
this.showEmailInput = true;
|
|
|
|
|
} else if (this.searchKeySelect === 'User Name') {
|
|
|
|
|
this.showUserNameOrNameInput = false;
|
|
|
|
|
this.showEmailInput = false;
|
|
|
|
|
this.showUserNameInput = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|