|
|
|
@@ -73,18 +73,6 @@ export class PeopleRewardComponent implements OnInit { |
|
|
|
public ngOnInit(): void { |
|
|
|
this.initPeople(); // make sure people has the one that we need |
|
|
|
this.initReward(); |
|
|
|
|
|
|
|
console.log(this.Loan, this.pendingReward); |
|
|
|
|
|
|
|
// this.debounceFilter = debounce( (filter: string): void => { |
|
|
|
// this.ps.getPeopleList(filter).subscribe( |
|
|
|
// resp => { |
|
|
|
// this.contacts = resp.List; |
|
|
|
// this.total = resp.Count; |
|
|
|
// console.log(resp); |
|
|
|
// } |
|
|
|
// ); |
|
|
|
// }, 500) ; |
|
|
|
} |
|
|
|
|
|
|
|
public initPeople(): void{ |
|
|
|
@@ -163,21 +151,7 @@ export class PeopleRewardComponent implements OnInit { |
|
|
|
|
|
|
|
peopleChanged(id: string): void { |
|
|
|
this.formGroup.get('Role').setValue(this.Loan.getRoleById(id)); |
|
|
|
console.log(this.formGroup); |
|
|
|
console.log(this.formGroup.getRawValue()); |
|
|
|
} |
|
|
|
// private checkConflictingRoles(reward: RewardModel): {id: string, roles: string[]} { |
|
|
|
// console.log(reward, this.pendingReward); |
|
|
|
// const roles = [reward.Role]; |
|
|
|
// this.pendingReward.forEach( v => { |
|
|
|
// if (v.To === reward.To) { |
|
|
|
// const idx = roles.findIndex(r => r === v.Role); |
|
|
|
// if (idx === -1) { roles.push (v.Role); } |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// |
|
|
|
// return {id: reward.To, roles}; |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
public removeHandler({ dataItem }): void { |
|
|
|
|