Tech review changes
This commit is contained in:
parent
86f0f0fb94
commit
716fbe3603
9 changed files with 10 additions and 6 deletions
|
|
@ -79,6 +79,7 @@ const storeActions = {
|
||||||
SAVE_PAYMENT_TYPE: "savePaymentType",
|
SAVE_PAYMENT_TYPE: "savePaymentType",
|
||||||
SAVE_PARENT_ACCOUNT_NUMBER: "saveParentAccountNumber",
|
SAVE_PARENT_ACCOUNT_NUMBER: "saveParentAccountNumber",
|
||||||
SAVE_SUPPORTING_ITEMS: "saveSupportingItems",
|
SAVE_SUPPORTING_ITEMS: "saveSupportingItems",
|
||||||
|
SAVE_SUPPORTING_ITEMS_AND_RESET_SERVICE_LOCATION: "saveSupportingItemsAndResetServiceLocation",
|
||||||
SAVE_VAPS: "saveVaps",
|
SAVE_VAPS: "saveVaps",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ export default {
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
this.storeActions.SAVE_SUPPORTING_ITEMS,
|
this.storeActions.SAVE_SUPPORTING_ITEMS_AND_RESET_SERVICE_LOCATION,
|
||||||
resultMap.supportingItems,
|
resultMap.supportingItems,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,6 @@ store.getters = {
|
||||||
damage: baseStoreGettersDamage,
|
damage: baseStoreGettersDamage,
|
||||||
order: {},
|
order: {},
|
||||||
};
|
};
|
||||||
//store.commit = jest.fn();
|
|
||||||
store.dispatch = jest.fn();
|
store.dispatch = jest.fn();
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
this.storeActions.SAVE_SUPPORTING_ITEMS,
|
this.storeActions.SAVE_SUPPORTING_ITEMS_AND_RESET_SERVICE_LOCATION,
|
||||||
this.supportingItems,
|
this.supportingItems,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ import addressQuestions from "@/layouts/address-lookup/customer-questions/addres
|
||||||
import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question";
|
import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question";
|
||||||
|
|
||||||
// Helpers
|
// Helpers
|
||||||
import { deepClone } from "@/layouts/service-location/helpers/object-helper/object-helper";
|
import { deepClone } from "@/helpers/object-helper";
|
||||||
import {
|
import {
|
||||||
getPricedMobileFeePart,
|
getPricedMobileFeePart,
|
||||||
getServiceabilityDetails,
|
getServiceabilityDetails,
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@ export default {
|
||||||
storeActions.GET_SUPPORTING_ITEMS
|
storeActions.GET_SUPPORTING_ITEMS
|
||||||
);
|
);
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
this.storeActions.SAVE_SUPPORTING_ITEMS,
|
this.storeActions.SAVE_SUPPORTING_ITEMS_AND_RESET_SERVICE_LOCATION,
|
||||||
supportingItems.data,
|
supportingItems.data,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { experimentTriggers } from "@/constants/experiments";
|
||||||
import { damageLocationsSelected } from "@/constants/damage-locations-selected";
|
import { damageLocationsSelected } from "@/constants/damage-locations-selected";
|
||||||
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||||
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js";
|
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js";
|
||||||
import { deepEqual } from "@/layouts/service-location/helpers/object-helper/object-helper.js";
|
import { deepEqual } from "@/helpers/object-helper";
|
||||||
import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from "@/constants/schedule-constants";
|
import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from "@/constants/schedule-constants";
|
||||||
|
|
||||||
// Export State
|
// Export State
|
||||||
|
|
@ -1776,6 +1776,10 @@ export const actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
saveSupportingItems(context, supportingItems) {
|
saveSupportingItems(context, supportingItems) {
|
||||||
|
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, supportingItems);
|
||||||
|
},
|
||||||
|
|
||||||
|
saveSupportingItemsAndResetServiceLocation(context, supportingItems) {
|
||||||
if (!deepEqual(supportingItems, context.state.order.lineItems.supportingItems)) {
|
if (!deepEqual(supportingItems, context.state.order.lineItems.supportingItems)) {
|
||||||
context.commit(storeMutations.RESET_SERVICE_LOCATION_APPOINTMENT_TYPE);
|
context.commit(storeMutations.RESET_SERVICE_LOCATION_APPOINTMENT_TYPE);
|
||||||
context.commit(storeMutations.RESET_SERVICE_LOCATION_PROVIDER);
|
context.commit(storeMutations.RESET_SERVICE_LOCATION_PROVIDER);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue