CASH-1338: fix instances where wrong pageName is set and/or pass in pageName var
This commit is contained in:
parent
3b050f1c2d
commit
61e350dcbe
7 changed files with 41 additions and 38 deletions
|
|
@ -77,6 +77,7 @@
|
||||||
:carId="carId"
|
:carId="carId"
|
||||||
:isVehicleHeavyTruck="isVehicleHeavyTruck"
|
:isVehicleHeavyTruck="isVehicleHeavyTruck"
|
||||||
:mobileFeePart="mobileFeePart"
|
:mobileFeePart="mobileFeePart"
|
||||||
|
pageName="schedule"
|
||||||
@updated-mobile-fee-part="setMobileFeePart"
|
@updated-mobile-fee-part="setMobileFeePart"
|
||||||
@updated-recycle-fee-part="setRecycleFeePart"
|
@updated-recycle-fee-part="setRecycleFeePart"
|
||||||
@updated-serviceability="setServiceabilityDetails"
|
@updated-serviceability="setServiceabilityDetails"
|
||||||
|
|
@ -100,6 +101,7 @@
|
||||||
:shopProviderDataFromParent="shopProviderData"
|
:shopProviderDataFromParent="shopProviderData"
|
||||||
:zipCodeFromParent="zipCode"
|
:zipCodeFromParent="zipCode"
|
||||||
:isShopQuestionDisplayed="isShopQuestionDisplayed"
|
:isShopQuestionDisplayed="isShopQuestionDisplayed"
|
||||||
|
pageName="schedule"
|
||||||
@shop-selected="onShopSelected"
|
@shop-selected="onShopSelected"
|
||||||
@updated-serviceability="setServiceabilityDetails" />
|
@updated-serviceability="setServiceabilityDetails" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -497,14 +499,14 @@ export default {
|
||||||
);
|
);
|
||||||
|
|
||||||
const serviceZipCode = store.getters.order.serviceLocation.zipCode;
|
const serviceZipCode = store.getters.order.serviceLocation.zipCode;
|
||||||
const zipCodeDataPromise = getZipCodeData(serviceZipCode);
|
const zipCodeDataPromise = getZipCodeData(serviceZipCode, "schedule");
|
||||||
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
null,
|
null,
|
||||||
"service-location"
|
"schedule"
|
||||||
);
|
);
|
||||||
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "service-location");
|
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "schedule");
|
||||||
const shopProviderData = await getShopProviderData(serviceZipCode);
|
const shopProviderData = await getShopProviderData(serviceZipCode, "schedule");
|
||||||
const providerNumber = shopProviderData?.data?.shopProviders[0]?.providerNumber;
|
const providerNumber = shopProviderData?.data?.shopProviders[0]?.providerNumber;
|
||||||
|
|
||||||
// Get pricingByDayUpcharge needed for Pricing By Day
|
// Get pricingByDayUpcharge needed for Pricing By Day
|
||||||
|
|
@ -1305,7 +1307,7 @@ export default {
|
||||||
) {
|
) {
|
||||||
navigateToHeritageFunnel({
|
navigateToHeritageFunnel({
|
||||||
shouldSaveSession: false,
|
shouldSaveSession: false,
|
||||||
pageNameToLog: "service-location",
|
pageNameToLog: "schedule",
|
||||||
navType: "back",
|
navType: "back",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1630,7 +1632,7 @@ export default {
|
||||||
handleZipCodeChange(newZipCode) {
|
handleZipCodeChange(newZipCode) {
|
||||||
this.resetMobileLocation();
|
this.resetMobileLocation();
|
||||||
|
|
||||||
getShopProviderData(newZipCode.zipCode).then((result) => {
|
getShopProviderData(newZipCode.zipCode, "schedule").then((result) => {
|
||||||
this.shopProviderData = result.data;
|
this.shopProviderData = result.data;
|
||||||
this.resetSelectedProvider();
|
this.resetSelectedProvider();
|
||||||
this.state = newZipCode.state;
|
this.state = newZipCode.state;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
:selectedProviderNumberFromParent="selectedProviderNumberFromParent"
|
:selectedProviderNumberFromParent="selectedProviderNumberFromParent"
|
||||||
:shopProviderDataFromParent="shopProviderDataFromParent"
|
:shopProviderDataFromParent="shopProviderDataFromParent"
|
||||||
:zipCodeFromParent="zipCodeFromParent"
|
:zipCodeFromParent="zipCodeFromParent"
|
||||||
|
:pageName="pageName"
|
||||||
@shop-selected="onShopSelected"
|
@shop-selected="onShopSelected"
|
||||||
@updated-serviceability="setServiceabilityDetails"
|
@updated-serviceability="setServiceabilityDetails"
|
||||||
cmsWidgetName="YourSafeliteShopWidget" />
|
cmsWidgetName="YourSafeliteShopWidget" />
|
||||||
|
|
@ -55,6 +56,7 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
pageName: String,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
questionText() {
|
questionText() {
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const zipCodeData = await getZipCodeData(serviceZipCode);
|
const zipCodeData = await getZipCodeData(serviceZipCode, pageNameToLog);
|
||||||
const providerData = await getShopProviderData(serviceZipCode);
|
const providerData = await getShopProviderData(serviceZipCode, pageNameToLog);
|
||||||
|
|
||||||
// Get the Mobile Fee Part
|
// Get the Mobile Fee Part
|
||||||
const mobileFeePart = await baseMixin.methods.dispatchStoreActionWithLogging(
|
const mobileFeePart = await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
|
|
@ -50,7 +50,7 @@ export async function getPricedRecycleFeePart(serviceZipCode, pageNameToLog) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const zipCodeData = await getZipCodeData(serviceZipCode);
|
const zipCodeData = await getZipCodeData(serviceZipCode, pageNameToLog);
|
||||||
|
|
||||||
// Get supporting items
|
// Get supporting items
|
||||||
const supportingItems = await baseMixin.methods.dispatchStoreActionWithLogging(
|
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
|
// Get the BillTo Account Number
|
||||||
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
storeActions.GET_BILL_TO_ACCOUNT_NUMBER,
|
storeActions.GET_BILL_TO_ACCOUNT_NUMBER,
|
||||||
{ providerNumber: providerNumber },
|
{ providerNumber: providerNumber },
|
||||||
"service-location",
|
pageNameToLog,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getShopProviderData(serviceZipCode) {
|
export async function getShopProviderData(serviceZipCode, pageNameToLog) {
|
||||||
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
storeActions.GET_PROVIDERS,
|
storeActions.GET_PROVIDERS,
|
||||||
{
|
{
|
||||||
serviceZipCode: serviceZipCode,
|
serviceZipCode: serviceZipCode,
|
||||||
},
|
},
|
||||||
"service-location"
|
pageNameToLog
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,6 +139,6 @@ export async function getClosestApplicableShops(serviceZipCode, carId, pageNameT
|
||||||
return closestShops.data;
|
return closestShops.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getZipCodeData(serviceZipCode) {
|
export async function getZipCodeData(serviceZipCode, pageNameToLog) {
|
||||||
return await baseMixin.methods.getZipCodeData(serviceZipCode, "service-location");
|
return await baseMixin.methods.getZipCodeData(serviceZipCode, pageNameToLog);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@ export default {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
|
pageName: String,
|
||||||
linkWidgetName: String,
|
linkWidgetName: String,
|
||||||
modalWidgetName: String,
|
modalWidgetName: String,
|
||||||
alertNonServiceableZipWidgetName: String,
|
alertNonServiceableZipWidgetName: String,
|
||||||
|
|
@ -193,8 +194,7 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const zipCodeData = await this.getZipCodeData(
|
const zipCodeData = await this.getZipCodeData(
|
||||||
this.internalModel.addressQuestions.zipCode,
|
this.internalModel.addressQuestions.zipCode
|
||||||
"service-location"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!zipCodeData.isValid) {
|
if (!zipCodeData.isValid) {
|
||||||
|
|
@ -216,26 +216,21 @@ export default {
|
||||||
|
|
||||||
// retrieve mobile fee part
|
// retrieve mobile fee part
|
||||||
const serviceZipCode = this.internalModel.addressQuestions.zipCode;
|
const serviceZipCode = this.internalModel.addressQuestions.zipCode;
|
||||||
const mobileFeePart = await getPricedMobileFeePart(
|
const mobileFeePart = await getPricedMobileFeePart(serviceZipCode, this.pageName);
|
||||||
serviceZipCode,
|
|
||||||
"service-location"
|
|
||||||
);
|
|
||||||
|
|
||||||
// retrieve recycle fee part
|
// retrieve recycle fee part
|
||||||
const recycleFeePart = await getPricedRecycleFeePart(
|
const recycleFeePart = await getPricedRecycleFeePart(serviceZipCode, this.pageName);
|
||||||
serviceZipCode,
|
|
||||||
"service-location"
|
|
||||||
);
|
|
||||||
|
|
||||||
// retrieve serviceability details
|
// retrieve serviceability details
|
||||||
const serviceabilityDetails = await getServiceabilityDetails(
|
const serviceabilityDetails = await getServiceabilityDetails(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
null,
|
null,
|
||||||
"service-location"
|
this.pageName
|
||||||
);
|
);
|
||||||
|
|
||||||
const billToAccountNumber = await getBillToAccountNumber(
|
const billToAccountNumber = await getBillToAccountNumber(
|
||||||
this.internalModel.zipCodeCtu
|
this.internalModel.zipCodeCtu,
|
||||||
|
this.pageName
|
||||||
);
|
);
|
||||||
|
|
||||||
// update content related to service zip code
|
// update content related to service zip code
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
:carId="carId"
|
:carId="carId"
|
||||||
:isVehicleHeavyTruck="isVehicleHeavyTruck"
|
:isVehicleHeavyTruck="isVehicleHeavyTruck"
|
||||||
:mobileFeePart="mobileFeePart"
|
:mobileFeePart="mobileFeePart"
|
||||||
|
pageName="service-location"
|
||||||
@updated-mobile-fee-part="setMobileFeePart"
|
@updated-mobile-fee-part="setMobileFeePart"
|
||||||
@updated-recycle-fee-part="setRecycleFeePart"
|
@updated-recycle-fee-part="setRecycleFeePart"
|
||||||
@updated-serviceability="setServiceabilityDetails"
|
@updated-serviceability="setServiceabilityDetails"
|
||||||
|
|
@ -226,7 +227,7 @@ export default {
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to.name);
|
const cmsContentPromise = fetchCmsContentForPage(to.name);
|
||||||
|
|
||||||
const serviceZipCode = store.getters.order.serviceLocation.zipCode;
|
const serviceZipCode = store.getters.order.serviceLocation.zipCode;
|
||||||
const zipCodeDataPromise = getZipCodeData(serviceZipCode);
|
const zipCodeDataPromise = getZipCodeData(serviceZipCode, "service-location");
|
||||||
|
|
||||||
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
|
|
@ -236,7 +237,7 @@ export default {
|
||||||
|
|
||||||
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "service-location");
|
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "service-location");
|
||||||
|
|
||||||
const shopProviderDataPromise = getShopProviderData(serviceZipCode); // shopQuestion.methods.loadInitialData(serviceZipCode);
|
const shopProviderDataPromise = getShopProviderData(serviceZipCode, "service-location"); // shopQuestion.methods.loadInitialData(serviceZipCode);
|
||||||
|
|
||||||
// Settle promises and get results
|
// Settle promises and get results
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
|
|
@ -846,7 +847,7 @@ export default {
|
||||||
zipCode: {
|
zipCode: {
|
||||||
handler(newValue) {
|
handler(newValue) {
|
||||||
if (!this.navigatingForward) {
|
if (!this.navigatingForward) {
|
||||||
getShopProviderData(this.zipCode).then(async (result) => {
|
getShopProviderData(this.zipCode, "service-location").then(async (result) => {
|
||||||
this.shopProviderData = result.data;
|
this.shopProviderData = result.data;
|
||||||
if (this.selectedAppointmentType === "Mobile") {
|
if (this.selectedAppointmentType === "Mobile") {
|
||||||
this.selectedProvider = new Provider(
|
this.selectedProvider = new Provider(
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ export default {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
|
pageName: String,
|
||||||
linkWidgetName: String,
|
linkWidgetName: String,
|
||||||
modalWidgetName: String,
|
modalWidgetName: String,
|
||||||
editScreenReaderTextCmsWidgetName: String,
|
editScreenReaderTextCmsWidgetName: String,
|
||||||
|
|
@ -162,7 +163,7 @@ export default {
|
||||||
|
|
||||||
const zipCodeData = await this.getZipCodeData(
|
const zipCodeData = await this.getZipCodeData(
|
||||||
this.internalModel.zipCode,
|
this.internalModel.zipCode,
|
||||||
"service-location"
|
this.pageName
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!zipCodeData.isValid) {
|
if (!zipCodeData.isValid) {
|
||||||
|
|
@ -175,7 +176,7 @@ export default {
|
||||||
const closestShops = await getClosestApplicableShops(
|
const closestShops = await getClosestApplicableShops(
|
||||||
this.internalModel.zipCode,
|
this.internalModel.zipCode,
|
||||||
this.carId,
|
this.carId,
|
||||||
"service-location"
|
this.pageName
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!closestShops || closestShops.inShopProviders?.length === 0) {
|
if (!closestShops || closestShops.inShopProviders?.length === 0) {
|
||||||
|
|
@ -193,24 +194,25 @@ export default {
|
||||||
const serviceZipCode = this.internalModel.zipCode;
|
const serviceZipCode = this.internalModel.zipCode;
|
||||||
const mobileFeePart = await getPricedMobileFeePart(
|
const mobileFeePart = await getPricedMobileFeePart(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
"service-location"
|
this.pageName
|
||||||
);
|
);
|
||||||
|
|
||||||
// retrieve recycle fee part
|
// retrieve recycle fee part
|
||||||
const recycleFeePart = await getPricedRecycleFeePart(
|
const recycleFeePart = await getPricedRecycleFeePart(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
"service-location"
|
this.pageName
|
||||||
);
|
);
|
||||||
|
|
||||||
// retrieve serviceability details
|
// retrieve serviceability details
|
||||||
const serviceabilityDetails = await getServiceabilityDetails(
|
const serviceabilityDetails = await getServiceabilityDetails(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
null,
|
null,
|
||||||
"service-location"
|
this.pageName
|
||||||
);
|
);
|
||||||
|
|
||||||
const billToAccountNumber = await getBillToAccountNumber(
|
const billToAccountNumber = await getBillToAccountNumber(
|
||||||
this.internalModel.zipCodeCtu
|
this.internalModel.zipCodeCtu,
|
||||||
|
this.pageName
|
||||||
);
|
);
|
||||||
|
|
||||||
// update content related to service zip code
|
// update content related to service zip code
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,7 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
pageName: String,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
shopQuestionLinkText() {
|
shopQuestionLinkText() {
|
||||||
|
|
@ -280,7 +281,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.isLoading = true;
|
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
|
// Add zipCode to zipCodeData as it does not come back from endpoint
|
||||||
this.zipCodeData.zipCode = this.localZipCode;
|
this.zipCodeData.zipCode = this.localZipCode;
|
||||||
if (this.zipCodeData.isValid) {
|
if (this.zipCodeData.isValid) {
|
||||||
|
|
@ -289,7 +290,7 @@ export default {
|
||||||
const closestShops = await getClosestApplicableShops(
|
const closestShops = await getClosestApplicableShops(
|
||||||
this.localZipCode,
|
this.localZipCode,
|
||||||
this.$store.getters.order.vehicle.carId,
|
this.$store.getters.order.vehicle.carId,
|
||||||
"service-location"
|
this.pageName
|
||||||
);
|
);
|
||||||
if (!closestShops || closestShops.inShopProviders?.length === 0) {
|
if (!closestShops || closestShops.inShopProviders?.length === 0) {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue