Merge pull request #494 from Safelite/defect/digital/SSR-778
SSR-778 Fix ITAC Save Session
This commit is contained in:
commit
f15924c098
3 changed files with 12 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue