Merge pull request #1093 from Safelite/feature/richardson/INSR-8467
Auto select if only 1 timeslot
This commit is contained in:
commit
4b4df0ec46
1 changed files with 12 additions and 4 deletions
|
|
@ -558,8 +558,12 @@ export default {
|
||||||
this.selectedDate = morningDateString;
|
this.selectedDate = morningDateString;
|
||||||
this.selectedTimeOfDayGrouping = 'morning';
|
this.selectedTimeOfDayGrouping = 'morning';
|
||||||
this.selectableTimeSlotsData = selectableDateObj.morningTimeSlots;
|
this.selectableTimeSlotsData = selectableDateObj.morningTimeSlots;
|
||||||
this.selectedTime = null;
|
if (selectableDateObj.morningTimeSlots.length === 1) {
|
||||||
this.selectedTimeSlot = null;
|
this.selectTimeSlotForDay(selectableDateObj.morningTimeSlots[0]);
|
||||||
|
} else {
|
||||||
|
this.selectedTime = null;
|
||||||
|
this.selectedTimeSlot = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showAfternoonAvailabilityForIndex(index) {
|
showAfternoonAvailabilityForIndex(index) {
|
||||||
|
|
@ -582,8 +586,12 @@ export default {
|
||||||
this.selectedDate = afternoonDateString;
|
this.selectedDate = afternoonDateString;
|
||||||
this.selectedTimeOfDayGrouping = 'afternoon';
|
this.selectedTimeOfDayGrouping = 'afternoon';
|
||||||
this.selectableTimeSlotsData = selectableDateObj.afternoonTimeSlots;
|
this.selectableTimeSlotsData = selectableDateObj.afternoonTimeSlots;
|
||||||
this.selectedTimeSlot = null;
|
if (selectableDateObj.afternoonTimeSlots.length === 1) {
|
||||||
this.selectedTime = null;
|
this.selectTimeSlotForDay(selectableDateObj.afternoonTimeSlots[0]);
|
||||||
|
} else {
|
||||||
|
this.selectedTime = null;
|
||||||
|
this.selectedTimeSlot = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
timeSlotFocused(timeSlot) {
|
timeSlotFocused(timeSlot) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue