Merge remote-tracking branch 'origin/develop' into feature/skiener/CSR-1452
This commit is contained in:
commit
d83ec8a4bc
4 changed files with 16 additions and 13 deletions
|
|
@ -12,7 +12,7 @@ beforeEach(() => {
|
||||||
jest.restoreAllMocks();
|
jest.restoreAllMocks();
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
store.getters = {
|
store.getters = {
|
||||||
order: {
|
submittedOrder: {
|
||||||
schedule: {
|
schedule: {
|
||||||
date: "2019-01-01",
|
date: "2019-01-01",
|
||||||
startTime: "09:00",
|
startTime: "09:00",
|
||||||
|
|
|
||||||
|
|
@ -110,11 +110,11 @@ export default {
|
||||||
return this.getCmsContent(this.sameDayDropOffWidgetName, "BodyText");
|
return this.getCmsContent(this.sameDayDropOffWidgetName, "BodyText");
|
||||||
},
|
},
|
||||||
UniqueId() {
|
UniqueId() {
|
||||||
return store.getters.order.referralNumber?.toString();
|
return store.getters.submittedOrder.referralNumber?.toString();
|
||||||
},
|
},
|
||||||
ServiceType() {
|
ServiceType() {
|
||||||
const isRepair = store.getters.order.damage.isRepair;
|
const isRepair = store.getters.submittedOrder.damage.isRepair;
|
||||||
const funnelHasRecalibrationPart = store.getters.funnelHasRecalibrationPart;
|
const funnelHasRecalibrationPart = store.getters.isRecalibrationOnSubmittedOrder;
|
||||||
if (!isRepair) {
|
if (!isRepair) {
|
||||||
if (funnelHasRecalibrationPart) {
|
if (funnelHasRecalibrationPart) {
|
||||||
return serviceType.REPLACEMENT_AND_RECALIBRATION;
|
return serviceType.REPLACEMENT_AND_RECALIBRATION;
|
||||||
|
|
@ -125,7 +125,7 @@ export default {
|
||||||
return serviceType.REPAIR;
|
return serviceType.REPAIR;
|
||||||
},
|
},
|
||||||
RouteCode() {
|
RouteCode() {
|
||||||
return store.getters.order.schedule.routeCode;
|
return store.getters.submittedOrder.schedule.routeCode;
|
||||||
},
|
},
|
||||||
Appointment() {
|
Appointment() {
|
||||||
var subject = "";
|
var subject = "";
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,7 @@ export default {
|
||||||
taxedVaps,
|
taxedVaps,
|
||||||
lineItems
|
lineItems
|
||||||
);
|
);
|
||||||
|
lineItems.vaps = lineItems.vaps ?? [];
|
||||||
lineItems.vaps.push(...vapsToAddToCart);
|
lineItems.vaps.push(...vapsToAddToCart);
|
||||||
|
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
|
|
|
||||||
|
|
@ -595,6 +595,15 @@ export const getters = {
|
||||||
isRecalibrationOnOrder: (state) => {
|
isRecalibrationOnOrder: (state) => {
|
||||||
return getHasRecalibrationPart(state);
|
return getHasRecalibrationPart(state);
|
||||||
},
|
},
|
||||||
|
isRecalibrationOnSubmittedOrder: (state) => {
|
||||||
|
if (window.sessionStorage.getItem("submittedOrder") !== null) {
|
||||||
|
return getHasRecalibrationPart({
|
||||||
|
order: JSON.parse(window.sessionStorage.getItem("submittedOrder")),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
areRearWipersOnOrder: (state) => {
|
areRearWipersOnOrder: (state) => {
|
||||||
return !!state.order.lineItems.vaps?.some(
|
return !!state.order.lineItems.vaps?.some(
|
||||||
(vap) => vap.partType.toUpperCase() === partTypeStrings.REAR_WIPER.toUpperCase()
|
(vap) => vap.partType.toUpperCase() === partTypeStrings.REAR_WIPER.toUpperCase()
|
||||||
|
|
@ -1039,14 +1048,7 @@ export const actions = {
|
||||||
context.commit(storeMutations.UPDATE_CRM_CUSTOMER_ID, crmCustomerId);
|
context.commit(storeMutations.UPDATE_CRM_CUSTOMER_ID, crmCustomerId);
|
||||||
context.commit(storeMutations.WORK_ORDER_NUMBER, workOrderNumber);
|
context.commit(storeMutations.WORK_ORDER_NUMBER, workOrderNumber);
|
||||||
context.commit(storeMutations.LOCK_TOKEN, lockToken);
|
context.commit(storeMutations.LOCK_TOKEN, lockToken);
|
||||||
|
|
||||||
// if we already have the token, do not update it. pia does 2 work order submits and the value is not persisted after the first submit
|
|
||||||
if (
|
|
||||||
state.order.customerPortalLoginToken != null &&
|
|
||||||
state.order.customerPortalLoginToken != "00000000-0000-0000-0000-000000000000"
|
|
||||||
) {
|
|
||||||
context.commit(storeMutations.Customer_Portal_Login_Token, customerPortalLoginToken);
|
context.commit(storeMutations.Customer_Portal_Login_Token, customerPortalLoginToken);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
logPageView(
|
logPageView(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue