|
|
|
|
@ -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();
|
|
|
|
|
|