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: {
|
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) {
|
findMatches(request, response) {
|
||||||
const matches = [];
|
const matches = [];
|
||||||
const term = request?.term?.toUpperCase();
|
const term = request?.term?.toUpperCase();
|
||||||
|
|
@ -98,16 +110,20 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectedItem = this.searchableInsuranceCompanyList.filter((item) => {
|
// const selectedItem = this.searchableInsuranceCompanyList.filter((item) => {
|
||||||
return item.accountName === parentAccountName;
|
// return item.accountName === parentAccountName;
|
||||||
});
|
// });
|
||||||
|
|
||||||
if (selectedItem) {
|
this.selectedAccountNumber = this.getParentAccountNumber(parentAccountName);
|
||||||
this.selectedAccountName = parentAccountName;
|
|
||||||
this.selectedAccountNumber = selectedItem[0].parentAccountNumber;
|
// if (selectedItem) {
|
||||||
} else {
|
// this.selectedAccountName = parentAccountName;
|
||||||
console.error("Error locating " + 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() {
|
mounted() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue