Tech review changes
This commit is contained in:
parent
831b579df1
commit
1f8b7d940d
1 changed files with 17 additions and 12 deletions
|
|
@ -341,14 +341,14 @@ export const mutations = {
|
|||
state.order.schedule.routeCode = null;
|
||||
state.order.schedule.jobMaxMinutes = null;
|
||||
|
||||
//early bird fee used on schedule page also needs reset when schedule is reset
|
||||
//premium appointment fee used on schedule page also needs reset when schedule is reset
|
||||
const supportingItems = state.order.lineItems.supportingItems;
|
||||
const removeEarlyBirdIndex = supportingItems?.findIndex(
|
||||
const premiumAppointmentFeeIndex = supportingItems?.findIndex(
|
||||
(item) => item.partType == PREMIUM_FEE_PART_TYPE
|
||||
);
|
||||
|
||||
if (removeEarlyBirdIndex >= 0) {
|
||||
supportingItems.splice(removeEarlyBirdIndex, 1);
|
||||
if (premiumAppointmentFeeIndex >= 0) {
|
||||
supportingItems.splice(premiumAppointmentFeeIndex, 1);
|
||||
state.order.lineItems.supportingItems = supportingItems;
|
||||
}
|
||||
},
|
||||
|
|
@ -369,7 +369,6 @@ export const mutations = {
|
|||
state.order.serviceLocation.address2 = null;
|
||||
state.order.serviceLocation.city = null;
|
||||
state.order.serviceLocation.state = null;
|
||||
state.order.serviceLocation.zipCode = null;
|
||||
state.order.serviceLocation.isVehicleProtected = null;
|
||||
},
|
||||
// Misc Mutations
|
||||
|
|
@ -712,15 +711,16 @@ export const actions = {
|
|||
// Dependency Actions
|
||||
resetDamageAndDependencies(context) {
|
||||
context.commit(storeMutations.RESET_DAMAGE_STATE);
|
||||
context.commit(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
|
||||
context.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
|
||||
context.commit(storeMutations.UPDATE_VAPS, null);
|
||||
},
|
||||
|
||||
resetRegistrationAndDependencies(context) {
|
||||
context.commit(storeMutations.RESET_REGISTRATION_STATE);
|
||||
context.commit(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
|
||||
context.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
},
|
||||
|
||||
resetPartsAndDependencies(context) {
|
||||
|
|
@ -1606,7 +1606,6 @@ export const actions = {
|
|||
|
||||
if (!isSelectedGlassAvailableForVehicle) {
|
||||
context.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
|
||||
context.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
}
|
||||
|
||||
//Save new values
|
||||
|
|
@ -1632,7 +1631,6 @@ export const actions = {
|
|||
|
||||
if (!isSelectedGlassAvailableForVehicle) {
|
||||
context.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
|
||||
context.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
}
|
||||
|
||||
//Save new values
|
||||
|
|
@ -1658,6 +1656,8 @@ export const actions = {
|
|||
);
|
||||
|
||||
if (havePartQuestionAnswersChanged) {
|
||||
context.dispatch(storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES);
|
||||
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, null);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
context.commit(storeMutations.UPDATE_MOLDING_QUESTION_ANSWERS, null);
|
||||
|
|
@ -1705,6 +1705,8 @@ export const actions = {
|
|||
previouslySelectedPartNumbers !== currentlySelectedPartNumbers;
|
||||
|
||||
if (haveSelectedVehiclePartsChanged) {
|
||||
context.dispatch(storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES);
|
||||
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, null);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
context.commit(storeMutations.UPDATE_MOLDING_QUESTION_ANSWERS, null);
|
||||
|
|
@ -1736,6 +1738,8 @@ export const actions = {
|
|||
);
|
||||
|
||||
if (haveMoldingQuestionAnswersChanged) {
|
||||
context.dispatch(storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES);
|
||||
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, null);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
context.commit(storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, null);
|
||||
|
|
@ -1765,6 +1769,8 @@ export const actions = {
|
|||
);
|
||||
|
||||
if (haveCapabilityQuestionAnswersChanged) {
|
||||
context.dispatch(storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES);
|
||||
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, null);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
}
|
||||
|
|
@ -1897,7 +1903,6 @@ export const actions = {
|
|||
if (vehicleInfo.vin !== context.state.order.vehicle.vin) {
|
||||
if (!isSelectedGlassAvailableForVehicle) {
|
||||
context.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
|
||||
context.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
}
|
||||
|
||||
//Save new values
|
||||
|
|
|
|||
Loading…
Reference in a new issue