Merge branch 'develop' into feature/bugfix/CASH-1502
This commit is contained in:
commit
f0c5c7f33b
21 changed files with 133 additions and 102 deletions
|
|
@ -5,23 +5,23 @@ export enum PaymentMethod {
|
|||
}
|
||||
|
||||
export enum ProgressBarPercentages {
|
||||
VehicleSelectionPage = '4%',
|
||||
VehicleDamagePage = '16%',
|
||||
EstimatePage = '28%',
|
||||
ServiceZipPage = '32%',
|
||||
VehicleLookupAddressPage = '32%',
|
||||
VehicleLookupLicensePage = '32%',
|
||||
VinLookupPage = '32%',
|
||||
PartQuestionsPage = '40%',
|
||||
MoldingQuestionsPage = '40%',
|
||||
CapabilityQuestionsPage = '40%',
|
||||
VehiclePartsPage = '40%',
|
||||
ServicePackagePage = '48%',
|
||||
VehicleSelectionPage = '8%',
|
||||
VehicleDamagePage = '11%',
|
||||
EstimatePage = '18%',
|
||||
ServiceZipPage = '22%',
|
||||
VehicleLookupAddressPage = '22%',
|
||||
VehicleLookupLicensePage = '22%',
|
||||
VinLookupPage = '22%',
|
||||
PartQuestionsPage = '30%',
|
||||
MoldingQuestionsPage = '30%',
|
||||
CapabilityQuestionsPage = '30%',
|
||||
VehiclePartsPage = '30%',
|
||||
ServicePackagePage = '62%',
|
||||
InsuranceCompanyPage = '52%',
|
||||
ServiceLocationPage = '60%',
|
||||
SchedulePage = '64%',
|
||||
ServiceLocationPage = '76%',
|
||||
SchedulePage = '76%',
|
||||
MobileDetailsPage = '76%',
|
||||
ContactDetailsPage = '84%',
|
||||
PaymentMethodPage = '92%',
|
||||
PaymentMethodPage = '97%',
|
||||
OrderConfirmationPage = '100%'
|
||||
}
|
||||
|
|
@ -10,6 +10,8 @@ export class AfterpayPage extends BasePage {
|
|||
readonly passwordTextBox: Locator;
|
||||
|
||||
// Card details
|
||||
readonly paymentOptionsButton: Locator;
|
||||
readonly continueButtonAfterpay: Locator;
|
||||
readonly cardholderNameTextBox: Locator;
|
||||
readonly cardNumberTextBox: Locator;
|
||||
readonly expirationDateTextBox: Locator;
|
||||
|
|
@ -23,6 +25,8 @@ export class AfterpayPage extends BasePage {
|
|||
this.passwordTextBox = page.getByTestId('login-password-input');
|
||||
this.submitButton = page.getByRole('button', { name: 'Continue' });
|
||||
|
||||
this.paymentOptionsButton = page.locator('div:has(>input[id*=\'payment-types\']) label').nth(1);
|
||||
this.continueButtonAfterpay = page.getByRole('button').filter({hasText: 'Continue'});
|
||||
this.cardholderNameTextBox = page.getByTestId('payment-method-cardHolderName-input');
|
||||
this.cardNumberTextBox = page.getByTestId('payment-method-cardNumber-input');
|
||||
this.expirationDateTextBox = page.getByTestId('payment-method-cardExpiry-input');
|
||||
|
|
@ -46,7 +50,12 @@ export class AfterpayPage extends BasePage {
|
|||
|
||||
async executeAfterpayPayment(paymentDetails: IPaymentDetails) {
|
||||
await this.login(paymentDetails.password!);
|
||||
|
||||
await this.page.locator('div[data-testid=\'loading-icon-svg\']').filter({ visible: true}).first().waitFor({ state: 'hidden' });
|
||||
if (await this.paymentOptionsButton.isVisible())
|
||||
{
|
||||
await this.paymentOptionsButton.click();
|
||||
await this.continueButtonAfterpay.click();
|
||||
}
|
||||
await this.confirmButton.click();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export class BasePage {
|
|||
this.pageSpinner = page.getByRole('status');
|
||||
this.buttonLoadSpin = page.getByRole('alert');
|
||||
this.hamburgerMenu = this.page.getByRole('button', { name: 'Hamburger Menu (modal window)' });
|
||||
this.progressBar = this.page.locator('.progress-bar-inner');
|
||||
this.progressBar = this.page.locator('.progress-bar-outer.progress-bar-inner');
|
||||
}
|
||||
|
||||
async nextPage() {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export class PaymentMethodPage extends BasePage {
|
|||
this.payNowButton = this.page.locator('[buttonlabel="Pay now"]');
|
||||
this.payInFourButton = this.page.locator('[buttonlabel="Pay in 4 installments"]');
|
||||
this.submitButton = this.page.locator('[data-test-id="nav-bar-main-button"]');
|
||||
this.recalibrationCheckbox = this.page.getByLabel('I understand after windshield');
|
||||
this.recalibrationCheckbox = this.page.locator('label:has(>input[name=\'recalAckOptIn\'])');
|
||||
// this.creditCardButton = page.locator('div').filter({ hasText: /^Credit or Debit$/ }).nth(1);
|
||||
this.paymentPage = new PaymentPage(page);
|
||||
this.paypalPage = new PaypalPage(page);
|
||||
|
|
@ -101,7 +101,7 @@ export class PaymentMethodPage extends BasePage {
|
|||
let expectedAppointmentDetails = new Map<string, string[]>();
|
||||
expectedAppointmentDetails = await this.getExpectedVehicleDetails(testData, expectedAppointmentDetails);
|
||||
expectedAppointmentDetails = await this.getExpectedVehicleDamage(testData, expectedAppointmentDetails);
|
||||
expectedAppointmentDetails = await this.expectedServicePackageDetails(testData, expectedAppointmentDetails);
|
||||
// expectedAppointmentDetails = await this.expectedServicePackageDetails(testData, expectedAppointmentDetails);
|
||||
expectedAppointmentDetails = await this.getExpectedServiceLocation(testData, expectedAppointmentDetails);
|
||||
expectedAppointmentDetails = await this.getExpectedAppointmentDate(testData, expectedAppointmentDetails);
|
||||
expectedAppointmentDetails = await this.getExpectedCustomerDetails(testData, expectedAppointmentDetails);
|
||||
|
|
@ -403,7 +403,7 @@ l
|
|||
const { appointmentDetails } = testData;
|
||||
let serviceLocationTitle = appointmentDetails?.serviceLocation == ServiceLocation.Mobile
|
||||
? "We're coming to you"
|
||||
: "You're going to a Safelite shop";
|
||||
: "You're coming to us";
|
||||
let serviceLocation: string[] = [];
|
||||
|
||||
serviceLocation.push(
|
||||
|
|
@ -443,7 +443,7 @@ l
|
|||
customerDetails?.apptDuration ? "Estimated appointment length: " + customerDetails.apptDuration : ""
|
||||
);
|
||||
|
||||
expectedServicePackageDetails["Appointment date + time"] = appointmentDateText;
|
||||
expectedServicePackageDetails["Appointment Date + Time"] = appointmentDateText;
|
||||
return expectedServicePackageDetails;
|
||||
}
|
||||
|
||||
|
|
@ -452,7 +452,7 @@ l
|
|||
let customerDetailsText: string[] = [];
|
||||
|
||||
customerDetailsText.push(
|
||||
customerDetails?.firstName.toUpperCase() + " " + customerDetails?.lastName.toUpperCase(),
|
||||
// customerDetails?.firstName.toUpperCase() + " " + customerDetails?.lastName.toUpperCase(),
|
||||
customerDetails?.email ? customerDetails?.email.toUpperCase() : "",
|
||||
customerDetails?.phoneNumber ? customerDetails?.phoneNumber : "",
|
||||
"Opted out of text message updates"
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ export class PaypalPage extends BasePage {
|
|||
this.passwordTextBox = page.getByPlaceholder('Password');
|
||||
this.paypalLoginButton = page.getByRole('button', { name: 'Log In', exact: true });
|
||||
this.completePurchaseButton = page.getByTestId('submit-button-initial')
|
||||
this.payWithRadioButton = page.locator('.py-4').first();
|
||||
this.payButton = page.getByRole('button', { name: 'Pay $' });
|
||||
this.payWithRadioButton = page.getByRole('button').filter({ hasText: 'Pay with' });
|
||||
this.payButton = page.locator('#one-time-cta');
|
||||
}
|
||||
|
||||
async completePaypalPurchase(paymentDetails: IPaymentDetails){
|
||||
|
|
@ -45,7 +45,8 @@ export class PaypalPage extends BasePage {
|
|||
await this.passwordTextBox.fill(paymentDetails.password!);
|
||||
await this.paypalLoginButton.click();
|
||||
await this.payWithRadioButton.click();
|
||||
await this.payButton.click();
|
||||
await this.page.waitForTimeout(2000); // wait for 2 seconds to ensure the Pay button is clickable
|
||||
await this.payButton.dblclick();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,11 @@ export class SchedulePage extends BasePage {
|
|||
readonly militaryWarningMessage: Locator;
|
||||
readonly changeZipButton: Locator;
|
||||
readonly updateZipTextBox: Locator;
|
||||
readonly safeliteShopsList: Locator;
|
||||
readonly searchButton: Locator;
|
||||
readonly storeAddressText: Locator;
|
||||
readonly saveLocationButton: Locator;
|
||||
readonly changeShopLocationLink: Locator;
|
||||
readonly moreLocationsButton: Locator;
|
||||
readonly selectAShopOptions: Locator;
|
||||
readonly yourSafeliteShop: Locator;
|
||||
|
||||
|
|
@ -44,12 +47,15 @@ export class SchedulePage extends BasePage {
|
|||
this.militaryWarningMessage = this.page.locator('[class*="widget-name-AlertMilitaryBaseZipWidget"]');
|
||||
this.changeZipButton = this.page.locator('a:has(span.sr-only:has-text("edit zip code"))');
|
||||
this.updateZipTextBox = this.page.locator('#serviceZipCode').filter({ visible: true });
|
||||
this.safeliteShopsList = this.page.locator('fieldset:has(#chooseShop) label');
|
||||
this.searchButton = this.page.locator('.search-icon-button');
|
||||
this.storeAddressText = this.page.locator('#shop-location label:not(:first-child)');
|
||||
this.saveLocationButton = this.page.getByText('Save location', { exact: true });
|
||||
this.changeShopLocationLink = this.page.locator(".shop-question a").filter({ hasText: "Change shop location " });
|
||||
this.moreLocationsButton = this.page.locator(".shop-question a").filter({ hasText: "More locations " });
|
||||
this.selectAShopOptions = this.page.locator('[class="shop-question"]');
|
||||
this.yourSafeliteShop = this.page.locator("fieldset:has(#chooseShop) label");
|
||||
|
||||
this.allDayDropOffButton = this.page.locator("label[buttonlabel='Drop off all day']");
|
||||
this.allDayDropOffButton = this.page.locator("label[buttonlabel*='Drop']");
|
||||
this.pickATimeButton = this.page.locator("label[buttonlabel='Pick a time']");
|
||||
this.firstAvailableDate = this.page.locator('.selectable-day').filter({ visible: true}).locator('nth=0');
|
||||
this.firstAvailableTime = this.page.locator('label').filter({ hasText: /AM|PM/ }).locator('div').locator('nth=0');
|
||||
|
|
@ -58,7 +64,7 @@ export class SchedulePage extends BasePage {
|
|||
this.dateText = this.page.locator('label.modal-title');
|
||||
this.viewMoreDatesLink = this.page.getByText(/View more dates/).first();
|
||||
this.appointmentDuration = this.page.locator('.duration-text-block');
|
||||
this.timeSlots = this.page.locator('fieldset[aria-labelledby=\'chooseTimeSlot\'] label');
|
||||
this.timeSlots = this.page.locator('fieldset:has(>legend#chooseTimeSlot) label').filter({ visible: true});
|
||||
}
|
||||
|
||||
async selectLocation(testData: Partial<ITestData>) {
|
||||
|
|
@ -76,25 +82,36 @@ export class SchedulePage extends BasePage {
|
|||
}
|
||||
|
||||
async scheduleInShop(appointmentDetails?: IAppointmentDetails) {
|
||||
await this.inShopButton.click();
|
||||
|
||||
await this.inShopButton.isVisible() ? await this.inShopButton.click() : null;
|
||||
if (appointmentDetails && appointmentDetails.shopAddress) {
|
||||
const zipCodeMatch = appointmentDetails.shopAddress.match(/\b\d{5}$/);
|
||||
if (zipCodeMatch) {
|
||||
const zipCode = zipCodeMatch[0];
|
||||
// Enter the ZIP code into the updateZipTextBox
|
||||
await this.changeShopLocationLink.click();
|
||||
await this.moreLocationsButton.click();
|
||||
await this.page.waitForTimeout(500);
|
||||
await this.updateZipTextBox.fill(zipCode);
|
||||
await this.searchButton.click().then( async() => await this.page.locator('loader-wrapper').waitFor({state: 'hidden'}));
|
||||
await this.safeliteShopsList.first().click();
|
||||
// Click the save location button
|
||||
await this.saveLocationButton.click();
|
||||
}
|
||||
|
||||
await this.inShopButton.click();
|
||||
// await this.inShopButton.click();
|
||||
// await this.selectAShopOptions.locator(`[buttonbodycopy="${appointmentDetails.shopAddress}"]`).scrollIntoViewIfNeeded().then(() => this.selectAShopOptions.locator(`[buttonbodycopy="${appointmentDetails.shopAddress}"]`).click());
|
||||
}
|
||||
|
||||
if (appointmentDetails && (appointmentDetails.shopAddress === "" || appointmentDetails.shopAddress === undefined )) {
|
||||
appointmentDetails.shopAddress = await this.yourSafeliteShop.getAttribute("buttonbodycopy") || "";
|
||||
appointmentDetails.shopAddress = '';
|
||||
await this.storeAddressText.first().waitFor({ state: 'visible' });
|
||||
const elements = await this.storeAddressText.all();
|
||||
|
||||
for (let element of elements) {
|
||||
let addressLine = await element.textContent() || "";
|
||||
appointmentDetails.shopAddress += addressLine + ", "
|
||||
};
|
||||
appointmentDetails.shopAddress = appointmentDetails.shopAddress?.slice(0, -2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -146,6 +163,7 @@ export class SchedulePage extends BasePage {
|
|||
const inshopAvailableDates = this.page.locator('.selectable-day').filter({ visible: true}).all();
|
||||
for (const inshopAvailableDate of await inshopAvailableDates) {
|
||||
await inshopAvailableDate.click();
|
||||
await this.page.waitForTimeout(500);
|
||||
if (await this.allDayDropOffButton.isVisible()) {
|
||||
customerDetails!.apptDate = `${await inshopAvailableDate.getAttribute("id")}`;
|
||||
break;
|
||||
|
|
@ -186,13 +204,13 @@ export class SchedulePage extends BasePage {
|
|||
}
|
||||
|
||||
// appointmentmentDetails.serviceLocation === ServiceLocation.DropOff ? await this.dropOffButton.click() : await this.firstAvailableTime.click();
|
||||
customerDetails!.apptDuration = (await this.appointmentDuration.innerText()).replace("Duration: ", "");
|
||||
customerDetails!.apptDuration = (await this.appointmentDuration.innerText()).replace("Your service will take approximately ", "").replace("Duration: ", "");
|
||||
}
|
||||
|
||||
async getFormattedTimeSlot(timeSlot: Locator) {
|
||||
async getFormattedTimeSlot(timeSlot: Locator) {
|
||||
const selectedTimeSlot = await timeSlot.innerText();
|
||||
let formattedTimeSlot: string = "";
|
||||
if (selectedTimeSlot.toLowerCase().includes("drop off"))
|
||||
if (selectedTimeSlot.toLowerCase().includes("drop"))
|
||||
{
|
||||
formattedTimeSlot = selectedTimeSlot.includes("overnight") ? "drop off by 5:30 pm on the night of your scheduled appointment. Pick-up time dependent on shop schedule" : "drop off before 9:30 AM";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export class ServicePackagesPage extends BasePage {
|
|||
this.iHavePromoCodeButton = this.page.getByRole('link', { name: 'I have a promo code' });
|
||||
this.skipQuoteEmailButton = this.page.getByRole('button', { name: 'Skip' });
|
||||
this.emailInput = this.page.getByRole('textbox', { name: 'Enter your email address' });
|
||||
this.getMyQuoteButton = this.page.getByRole('button', { name: 'Get my quote' });
|
||||
this.getMyQuoteButton = this.page.getByRole('button', { name: 'Send' });
|
||||
this.closeButton = this.page. getByRole('dialog').locator('button').filter({ hasText: 'Close' });
|
||||
this.promoCodeTextbox = this.page.getByLabel('Enter a promo code');
|
||||
this.applyPromoButton = this.page.getByRole('button', { name: 'Apply promo code' });
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ export class VehicleDamagePage extends BasePage {
|
|||
super(page);
|
||||
this.page = page;
|
||||
this.windshieldChkBox = this.page.locator('[buttonlabel="Windshield"]');
|
||||
this.crackButton = this.page.locator('[buttonlabel="Crack"]');
|
||||
this.chipButton = this.page.locator('[buttonlabel="Chip(s)"]');
|
||||
this.sideDoorButton = this.page.locator('[buttonlabel="Side door"]');
|
||||
this.crackButton = this.page.locator('[buttonlabelsubcopy="Replace my windshield"]');
|
||||
this.chipButton = this.page.locator('[buttonlabelsubcopy="Repair my windshield"]');
|
||||
this.sideDoorButton = this.page.locator('[buttonlabel="Side window"]');
|
||||
this.driverSideButton = this.page.locator('[buttonlabel="Driver side"]');
|
||||
this.passengerSideButton = this.page.locator('[buttonlabel="Passenger side"]');
|
||||
this.driverQuarterPanelChkBox = this.page.locator('[aria-labelledby="driverSideOptions"]').locator('[buttonlabel="Quarter panel"]');
|
||||
|
|
|
|||
|
|
@ -42,14 +42,6 @@ const cashReplaceGlassAddressLookupInshopAfterPayData: Partial<ITestData> = {
|
|||
vehicleLookupType: VehicleLookupType.Address
|
||||
},
|
||||
|
||||
// No need to override vehicleDamage as it already defaults to WindshieldCrack
|
||||
|
||||
// Override appointment details
|
||||
appointmentDetails: {
|
||||
...getDefaultTestData().appointmentDetails!,
|
||||
shopAddress: "6826 Sawmill Rd, Columbus, OH 43235"
|
||||
},
|
||||
|
||||
// Override payment details
|
||||
paymentDetails: ClientData.getDefaultAfterpayDetails()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const cashReplaceMultiSlidingGlassDropoffData: Partial<ITestData> = {
|
|||
appointmentDetails: {
|
||||
serviceLocation: ServiceLocation.DropOff,
|
||||
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate,
|
||||
shopAddress: "6826 Sawmill Rd, Columbus, OH 43235"
|
||||
shopAddress: "6826 sawmill rd, Columbus, OH 43235"
|
||||
},
|
||||
|
||||
// Override vehicle details
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ const cashReplaceWiperDropoffData: Partial<ITestData> = {
|
|||
servicePackage: ServicePackage.Standard,
|
||||
|
||||
// Special flags
|
||||
isSkipEstimatePage: true,
|
||||
isSkipEstimatePage: false,
|
||||
isRecalVehicle: true,
|
||||
|
||||
// Override customer postal code
|
||||
|
|
@ -28,7 +28,7 @@ const cashReplaceWiperDropoffData: Partial<ITestData> = {
|
|||
...getDefaultTestData().customerDetails!,
|
||||
address: {
|
||||
...getDefaultTestData().customerDetails!.address,
|
||||
postalCode: '43085'
|
||||
postalCode: '43235'
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="funnel-header" v-if="imageSrc">
|
||||
<div class="funnel-header" :class="{ scrolled: isScrolled }" v-if="imageSrc">
|
||||
<div class="d-flex w-100">
|
||||
<progress-bar :page="$route.name" />
|
||||
</div>
|
||||
|
|
@ -61,6 +61,7 @@ export default {
|
|||
sierraChatOpen: false,
|
||||
salesforceChatOpen: false,
|
||||
isSalesforceTransferInProgress: false,
|
||||
isScrolled: false,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
|
@ -194,6 +195,12 @@ export default {
|
|||
}
|
||||
};
|
||||
window.addEventListener("salesforce-chat-visibility", this._handleSalesforceChatOpened);
|
||||
|
||||
// Add scroll listener for header shadow effect
|
||||
this._handleScroll = () => {
|
||||
this.isScrolled = window.scrollY > 0;
|
||||
};
|
||||
window.addEventListener("scroll", this._handleScroll);
|
||||
},
|
||||
beforeUnmount() {
|
||||
window.removeEventListener("sierra-chat-closed", this._handleSierraChatClosed);
|
||||
|
|
@ -204,6 +211,7 @@ export default {
|
|||
);
|
||||
window.removeEventListener("sierra-chat-transfer", this._handleSierraToSalesforceTransfer);
|
||||
window.removeEventListener("salesforce-chat-visibility", this._handleSalesforceChatOpened);
|
||||
window.removeEventListener("scroll", this._handleScroll);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -218,9 +226,18 @@ export default {
|
|||
padding: 2rem 0.75rem;
|
||||
}
|
||||
}
|
||||
position: relative;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background-color: white;
|
||||
box-shadow: none;
|
||||
transition: box-shadow 0.3s ease-in-out;
|
||||
padding: 0;
|
||||
|
||||
&.scrolled {
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.button-container {
|
||||
&.webchat {
|
||||
margin-right: 0.875rem;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export default {
|
|||
position: relative;
|
||||
background: $white;
|
||||
transition: all 150ms linear;
|
||||
border-radius: $border-radius-lg;
|
||||
border-radius: $border-radius-pill;
|
||||
border: 1px solid $gray-500;
|
||||
width: 100%;
|
||||
outline: none;
|
||||
|
|
|
|||
|
|
@ -497,14 +497,14 @@ export default {
|
|||
);
|
||||
|
||||
const serviceZipCode = store.getters.order.serviceLocation.zipCode;
|
||||
const zipCodeDataPromise = getZipCodeData(serviceZipCode);
|
||||
const zipCodeDataPromise = getZipCodeData(serviceZipCode, to.name);
|
||||
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
||||
serviceZipCode,
|
||||
null,
|
||||
"service-location"
|
||||
to.name
|
||||
);
|
||||
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "service-location");
|
||||
const shopProviderData = await getShopProviderData(serviceZipCode);
|
||||
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, to.name);
|
||||
const shopProviderData = await getShopProviderData(serviceZipCode, to.name);
|
||||
const providerNumber = shopProviderData?.data?.shopProviders[0]?.providerNumber;
|
||||
|
||||
// Get pricingByDayUpcharge needed for Pricing By Day
|
||||
|
|
@ -515,7 +515,7 @@ export default {
|
|||
const premiumFeePromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.GET_MOBILE_PREMIUM_FEE,
|
||||
null,
|
||||
"schedule"
|
||||
to.name
|
||||
);
|
||||
const premiumFeeWithPricePromise = premiumFeePromise.then((result) => {
|
||||
if (result.data) {
|
||||
|
|
@ -524,7 +524,7 @@ export default {
|
|||
{
|
||||
availableLineItems: [result.data],
|
||||
},
|
||||
"schedule",
|
||||
to.name,
|
||||
false
|
||||
);
|
||||
} else {
|
||||
|
|
@ -1305,7 +1305,7 @@ export default {
|
|||
) {
|
||||
navigateToHeritageFunnel({
|
||||
shouldSaveSession: false,
|
||||
pageNameToLog: "service-location",
|
||||
pageNameToLog: this.pageName,
|
||||
navType: "back",
|
||||
});
|
||||
} else {
|
||||
|
|
@ -1630,7 +1630,7 @@ export default {
|
|||
handleZipCodeChange(newZipCode) {
|
||||
this.resetMobileLocation();
|
||||
|
||||
getShopProviderData(newZipCode.zipCode).then((result) => {
|
||||
getShopProviderData(newZipCode.zipCode, this.pageName).then((result) => {
|
||||
this.shopProviderData = result.data;
|
||||
this.resetSelectedProvider();
|
||||
this.state = newZipCode.state;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) {
|
|||
return null;
|
||||
}
|
||||
|
||||
const zipCodeData = await getZipCodeData(serviceZipCode);
|
||||
const providerData = await getShopProviderData(serviceZipCode);
|
||||
const zipCodeData = await getZipCodeData(serviceZipCode, pageNameToLog);
|
||||
const providerData = await getShopProviderData(serviceZipCode, pageNameToLog);
|
||||
|
||||
// Get the Mobile Fee Part
|
||||
const mobileFeePart = await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
|
|
@ -50,7 +50,7 @@ export async function getPricedRecycleFeePart(serviceZipCode, pageNameToLog) {
|
|||
return null;
|
||||
}
|
||||
|
||||
const zipCodeData = await getZipCodeData(serviceZipCode);
|
||||
const zipCodeData = await getZipCodeData(serviceZipCode, pageNameToLog);
|
||||
|
||||
// Get supporting items
|
||||
const supportingItems = await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
|
|
@ -102,23 +102,23 @@ export async function getServiceabilityDetails(serviceZipCode, lineItems, pageNa
|
|||
);
|
||||
}
|
||||
|
||||
export async function getBillToAccountNumber(providerNumber) {
|
||||
export async function getBillToAccountNumber(providerNumber, pageNameToLog) {
|
||||
// Get the BillTo Account Number
|
||||
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.GET_BILL_TO_ACCOUNT_NUMBER,
|
||||
{ providerNumber: providerNumber },
|
||||
"service-location",
|
||||
pageNameToLog,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
export async function getShopProviderData(serviceZipCode) {
|
||||
export async function getShopProviderData(serviceZipCode, pageNameToLog) {
|
||||
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||
storeActions.GET_PROVIDERS,
|
||||
{
|
||||
serviceZipCode: serviceZipCode,
|
||||
},
|
||||
"service-location"
|
||||
pageNameToLog
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -139,6 +139,6 @@ export async function getClosestApplicableShops(serviceZipCode, carId, pageNameT
|
|||
return closestShops.data;
|
||||
}
|
||||
|
||||
export async function getZipCodeData(serviceZipCode) {
|
||||
return await baseMixin.methods.getZipCodeData(serviceZipCode, "service-location");
|
||||
export async function getZipCodeData(serviceZipCode, pageNameToLog) {
|
||||
return await baseMixin.methods.getZipCodeData(serviceZipCode, pageNameToLog);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,8 +193,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
const zipCodeData = await this.getZipCodeData(
|
||||
this.internalModel.addressQuestions.zipCode,
|
||||
"service-location"
|
||||
this.internalModel.addressQuestions.zipCode
|
||||
);
|
||||
|
||||
if (!zipCodeData.isValid) {
|
||||
|
|
@ -216,26 +215,21 @@ export default {
|
|||
|
||||
// retrieve mobile fee part
|
||||
const serviceZipCode = this.internalModel.addressQuestions.zipCode;
|
||||
const mobileFeePart = await getPricedMobileFeePart(
|
||||
serviceZipCode,
|
||||
"service-location"
|
||||
);
|
||||
const mobileFeePart = await getPricedMobileFeePart(serviceZipCode, this.pageName);
|
||||
|
||||
// retrieve recycle fee part
|
||||
const recycleFeePart = await getPricedRecycleFeePart(
|
||||
serviceZipCode,
|
||||
"service-location"
|
||||
);
|
||||
const recycleFeePart = await getPricedRecycleFeePart(serviceZipCode, this.pageName);
|
||||
|
||||
// retrieve serviceability details
|
||||
const serviceabilityDetails = await getServiceabilityDetails(
|
||||
serviceZipCode,
|
||||
null,
|
||||
"service-location"
|
||||
this.pageName
|
||||
);
|
||||
|
||||
const billToAccountNumber = await getBillToAccountNumber(
|
||||
this.internalModel.zipCodeCtu
|
||||
this.internalModel.zipCodeCtu,
|
||||
this.pageName
|
||||
);
|
||||
|
||||
// update content related to service zip code
|
||||
|
|
|
|||
|
|
@ -226,17 +226,17 @@ export default {
|
|||
const cmsContentPromise = fetchCmsContentForPage(to.name);
|
||||
|
||||
const serviceZipCode = store.getters.order.serviceLocation.zipCode;
|
||||
const zipCodeDataPromise = getZipCodeData(serviceZipCode);
|
||||
const zipCodeDataPromise = getZipCodeData(serviceZipCode, to.name);
|
||||
|
||||
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
||||
serviceZipCode,
|
||||
null,
|
||||
"service-location"
|
||||
to.name
|
||||
);
|
||||
|
||||
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "service-location");
|
||||
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, to.name);
|
||||
|
||||
const shopProviderDataPromise = getShopProviderData(serviceZipCode); // shopQuestion.methods.loadInitialData(serviceZipCode);
|
||||
const shopProviderDataPromise = getShopProviderData(serviceZipCode, to.name); // shopQuestion.methods.loadInitialData(serviceZipCode);
|
||||
|
||||
// Settle promises and get results
|
||||
const promiseResultMap = [
|
||||
|
|
@ -846,7 +846,7 @@ export default {
|
|||
zipCode: {
|
||||
handler(newValue) {
|
||||
if (!this.navigatingForward) {
|
||||
getShopProviderData(this.zipCode).then(async (result) => {
|
||||
getShopProviderData(this.zipCode, this.pageName).then(async (result) => {
|
||||
this.shopProviderData = result.data;
|
||||
if (this.selectedAppointmentType === "Mobile") {
|
||||
this.selectedProvider = new Provider(
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ export default {
|
|||
|
||||
const zipCodeData = await this.getZipCodeData(
|
||||
this.internalModel.zipCode,
|
||||
"service-location"
|
||||
this.pageName
|
||||
);
|
||||
|
||||
if (!zipCodeData.isValid) {
|
||||
|
|
@ -175,7 +175,7 @@ export default {
|
|||
const closestShops = await getClosestApplicableShops(
|
||||
this.internalModel.zipCode,
|
||||
this.carId,
|
||||
"service-location"
|
||||
this.pageName
|
||||
);
|
||||
|
||||
if (!closestShops || closestShops.inShopProviders?.length === 0) {
|
||||
|
|
@ -193,24 +193,25 @@ export default {
|
|||
const serviceZipCode = this.internalModel.zipCode;
|
||||
const mobileFeePart = await getPricedMobileFeePart(
|
||||
serviceZipCode,
|
||||
"service-location"
|
||||
this.pageName
|
||||
);
|
||||
|
||||
// retrieve recycle fee part
|
||||
const recycleFeePart = await getPricedRecycleFeePart(
|
||||
serviceZipCode,
|
||||
"service-location"
|
||||
this.pageName
|
||||
);
|
||||
|
||||
// retrieve serviceability details
|
||||
const serviceabilityDetails = await getServiceabilityDetails(
|
||||
serviceZipCode,
|
||||
null,
|
||||
"service-location"
|
||||
this.pageName
|
||||
);
|
||||
|
||||
const billToAccountNumber = await getBillToAccountNumber(
|
||||
this.internalModel.zipCodeCtu
|
||||
this.internalModel.zipCodeCtu,
|
||||
this.pageName
|
||||
);
|
||||
|
||||
// update content related to service zip code
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ export default {
|
|||
}
|
||||
this.isLoading = true;
|
||||
|
||||
this.zipCodeData = await this.getZipCodeData(this.localZipCode, "service-location");
|
||||
this.zipCodeData = await this.getZipCodeData(this.localZipCode, this.pageName);
|
||||
// Add zipCode to zipCodeData as it does not come back from endpoint
|
||||
this.zipCodeData.zipCode = this.localZipCode;
|
||||
if (this.zipCodeData.isValid) {
|
||||
|
|
@ -289,9 +289,9 @@ export default {
|
|||
const closestShops = await getClosestApplicableShops(
|
||||
this.localZipCode,
|
||||
this.$store.getters.order.vehicle.carId,
|
||||
"service-location"
|
||||
this.pageName
|
||||
);
|
||||
if (!closestShops || closestShops.providers?.length === 0) {
|
||||
if (!closestShops || closestShops.inShopProviders?.length === 0) {
|
||||
this.isLoading = false;
|
||||
this.displayNoServiceAlert = true;
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -496,7 +496,10 @@ export default {
|
|||
{ zip: this.serviceZipCode, carId: this.carId },
|
||||
"vehicle"
|
||||
);
|
||||
if (!closestShops?.data?.providers || closestShops.data.providers.length === 0) {
|
||||
if (
|
||||
!closestShops?.data?.inShopProviders ||
|
||||
closestShops.data.inShopProviders.length === 0
|
||||
) {
|
||||
this.displayNoServiceAlert = true;
|
||||
if (store.getters.externalParameterState?.isExternalParameter) {
|
||||
return baseMixin.methods.ResetExternalParamsAndHideModal();
|
||||
|
|
|
|||
|
|
@ -318,10 +318,6 @@ export default {
|
|||
"vin-lookup"
|
||||
);
|
||||
|
||||
// Update button "Continue with..."
|
||||
this.$refs.navbar.updateButtonText(
|
||||
`Continue with ${resultMap.vehicleLookupResponse.year} ${resultMap.vehicleLookupResponse.make} ${resultMap.vehicleLookupResponse.model}`
|
||||
);
|
||||
return this.$refs.navbar.removeLoader();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue