Merge pull request #2052 from Safelite/feature/CSR-2266
CSR-2266 | Get billToAccountNumber on vin-pages
This commit is contained in:
commit
c8d832340f
7 changed files with 21 additions and 4 deletions
|
|
@ -375,6 +375,7 @@ export default {
|
|||
},
|
||||
false
|
||||
);
|
||||
await this.getAndSaveBillToAccountNumber();
|
||||
|
||||
return await this.navigateForward(carsFound);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -323,6 +323,7 @@ export default {
|
|||
false
|
||||
);
|
||||
|
||||
await this.getAndSaveBillToAccountNumber();
|
||||
return await this.navigateForward();
|
||||
},
|
||||
lookupVin(plate, state) {
|
||||
|
|
|
|||
|
|
@ -485,6 +485,7 @@ function setupMocks({ customMountOptions, customZipQuery, customZipDataResponse
|
|||
}),
|
||||
setCmsContent: jest.fn(),
|
||||
navigateForwardWithSingleCarMatch: jest.fn(),
|
||||
getAndSaveBillToAccountNumber: jest.fn(),
|
||||
getZipCodeData: jest.fn().mockImplementation(() => {
|
||||
if (customZipDataResponse) {
|
||||
return customZipDataResponse;
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@ export default {
|
|||
},
|
||||
false
|
||||
);
|
||||
await this.getAndSaveBillToAccountNumber();
|
||||
|
||||
if (!zipCodeData.isValid) {
|
||||
this.displayInvalidZipAlert = true;
|
||||
|
|
|
|||
|
|
@ -346,6 +346,7 @@ export default {
|
|||
false
|
||||
);
|
||||
|
||||
await this.getAndSaveBillToAccountNumber();
|
||||
return await this.navigateForward();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,5 +42,19 @@ export default {
|
|||
};
|
||||
return vinLookupMethods[vinSelection] || null;
|
||||
},
|
||||
async getAndSaveBillToAccountNumber() {
|
||||
const pageName = this.$options?.name;
|
||||
const billToAccountNumber = await this.dispatchStoreActionWithLogging(
|
||||
storeActions.GET_BILL_TO_ACCOUNT_NUMBER,
|
||||
{},
|
||||
pageName,
|
||||
false
|
||||
);
|
||||
await this.dispatchStoreAction(
|
||||
this.storeActions.SAVE_BILL_TO_ACCOUNT_NUMBER,
|
||||
billToAccountNumber,
|
||||
false
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2803,10 +2803,8 @@ export const actions = {
|
|||
pageNameToLog,
|
||||
}
|
||||
) {
|
||||
// Cash orders default to 87291 - update if/when more detailed
|
||||
// billToAccountNumbers are needed for cash
|
||||
if (parentAccountNumber == applicationConfig.CASH_PARENT_ACCOUNT_NUMBER) {
|
||||
return applicationConfig.CASH_DEFAULT_BILL_TO_ACCOUNT_NUMBER;
|
||||
if (!parentAccountNumber) {
|
||||
parentAccountNumber = applicationConfig.CASH_PARENT_ACCOUNT_NUMBER;
|
||||
}
|
||||
const queryString =
|
||||
`ParentAccountNumber=${parentAccountNumber}` +
|
||||
|
|
|
|||
Loading…
Reference in a new issue