CASH-1338 refactor to use base-mixin var pageName
This commit is contained in:
parent
e60aad756b
commit
e5a1bcbdab
6 changed files with 13 additions and 21 deletions
|
|
@ -77,7 +77,6 @@
|
||||||
: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"
|
||||||
|
|
@ -101,7 +100,6 @@
|
||||||
: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>
|
||||||
|
|
@ -499,14 +497,14 @@ export default {
|
||||||
);
|
);
|
||||||
|
|
||||||
const serviceZipCode = store.getters.order.serviceLocation.zipCode;
|
const serviceZipCode = store.getters.order.serviceLocation.zipCode;
|
||||||
const zipCodeDataPromise = getZipCodeData(serviceZipCode, "schedule");
|
const zipCodeDataPromise = getZipCodeData(serviceZipCode, to.name);
|
||||||
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
null,
|
null,
|
||||||
"schedule"
|
to.name
|
||||||
);
|
);
|
||||||
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "schedule");
|
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, to.name);
|
||||||
const shopProviderData = await getShopProviderData(serviceZipCode, "schedule");
|
const shopProviderData = await getShopProviderData(serviceZipCode, to.name);
|
||||||
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
|
||||||
|
|
@ -517,7 +515,7 @@ export default {
|
||||||
const premiumFeePromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
const premiumFeePromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
storeActions.GET_MOBILE_PREMIUM_FEE,
|
storeActions.GET_MOBILE_PREMIUM_FEE,
|
||||||
null,
|
null,
|
||||||
"schedule"
|
to.name
|
||||||
);
|
);
|
||||||
const premiumFeeWithPricePromise = premiumFeePromise.then((result) => {
|
const premiumFeeWithPricePromise = premiumFeePromise.then((result) => {
|
||||||
if (result.data) {
|
if (result.data) {
|
||||||
|
|
@ -526,7 +524,7 @@ export default {
|
||||||
{
|
{
|
||||||
availableLineItems: [result.data],
|
availableLineItems: [result.data],
|
||||||
},
|
},
|
||||||
"schedule",
|
to.name,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1307,7 +1305,7 @@ export default {
|
||||||
) {
|
) {
|
||||||
navigateToHeritageFunnel({
|
navigateToHeritageFunnel({
|
||||||
shouldSaveSession: false,
|
shouldSaveSession: false,
|
||||||
pageNameToLog: "schedule",
|
pageNameToLog: this.pageName,
|
||||||
navType: "back",
|
navType: "back",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1632,7 +1630,7 @@ export default {
|
||||||
handleZipCodeChange(newZipCode) {
|
handleZipCodeChange(newZipCode) {
|
||||||
this.resetMobileLocation();
|
this.resetMobileLocation();
|
||||||
|
|
||||||
getShopProviderData(newZipCode.zipCode, "schedule").then((result) => {
|
getShopProviderData(newZipCode.zipCode, this.pageName).then((result) => {
|
||||||
this.shopProviderData = result.data;
|
this.shopProviderData = result.data;
|
||||||
this.resetSelectedProvider();
|
this.resetSelectedProvider();
|
||||||
this.state = newZipCode.state;
|
this.state = newZipCode.state;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
: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" />
|
||||||
|
|
@ -56,7 +55,6 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
pageName: String,
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
questionText() {
|
questionText() {
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,6 @@ export default {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
pageName: String,
|
|
||||||
linkWidgetName: String,
|
linkWidgetName: String,
|
||||||
modalWidgetName: String,
|
modalWidgetName: String,
|
||||||
alertNonServiceableZipWidgetName: String,
|
alertNonServiceableZipWidgetName: String,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
: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"
|
||||||
|
|
@ -227,17 +226,17 @@ 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, "service-location");
|
const zipCodeDataPromise = getZipCodeData(serviceZipCode, to.name);
|
||||||
|
|
||||||
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
const serviceabilityDetailsPromise = getServiceabilityDetails(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
null,
|
null,
|
||||||
"service-location"
|
to.name
|
||||||
);
|
);
|
||||||
|
|
||||||
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, "service-location");
|
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode, to.name);
|
||||||
|
|
||||||
const shopProviderDataPromise = getShopProviderData(serviceZipCode, "service-location"); // shopQuestion.methods.loadInitialData(serviceZipCode);
|
const shopProviderDataPromise = getShopProviderData(serviceZipCode, to.name); // shopQuestion.methods.loadInitialData(serviceZipCode);
|
||||||
|
|
||||||
// Settle promises and get results
|
// Settle promises and get results
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
|
|
@ -847,7 +846,7 @@ export default {
|
||||||
zipCode: {
|
zipCode: {
|
||||||
handler(newValue) {
|
handler(newValue) {
|
||||||
if (!this.navigatingForward) {
|
if (!this.navigatingForward) {
|
||||||
getShopProviderData(this.zipCode, "service-location").then(async (result) => {
|
getShopProviderData(this.zipCode, this.pageName).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,7 +91,6 @@ export default {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
pageName: String,
|
|
||||||
linkWidgetName: String,
|
linkWidgetName: String,
|
||||||
modalWidgetName: String,
|
modalWidgetName: String,
|
||||||
editScreenReaderTextCmsWidgetName: String,
|
editScreenReaderTextCmsWidgetName: String,
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,6 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
pageName: String,
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
shopQuestionLinkText() {
|
shopQuestionLinkText() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue