Merge branch 'develop' into CSR-1382-order-quote-initial-setup

This commit is contained in:
Bryan Mauger 2023-08-22 15:31:28 -04:00
commit 512c73413d
4 changed files with 14 additions and 0 deletions

View file

@ -83,6 +83,7 @@ const storeActions = {
SAVE_VAPS: "saveVaps",
SAVE_CUSTOMER_DETAILS: "saveCustomerDetails",
SAVE_SERVICE_LOCATION_TECH_NOTES: "saveServiceLocationTechNotes",
SAVE_WORK_ORDER_FLAG: "saveWorkOrderFlag",
};
export { storeActions };

View file

@ -1,4 +1,6 @@
const storeMutations = {
UPDATE_WORK_ORDER_FLAG: "updateWorkOrderFlag",
// VEHICLE MUTATIONS
UPDATE_YEAR: "updateYear",
UPDATE_MAKE: "updateMake",

View file

@ -163,6 +163,7 @@ export default {
false
);
this.dispatchStoreAction(this.storeActions.SAVE_WORK_ORDER_FLAG, true, false);
this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route);
},
},

View file

@ -25,6 +25,7 @@ import {
// Export State
const getDefaultState = () => {
return {
submitAfterSave: false,
order: {
vehicle: {
year: null,
@ -123,6 +124,10 @@ export const state = getDefaultState();
// Export Mutations
export const mutations = {
updateWorkOrderFlag(state, submitAfterSave) {
state.submitAfterSave = submitAfterSave;
},
// VEHICLE MUTATIONS
updateYear(state, year) {
state.order.vehicle.year = year;
@ -1400,6 +1405,7 @@ export const actions = {
method: endpoints.SaveSession.method,
endpoint: endpoints.SaveSession.url,
payload: {
submitAfterSave: context.state.submitAfterSave,
applicationUser: {
crmCustomerId: applicationUser.crmCustomerId,
experiments: applicationUser.experiments,
@ -1552,6 +1558,10 @@ export const actions = {
);
},
saveWorkOrderFlag(context, submitAfterSave) {
context.commit(storeMutations.UPDATE_WORK_ORDER_FLAG, submitAfterSave);
},
// Business domain actions
// Vehicle