WIP
This commit is contained in:
parent
5fce807c5b
commit
ed2adf208d
1 changed files with 25 additions and 9 deletions
|
|
@ -79,6 +79,18 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
getParentAccountNumber(parentAccountName) {
|
||||
const matchedItem = this.searchableInsuranceCompanyList?.filter((item) => {
|
||||
return item.accountName === parentAccountName;
|
||||
});
|
||||
|
||||
if (matchedItem) {
|
||||
return matchedItem[0].parentAccountNumber;
|
||||
} else {
|
||||
console.error("Error locating " + parentAccountName);
|
||||
return;
|
||||
}
|
||||
},
|
||||
findMatches(request, response) {
|
||||
const matches = [];
|
||||
const term = request?.term?.toUpperCase();
|
||||
|
|
@ -98,16 +110,20 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
const selectedItem = this.searchableInsuranceCompanyList.filter((item) => {
|
||||
return item.accountName === parentAccountName;
|
||||
});
|
||||
// const selectedItem = this.searchableInsuranceCompanyList.filter((item) => {
|
||||
// return item.accountName === parentAccountName;
|
||||
// });
|
||||
|
||||
if (selectedItem) {
|
||||
this.selectedAccountName = parentAccountName;
|
||||
this.selectedAccountNumber = selectedItem[0].parentAccountNumber;
|
||||
} else {
|
||||
console.error("Error locating " + parentAccountName);
|
||||
}
|
||||
this.selectedAccountNumber = this.getParentAccountNumber(parentAccountName);
|
||||
|
||||
// if (selectedItem) {
|
||||
// this.selectedAccountName = parentAccountName;
|
||||
// //this.selectedAccountNumber = selectedItem[0].parentAccountNumber;
|
||||
// console.log("this.selectedAccountNumber", selectedItem[0].parentAccountNumber);
|
||||
// console.log("this.getParentAccountNumber", this.getParentAccountNumber(parentAccountName));
|
||||
// } else {
|
||||
// console.error("Error locating " + parentAccountName);
|
||||
// }
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue