AppointmentTypeString removal
We don't need this currently because there is no distinction between inshop and dropoff currently
This commit is contained in:
parent
fac44ed8df
commit
371849e924
2 changed files with 21 additions and 33 deletions
|
|
@ -106,7 +106,6 @@
|
||||||
</div>
|
</div>
|
||||||
<shopQuestionPopup
|
<shopQuestionPopup
|
||||||
v-if="isShopQuestionDisplayed"
|
v-if="isShopQuestionDisplayed"
|
||||||
:appointmentType="appointmentType"
|
|
||||||
:modelValue="{
|
:modelValue="{
|
||||||
zipCode: zipCode,
|
zipCode: zipCode,
|
||||||
state: state,
|
state: state,
|
||||||
|
|
|
||||||
|
|
@ -119,12 +119,11 @@ export default {
|
||||||
selectedProviderNumber: null, // Revisit this, maybe not too hard
|
selectedProviderNumber: null, // Revisit this, maybe not too hard
|
||||||
lastSearchedZip: "", // zip refactor
|
lastSearchedZip: "", // zip refactor
|
||||||
lastSuccessfulZip: "", // zip refactor
|
lastSuccessfulZip: "", // zip refactor
|
||||||
displayInvalidZipAlert: false,
|
displayInvalidZipAlert: false, // part of big refactor of asyn calls
|
||||||
displayNoShopsAlert: false,
|
displayNoShopsAlert: false, // part of big refactor of asyn calls
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
appointmentType: String,
|
|
||||||
shopProviderData: Object,
|
shopProviderData: Object,
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -176,7 +175,9 @@ export default {
|
||||||
availabilityRatingCallback: getAvailabilityRating,
|
availabilityRatingCallback: getAvailabilityRating,
|
||||||
startDate: formattedStartDate,
|
startDate: formattedStartDate,
|
||||||
endDate: formattedEndDate,
|
endDate: formattedEndDate,
|
||||||
shopAppointmentType: this.appointmentType,
|
// Used for availability indicators, could be refactored out of any availability indicator
|
||||||
|
// logic if/when we are sure we'll never have separate drop off/ in shop logic
|
||||||
|
shopAppointmentType: AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
displaySeeMoreLocationsLink() {
|
displaySeeMoreLocationsLink() {
|
||||||
|
|
@ -243,27 +244,23 @@ export default {
|
||||||
if (logFirstShopsDisplayed) {
|
if (logFirstShopsDisplayed) {
|
||||||
gaAction = this.GaActions.SHOPS_FIRST_DISPLAYED;
|
gaAction = this.GaActions.SHOPS_FIRST_DISPLAYED;
|
||||||
}
|
}
|
||||||
if (
|
|
||||||
this.appointmentType === AppointmentTypeStrings.IN_SHOP ||
|
|
||||||
this.appointmentType === AppointmentTypeStrings.DROP_OFF ||
|
|
||||||
this.appointmentType === AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF
|
|
||||||
) {
|
|
||||||
var shops = mappedData.map((shop) => {
|
|
||||||
if (shop.value.length > 5 && shop.value.startsWith("00")) {
|
|
||||||
return shop.value.substring(1);
|
|
||||||
} else {
|
|
||||||
return shop.value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var joinedShops = shops.join(",");
|
var shops = mappedData.map((shop) => {
|
||||||
if (!joinedShops) {
|
if (shop.value.length > 5 && shop.value.startsWith("00")) {
|
||||||
joinedShops = "no-shops";
|
return shop.value.substring(1);
|
||||||
|
} else {
|
||||||
|
return shop.value;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.pushEventToGA(this.GaCategories.SERVICE_LOCATION, gaAction, joinedShops, true);
|
var joinedShops = shops.join(",");
|
||||||
|
if (!joinedShops) {
|
||||||
|
joinedShops = "no-shops";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.pushEventToGA(this.GaCategories.SERVICE_LOCATION, gaAction, joinedShops, true);
|
||||||
|
|
||||||
|
|
||||||
if (this.answers.length === 0) {
|
if (this.answers.length === 0) {
|
||||||
this.answers = mappedData;
|
this.answers = mappedData;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -353,22 +350,12 @@ export default {
|
||||||
}
|
}
|
||||||
this.localShopProviderData = result.data;
|
this.localShopProviderData = result.data;
|
||||||
this.updateShopsForZip(this.internalModel.zipCode);
|
this.updateShopsForZip(this.internalModel.zipCode);
|
||||||
if (this.appointmentType === AppointmentTypeStrings.MOBILE) {
|
this.selectedProvider = new Provider();
|
||||||
this.selectedProvider = new Provider(
|
|
||||||
this.shopProviderData.mobileProviderNumber
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
this.selectedProvider = new Provider();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateShopsForZip(zipCode) {
|
updateShopsForZip(zipCode) {
|
||||||
if (!this.appointmentType) {
|
|
||||||
this.answers = [];
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.lastSearchedZip = zipCode;
|
this.lastSearchedZip = zipCode;
|
||||||
if (!zipCode) {
|
if (!zipCode) {
|
||||||
this.answers = [];
|
this.answers = [];
|
||||||
|
|
@ -420,7 +407,9 @@ export default {
|
||||||
availabilityRatingCallback: getAvailabilityRating,
|
availabilityRatingCallback: getAvailabilityRating,
|
||||||
startDate: formattedStartDate,
|
startDate: formattedStartDate,
|
||||||
endDate: formattedEndDate,
|
endDate: formattedEndDate,
|
||||||
shopAppointmentType: this.appointmentType,
|
// Used for availability indicators, could be refactored out of any availability indicator
|
||||||
|
// logic if/when we are sure we'll never have separate drop off/ in shop logic
|
||||||
|
shopAppointmentType: AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF,
|
||||||
},
|
},
|
||||||
value: shopProvider.providerNumber,
|
value: shopProvider.providerNumber,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue