fix vacation-rule issue

mekawy-issues
ashwaq 6 years ago
parent 30bfa05c2d
commit 47054eca84

@ -21,9 +21,9 @@ import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/mo
})
export class ChangePasswordComponent implements OnInit {
private loginData = new LoginModel();
public P_NEW_PASSWORD: string;
public P_Confirm_NEW_PASSWORD : string;
public P_OLD_PASSWORD : string;
public P_NEW_PASSWORD: string = "";
public P_Confirm_NEW_PASSWORD : string = "";
public P_OLD_PASSWORD : string = "";
public P_USER_NAME : string;
public logo = "assets/icon/login/lock.png";

@ -11,7 +11,7 @@
<ion-item lines="none">
<ion-label class="boldTxtNav">{{'replacementRoll, searchBy' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="searchBy">
[(ngModel)]="searchBy" (ionChange)="onChangeSelect($event)">
<ion-select-option value="1" selected="true">{{'addAttach, name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'login, username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'general, email' | translate}}</ion-select-option>
@ -19,11 +19,11 @@
</ion-item>
<ion-item lines="none">
<ion-button class="filterBtn" button-type="clear" (click)="getreplacmentemployee()" item-end>
<ion-button [ngClass]="(!searchKeyEnter || !isSelect) ? 'disabledButton' : '' " [disabled]="(!searchKeyEnter || !isSelect) " class="filterBtn" button-type="clear" (click)="getreplacmentemployee()" item-end>
<ion-icon slot="icon-only" color="white" name="search"></ion-icon>
</ion-button>
<ion-input class="filterInput" [(ngModel)]="inputSearch" placeholder='{{"general, search" | translate}}'></ion-input>
<ion-input (ionChange)="onChangeInput()" class="filterInput" [(ngModel)]="inputSearch" placeholder='{{"general, search" | translate}}'></ion-input>
<!-- <button ion-button icon-only (click)="getreplacmentemployee()" clear type="button" item-end>
<ion-icon name="search"></ion-icon>

@ -121,6 +121,12 @@ button.item-button.button.button-md.button-clear.button-clear-md {
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26);
}
.disabledButton{
opacity:.5;
}

@ -38,6 +38,8 @@ export class WorkListReplacementRollComponent implements OnInit {
getpassResAttr: any = [];
active: any;
demoeAttach:any=[];
isSelect: boolean =false;
searchKeyEnter: boolean = false;
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
this.P_PAGE_NUM = 1;
@ -319,5 +321,26 @@ export class WorkListReplacementRollComponent implements OnInit {
closeModal() {
this.modalCtrl.dismiss();
}
onChangeSelect(select){
console.log(select.detail.value);
let selectValue= select.detail.value;
if(selectValue == "1" || selectValue == "2" ||selectValue == "3"){
this.isSelect=true;
}
else{
this.isSelect=false;
}
}
onChangeInput(){
if (this.inputSearch.length >0) {
this.searchKeyEnter=true;
}else{
this.searchKeyEnter=false;
}
}
}

@ -16,7 +16,7 @@
<ion-item>
<ion-label class="boldTxtNav">{{'vacation-rule, search-by' | translate}}</ion-label>
<ion-select okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="searchKeySelect">
[(ngModel)]="searchKeySelect" (ionChange)="onChangeSelect($event)">
<ion-select-option value="1" selected="true">{{'vacation-rule, search-by-name' | translate}}</ion-select-option>
<ion-select-option value="2">{{'vacation-rule, search-by-username' | translate}}</ion-select-option>
<ion-select-option value="3">{{'vacation-rule, search-by-email' | translate}}</ion-select-option>
@ -24,14 +24,14 @@
</ion-item>
<ion-item lines="none">
<ion-button class="filterBtn" button-type="clear" button-type="clear" (click)="SearchReplacementList()">
<ion-button [ngClass]="(!searchKeyEnter || !isSelect) ? 'disabledButton' : '' " [disabled]="(!searchKeyEnter || !isSelect) " class="filterBtn" button-type="clear" button-type="clear" (click)="SearchReplacementList()">
<ion-icon slot="icon-only" color="white" name="search"></ion-icon>
</ion-button>
<ion-input class="filterInput" [(ngModel)]="searchKey" placeholder="{{'vacation-rule, search-employee' | translate}}"></ion-input>
<ion-input (ionChange)="onChangeInput()" class="filterInput" [(ngModel)]="searchKey" placeholder="{{'vacation-rule, search-employee' | translate}}"></ion-input>
</ion-item>
<!-- <ion-item>
<ion-list [(ngModel)]="selEmp" *ngIf="ReplacementList">
@ -53,7 +53,7 @@
</ion-radio-group>
</ion-list> -->
<ion-item>
<ion-item lines="none">
<div *ngIf="ReplacementList" class="square-container">
<div (click)="select(employee,i)" *ngFor="let employee of ReplacementList;let i=index;" class="square">
<div class="profileImageDiv">

@ -164,4 +164,7 @@ button.item-button.button.button-md.button-clear.button-clear-md {
border: #dedede solid 1px;
}
.disabledButton{
opacity:.5;
}

@ -29,12 +29,18 @@ export class ReplacementListComponent implements OnInit {
isAbs: boolean = false;
isSave: boolean = false;
active: any;
isSelect: boolean =false;
searchKeyEnter: boolean = false;
constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService, public modalController: ModalController) { }
ngOnInit() { }
ngOnInit() {
}
SearchReplacementList() {
console.log("this.searchKeySelect" + this.searchKeySelect);
this.ReplacementList = [];
this.IsReachEnd = false;
this.P_PAGE_NUM = 1;
@ -198,4 +204,27 @@ export class ReplacementListComponent implements OnInit {
infiniteScroll.target.complete();
}
}
onChangeSelect(select){
console.log(select.detail.value);
let selectValue= select.detail.value;
if(selectValue == "1" || selectValue == "2" ||selectValue == "3"){
this.isSelect=true;
}
else{
this.isSelect=false;
}
}
onChangeInput(){
if (this.searchKey.length >0) {
this.searchKeyEnter=true;
}else{
this.searchKeyEnter=false;
}
}
}

Loading…
Cancel
Save