couple updates for dates
This commit is contained in:
parent
50fa11a2b5
commit
7774e64cbc
1 changed files with 12 additions and 2 deletions
|
|
@ -95,7 +95,8 @@
|
||||||
v-for="timeSlot in selectableTimeSlotsData"
|
v-for="timeSlot in selectableTimeSlotsData"
|
||||||
:key="timeSlot.startTime"
|
:key="timeSlot.startTime"
|
||||||
class="time-slot-button"
|
class="time-slot-button"
|
||||||
:class="checkIsSelectedTimeSlot(timeSlot) ? 'selected-time-slot' : ''"
|
:class="[checkIsSelectedTimeSlot(timeSlot) ? 'selected-time-slot' : ''
|
||||||
|
, {'has-date-error': showTimeSlotError}]"
|
||||||
@click="selectTimeSlotForDay(timeSlot)">
|
@click="selectTimeSlotForDay(timeSlot)">
|
||||||
{{ displayTimeSlotTime(timeSlot.startTime) }}
|
{{ displayTimeSlotTime(timeSlot.startTime) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -119,6 +120,7 @@ import {
|
||||||
convertDateToShortMonth,
|
convertDateToShortMonth,
|
||||||
convertDateToTwoDigitDay,
|
convertDateToTwoDigitDay,
|
||||||
convertDateToTwoDigitMonth,
|
convertDateToTwoDigitMonth,
|
||||||
|
getDisplayTextForDurationLength,
|
||||||
militaryToTwelveHourTime
|
militaryToTwelveHourTime
|
||||||
} from '@/helpers/date-helper';
|
} from '@/helpers/date-helper';
|
||||||
import showIssLoadingModal from '@/helpers/loading-modal-helper.js';
|
import showIssLoadingModal from '@/helpers/loading-modal-helper.js';
|
||||||
|
|
@ -213,13 +215,15 @@ export default {
|
||||||
daysInViewMobile: 3,
|
daysInViewMobile: 3,
|
||||||
daysInViewStandard: 5,
|
daysInViewStandard: 5,
|
||||||
daysLoaded: 0,
|
daysLoaded: 0,
|
||||||
|
appointmentDurationMinutesMinimum: 90,
|
||||||
|
appointmentDurationMinutesMaximum: 120,
|
||||||
initialDaysToLoad: 15,
|
initialDaysToLoad: 15,
|
||||||
isMobileView: false
|
isMobileView: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
appointmentEstimate() {
|
appointmentEstimate() {
|
||||||
return '1.5 - 2 hours.';
|
return getDisplayTextForDurationLength(this.appointmentDurationMinutesMinimum, this.appointmentDurationMinutesMaximum);
|
||||||
},
|
},
|
||||||
daysToAdd() {
|
daysToAdd() {
|
||||||
return this.isMobileView ? this.daysInViewMobile : this.daysInViewStandard;
|
return this.isMobileView ? this.daysInViewMobile : this.daysInViewStandard;
|
||||||
|
|
@ -473,6 +477,8 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.daysLoaded = config.initialDaysLoaded || this.initialDaysToLoad;
|
this.daysLoaded = config.initialDaysLoaded || this.initialDaysToLoad;
|
||||||
|
this.appointmentDurationMinutesMaximum = config.initialShopTimeSlotsResponse.estimatedServiceMinutesMaximum;
|
||||||
|
this.appointmentDurationMinutesMinimum = config.initialShopTimeSlotsResponse.estimatedServiceMinutesMinimum;
|
||||||
|
|
||||||
this.findFirstAvailableDateInView();
|
this.findFirstAvailableDateInView();
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
|
@ -705,6 +711,10 @@ export default {
|
||||||
color:#000;
|
color:#000;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.has-date-error {
|
||||||
|
border: 1px solid #d93025;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue