Merge pull request #634 from Safelite/feature/richardson/1160.loader

No Changes just formatting before changes.
This commit is contained in:
brich1212safe 2024-04-22 15:23:16 -04:00 committed by GitHub
commit f4bf3c1d64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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