fixed testing issues

MOE_DEV_NEW_TEMPORARY_DESIGN
Fatimah Alshammari 4 years ago
parent 670980886a
commit a6a6f17652

@ -39,6 +39,7 @@ export class MyRequestComponent implements OnInit {
}
ngOnInit() {
this.cs.startLoading();
this.getTicketsByEmployee();
}

@ -31,10 +31,17 @@
<ion-input placeholder="Search by" class="search-label"[(ngModel)]="searchKeySelect" (ionChange)="showSelectedField($event)" ></ion-input>
</ion-row> -->
<ion-row>
<ion-col class="search-label">
<ion-input *ngIf="showEmailInput" placeholder="Search by Email" [(ngModel)]="searchEmail" pattern="email"></ion-input>
<ion-input *ngIf="showUserNameOrNameInput" placeholder ="Search by Name or Username" [(ngModel)]="searchNameOrUserName"></ion-input>
<ion-col class="search-label">
<div style="margin-right: 60px !important;" (click)="searchEmployee()">
<ion-input *ngIf="showEmailInput" placeholder="Search by Email" [(ngModel)]="searchEmail" pattern="email" ></ion-input>
<ion-input *ngIf="showUserNameOrNameInput" placeholder ="Search by Name" [(ngModel)]="searchNameOrUserName" ></ion-input>
<ion-input *ngIf="showUserNameInput" placeholder ="Search by Username" [(ngModel)]="searchUserName" ></ion-input>
</div>
<div *ngIf="isSearch" (click)="clearSearch()" class="search-container">
<ion-col style="float: right;" >
<ion-icon name="close" ></ion-icon>
</ion-col>
</div>
</ion-col>
</ion-row>
</div>
@ -104,14 +111,14 @@
</ion-row>
</div> -->
<div *ngIf="isSearch">
<!-- <div *ngIf="isSearch">
<ion-row class="search-container">
<ion-col style="float: left;" size=[6] (click)="clearSearch()">
<span style="margin-left: 5px;">{{ts.trPK('work-list','clear-search')}}</span>
<ion-icon name="close" ></ion-icon>
</ion-col>
</ion-row>
</div>
</div> -->
<ng-container *ngFor="let subordinate of empSubordinate;let i=index">
<app-employee-information

@ -161,11 +161,13 @@ ion-content {
}
.search-container{
margin-top: 15px;
// margin-top: 15px;
margin-top: -35px;
margin-left: 262px;
ion-col{
background: white;
border-radius: 12px;
padding-right: 10px;
// background: white;
// border-radius: 12px;
// padding-right: 10px;
flex: none;
ion-icon{
margin-right: 3px;

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

Loading…
Cancel
Save