CSR-889 | Tech review changes
This commit is contained in:
parent
7a2faf84ad
commit
700ab40d9c
4 changed files with 32 additions and 39 deletions
|
|
@ -65,7 +65,9 @@ const storeActions = {
|
|||
"resetMoldingAndCapabilityQuestionAnswersIfNeeded",
|
||||
SAVE_MOLDING_QUESTION_ANSWERS: "saveMoldingQuestionAnswers",
|
||||
SAVE_CAPABILITY_QUESTION_ANSWERS: "saveCapabilityQuestionAnswers",
|
||||
SAVE_QUOTE_PAGE_SELECTIONS: "saveQuotePageSelections",
|
||||
SAVE_PAYMENT_TYPE: "savePaymentType",
|
||||
SAVE_SUPPORTING_ITEMS: "saveSupportingItems",
|
||||
SAVE_VAPS: "saveVaps",
|
||||
};
|
||||
|
||||
export { storeActions };
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@ const storeMutations = {
|
|||
RESET_DAMAGE_STATE: "resetDamageState",
|
||||
RESET_REGISTRATION_STATE: "resetRegistrationState",
|
||||
RESET_GLASS_PARTS_STATE: "resetGlassPartsState",
|
||||
RESET_SUPPORTING_ITEMS_STATE: "resetSupportingItemsState",
|
||||
RESET_VAPS_STATE: "resetVapsState",
|
||||
RESET_STATE: "resetState",
|
||||
RESET_SAVE_SESSION_PROMISE: "resetSaveSessionPromise",
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
ref="servicePackage"
|
||||
cashCmsWidgetName="CashServicePackageQuestionWidget"
|
||||
insuranceCmsWidgetName="InsuranceServicePackageQuestionWidget"
|
||||
v-model="selectedPackage"
|
||||
v-model="selectedVaps"
|
||||
groupName="ServicePackageQuestion"
|
||||
:availableLineItems="availableLineItems"
|
||||
:isInsuranceSelected="isInsuranceSelected" />
|
||||
|
|
@ -117,7 +117,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
isInsuranceSelected: null,
|
||||
selectedPackage: null,
|
||||
selectedVaps: null,
|
||||
availableLineItems: null,
|
||||
supportingItems: null,
|
||||
};
|
||||
|
|
@ -140,16 +140,18 @@ export default {
|
|||
backButtonAction() {
|
||||
vehicleQuestionsMixin.methods.navigateBack(this);
|
||||
},
|
||||
async forwardButtonAction() {
|
||||
await this.dispatchStoreAction(
|
||||
this.storeActions.SAVE_QUOTE_PAGE_SELECTIONS,
|
||||
{
|
||||
isInsuranceSelected: this.isInsuranceSelected,
|
||||
vapsItemsToAdd: this.selectedPackage,
|
||||
supportingItemsToAdd: this.supportingItems,
|
||||
},
|
||||
forwardButtonAction() {
|
||||
this.dispatchStoreAction(
|
||||
this.storeActions.SAVE_PAYMENT_TYPE,
|
||||
this.isInsuranceSelected,
|
||||
false
|
||||
);
|
||||
this.dispatchStoreAction(
|
||||
this.storeActions.SAVE_SUPPORTING_ITEMS,
|
||||
this.supportingItems,
|
||||
false
|
||||
);
|
||||
this.dispatchStoreAction(this.storeActions.SAVE_VAPS, this.selectedVaps, false);
|
||||
|
||||
//return this.navigateForward();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -302,12 +302,6 @@ export const mutations = {
|
|||
state.applicationUser.pageData[fmgPageValues.MOLDING_QUESTIONS] = null;
|
||||
state.applicationUser.pageData[fmgPageValues.CAPABILITY_QUESTIONS] = null;
|
||||
},
|
||||
resetSupportingItemsState(state) {
|
||||
state.order.lineItems.supportingItems = null;
|
||||
},
|
||||
resetVapsState(state) {
|
||||
state.order.lineItems.vaps = null;
|
||||
},
|
||||
resetState(state) {
|
||||
Object.assign(state, getDefaultState());
|
||||
},
|
||||
|
|
@ -590,19 +584,17 @@ export const actions = {
|
|||
resetDamageAndDependencies(context) {
|
||||
context.commit(storeMutations.RESET_DAMAGE_STATE);
|
||||
context.commit(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||
context.commit(storeMutations.RESET_SUPPORTING_ITEMS_STATE);
|
||||
context.commit(storeMutations.RESET_VAPS_STATE);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
context.commit(storeMutations.UPDATE_VAPS, null);
|
||||
},
|
||||
resetRegistrationAndDependencies(context) {
|
||||
context.commit(storeMutations.RESET_REGISTRATION_STATE);
|
||||
context.commit(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||
context.commit(storeMutations.RESET_SUPPORTING_ITEMS_STATE);
|
||||
context.commit(storeMutations.RESET_VAPS_STATE);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
},
|
||||
resetPartsAndDependencies(context) {
|
||||
context.commit(storeMutations.RESET_GLASS_PARTS_STATE);
|
||||
context.commit(storeMutations.RESET_SUPPORTING_ITEMS_STATE);
|
||||
context.commit(storeMutations.RESET_VAPS_STATE);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
},
|
||||
resetState(context) {
|
||||
context.commit(storeMutations.RESET_STATE);
|
||||
|
|
@ -1173,6 +1165,7 @@ export const actions = {
|
|||
if (isDamageChanging) {
|
||||
//Reset dependent state when changing
|
||||
context.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
context.commit(storeMutations.UPDATE_VAPS, null);
|
||||
|
||||
// Save new values
|
||||
context.commit(storeMutations.UPDATE_IS_REPAIR, isWindshieldRepair);
|
||||
|
|
@ -1264,7 +1257,7 @@ export const actions = {
|
|||
|
||||
if (havePartQuestionAnswersChanged) {
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, null);
|
||||
context.commit(storeMutations.RESET_SUPPORTING_ITEMS_STATE);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
context.commit(storeMutations.UPDATE_MOLDING_QUESTION_ANSWERS, null);
|
||||
context.commit(storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, null);
|
||||
context.commit(storeMutations.UPDATE_PAGE_DATA, {
|
||||
|
|
@ -1310,7 +1303,7 @@ export const actions = {
|
|||
|
||||
if (haveSelectedVehiclePartsChanged) {
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, null);
|
||||
context.commit(storeMutations.RESET_SUPPORTING_ITEMS_STATE);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
context.commit(storeMutations.UPDATE_MOLDING_QUESTION_ANSWERS, null);
|
||||
context.commit(storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, null);
|
||||
context.commit(storeMutations.UPDATE_PAGE_DATA, {
|
||||
|
|
@ -1340,7 +1333,7 @@ export const actions = {
|
|||
|
||||
if (haveMoldingQuestionAnswersChanged) {
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, null);
|
||||
context.commit(storeMutations.RESET_SUPPORTING_ITEMS_STATE);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
context.commit(storeMutations.UPDATE_CAPABILITY_QUESTION_ANSWERS, null);
|
||||
context.commit(storeMutations.UPDATE_PAGE_DATA, {
|
||||
page: fmgPageValues.CAPABILITY_QUESTIONS,
|
||||
|
|
@ -1368,7 +1361,7 @@ export const actions = {
|
|||
|
||||
if (haveCapabilityQuestionAnswersChanged) {
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, null);
|
||||
context.commit(storeMutations.RESET_SUPPORTING_ITEMS_STATE);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, null);
|
||||
}
|
||||
|
||||
//Save new values
|
||||
|
|
@ -1377,16 +1370,14 @@ export const actions = {
|
|||
capabilityQuestionAnswers
|
||||
);
|
||||
},
|
||||
// Quote Page
|
||||
saveQuotePageSelections(
|
||||
context,
|
||||
{ isInsuranceSelected, vapsItemsToAdd, supportingItemsToAdd }
|
||||
) {
|
||||
context.commit(storeMutations.RESET_SUPPORTING_ITEMS_STATE);
|
||||
context.commit(storeMutations.RESET_VAPS_STATE);
|
||||
context.commit(storeMutations.UPDATE_IS_INSURANCE, isInsuranceSelected);
|
||||
context.commit(storeMutations.UPDATE_VAPS, vapsItemsToAdd);
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, supportingItemsToAdd);
|
||||
savePaymentType(context, isInsurance) {
|
||||
context.commit(storeMutations.UPDATE_IS_INSURANCE, isInsurance);
|
||||
},
|
||||
saveSupportingItems(context, supportingItems) {
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, supportingItems);
|
||||
},
|
||||
saveVaps(context, vaps) {
|
||||
context.commit(storeMutations.UPDATE_VAPS, vaps);
|
||||
},
|
||||
// Price order actions
|
||||
// PLACEHOLDER, WILL CHANGE WHEN PRICING END POINT IS IMPLEMENTED
|
||||
|
|
|
|||
Loading…
Reference in a new issue