|
|
|
|
@ -45,7 +45,8 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
|
P_RESPOND_ATTRIBUTES_TBL: any[];
|
|
|
|
|
typingTimer: any;
|
|
|
|
|
userSelected: boolean;
|
|
|
|
|
actionHistory: [] = [];
|
|
|
|
|
actionHistory = [];
|
|
|
|
|
arr = [];
|
|
|
|
|
favoriteUserList: [] = [];
|
|
|
|
|
isFilter = true;
|
|
|
|
|
constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
|
|
|
|
|
@ -59,8 +60,21 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
|
console.log(this.getpassResAttr);
|
|
|
|
|
this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
|
|
|
|
|
|
|
|
|
|
this.actionHistory = this.cs.sharedService.getSharedData('actionHistoryData', false) ? this.cs.sharedService.getSharedData('actionHistoryData', false) : [];
|
|
|
|
|
if (this.getPassActionMode == "ANSWER_INFO") {
|
|
|
|
|
// tslint:disable-next-line: max-line-length
|
|
|
|
|
this.arr = this.cs.sharedService.getSharedData('actionHistoryData', false) ? this.cs.sharedService.getSharedData('actionHistoryData', false) : [];
|
|
|
|
|
var lookupObject = {};
|
|
|
|
|
|
|
|
|
|
for(var i in this.arr) {
|
|
|
|
|
lookupObject[this.arr[i]['USER_NAME']] = this.arr[i];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for(i in lookupObject) {
|
|
|
|
|
this.actionHistory.push(lookupObject[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(this.actionHistory);
|
|
|
|
|
|
|
|
|
|
if (this.getPassActionMode === 'ANSWER_INFO') {
|
|
|
|
|
this.isAnswer = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -285,15 +299,17 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
let msg: string = this.ts.trPK("replacementRoll", "enterNote");
|
|
|
|
|
this.cs.showErrorMessageDialog(() => {
|
|
|
|
|
}, this.ts.trPK('general', 'ok'), msg);
|
|
|
|
|
this.cs.toastPK("replacementRoll", "enterNote");
|
|
|
|
|
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
|
|
|
|
|
// this.cs.showErrorMessageDialog(() => {
|
|
|
|
|
// }, this.ts.trPK('general', 'ok'), msg);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
let msg: string = this.ts.trPK("replacementRoll", "msg");
|
|
|
|
|
this.cs.showErrorMessageDialog(() => {
|
|
|
|
|
}, this.ts.trPK('general', 'ok'), msg);
|
|
|
|
|
this.cs.toastPK("replacementRoll", "msg");
|
|
|
|
|
// let msg: string = this.ts.trPK("replacementRoll", "msg");
|
|
|
|
|
// this.cs.showErrorMessageDialog(() => {
|
|
|
|
|
// }, this.ts.trPK('general', 'ok'), msg);
|
|
|
|
|
}
|
|
|
|
|
} else if (this.isAnswer == true) {
|
|
|
|
|
if (this.userNote) {
|
|
|
|
|
@ -308,14 +324,16 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
|
this.handleApplayActionResult(result);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
let msg: string = this.ts.trPK("replacementRoll", "enterNote");
|
|
|
|
|
this.cs.showErrorMessageDialog(() => {
|
|
|
|
|
}, this.ts.trPK('general', 'ok'), msg);
|
|
|
|
|
this.cs.toastPK("replacementRoll", "enterNote");
|
|
|
|
|
// let msg: string = this.ts.trPK("replacementRoll", "enterNote");
|
|
|
|
|
// this.cs.showErrorMessageDialog(() => {
|
|
|
|
|
// }, this.ts.trPK('general', 'ok'), msg);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
let msg: string = this.ts.trPK("replacementRoll", "msg");
|
|
|
|
|
this.cs.showErrorMessageDialog(() => {
|
|
|
|
|
}, this.ts.trPK('general', 'ok'), msg);
|
|
|
|
|
this.cs.toastPK("replacementRoll", "msg");
|
|
|
|
|
// let msg: string = this.ts.trPK("replacementRoll", "msg");
|
|
|
|
|
// this.cs.showErrorMessageDialog(() => {
|
|
|
|
|
// }, this.ts.trPK('general', 'ok'), msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -430,8 +448,9 @@ export class WorkListReplacementRollComponent implements OnInit {
|
|
|
|
|
this.listOfRealted = this.actionHistory;
|
|
|
|
|
} else if(selectValue === '4'){
|
|
|
|
|
console.log(this.listOfFav.length)
|
|
|
|
|
if(this.favoriteUserList.length === 0 || this.favoriteUserList === undefined )
|
|
|
|
|
if(this.favoriteUserList.length === 0 || this.favoriteUserList === undefined ) {
|
|
|
|
|
this.getFavruite();
|
|
|
|
|
}
|
|
|
|
|
this.isFilter = true;
|
|
|
|
|
this.selectedType = 4;
|
|
|
|
|
} else if( selectValue === '2' || selectValue === '3' || selectValue === '5'){
|
|
|
|
|
|