diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue index 8219d872..4554fedc 100644 --- a/src/layouts/coverage-statement/coverage-statement.vue +++ b/src/layouts/coverage-statement/coverage-statement.vue @@ -343,7 +343,7 @@ export default { async initializeComponent() { if (this.policyLookupSuccessful && useMainStore().isClaimRegistrationRequired - && this.coveredAndServicePriceAboveOrEqualDeductible) { + && (this.coveredAndServicePriceAboveOrEqualDeductible || this.verifiedITAC)) { await useMainStore().registerClaim()?.catch(() => {}); } this.$refs.loadingModal.hideModal(); @@ -362,6 +362,7 @@ export default { { [routerParams.SAVE_SESSION_SYNCHRONOUS]: true } ); } else if (this.verifiedITAC || this.verifiedNoComp) { + useMainStore().updateIsSafeliteProvider(this.selectedProvider === 'Safelite'); if (this.selectedProvider === 'Safelite') { this.mainStore.saveSupportingItems(this.supportingItems); this.$router.navigate( diff --git a/src/layouts/provider-preference/provider-preference.vue b/src/layouts/provider-preference/provider-preference.vue index 1db4c30f..b5d76d26 100644 --- a/src/layouts/provider-preference/provider-preference.vue +++ b/src/layouts/provider-preference/provider-preference.vue @@ -184,9 +184,11 @@ export default { let scenario = null; switch (this.selectedProvider) { case options.SAFELITE: + this.mainStore.updateIsSafeliteProvider(true); scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE; break; case options.TPA: + this.mainStore.updateIsSafeliteProvider(false); if (this.mainStore.issConfig.enableTPAFlow) { if (this.mainStore.hasRecalibrationPart) { this.$refs.TPARecalModal.openModal(); diff --git a/src/store/index.js b/src/store/index.js index 9d9b5c32..b02e77cc 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -104,6 +104,7 @@ const getDefaultState = () => ({ zipCodeCtu: null, appointmentType: null, isVehicleProtected: null, + IsSafeliteProvider: null, provider: { providerNumber: null, address: { @@ -978,7 +979,9 @@ export const useMainStore = defineStore({ noCoverage: policy.noCoverage, policyLookupSuccessful: policy.policyLookupSuccessful, originalDeductible: this.order.originalDeductible, - currentDeductible: this.order.currentDeductible + currentDeductible: this.order.currentDeductible, + IsItac: this.order.policy.isITAC, + OemEndorsement: policy.endorsements?.indexOf('OEM Approved') !== -1 ?? false }, customer: { address: { @@ -1020,6 +1023,7 @@ export const useMainStore = defineStore({ ? AppointmentTypeStrings.MOBILE : serviceLocation.appointmentType, isVehicleProtected: serviceLocation.isVehicleProtected, provider: { + IsSafeliteProvider: serviceLocation?.IsSafeliteProvider, providerNumber: serviceLocation.provider?.providerNumber, address: { streetAddress: serviceLocation.provider?.address?.streetAddress, @@ -1516,6 +1520,9 @@ export const useMainStore = defineStore({ updatePolicyITACFlag(isITAC) { this.order.policy.isITAC = isITAC; }, + updateIsSafeliteProvider(isSafelite) { + this.order.serviceLocation.IsSafeliteProvider = isSafelite; + }, savePartQuestionAnswers(partQuestionAnswersArray) { // if part question answers have changed, reset subsequent question answers const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue(this.order.damage.partQuestionAnswers, 'result');