Merge pull request #2672 from Safelite/feature/CASH-1206

Don't set appointment type when no appointment/routecode is present.
This commit is contained in:
chloeherdsafelite 2025-07-21 15:40:40 -04:00 committed by GitHub
commit bfad4e62fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1534,8 +1534,17 @@ export default {
}, },
updateTimeSlot(timeSlotObj) { updateTimeSlot(timeSlotObj) {
this.selectedTimeSlotInfo = timeSlotObj; this.selectedTimeSlotInfo = timeSlotObj;
if (this.appointmentType !== AppointmentTypeStrings.MOBILE) { if (
this.appointmentType !== AppointmentTypeStrings.MOBILE &&
this.appointmentType !== null
) {
// update apptType based on routeCode to determine if it should be dropoff or inshop // update apptType based on routeCode to determine if it should be dropoff or inshop
debugLog(`Updating appointment type based on route code.`);
debugLog(`Route code =`, timeSlotObj.timeSlot.routeCode);
debugLog(
`Parsed type = `,
this.getInShopOrDropOffApptType(timeSlotObj.timeSlot.routeCode)
);
this.appointmentType = this.getInShopOrDropOffApptType( this.appointmentType = this.getInShopOrDropOffApptType(
timeSlotObj.timeSlot.routeCode timeSlotObj.timeSlot.routeCode
); );