|
|
|
@ -445,13 +445,12 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
counter = 0;
|
|
|
|
counter = 0;
|
|
|
|
onChangeSelect(select) {
|
|
|
|
onChangeSelect(select) {
|
|
|
|
let selectValue = select.detail.value;
|
|
|
|
let selectValue = select.detail.value;
|
|
|
|
|
|
|
|
|
|
|
|
if (selectValue == '1') {
|
|
|
|
if (selectValue == '1') {
|
|
|
|
this.isSelect = true;
|
|
|
|
this.isSelect = true;
|
|
|
|
this.isFilter = true;
|
|
|
|
this.isFilter = true;
|
|
|
|
this.selectedType = 1;
|
|
|
|
this.selectedType = 1;
|
|
|
|
this.listOfRealted = this.actionHistory;
|
|
|
|
this.listOfRealted = this.actionHistory;
|
|
|
|
if (this.counter > 0) {
|
|
|
|
// if (this.counter > 0) {
|
|
|
|
this.actionHistory.forEach((obj, i) => {
|
|
|
|
this.actionHistory.forEach((obj, i) => {
|
|
|
|
if (this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) {
|
|
|
|
if (this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) {
|
|
|
|
this.actionHistory[i].IsFavorite = true;
|
|
|
|
this.actionHistory[i].IsFavorite = true;
|
|
|
|
@ -459,7 +458,7 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
this.actionHistory[i].IsFavorite = false;
|
|
|
|
this.actionHistory[i].IsFavorite = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
this.counter = 1;
|
|
|
|
this.counter = 1;
|
|
|
|
} else if (selectValue === '4') {
|
|
|
|
} else if (selectValue === '4') {
|
|
|
|
// if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) {
|
|
|
|
// if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) {
|
|
|
|
@ -523,7 +522,9 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.favLetter.forEach((obj, index) => {
|
|
|
|
this.favLetter.forEach((obj, index) => {
|
|
|
|
if (this.activeSelectedLetter) { }
|
|
|
|
if (this.activeSelectedLetter) {
|
|
|
|
|
|
|
|
this.selectedLetter(this.activeSelectedLetter);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (index === 0) {
|
|
|
|
if (index === 0) {
|
|
|
|
// this.selectedLetter(obj);
|
|
|
|
// this.selectedLetter(obj);
|
|
|
|
this.favIsActive.push(true);
|
|
|
|
this.favIsActive.push(true);
|
|
|
|
@ -547,9 +548,9 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
saveUserFavruiteList(request, isFav: boolean) {
|
|
|
|
saveUserFavruiteList(request, isFav: boolean) {
|
|
|
|
this.worklistService.saveFavoriteList(request, () => {
|
|
|
|
this.worklistService.saveFavoriteList(request, () => {
|
|
|
|
}).subscribe((result) => {
|
|
|
|
}).subscribe((result) => {
|
|
|
|
if (this.cs.validResponse(result)) {
|
|
|
|
if (this.cs.validResponse(result)) {
|
|
|
|
@ -561,13 +562,9 @@ saveUserFavruiteList(request, isFav: boolean) {
|
|
|
|
this.getFavruite();
|
|
|
|
this.getFavruite();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setFavorite(selEmp) {
|
|
|
|
setFavorite(selEmp) {
|
|
|
|
selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME;
|
|
|
|
|
|
|
|
selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : '';
|
|
|
|
|
|
|
|
selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : '';
|
|
|
|
|
|
|
|
selEmp.IsFavorite = !selEmp.IsFavorite;
|
|
|
|
|
|
|
|
let confirmBoxhtml = `<div>
|
|
|
|
let confirmBoxhtml = `<div>
|
|
|
|
<h4>Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list </h4>
|
|
|
|
<h4>Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list </h4>
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
@ -591,6 +588,10 @@ setFavorite(selEmp) {
|
|
|
|
this.cs.presentConfirmDialog(
|
|
|
|
this.cs.presentConfirmDialog(
|
|
|
|
confirmBoxhtml
|
|
|
|
confirmBoxhtml
|
|
|
|
, () => {
|
|
|
|
, () => {
|
|
|
|
|
|
|
|
selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME;
|
|
|
|
|
|
|
|
selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : '';
|
|
|
|
|
|
|
|
selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : '';
|
|
|
|
|
|
|
|
selEmp.IsFavorite = !selEmp.IsFavorite;
|
|
|
|
const request =
|
|
|
|
const request =
|
|
|
|
[
|
|
|
|
[
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -605,6 +606,10 @@ setFavorite(selEmp) {
|
|
|
|
this.saveUserFavruiteList(request, selEmp.IsFavorite);
|
|
|
|
this.saveUserFavruiteList(request, selEmp.IsFavorite);
|
|
|
|
}, () => { });
|
|
|
|
}, () => { });
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME;
|
|
|
|
|
|
|
|
selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : '';
|
|
|
|
|
|
|
|
selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : '';
|
|
|
|
|
|
|
|
selEmp.IsFavorite = !selEmp.IsFavorite;
|
|
|
|
const request =
|
|
|
|
const request =
|
|
|
|
[
|
|
|
|
[
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -617,14 +622,14 @@ setFavorite(selEmp) {
|
|
|
|
];
|
|
|
|
];
|
|
|
|
this.saveUserFavruiteList(request, false);
|
|
|
|
this.saveUserFavruiteList(request, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
listOfRealted: any = [];
|
|
|
|
listOfRealted: any = [];
|
|
|
|
listOfFav: any = [];
|
|
|
|
listOfFav: any = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
filterList(event) {
|
|
|
|
filterList(event) {
|
|
|
|
const val = event.target.value;
|
|
|
|
const val = event.target.value;
|
|
|
|
if (this.selectedType === 1) {
|
|
|
|
if (this.selectedType === 1) {
|
|
|
|
if (val === '') {
|
|
|
|
if (val === '') {
|
|
|
|
@ -645,9 +650,9 @@ filterList(event) {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
selectedLetter(el) {
|
|
|
|
selectedLetter(el) {
|
|
|
|
this.isFavoriteLetterActive = true;
|
|
|
|
this.isFavoriteLetterActive = true;
|
|
|
|
this.favLetter.forEach((letter, index) => {
|
|
|
|
this.favLetter.forEach((letter, index) => {
|
|
|
|
if (letter === el) {
|
|
|
|
if (letter === el) {
|
|
|
|
@ -668,13 +673,13 @@ selectedLetter(el) {
|
|
|
|
this.favIsActive[index] = false;
|
|
|
|
this.favIsActive[index] = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
returnIsActiveFunction(i) {
|
|
|
|
returnIsActiveFunction(i) {
|
|
|
|
return this.favIsActive[i];
|
|
|
|
return this.favIsActive[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
clearSearchInput(){
|
|
|
|
clearSearchInput() {
|
|
|
|
this.inputSearch = '';
|
|
|
|
this.inputSearch = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|