Merge pull request #634 from Safelite/feature/richardson/1160.loader
No Changes just formatting before changes.
This commit is contained in:
commit
f4bf3c1d64
1 changed files with 43 additions and 51 deletions
|
|
@ -60,7 +60,9 @@
|
||||||
<div
|
<div
|
||||||
class="fw-bold text-black mt-5 mb-2"
|
class="fw-bold text-black mt-5 mb-2"
|
||||||
v-html="nextStepsHeader"></div>
|
v-html="nextStepsHeader"></div>
|
||||||
<div class="body-text" v-html="nextStepsBody"></div>
|
<div
|
||||||
|
class="body-text"
|
||||||
|
v-html="nextStepsBody"></div>
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
v-if="isQuoteDisplayed"
|
v-if="isQuoteDisplayed"
|
||||||
v-model="selectedProvider"
|
v-model="selectedProvider"
|
||||||
|
|
@ -86,7 +88,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<recalModal ref="RecalModal" cmsWidgetName="RecalModal" />
|
<recalModal
|
||||||
|
ref="RecalModal"
|
||||||
|
cmsWidgetName="RecalModal" />
|
||||||
<contentGroupModal
|
<contentGroupModal
|
||||||
ref="DeductibleModal"
|
ref="DeductibleModal"
|
||||||
cmsWidgetName="DeductibleModal"
|
cmsWidgetName="DeductibleModal"
|
||||||
|
|
@ -110,7 +114,7 @@ import pageVariations from '@/constants/coverage-statement-page-variations';
|
||||||
import {
|
import {
|
||||||
fetchCmsContentForPage,
|
fetchCmsContentForPage,
|
||||||
setupModalLinks,
|
setupModalLinks,
|
||||||
processIfStatements,
|
processIfStatements
|
||||||
} from '@/helpers/cms-content-helper.js';
|
} from '@/helpers/cms-content-helper.js';
|
||||||
import settleAllPromises from '@/helpers/layout-helper.js';
|
import settleAllPromises from '@/helpers/layout-helper.js';
|
||||||
import { getDamageString } from '@/helpers/damage-helper.js';
|
import { getDamageString } from '@/helpers/damage-helper.js';
|
||||||
|
|
@ -140,7 +144,7 @@ export default {
|
||||||
contentGroupModal,
|
contentGroupModal,
|
||||||
buttonQuestion,
|
buttonQuestion,
|
||||||
loadingModal,
|
loadingModal,
|
||||||
textBlock,
|
textBlock
|
||||||
},
|
},
|
||||||
mixins: [baseFormMixin, vehicleQuestionsMixin],
|
mixins: [baseFormMixin, vehicleQuestionsMixin],
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
|
|
@ -153,12 +157,12 @@ export default {
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
{
|
{
|
||||||
resultKey: 'cmsContent',
|
resultKey: 'cmsContent',
|
||||||
promise: cmsContentPromise,
|
promise: cmsContentPromise
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
resultKey: 'supportingItems',
|
resultKey: 'supportingItems',
|
||||||
promise: supportingItemsPromise,
|
promise: supportingItemsPromise
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
@ -168,7 +172,7 @@ export default {
|
||||||
// TODO SSR-1165: Recycle fee needs removed from quote calculation
|
// TODO SSR-1165: Recycle fee needs removed from quote calculation
|
||||||
const availableLineItems = [
|
const availableLineItems = [
|
||||||
...(resultMap.supportingItems ?? []),
|
...(resultMap.supportingItems ?? []),
|
||||||
...(clonedGlassParts ?? []),
|
...(clonedGlassParts ?? [])
|
||||||
];
|
];
|
||||||
|
|
||||||
let hasBailedOut = false;
|
let hasBailedOut = false;
|
||||||
|
|
@ -179,16 +183,14 @@ export default {
|
||||||
pricingResults = await useMainStore()
|
pricingResults = await useMainStore()
|
||||||
.getPriceOrderItems(availableLineItems)
|
.getPriceOrderItems(availableLineItems)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
useMainStore().setBailout(
|
useMainStore().setBailout(bailoutMessage.pricingResponseError(
|
||||||
bailoutMessage.pricingResponseError(
|
availableLineItems.map((li) => li.partNumber),
|
||||||
availableLineItems.map((li) => li.partNumber),
|
{
|
||||||
{
|
code: err.code,
|
||||||
code: err.code,
|
message: err.message,
|
||||||
message: err.message,
|
data: err.data
|
||||||
data: err.data,
|
}
|
||||||
}
|
));
|
||||||
)
|
|
||||||
);
|
|
||||||
hasBailedOut = true;
|
hasBailedOut = true;
|
||||||
next(`/?issPage=${issPageValues.BAILOUT_PAGE}`);
|
next(`/?issPage=${issPageValues.BAILOUT_PAGE}`);
|
||||||
});
|
});
|
||||||
|
|
@ -218,10 +220,10 @@ export default {
|
||||||
loadingText: [
|
loadingText: [
|
||||||
'Connecting to your insurance company',
|
'Connecting to your insurance company',
|
||||||
'Nearly there',
|
'Nearly there',
|
||||||
'Finishing up',
|
'Finishing up'
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
selectionRequired: globalRules.OPTION_REQUIRED,
|
selectionRequired: globalRules.OPTION_REQUIRED
|
||||||
},
|
},
|
||||||
supportingItems: null,
|
supportingItems: null,
|
||||||
widget: {
|
widget: {
|
||||||
|
|
@ -229,8 +231,8 @@ export default {
|
||||||
verifiedItacAlert: 'VerifiedITACAlert',
|
verifiedItacAlert: 'VerifiedITACAlert',
|
||||||
explanatoryText: 'ExplanatoryTextWidget',
|
explanatoryText: 'ExplanatoryTextWidget',
|
||||||
nextStep: 'NextStepsWidget',
|
nextStep: 'NextStepsWidget',
|
||||||
serviceProviderQuestion: 'ServiceProviderQuestion',
|
serviceProviderQuestion: 'ServiceProviderQuestion'
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -240,7 +242,7 @@ export default {
|
||||||
issConfig,
|
issConfig,
|
||||||
policy,
|
policy,
|
||||||
payment,
|
payment,
|
||||||
isClaimRegistrationRequired,
|
isClaimRegistrationRequired
|
||||||
} = useMainStore();
|
} = useMainStore();
|
||||||
const registerClaimSuccessful =
|
const registerClaimSuccessful =
|
||||||
payment.insuranceCoverage.isVerified;
|
payment.insuranceCoverage.isVerified;
|
||||||
|
|
@ -346,8 +348,8 @@ export default {
|
||||||
isADAS() {
|
isADAS() {
|
||||||
const { glassParts } = useMainStore().order.lineItems;
|
const { glassParts } = useMainStore().order.lineItems;
|
||||||
return (
|
return (
|
||||||
glassParts !== null &&
|
glassParts !== null
|
||||||
!!glassParts.find((part) => part.requiresRecalibration)
|
&& !!glassParts.find((part) => part.requiresRecalibration)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
totalServicePrice() {
|
totalServicePrice() {
|
||||||
|
|
@ -373,18 +375,18 @@ export default {
|
||||||
policy,
|
policy,
|
||||||
vehicle,
|
vehicle,
|
||||||
isClaimRegistrationRequired,
|
isClaimRegistrationRequired,
|
||||||
isClaimAlreadyRegistered,
|
isClaimAlreadyRegistered
|
||||||
} = useMainStore();
|
} = useMainStore();
|
||||||
const { policyVehicleId } = vehicle;
|
const { policyVehicleId } = vehicle;
|
||||||
return (
|
return (
|
||||||
policy.policyLookupSuccessful &&
|
policy.policyLookupSuccessful
|
||||||
policyVehicleId != null &&
|
&& policyVehicleId != null
|
||||||
policyVehicleId >= 0 &&
|
&& policyVehicleId >= 0
|
||||||
isClaimRegistrationRequired &&
|
&& isClaimRegistrationRequired
|
||||||
!isClaimAlreadyRegistered &&
|
&& !isClaimAlreadyRegistered
|
||||||
!this.isNoCompQuoteVisible
|
&& !this.isNoCompQuoteVisible
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectedProvider() {
|
selectedProvider() {
|
||||||
|
|
@ -399,7 +401,7 @@ export default {
|
||||||
setupModalLinks(this, 'RecalModal');
|
setupModalLinks(this, 'RecalModal');
|
||||||
setupModalLinks(this, 'DeductibleModal');
|
setupModalLinks(this, 'DeductibleModal');
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
setupModalLinks(this);
|
setupModalLinks(this);
|
||||||
|
|
@ -428,27 +430,17 @@ export default {
|
||||||
useMainStore().updateSupportingItems(this.supportingItems);
|
useMainStore().updateSupportingItems(this.supportingItems);
|
||||||
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD);
|
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD);
|
||||||
} else if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
|
} else if (this.isITACQuoteVisible || this.isNoCompQuoteVisible) {
|
||||||
useMainStore().updateIsSafeliteProvider(
|
useMainStore().updateIsSafeliteProvider(this.selectedProvider === SAFELITE_PROVIDER);
|
||||||
this.selectedProvider === SAFELITE_PROVIDER
|
|
||||||
);
|
|
||||||
if (this.selectedProvider === SAFELITE_PROVIDER) {
|
if (this.selectedProvider === SAFELITE_PROVIDER) {
|
||||||
useMainStore().updateSupportingItems(this.supportingItems);
|
useMainStore().updateSupportingItems(this.supportingItems);
|
||||||
this.navigateWithScenario(
|
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE);
|
||||||
navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
useMainStore().setBailout(bailoutMessage.RequestCallback());
|
useMainStore().setBailout(bailoutMessage.RequestCallback());
|
||||||
this.navigateWithScenario(
|
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP);
|
||||||
navigationScenarios.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
useMainStore().setBailout(
|
useMainStore().setBailout(bailoutMessage.coverageStatementInvalidState());
|
||||||
bailoutMessage.coverageStatementInvalidState()
|
this.navigateWithScenario(navigationScenarios.CLICKED_FORWARD_WITH_INVALID_STATE);
|
||||||
);
|
|
||||||
this.navigateWithScenario(
|
|
||||||
navigationScenarios.CLICKED_FORWARD_WITH_INVALID_STATE
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
navigateWithScenario(scenario) {
|
navigateWithScenario(scenario) {
|
||||||
|
|
@ -497,8 +489,8 @@ export default {
|
||||||
setBaseServiceLineItems(lineItems) {
|
setBaseServiceLineItems(lineItems) {
|
||||||
this.baseServiceLineItems = lineItems;
|
this.baseServiceLineItems = lineItems;
|
||||||
},
|
},
|
||||||
formatAmountInDollars,
|
formatAmountInDollars
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue