|
|
|
@ -340,17 +340,17 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
this.messageSuccess = true;
|
|
|
|
this.messageSuccess = true;
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
// setTimeout(() => {
|
|
|
|
this.messageSuccess = false;
|
|
|
|
this.messageSuccess = false;
|
|
|
|
//this.modalCtrl.dismiss(succ);
|
|
|
|
//this.modalCtrl.dismiss(succ);
|
|
|
|
this.modalCtrl.dismiss({
|
|
|
|
this.modalCtrl.dismiss({
|
|
|
|
'dismissed': true,
|
|
|
|
'dismissed': true,
|
|
|
|
data: "Success"
|
|
|
|
data: "Success"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (this.selEmp && this.isAnswer == false) {
|
|
|
|
// if (this.selEmp && this.isAnswer == false) {
|
|
|
|
this.setFavorite(this.selEmp);
|
|
|
|
// this.setFavorite(this.selEmp);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}, 5000);
|
|
|
|
// }, 5000);
|
|
|
|
|
|
|
|
|
|
|
|
this.cs.openNotificationPage();
|
|
|
|
this.cs.openNotificationPage();
|
|
|
|
// this.messageSuccess = true;
|
|
|
|
// this.messageSuccess = true;
|
|
|
|
@ -441,6 +441,16 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
this.isFilter = true;
|
|
|
|
this.isFilter = true;
|
|
|
|
this.selectedType = 1;
|
|
|
|
this.selectedType = 1;
|
|
|
|
this.listOfRealted = this.actionHistory;
|
|
|
|
this.listOfRealted = this.actionHistory;
|
|
|
|
|
|
|
|
if(this.favoriteUserList.length > 0){
|
|
|
|
|
|
|
|
this.actionHistory.forEach((obj, i) => {
|
|
|
|
|
|
|
|
if(this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) {
|
|
|
|
|
|
|
|
this.actionHistory[i].IsFavorite = true;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.actionHistory[i].IsFavorite = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(this.actionHistory);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
} else if (selectValue === '4') {
|
|
|
|
} else if (selectValue === '4') {
|
|
|
|
// if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) {
|
|
|
|
// if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) {
|
|
|
|
this.getFavruite();
|
|
|
|
this.getFavruite();
|
|
|
|
@ -461,11 +471,11 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
onChangeInput() {
|
|
|
|
onChangeInput() {
|
|
|
|
this.ReplacementList = [];
|
|
|
|
this.ReplacementList = [];
|
|
|
|
clearTimeout(this.typingTimer);
|
|
|
|
clearTimeout(this.typingTimer);
|
|
|
|
this.typingTimer = setTimeout(() => {
|
|
|
|
// this.typingTimer = setTimeout(() => {
|
|
|
|
if (this.inputSearch.length > 2) {
|
|
|
|
// if (this.inputSearch.length > 2) {
|
|
|
|
this.getreplacmentemployee();
|
|
|
|
this.getreplacmentemployee();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}, 3000);
|
|
|
|
// }, 3000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (this.inputSearch.length > 0) {
|
|
|
|
// if (this.inputSearch.length > 0) {
|
|
|
|
@ -509,12 +519,12 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
this.worklistService.saveFavoriteList(request, () => {
|
|
|
|
this.worklistService.saveFavoriteList(request, () => {
|
|
|
|
}).subscribe((result) => {
|
|
|
|
}).subscribe((result) => {
|
|
|
|
if (this.cs.validResponse(result)) {
|
|
|
|
if (this.cs.validResponse(result)) {
|
|
|
|
if(isFav){
|
|
|
|
if (isFav) {
|
|
|
|
this.cs.toastPK("replacementRoll", "favorite-saved");
|
|
|
|
this.cs.greenToastPK("replacementRoll", "favorite-saved");
|
|
|
|
} else{
|
|
|
|
} else {
|
|
|
|
this.cs.toastPK("replacementRoll", "favorite-unsaved");
|
|
|
|
this.cs.redToastPK("replacementRoll", "favorite-unsaved");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.getFavruite();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|