CSR-1137 | Formatting
This commit is contained in:
parent
07609b9dde
commit
46aa254935
2 changed files with 19 additions and 16 deletions
|
|
@ -103,7 +103,7 @@ const getAvailableDates = async (startDate, endDate) => {
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
const newShopTimeSlots = newShopTimeSlotsResponse.data;
|
const newShopTimeSlots = newShopTimeSlotsResponse.data;
|
||||||
return convertApiResponse(newShopTimeSlots);
|
return convertApiResponse(newShopTimeSlots);
|
||||||
};
|
};
|
||||||
const convertApiResponse = (responseData) => {
|
const convertApiResponse = (responseData) => {
|
||||||
// DATA CONVERSION
|
// DATA CONVERSION
|
||||||
|
|
@ -156,15 +156,13 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Price EARLY BIRD pre-emptively to allow for asynchronous call to pricing
|
// Price EARLY BIRD pre-emptively to allow for asynchronous call to pricing
|
||||||
const pricingPromise = baseMixin.methods.dispatchStoreAction(
|
const pricingPromise = baseMixin.methods.dispatchStoreAction(
|
||||||
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
||||||
{
|
{
|
||||||
availableLineItems: [
|
availableLineItems: [{ partNumber: "EARLY BIRD" }],
|
||||||
{partNumber: "EARLY BIRD"}
|
},
|
||||||
],
|
false
|
||||||
},
|
);
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
const earlyBirdPromise = baseMixin.methods.dispatchStoreAction(
|
const earlyBirdPromise = baseMixin.methods.dispatchStoreAction(
|
||||||
storeActions.GET_MOBILE_EARLY_BIRD_FEE
|
storeActions.GET_MOBILE_EARLY_BIRD_FEE
|
||||||
|
|
@ -260,10 +258,10 @@ export default {
|
||||||
},
|
},
|
||||||
async getAvailableDatesMethod(startDate, endDate) {
|
async getAvailableDatesMethod(startDate, endDate) {
|
||||||
const newShopTimeSlots = await getAvailableDates(startDate, endDate);
|
const newShopTimeSlots = await getAvailableDates(startDate, endDate);
|
||||||
// ADD API CALL RESULTS TO EXISTING DATE DATA
|
// ADD API CALL RESULTS TO EXISTING DATE DATA
|
||||||
this.selectableDatesData.days = this.selectableDatesData.days.concat(
|
this.selectableDatesData.days = this.selectableDatesData.days.concat(
|
||||||
newShopTimeSlots.days
|
newShopTimeSlots.days
|
||||||
);
|
);
|
||||||
return newShopTimeSlots;
|
return newShopTimeSlots;
|
||||||
},
|
},
|
||||||
setData(alertReasonsData) {
|
setData(alertReasonsData) {
|
||||||
|
|
@ -334,7 +332,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
selectedDate(newValue, oldValue) {
|
selectedDate(newValue, oldValue) {
|
||||||
// Clear time slot selection if date selected changes
|
// Clear time slot selection if date selected changes
|
||||||
if (newValue!== oldValue) {
|
if (newValue !== oldValue) {
|
||||||
this.selectedTimeSlotId = null;
|
this.selectedTimeSlotId = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,12 @@ export default {
|
||||||
}
|
}
|
||||||
let availableTimeSlots;
|
let availableTimeSlots;
|
||||||
if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) {
|
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 {
|
} else {
|
||||||
availableTimeSlots = this.dateAndTimeSlotData.timeSlots.map((timeslot) => {
|
availableTimeSlots = this.dateAndTimeSlotData.timeSlots.map((timeslot) => {
|
||||||
let readableTime;
|
let readableTime;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue