Merge pull request #1157 from Safelite/feature/CSR-1144
Feature/csr 1144
This commit is contained in:
commit
54f39e2022
2 changed files with 6 additions and 6 deletions
|
|
@ -357,7 +357,7 @@ export default {
|
||||||
this.selectedTimeSlotData?.isPremiumAppointment
|
this.selectedTimeSlotData?.isPremiumAppointment
|
||||||
) {
|
) {
|
||||||
const earlyBirdIndex = supportingItems.findIndex(
|
const earlyBirdIndex = supportingItems.findIndex(
|
||||||
(item) => item.partNumber == PREMIUM_FEE_PART_TYPE
|
(item) => item.partType == PREMIUM_FEE_PART_TYPE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (earlyBirdIndex >= 0) {
|
if (earlyBirdIndex >= 0) {
|
||||||
|
|
@ -379,7 +379,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
// if it's not a mobile and/or premium early bird, then make sure we remove any that may have been added
|
// if it's not a mobile and/or premium early bird, then make sure we remove any that may have been added
|
||||||
const removeEarlyBirdIndex = supportingItems.findIndex(
|
const removeEarlyBirdIndex = supportingItems.findIndex(
|
||||||
(item) => item.partNumber == PREMIUM_FEE_PART_TYPE
|
(item) => item.partType == PREMIUM_FEE_PART_TYPE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (removeEarlyBirdIndex >= 0) {
|
if (removeEarlyBirdIndex >= 0) {
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@ export const mutations = {
|
||||||
//early bird fee used on schedule page also needs reset when schedule is reset
|
//early bird fee used on schedule page also needs reset when schedule is reset
|
||||||
const supportingItems = state.order.lineItems.supportingItems;
|
const supportingItems = state.order.lineItems.supportingItems;
|
||||||
const removeEarlyBirdIndex = supportingItems.findIndex(
|
const removeEarlyBirdIndex = supportingItems.findIndex(
|
||||||
(item) => item.partNumber == PREMIUM_FEE_PART_TYPE
|
(item) => item.partType == PREMIUM_FEE_PART_TYPE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (removeEarlyBirdIndex >= 0) {
|
if (removeEarlyBirdIndex >= 0) {
|
||||||
|
|
@ -1431,7 +1431,7 @@ export const actions = {
|
||||||
response.data
|
response.data
|
||||||
);
|
);
|
||||||
|
|
||||||
await validateAppointment(context, response.data.order);
|
await resetScheduleIfUnavailable(context, response.data.order);
|
||||||
return response;
|
return response;
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
|
|
@ -2071,7 +2071,7 @@ function convertGlassPieceToBackEndCompatibleFormat(glassPieces) {
|
||||||
// check to see if we have an appointment date on the order object.
|
// check to see if we have an appointment date on the order object.
|
||||||
// if so, make sure it's not in the past. if in the past, clear schedule info in store.
|
// if so, make sure it's not in the past. if in the past, clear schedule info in store.
|
||||||
// if date not in past, then call schedule service to verify appointment is still available.
|
// if date not in past, then call schedule service to verify appointment is still available.
|
||||||
async function validateAppointment(context, order) {
|
async function resetScheduleIfUnavailable(context, order) {
|
||||||
if (!order.schedule?.date) {
|
if (!order.schedule?.date) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -2124,7 +2124,7 @@ async function validateAppointment(context, order) {
|
||||||
// if early bird fee is in supporting items then need to check the timeslot to see if offer premium is also still available
|
// if early bird fee is in supporting items then need to check the timeslot to see if offer premium is also still available
|
||||||
if (
|
if (
|
||||||
order.lineItem?.supportingItems?.findIndex(
|
order.lineItem?.supportingItems?.findIndex(
|
||||||
(item) => item.partNumber == PREMIUM_FEE_PART_TYPE
|
(item) => item.partType == PREMIUM_FEE_PART_TYPE
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
newTimeSlotsResponse.data.days?.forEach((day) => {
|
newTimeSlotsResponse.data.days?.forEach((day) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue