CSR-1137 | Formatting

This commit is contained in:
Scott Kiener 2023-05-18 15:47:57 -04:00
parent 07609b9dde
commit 46aa254935
2 changed files with 19 additions and 16 deletions

View file

@ -103,7 +103,7 @@ const getAvailableDates = async (startDate, endDate) => {
false
);
const newShopTimeSlots = newShopTimeSlotsResponse.data;
return convertApiResponse(newShopTimeSlots);
return convertApiResponse(newShopTimeSlots);
};
const convertApiResponse = (responseData) => {
// DATA CONVERSION
@ -156,15 +156,13 @@ export default {
});
// Price EARLY BIRD pre-emptively to allow for asynchronous call to pricing
const pricingPromise = baseMixin.methods.dispatchStoreAction(
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
{
availableLineItems: [
{partNumber: "EARLY BIRD"}
],
},
false
);
const pricingPromise = baseMixin.methods.dispatchStoreAction(
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
{
availableLineItems: [{ partNumber: "EARLY BIRD" }],
},
false
);
const earlyBirdPromise = baseMixin.methods.dispatchStoreAction(
storeActions.GET_MOBILE_EARLY_BIRD_FEE
@ -260,10 +258,10 @@ export default {
},
async getAvailableDatesMethod(startDate, endDate) {
const newShopTimeSlots = await getAvailableDates(startDate, endDate);
// ADD API CALL RESULTS TO EXISTING DATE DATA
this.selectableDatesData.days = this.selectableDatesData.days.concat(
newShopTimeSlots.days
);
// ADD API CALL RESULTS TO EXISTING DATE DATA
this.selectableDatesData.days = this.selectableDatesData.days.concat(
newShopTimeSlots.days
);
return newShopTimeSlots;
},
setData(alertReasonsData) {
@ -334,7 +332,7 @@ export default {
watch: {
selectedDate(newValue, oldValue) {
// Clear time slot selection if date selected changes
if (newValue!== oldValue) {
if (newValue !== oldValue) {
this.selectedTimeSlotId = null;
}
},

View file

@ -166,7 +166,12 @@ export default {
}
let availableTimeSlots;
if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) {
availableTimeSlots = [{ value: this.dateAndTimeSlotData.timeSlots[0], buttonLabel: this.dropoffButtonText }];
availableTimeSlots = [
{
value: this.dateAndTimeSlotData.timeSlots[0],
buttonLabel: this.dropoffButtonText,
},
];
} else {
availableTimeSlots = this.dateAndTimeSlotData.timeSlots.map((timeslot) => {
let readableTime;