SSR-778 Fix ITAC Save Session
This commit is contained in:
parent
069e5bcc23
commit
0f15135d25
3 changed files with 12 additions and 2 deletions
|
|
@ -343,7 +343,7 @@ export default {
|
||||||
async initializeComponent() {
|
async initializeComponent() {
|
||||||
if (this.policyLookupSuccessful
|
if (this.policyLookupSuccessful
|
||||||
&& useMainStore().isClaimRegistrationRequired
|
&& useMainStore().isClaimRegistrationRequired
|
||||||
&& this.coveredAndServicePriceAboveOrEqualDeductible) {
|
&& (this.coveredAndServicePriceAboveOrEqualDeductible || this.verifiedITAC)) {
|
||||||
await useMainStore().registerClaim()?.catch(() => {});
|
await useMainStore().registerClaim()?.catch(() => {});
|
||||||
}
|
}
|
||||||
this.$refs.loadingModal.hideModal();
|
this.$refs.loadingModal.hideModal();
|
||||||
|
|
@ -362,6 +362,7 @@ export default {
|
||||||
{ [routerParams.SAVE_SESSION_SYNCHRONOUS]: true }
|
{ [routerParams.SAVE_SESSION_SYNCHRONOUS]: true }
|
||||||
);
|
);
|
||||||
} else if (this.verifiedITAC || this.verifiedNoComp) {
|
} else if (this.verifiedITAC || this.verifiedNoComp) {
|
||||||
|
useMainStore().updateSelectedProvider(this.selectedProvider);
|
||||||
if (this.selectedProvider === 'Safelite') {
|
if (this.selectedProvider === 'Safelite') {
|
||||||
this.mainStore.saveSupportingItems(this.supportingItems);
|
this.mainStore.saveSupportingItems(this.supportingItems);
|
||||||
this.$router.navigate(
|
this.$router.navigate(
|
||||||
|
|
|
||||||
|
|
@ -184,9 +184,11 @@ export default {
|
||||||
let scenario = null;
|
let scenario = null;
|
||||||
switch (this.selectedProvider) {
|
switch (this.selectedProvider) {
|
||||||
case options.SAFELITE:
|
case options.SAFELITE:
|
||||||
|
this.mainStore.updateSelectedProvider('Safelite');
|
||||||
scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE;
|
scenario = this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE;
|
||||||
break;
|
break;
|
||||||
case options.TPA:
|
case options.TPA:
|
||||||
|
this.mainStore.updateSelectedProvider('Other');
|
||||||
if (this.mainStore.issConfig.enableTPAFlow) {
|
if (this.mainStore.issConfig.enableTPAFlow) {
|
||||||
if (this.mainStore.hasRecalibrationPart) {
|
if (this.mainStore.hasRecalibrationPart) {
|
||||||
this.$refs.TPARecalModal.openModal();
|
this.$refs.TPARecalModal.openModal();
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ const getDefaultState = () => ({
|
||||||
zipCodeCtu: null,
|
zipCodeCtu: null,
|
||||||
appointmentType: null,
|
appointmentType: null,
|
||||||
isVehicleProtected: null,
|
isVehicleProtected: null,
|
||||||
|
selectedProvider: null,
|
||||||
provider: {
|
provider: {
|
||||||
providerNumber: null,
|
providerNumber: null,
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -972,7 +973,9 @@ export const useMainStore = defineStore({
|
||||||
noCoverage: policy.noCoverage,
|
noCoverage: policy.noCoverage,
|
||||||
policyLookupSuccessful: policy.policyLookupSuccessful,
|
policyLookupSuccessful: policy.policyLookupSuccessful,
|
||||||
originalDeductible: this.order.originalDeductible,
|
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: {
|
customer: {
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -1014,6 +1017,7 @@ export const useMainStore = defineStore({
|
||||||
? AppointmentTypeStrings.MOBILE : serviceLocation.appointmentType,
|
? AppointmentTypeStrings.MOBILE : serviceLocation.appointmentType,
|
||||||
isVehicleProtected: serviceLocation.isVehicleProtected,
|
isVehicleProtected: serviceLocation.isVehicleProtected,
|
||||||
provider: {
|
provider: {
|
||||||
|
selectedProvider: serviceLocation?.selectedProvider,
|
||||||
providerNumber: serviceLocation.provider?.providerNumber,
|
providerNumber: serviceLocation.provider?.providerNumber,
|
||||||
address: {
|
address: {
|
||||||
streetAddress: serviceLocation.provider?.address?.streetAddress,
|
streetAddress: serviceLocation.provider?.address?.streetAddress,
|
||||||
|
|
@ -1508,6 +1512,9 @@ export const useMainStore = defineStore({
|
||||||
updatePolicyITACFlag(isITAC) {
|
updatePolicyITACFlag(isITAC) {
|
||||||
this.order.policy.isITAC = isITAC;
|
this.order.policy.isITAC = isITAC;
|
||||||
},
|
},
|
||||||
|
updateSelectedProvider(provider) {
|
||||||
|
this.order.serviceLocation.selectedProvider = provider;
|
||||||
|
},
|
||||||
savePartQuestionAnswers(partQuestionAnswersArray) {
|
savePartQuestionAnswers(partQuestionAnswersArray) {
|
||||||
// if part question answers have changed, reset subsequent question answers
|
// if part question answers have changed, reset subsequent question answers
|
||||||
const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue(this.order.damage.partQuestionAnswers, 'result');
|
const sortedPreviousResultsArray = sortArrayOfObjectsByPropertyValue(this.order.damage.partQuestionAnswers, 'result');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue