fav isues in ITG

MOHEMM-HUAWEI-RELEASE
enadhilal 4 years ago
parent ca9d714612
commit 8cf9005678

@ -102,12 +102,28 @@
<!-- <ion-input (ionInput)="onChangeInput()" [ngClass]="direction == 'ltr'? 'filterInput':'filterInput-ar'"
[(ngModel)]="searchKey" [placeholder]='getPlaceHolder()' clearInput="true"></ion-input> -->
<ion-input class='replacmentSearchBar'
<!-- <ion-input class='replacmentSearchBar'
style="height: 45px; border: 1px solid lightgray; border-radius: 50px; width: 350px;"
[(ngModel)]="searchKey"
[placeholder]='"replacementRoll, searchbyname" | translate' clearInput="true">
<ion-button (click)='onChangeInput()' style="--background: transparent; background: transparent; color: black"><ion-icon name="search"></ion-icon></ion-button>
</ion-input>
</ion-input> -->
<ion-grid>
<ion-row style="height: 45px; border: 1px solid lightgray; border-radius: 50px;">
<ion-col size='9'>
<ion-input class='replacmentSearchBar' style="height: 35px;"
[(ngModel)]="searchKey" [placeholder]='"replacementRoll, searchbyname" | translate' clearInput="true">
<ion-icon style="width: 50px; height: 21px;" name="search"></ion-icon>
</ion-input>
</ion-col>
<ion-col size='3'>
<button [disabled]='searchKey == undefined || 1 > searchKey.length' (click)='onChangeInput()'
style="--background: white; background: transparent; margin-top: 4px; --background-hover: transparent !important;">
<ion-label><p style="color: #269db8;">{{"general, search" | translate}}</p></ion-label>
</button>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>

@ -269,7 +269,7 @@ export class WorkListReplacementItgComponent implements OnInit {
"IsFavorite": selEmp.IsFavorite
}
];
this.saveUserFavruiteList(request);
this.saveUserFavruiteList(request, selEmp.IsFavorite);
}, () => {
});
} else {
@ -284,16 +284,21 @@ export class WorkListReplacementItgComponent implements OnInit {
"IsFavorite": false
}
];
this.saveUserFavruiteList(request);
this.saveUserFavruiteList(request, false);
}
}
saveUserFavruiteList(request) {
saveUserFavruiteList(request, isFav: boolean) {
this.worklistService.saveFavoriteList(request, () => {
}).subscribe((result) => {
if (this.cs.validResponse(result)) {
this.cs.toastPK("replacementRoll", "favorite-saved");
if (isFav) {
this.cs.greenToastPK("replacementRoll", "favorite-saved");
} else {
this.cs.redToastPK("replacementRoll", "favorite-unsaved");
}
this.getFavruite();
}
})
});
}
getFavruite() {
this.cs.startLoading();

@ -69,7 +69,7 @@
</ion-input>
</ion-col>
<ion-col size='3'>
<button [disabled]='inputSearch == undefined || 1 > inputSearch.length' (click)='onChangeInput()' style="--background: white; background: transparent; padding-bottom: 20px; --background-hover: transparent !important;">
<button [disabled]='inputSearch == undefined || 1 > inputSearch.length' (click)='onChangeInput()' style="--background: white; background: transparent; margin-top: 4px; --background-hover: transparent !important;">
<ion-label><p style="color: #269db8;">{{"general, search" | translate}}</p></ion-label>
</button>
</ion-col>

Loading…
Cancel
Save