Updated Draft
This commit is contained in:
parent
0588b182a0
commit
af78d9b4e1
4 changed files with 323 additions and 321 deletions
|
|
@ -11,6 +11,7 @@ const applicationConfig = {
|
||||||
CLIENTTAG_QUERYSTRING: 'CientTag',
|
CLIENTTAG_QUERYSTRING: 'CientTag',
|
||||||
GOOGLE_PLACES_API_KEY: process.env.VUE_APP_GOOGLE_PLACES_API_KEY,
|
GOOGLE_PLACES_API_KEY: process.env.VUE_APP_GOOGLE_PLACES_API_KEY,
|
||||||
ISS_DEV_CMS_DOMAIN: "https://digitalisscms.dev.safelite.io",
|
ISS_DEV_CMS_DOMAIN: "https://digitalisscms.dev.safelite.io",
|
||||||
|
CASH_PARENT_ACCOUNT_NUMBER: 167132
|
||||||
};
|
};
|
||||||
|
|
||||||
export { applicationConfig };
|
export { applicationConfig };
|
||||||
|
|
@ -16,6 +16,8 @@ import { processIfStatements } from '@/helpers/cms-content-helper';
|
||||||
import { damageLocationsSelected as glassLocations } from '@/constants/damage-locations-selected';
|
import { damageLocationsSelected as glassLocations } from '@/constants/damage-locations-selected';
|
||||||
import servicePackageRadio from './service-package-radio/service-package-radio';
|
import servicePackageRadio from './service-package-radio/service-package-radio';
|
||||||
import { partTypeStrings } from '@/constants/part-type-strings';
|
import { partTypeStrings } from '@/constants/part-type-strings';
|
||||||
|
import { useMainStore } from '@/store';
|
||||||
|
|
||||||
const packageNames = {
|
const packageNames = {
|
||||||
TIER_ONE: 'TierOne',
|
TIER_ONE: 'TierOne',
|
||||||
TIER_TWO: 'TierTwo',
|
TIER_TWO: 'TierTwo',
|
||||||
|
|
@ -38,7 +40,8 @@ export default {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
availableLineItems() {
|
availableLineItems() {
|
||||||
if (this.allGlassPartsAndSupportingItemsHavePrices(this.$store.lineItems)) {
|
const store = useMainStore();
|
||||||
|
if (this.allGlassPartsAndSupportingItemsHavePrices(store.order.lineItems)) {
|
||||||
this.selectDefaultPackage();
|
this.selectDefaultPackage();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -76,16 +79,14 @@ export default {
|
||||||
}
|
}
|
||||||
console.log(this.getCmsContent(this.cmsWidgetName, 'HeaderText'));
|
console.log(this.getCmsContent(this.cmsWidgetName, 'HeaderText'));
|
||||||
|
|
||||||
const modifiedAnswers = [{
|
const modifiedAnswers = cmsAnswersContent.map((answer) => ({
|
||||||
Answers: {
|
|
||||||
value: answer.Name,
|
value: answer.Name,
|
||||||
buttonLabel: this.getHeaderTextFromCms(this.cmsWidgetName),
|
buttonLabel: this.getHeaderTextFromCms(this.cmsWidgetName),
|
||||||
buttonLabelSubCopy: this.getSubheaderTextFromCms(this.cmsWidgetName),
|
buttonLabelSubCopy: this.getSubheaderTextFromCms(this.cmsWidgetName),
|
||||||
buttonBodyCopy: this.getBodyTextFromCms(this.cmsWidgetName),
|
buttonBodyCopy: this.getBodyTextFromCms(this.cmsWidgetName),
|
||||||
buttonAuxiliaryCopy: 'Aux Copy', //his.getPackagePriceString(answer.Name),
|
buttonAuxiliaryCopy: 'Aux Copy', //his.getPackagePriceString(answer.Name),
|
||||||
buttonFooterCopy: this.getFooterTextFromCms(this.cmsWidgetName),
|
buttonFooterCopy: this.getFooterTextFromCms(this.cmsWidgetName)
|
||||||
}
|
}));
|
||||||
}];
|
|
||||||
return modifiedAnswers;
|
return modifiedAnswers;
|
||||||
},
|
},
|
||||||
frontWipersApplicableForTierTwo() {
|
frontWipersApplicableForTierTwo() {
|
||||||
|
|
|
||||||
|
|
@ -91,19 +91,19 @@
|
||||||
...resultMap.wipers,
|
...resultMap.wipers,
|
||||||
...clonedGlassParts
|
...clonedGlassParts
|
||||||
];
|
];
|
||||||
const pricingResults = await baseMixin.methods.dispatchStoreAction(
|
//const pricingResults = await baseMixin.methods.dispatchStoreAction(
|
||||||
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
// storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
||||||
{
|
// {
|
||||||
availableLineItems: availableLineItems
|
// availableLineItems: availableLineItems
|
||||||
},
|
// },
|
||||||
false
|
// false
|
||||||
);
|
//);
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.pricedGlassParts = clonedGlassParts;
|
vm.pricedGlassParts = clonedGlassParts;
|
||||||
vm.supportingItems = resultMap.supportingItems;
|
vm.supportingItems = resultMap.supportingItems;
|
||||||
vm.availableLineItems = pricingResults;
|
vm.availableLineItems = availableLineItems; //pricingResults;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
|
|
@ -479,7 +479,7 @@ export const useMainStore = defineStore({
|
||||||
payload: {
|
payload: {
|
||||||
carId: carId,
|
carId: carId,
|
||||||
serviceType: isRepair ? 'Repair' : 'Replace',
|
serviceType: isRepair ? 'Repair' : 'Replace',
|
||||||
parentAccountNumber: 0,
|
parentAccountNumber: applicationConfig.CASH_PARENT_ACCOUNT_NUMBER,
|
||||||
parts: glassPartsArray,
|
parts: glassPartsArray,
|
||||||
numberOfRepairChips: isRepair ? numberOfChips : 0
|
numberOfRepairChips: isRepair ? numberOfChips : 0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue