Format code.
This commit is contained in:
parent
132db34c59
commit
a51a8e358b
2 changed files with 20 additions and 21 deletions
|
|
@ -45,7 +45,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
selectedAccountName: "",
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
selectedAccountNumber: {
|
||||
|
|
@ -61,30 +61,28 @@ export default {
|
|||
},
|
||||
},
|
||||
searchableInsuranceCompanyList() {
|
||||
return this.originalList.map(
|
||||
(insuranceCompany) => {
|
||||
insuranceCompany.altTerms = "";
|
||||
return this.originalList.map((insuranceCompany) => {
|
||||
insuranceCompany.altTerms = "";
|
||||
|
||||
termMapping.forEach((matchingTerm) => {
|
||||
if (
|
||||
insuranceCompany.accountName
|
||||
.toUpperCase()
|
||||
.includes(matchingTerm.term.toUpperCase())
|
||||
) {
|
||||
insuranceCompany.altTerms =
|
||||
insuranceCompany.altTerms + matchingTerm.altTerm?.toUpperCase() + " ";
|
||||
}
|
||||
});
|
||||
return insuranceCompany;
|
||||
}
|
||||
);
|
||||
}
|
||||
termMapping.forEach((matchingTerm) => {
|
||||
if (
|
||||
insuranceCompany.accountName
|
||||
.toUpperCase()
|
||||
.includes(matchingTerm.term.toUpperCase())
|
||||
) {
|
||||
insuranceCompany.altTerms =
|
||||
insuranceCompany.altTerms + matchingTerm.altTerm?.toUpperCase() + " ";
|
||||
}
|
||||
});
|
||||
return insuranceCompany;
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
findMatches(request, response) {
|
||||
const matches = [];
|
||||
const term = request?.term?.toUpperCase();
|
||||
this.searchableInsuranceCompanyList.forEach((company, index) => {
|
||||
this.searchableInsuranceCompanyList.forEach((company, index) => {
|
||||
if (
|
||||
company.accountName.indexOf(term) !== -1 ||
|
||||
company.altTerms.indexOf(term) !== -1
|
||||
|
|
@ -105,8 +103,8 @@ export default {
|
|||
});
|
||||
|
||||
if (selectedItem) {
|
||||
this.selectedAccountName = parentAccountName;
|
||||
this.selectedAccountNumber = selectedItem[0].parentAccountNumber;
|
||||
this.selectedAccountName = parentAccountName;
|
||||
this.selectedAccountNumber = selectedItem[0].parentAccountNumber;
|
||||
} else {
|
||||
console.error("Error locating " + parentAccountName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ export default {
|
|||
return {
|
||||
parentAccountNumber: this.parentAccountNumberFromStore(),
|
||||
originalList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
parentAccountNumberFromStore() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue