Merge branch 'develop' into feature/CSR-1088
This commit is contained in:
commit
7978a9407b
15 changed files with 55 additions and 69 deletions
|
|
@ -68,7 +68,7 @@ const storeActions = {
|
||||||
SAVE_MOLDING_QUESTION_ANSWERS: "saveMoldingQuestionAnswers",
|
SAVE_MOLDING_QUESTION_ANSWERS: "saveMoldingQuestionAnswers",
|
||||||
SAVE_CAPABILITY_QUESTION_ANSWERS: "saveCapabilityQuestionAnswers",
|
SAVE_CAPABILITY_QUESTION_ANSWERS: "saveCapabilityQuestionAnswers",
|
||||||
SAVE_PAYMENT_TYPE: "savePaymentType",
|
SAVE_PAYMENT_TYPE: "savePaymentType",
|
||||||
SAVE_ACCOUNT_NUMBER: "saveAccountNumber",
|
SAVE_PARENT_ACCOUNT_NUMBER: "saveParentAccountNumber",
|
||||||
SAVE_SUPPORTING_ITEMS: "saveSupportingItems",
|
SAVE_SUPPORTING_ITEMS: "saveSupportingItems",
|
||||||
SAVE_VAPS: "saveVaps",
|
SAVE_VAPS: "saveVaps",
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,9 @@ export default {
|
||||||
const validationResult = await this.form.validate();
|
const validationResult = await this.form.validate();
|
||||||
if (validationResult.valid) {
|
if (validationResult.valid) {
|
||||||
this.$emit("footer-button-event");
|
this.$emit("footer-button-event");
|
||||||
|
} else {
|
||||||
|
this.resetButtonStyle();
|
||||||
}
|
}
|
||||||
this.resetButtonStyle();
|
|
||||||
},
|
},
|
||||||
resetButtonStyle() {
|
resetButtonStyle() {
|
||||||
this.$refs.buttonMain.resetButtonStyle();
|
this.$refs.buttonMain.resetButtonStyle();
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,7 @@ describe("navigateToHeritageFunnel", () => {
|
||||||
const mockReferralNumber = "2";
|
const mockReferralNumber = "2";
|
||||||
const mockCorrelationId = "55";
|
const mockCorrelationId = "55";
|
||||||
const mockReferralDate = "2022";
|
const mockReferralDate = "2022";
|
||||||
const mockAccountNumber = "167132";
|
const mockParentAccountNumber = "167132";
|
||||||
const mockSavedSessionId = "xxx-xxx-xxx";
|
const mockSavedSessionId = "xxx-xxx-xxx";
|
||||||
const mockCrmCustomerId = "xxx-xxx-xxx";
|
const mockCrmCustomerId = "xxx-xxx-xxx";
|
||||||
|
|
||||||
|
|
@ -358,7 +358,7 @@ describe("navigateToHeritageFunnel", () => {
|
||||||
mockReferralNumber,
|
mockReferralNumber,
|
||||||
mockCorrelationId,
|
mockCorrelationId,
|
||||||
mockReferralDate,
|
mockReferralDate,
|
||||||
mockAccountNumber,
|
mockParentAccountNumber,
|
||||||
mockSavedSessionId,
|
mockSavedSessionId,
|
||||||
mockCrmCustomerId
|
mockCrmCustomerId
|
||||||
);
|
);
|
||||||
|
|
@ -395,7 +395,7 @@ describe("navigateToHeritageFunnel", () => {
|
||||||
const mockReferralNumber = "2";
|
const mockReferralNumber = "2";
|
||||||
const mockCorrelationId = "55";
|
const mockCorrelationId = "55";
|
||||||
const mockReferralDate = "2022";
|
const mockReferralDate = "2022";
|
||||||
const mockAccountNumber = "167132";
|
const mockParentAccountNumber = "167132";
|
||||||
const mockSavedSessionId = "xxx-xxx-xxx";
|
const mockSavedSessionId = "xxx-xxx-xxx";
|
||||||
const mockCrmCustomerId = "xxx-xxx-xxx";
|
const mockCrmCustomerId = "xxx-xxx-xxx";
|
||||||
|
|
||||||
|
|
@ -403,7 +403,7 @@ describe("navigateToHeritageFunnel", () => {
|
||||||
mockReferralNumber,
|
mockReferralNumber,
|
||||||
mockCorrelationId,
|
mockCorrelationId,
|
||||||
mockReferralDate,
|
mockReferralDate,
|
||||||
mockAccountNumber,
|
mockParentAccountNumber,
|
||||||
mockSavedSessionId,
|
mockSavedSessionId,
|
||||||
mockCrmCustomerId
|
mockCrmCustomerId
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ async function loadSession(
|
||||||
savedSessionId,
|
savedSessionId,
|
||||||
referralNumber,
|
referralNumber,
|
||||||
referralDate,
|
referralDate,
|
||||||
accountNumber,
|
parentAccountNumber,
|
||||||
referralCorrelationId,
|
referralCorrelationId,
|
||||||
isConceptInsurance
|
isConceptInsurance
|
||||||
) {
|
) {
|
||||||
|
|
@ -94,8 +94,8 @@ async function loadSession(
|
||||||
savedSessionId: savedSessionId?.toString(),
|
savedSessionId: savedSessionId?.toString(),
|
||||||
referralNumber,
|
referralNumber,
|
||||||
referralDate,
|
referralDate,
|
||||||
accountNumber,
|
|
||||||
referralCorrelationId,
|
referralCorrelationId,
|
||||||
|
parentAccountNumber,
|
||||||
isConceptInsurance,
|
isConceptInsurance,
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
|
|
@ -116,7 +116,7 @@ async function saveSessionHelper() {
|
||||||
referralNumber: savedSessionInfo.data.referralNumber?.toString(),
|
referralNumber: savedSessionInfo.data.referralNumber?.toString(),
|
||||||
referralCorrelationId: savedSessionInfo.data.referralCorrelationId,
|
referralCorrelationId: savedSessionInfo.data.referralCorrelationId,
|
||||||
referralDate: savedSessionInfo.data.referralDate,
|
referralDate: savedSessionInfo.data.referralDate,
|
||||||
accountNumber: savedSessionInfo.data.accountNumber?.toString(),
|
parentAccountNumber: savedSessionInfo.data.parentAccountNumber?.toString(),
|
||||||
savedSessionId: savedSessionInfo.data.savedSessionId,
|
savedSessionId: savedSessionInfo.data.savedSessionId,
|
||||||
crmCustomerId: savedSessionInfo.data.crmCustomerId?.toString(),
|
crmCustomerId: savedSessionInfo.data.crmCustomerId?.toString(),
|
||||||
eon: savedSessionInfo.data.eon,
|
eon: savedSessionInfo.data.eon,
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ describe("saveSession", () => {
|
||||||
const mockReferralNumber = "2";
|
const mockReferralNumber = "2";
|
||||||
const mockCorrelationId = "55";
|
const mockCorrelationId = "55";
|
||||||
const mockReferralDate = "2022";
|
const mockReferralDate = "2022";
|
||||||
const mockAccountNumber = "167132";
|
const mockParentAccountNumber = "167132";
|
||||||
const mockSavedSessionId = "xxx-xxx-xxx";
|
const mockSavedSessionId = "xxx-xxx-xxx";
|
||||||
const mockCrmCustomerId = "xxx-xxx-xxx";
|
const mockCrmCustomerId = "xxx-xxx-xxx";
|
||||||
|
|
||||||
|
|
@ -150,7 +150,7 @@ describe("saveSession", () => {
|
||||||
mockReferralNumber,
|
mockReferralNumber,
|
||||||
mockCorrelationId,
|
mockCorrelationId,
|
||||||
mockReferralDate,
|
mockReferralDate,
|
||||||
mockAccountNumber,
|
mockParentAccountNumber,
|
||||||
mockSavedSessionId,
|
mockSavedSessionId,
|
||||||
mockCrmCustomerId
|
mockCrmCustomerId
|
||||||
);
|
);
|
||||||
|
|
@ -182,7 +182,7 @@ describe("saveSession", () => {
|
||||||
referralNumber: mockReferralNumber,
|
referralNumber: mockReferralNumber,
|
||||||
referralDate: mockReferralDate,
|
referralDate: mockReferralDate,
|
||||||
referralCorrelationId: mockCorrelationId,
|
referralCorrelationId: mockCorrelationId,
|
||||||
accountNumber: mockAccountNumber,
|
parentAccountNumber: mockParentAccountNumber,
|
||||||
savedSessionId: mockSavedSessionId,
|
savedSessionId: mockSavedSessionId,
|
||||||
crmCustomerId: mockCrmCustomerId,
|
crmCustomerId: mockCrmCustomerId,
|
||||||
},
|
},
|
||||||
|
|
@ -195,7 +195,7 @@ describe("saveSession", () => {
|
||||||
const mockReferralNumber = 1566818;
|
const mockReferralNumber = 1566818;
|
||||||
const mockReferralDate = "2022-03-15T10:56:24.597";
|
const mockReferralDate = "2022-03-15T10:56:24.597";
|
||||||
const mockReferralCorrelationId = "404d2b04-f86e-45c3-b373-127b6217b060";
|
const mockReferralCorrelationId = "404d2b04-f86e-45c3-b373-127b6217b060";
|
||||||
const mockAccountNumber = "167132";
|
const mockParentAccountNumber = "167132";
|
||||||
const mockSavedSessionId = "xxx-xxx-xxx";
|
const mockSavedSessionId = "xxx-xxx-xxx";
|
||||||
const mockCrmCustomerId = "xxx-xxx-xxx";
|
const mockCrmCustomerId = "xxx-xxx-xxx";
|
||||||
|
|
||||||
|
|
@ -203,7 +203,7 @@ describe("saveSession", () => {
|
||||||
mockReferralNumber,
|
mockReferralNumber,
|
||||||
mockReferralCorrelationId,
|
mockReferralCorrelationId,
|
||||||
mockReferralDate,
|
mockReferralDate,
|
||||||
mockAccountNumber,
|
mockParentAccountNumber,
|
||||||
mockSavedSessionId,
|
mockSavedSessionId,
|
||||||
mockCrmCustomerId
|
mockCrmCustomerId
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ export function getMockOrderInfo(
|
||||||
mockReferralNumber,
|
mockReferralNumber,
|
||||||
mockCorrelationId,
|
mockCorrelationId,
|
||||||
mockReferralDate,
|
mockReferralDate,
|
||||||
accountNumber = "0",
|
parentAccountNumber = "0",
|
||||||
savedSessionId,
|
savedSessionId,
|
||||||
crmCustomerId
|
crmCustomerId
|
||||||
) {
|
) {
|
||||||
|
|
@ -112,7 +112,7 @@ export function getMockOrderInfo(
|
||||||
referralNumber: mockReferralNumber,
|
referralNumber: mockReferralNumber,
|
||||||
referralCorrelationId: mockCorrelationId,
|
referralCorrelationId: mockCorrelationId,
|
||||||
referralDate: mockReferralDate,
|
referralDate: mockReferralDate,
|
||||||
accountNumber: accountNumber,
|
parentAccountNumber: parentAccountNumber,
|
||||||
savedSessionId: savedSessionId,
|
savedSessionId: savedSessionId,
|
||||||
crmCustomerId: crmCustomerId,
|
crmCustomerId: crmCustomerId,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -63,11 +63,11 @@ mockStoreActionResults[storeActions.GET_SUPPORTING_ITEMS] = Promise.resolve([
|
||||||
|
|
||||||
store.getters = {
|
store.getters = {
|
||||||
order: {
|
order: {
|
||||||
accountNumber: applicationConfig.CASH_ACCOUNT_NUMBER,
|
payment: {
|
||||||
},
|
insuranceCoverage: {},
|
||||||
payment: {
|
isInsurance: false,
|
||||||
insuranceCoverage: {},
|
parentAccountNumber: applicationConfig.CASH_ACCOUNT_NUMBER,
|
||||||
isInsurance: false,
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -75,7 +75,9 @@ afterEach(() => {
|
||||||
// reset store after each test
|
// reset store after each test
|
||||||
store.getters = {
|
store.getters = {
|
||||||
order: {
|
order: {
|
||||||
accountNumber: applicationConfig.CASH_ACCOUNT_NUMBER,
|
payment: {
|
||||||
|
parentAccountNumber: applicationConfig.CASH_ACCOUNT_NUMBER,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
payment: {
|
payment: {
|
||||||
insuranceCoverage: {},
|
insuranceCoverage: {},
|
||||||
|
|
|
||||||
|
|
@ -184,13 +184,16 @@ export default {
|
||||||
);
|
);
|
||||||
if (!this.isInsuranceSelected) {
|
if (!this.isInsuranceSelected) {
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
this.storeActions.SAVE_ACCOUNT_NUMBER,
|
this.storeActions.SAVE_PARENT_ACCOUNT_NUMBER,
|
||||||
applicationConfig.CASH_ACCOUNT_NUMBER,
|
applicationConfig.CASH_ACCOUNT_NUMBER,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$store.getters.order.accountNumber != applicationConfig.CASH_ACCOUNT_NUMBER) {
|
if (
|
||||||
|
this.$store.getters.order.payment.parentAccountNumber !=
|
||||||
|
applicationConfig.CASH_ACCOUNT_NUMBER
|
||||||
|
) {
|
||||||
this.supportingItems = this.filterOutFees(this.supportingItems);
|
this.supportingItems = this.filterOutFees(this.supportingItems);
|
||||||
}
|
}
|
||||||
if (this.pricedGlassParts.length > 0) {
|
if (this.pricedGlassParts.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -98,13 +98,13 @@ export default {
|
||||||
},
|
},
|
||||||
mobileLocationLinkText() {
|
mobileLocationLinkText() {
|
||||||
if (
|
if (
|
||||||
this.addressModel.streetAddress !== null &&
|
this.addressModel.streetAddress &&
|
||||||
this.addressModel.streetAddress !== "" &&
|
this.addressModel.streetAddress !== "" &&
|
||||||
this.addressModel.city !== null &&
|
this.addressModel.city &&
|
||||||
this.addressModel.city !== "" &&
|
this.addressModel.city !== "" &&
|
||||||
this.addressModel.state !== null &&
|
this.addressModel.state &&
|
||||||
this.addressModel.state !== "" &&
|
this.addressModel.state !== "" &&
|
||||||
this.addressModel.zipCode !== null &&
|
this.addressModel.zipCode &&
|
||||||
this.addressModel.zipCode !== ""
|
this.addressModel.zipCode !== ""
|
||||||
) {
|
) {
|
||||||
return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`;
|
return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ const mockMixin = {
|
||||||
if (zip === "43235" || zip === "55555") {
|
if (zip === "43235" || zip === "55555") {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: true,
|
|
||||||
isValid: true,
|
isValid: true,
|
||||||
state: "OH",
|
state: "OH",
|
||||||
zipCodeCtu: "01820",
|
zipCodeCtu: "01820",
|
||||||
|
|
@ -74,7 +73,6 @@ const mockMixin = {
|
||||||
|
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: false,
|
|
||||||
isValid: false,
|
isValid: false,
|
||||||
state: null,
|
state: null,
|
||||||
zipCodeCtu: null,
|
zipCodeCtu: null,
|
||||||
|
|
@ -130,7 +128,6 @@ beforeEach(() => {
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
zipCode: "43235",
|
zipCode: "43235",
|
||||||
state: "OH",
|
state: "OH",
|
||||||
isServiceable: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
payment: {
|
payment: {
|
||||||
|
|
@ -226,7 +223,6 @@ describe("service-location.vue", () => {
|
||||||
const newServiceZipCodeQuestion = {
|
const newServiceZipCodeQuestion = {
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
state: "IL",
|
state: "IL",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const serviceZipCodeComponent = wrapper.findComponent({
|
const serviceZipCodeComponent = wrapper.findComponent({
|
||||||
|
|
@ -249,7 +245,6 @@ describe("service-location.vue", () => {
|
||||||
const newServiceZipCodeQuestion = {
|
const newServiceZipCodeQuestion = {
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
state: "IL",
|
state: "IL",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const mobileLocationQuestions = {
|
const mobileLocationQuestions = {
|
||||||
|
|
@ -369,13 +364,11 @@ describe("service-location.vue", () => {
|
||||||
wrapper.vm.serviceZipCodeQuestion = {
|
wrapper.vm.serviceZipCodeQuestion = {
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
state: "IL",
|
state: "IL",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const newServiceZipCodeInfo = {
|
const newServiceZipCodeInfo = {
|
||||||
state: "OH",
|
state: "OH",
|
||||||
zipCode: "43081",
|
zipCode: "43081",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
<serviceZipModalQuestion
|
<serviceZipModalQuestion
|
||||||
v-model="serviceZipCodeQuestion"
|
v-model="serviceZipCodeQuestion"
|
||||||
@updated-service-zip-code="resetMobileLocation"
|
|
||||||
ref="serviceZipCodeQuestion"
|
ref="serviceZipCodeQuestion"
|
||||||
linkWidgetName="ServiceZipLinkWidget"
|
linkWidgetName="ServiceZipLinkWidget"
|
||||||
modalWidgetName="ServiceZipModalWidget" />
|
modalWidgetName="ServiceZipModalWidget" />
|
||||||
|
|
@ -49,7 +48,6 @@ export default {
|
||||||
city: this.getServiceCityFromStore(),
|
city: this.getServiceCityFromStore(),
|
||||||
state: this.getServiceStateFromStore(),
|
state: this.getServiceStateFromStore(),
|
||||||
zipCode: this.getServiceZipCodeFromStore(),
|
zipCode: this.getServiceZipCodeFromStore(),
|
||||||
isServiceable: false,
|
|
||||||
isZipServiceableMobile: null,
|
isZipServiceableMobile: null,
|
||||||
isZipServiceableInShop: null,
|
isZipServiceableInShop: null,
|
||||||
mobileFeePart: null,
|
mobileFeePart: null,
|
||||||
|
|
@ -88,7 +86,6 @@ export default {
|
||||||
return {
|
return {
|
||||||
state: this.state,
|
state: this.state,
|
||||||
zipCode: this.zipCode,
|
zipCode: this.zipCode,
|
||||||
isServiceable: this.isServiceable,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
set: function (newValue) {
|
set: function (newValue) {
|
||||||
|
|
@ -98,7 +95,6 @@ export default {
|
||||||
|
|
||||||
this.state = newValue.state;
|
this.state = newValue.state;
|
||||||
this.zipCode = newValue.zipCode;
|
this.zipCode = newValue.zipCode;
|
||||||
this.isServiceable = newValue.isServiceable;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mobileLocationQuestions: {
|
mobileLocationQuestions: {
|
||||||
|
|
@ -152,9 +148,6 @@ export default {
|
||||||
getServiceZipCodeFromStore() {
|
getServiceZipCodeFromStore() {
|
||||||
return store.getters.order.serviceLocation.zipCode;
|
return store.getters.order.serviceLocation.zipCode;
|
||||||
},
|
},
|
||||||
getIsServiceableFromStore() {
|
|
||||||
return store.getters.order.serviceLocation.isServiceable;
|
|
||||||
},
|
|
||||||
resetMobileFeePart(serviceZipCode) {
|
resetMobileFeePart(serviceZipCode) {
|
||||||
getPricedMobileFeePart(serviceZipCode).then((pricedMobileFeePart) => {
|
getPricedMobileFeePart(serviceZipCode).then((pricedMobileFeePart) => {
|
||||||
this.mobileFeePart = pricedMobileFeePart;
|
this.mobileFeePart = pricedMobileFeePart;
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ jest.mock("@/digital-components/textbox-question/textbox-question", () => ({
|
||||||
jest.mock("@/digital-components/modal/modal", () => ({
|
jest.mock("@/digital-components/modal/modal", () => ({
|
||||||
methods: {
|
methods: {
|
||||||
closeModal: jest.fn(),
|
closeModal: jest.fn(),
|
||||||
|
resetButtonStyle: jest.fn(),
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
@ -44,7 +45,6 @@ const mockMixin = {
|
||||||
if (zip === "43235") {
|
if (zip === "43235") {
|
||||||
return {
|
return {
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: true,
|
|
||||||
isValid: true,
|
isValid: true,
|
||||||
state: "OH",
|
state: "OH",
|
||||||
zipCodeCtu: "01820",
|
zipCodeCtu: "01820",
|
||||||
|
|
@ -54,7 +54,6 @@ const mockMixin = {
|
||||||
if (zip === "61606") {
|
if (zip === "61606") {
|
||||||
return {
|
return {
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: true,
|
|
||||||
isValid: true,
|
isValid: true,
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCodeCtu: "01526",
|
zipCodeCtu: "01526",
|
||||||
|
|
@ -63,7 +62,6 @@ const mockMixin = {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
containsMilitaryBase: false,
|
containsMilitaryBase: false,
|
||||||
isServiceable: false,
|
|
||||||
isValid: false,
|
isValid: false,
|
||||||
state: null,
|
state: null,
|
||||||
zipCodeCtu: null,
|
zipCodeCtu: null,
|
||||||
|
|
@ -77,7 +75,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "",
|
state: "",
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
isServiceable: undefined,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|
@ -100,7 +97,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "OH",
|
state: "OH",
|
||||||
zipCode: "43235",
|
zipCode: "43235",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const wrapper = mount(serviceZipModalQuestion, {
|
const wrapper = mount(serviceZipModalQuestion, {
|
||||||
|
|
@ -122,7 +118,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "43235";
|
const zip = "43235";
|
||||||
|
|
@ -141,7 +136,7 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
wrapper.vm.internalModel.zipCode = zip;
|
wrapper.vm.internalModel.zipCode = zip;
|
||||||
await wrapper.vm.setZipCode();
|
await wrapper.vm.setZipCode();
|
||||||
|
|
||||||
let expectedEmit = [[{ isServiceable: true, state: "OH", zipCode: "43235" }]];
|
let expectedEmit = [[{ state: "OH", zipCode: "43235" }]];
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(wrapper.emitted("update:modelValue")).toEqual(expectedEmit);
|
expect(wrapper.emitted("update:modelValue")).toEqual(expectedEmit);
|
||||||
|
|
@ -152,7 +147,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "";
|
const zip = "";
|
||||||
|
|
@ -180,7 +174,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "11111";
|
const zip = "11111";
|
||||||
|
|
@ -208,7 +201,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "";
|
const zip = "";
|
||||||
|
|
@ -237,7 +229,6 @@ describe("service-zip-modal-question.vue", () => {
|
||||||
let serviceZipCodeQuestion = {
|
let serviceZipCodeQuestion = {
|
||||||
state: "IL",
|
state: "IL",
|
||||||
zipCode: "61606",
|
zipCode: "61606",
|
||||||
isServiceable: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const zip = "123";
|
const zip = "123";
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ export default {
|
||||||
default: () => ({
|
default: () => ({
|
||||||
state: "",
|
state: "",
|
||||||
zipCode: "",
|
zipCode: "",
|
||||||
isServiceable: null,
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
linkWidgetName: String,
|
linkWidgetName: String,
|
||||||
|
|
@ -104,7 +103,6 @@ export default {
|
||||||
return {
|
return {
|
||||||
state: modelToCopy.state,
|
state: modelToCopy.state,
|
||||||
zipCode: modelToCopy.zipCode,
|
zipCode: modelToCopy.zipCode,
|
||||||
isServiceable: modelToCopy.isServiceable,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -116,6 +114,10 @@ export default {
|
||||||
this.$refs[this.modalName].closeModal();
|
this.$refs[this.modalName].closeModal();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resetModalButtonStyle() {
|
||||||
|
this.$refs[this.modalName].resetButtonStyle();
|
||||||
|
},
|
||||||
|
|
||||||
onInputIdAssigned(inputId) {
|
onInputIdAssigned(inputId) {
|
||||||
this.serviceZipCodeTextInputId = inputId;
|
this.serviceZipCodeTextInputId = inputId;
|
||||||
},
|
},
|
||||||
|
|
@ -134,13 +136,13 @@ export default {
|
||||||
this.resetAlerts();
|
this.resetAlerts();
|
||||||
|
|
||||||
const zipCodeData = await this.getZipCodeData(this.internalModel.zipCode);
|
const zipCodeData = await this.getZipCodeData(this.internalModel.zipCode);
|
||||||
|
this.resetModalButtonStyle();
|
||||||
|
|
||||||
if (!zipCodeData.isValid) {
|
if (!zipCodeData.isValid) {
|
||||||
this.displayInvalidZipAlert = true;
|
this.displayInvalidZipAlert = true;
|
||||||
this.focusOnZipInput();
|
this.focusOnZipInput();
|
||||||
} else {
|
} else {
|
||||||
this.internalModel.state = zipCodeData.state;
|
this.internalModel.state = zipCodeData.state;
|
||||||
this.internalModel.isServiceable = zipCodeData.isServiceable;
|
|
||||||
|
|
||||||
// Update the page level model
|
// Update the page level model
|
||||||
this.$emit("update:modelValue", this.internalModel);
|
this.$emit("update:modelValue", this.internalModel);
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,11 @@ const getDefaultState = () => {
|
||||||
isVerified: null,
|
isVerified: null,
|
||||||
coverageStatus: null,
|
coverageStatus: null,
|
||||||
},
|
},
|
||||||
|
parentAccountNumber: 0,
|
||||||
},
|
},
|
||||||
referralNumber: null,
|
referralNumber: null,
|
||||||
referralDate: null,
|
referralDate: null,
|
||||||
referralCorrelationId: null,
|
referralCorrelationId: null,
|
||||||
accountNumber: 0,
|
|
||||||
eon: null,
|
eon: null,
|
||||||
},
|
},
|
||||||
applicationUser: {
|
applicationUser: {
|
||||||
|
|
@ -166,7 +166,7 @@ export const mutations = {
|
||||||
state.order.referralDate = referralDate;
|
state.order.referralDate = referralDate;
|
||||||
},
|
},
|
||||||
updateParentAcctNumber(state, parentAcctNumber) {
|
updateParentAcctNumber(state, parentAcctNumber) {
|
||||||
state.order.accountNumber = parentAcctNumber;
|
state.order.payment.parentAccountNumber = parentAcctNumber;
|
||||||
},
|
},
|
||||||
updateEON(state, eon) {
|
updateEON(state, eon) {
|
||||||
state.order.eon = eon;
|
state.order.eon = eon;
|
||||||
|
|
@ -355,7 +355,8 @@ export const mutations = {
|
||||||
state.order.lineItems.supportingItems = sessionInformation.order.lineItems.supportingItems;
|
state.order.lineItems.supportingItems = sessionInformation.order.lineItems.supportingItems;
|
||||||
state.order.lineItems.vaps = sessionInformation.order.lineItems.vaps;
|
state.order.lineItems.vaps = sessionInformation.order.lineItems.vaps;
|
||||||
state.order.lineItems.serverData = sessionInformation.order.lineItems.serverData;
|
state.order.lineItems.serverData = sessionInformation.order.lineItems.serverData;
|
||||||
state.order.accountNumber = sessionInformation.order.accountNumber;
|
state.order.payment.parentAccountNumber =
|
||||||
|
sessionInformation.order.payment.parentAccountNumber;
|
||||||
state.order.providerNumber = sessionInformation.order.providerNumber;
|
state.order.providerNumber = sessionInformation.order.providerNumber;
|
||||||
(state.order.serviceLocation.address =
|
(state.order.serviceLocation.address =
|
||||||
sessionInformation.order.serviceLocation.streetAddress),
|
sessionInformation.order.serviceLocation.streetAddress),
|
||||||
|
|
@ -425,7 +426,7 @@ export const getters = {
|
||||||
funnelServiceCity: state.order.serviceLocation.city,
|
funnelServiceCity: state.order.serviceLocation.city,
|
||||||
funnelServiceState: state.order.serviceLocation.state,
|
funnelServiceState: state.order.serviceLocation.state,
|
||||||
funnelServiceZipCode: state.order.serviceLocation.zipCode,
|
funnelServiceZipCode: state.order.serviceLocation.zipCode,
|
||||||
funnelParentAccountNumber: state.order.accountNumber,
|
funnelParentAccountNumber: state.order.payment.parentAccountNumber,
|
||||||
funnelIsCoverageVerified: state.order.payment.insuranceCoverage.isVerified,
|
funnelIsCoverageVerified: state.order.payment.insuranceCoverage.isVerified,
|
||||||
funnelHasRecalibrationPart: getHasRecalibrationPart(state),
|
funnelHasRecalibrationPart: getHasRecalibrationPart(state),
|
||||||
funnelSelectedMultiGlass: state.order.damage.glassToReplace?.length > 1,
|
funnelSelectedMultiGlass: state.order.damage.glassToReplace?.length > 1,
|
||||||
|
|
@ -677,7 +678,7 @@ export const actions = {
|
||||||
referralDate,
|
referralDate,
|
||||||
referralCorrelationId,
|
referralCorrelationId,
|
||||||
eon,
|
eon,
|
||||||
accountNumber,
|
parentAccountNumber,
|
||||||
savedSessionId,
|
savedSessionId,
|
||||||
crmCustomerId,
|
crmCustomerId,
|
||||||
}
|
}
|
||||||
|
|
@ -686,7 +687,7 @@ export const actions = {
|
||||||
context.commit(storeMutations.UPDATE_REFERRAL_DATE, referralDate);
|
context.commit(storeMutations.UPDATE_REFERRAL_DATE, referralDate);
|
||||||
context.commit(storeMutations.UPDATE_REFERRAL_CORRELATION_ID, referralCorrelationId);
|
context.commit(storeMutations.UPDATE_REFERRAL_CORRELATION_ID, referralCorrelationId);
|
||||||
context.commit(storeMutations.UPDATE_EON, eon);
|
context.commit(storeMutations.UPDATE_EON, eon);
|
||||||
context.commit(storeMutations.UPDATE_PARENT_ACCT_NUMBER, accountNumber);
|
context.commit(storeMutations.UPDATE_PARENT_ACCT_NUMBER, parentAccountNumber);
|
||||||
context.commit(storeMutations.UPDATE_SAVED_SESSION_ID, savedSessionId);
|
context.commit(storeMutations.UPDATE_SAVED_SESSION_ID, savedSessionId);
|
||||||
context.commit(storeMutations.UPDATE_CRM_CUSTOMER_ID, crmCustomerId);
|
context.commit(storeMutations.UPDATE_CRM_CUSTOMER_ID, crmCustomerId);
|
||||||
},
|
},
|
||||||
|
|
@ -1029,8 +1030,8 @@ export const actions = {
|
||||||
isVerified: order.payment.insuranceCoverage.isVerified ?? false,
|
isVerified: order.payment.insuranceCoverage.isVerified ?? false,
|
||||||
},
|
},
|
||||||
isInsurance: order.payment.isInsurance ?? false,
|
isInsurance: order.payment.isInsurance ?? false,
|
||||||
|
parentAccountNumber: order.payment.parentAccountNumber,
|
||||||
},
|
},
|
||||||
accountNumber: order.accountNumber,
|
|
||||||
providerNumber: "",
|
providerNumber: "",
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
streetAddress: order.serviceLocation.address,
|
streetAddress: order.serviceLocation.address,
|
||||||
|
|
@ -1055,8 +1056,8 @@ export const actions = {
|
||||||
savedSessionId,
|
savedSessionId,
|
||||||
referralNumber,
|
referralNumber,
|
||||||
referralDate,
|
referralDate,
|
||||||
|
parentAccountNumber,
|
||||||
referralCorrelationId,
|
referralCorrelationId,
|
||||||
accountNumber,
|
|
||||||
isConceptInsurance,
|
isConceptInsurance,
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
|
@ -1070,7 +1071,7 @@ export const actions = {
|
||||||
savedSessionId: savedSessionId?.toString(),
|
savedSessionId: savedSessionId?.toString(),
|
||||||
referralNumber: referralNumber?.toString(),
|
referralNumber: referralNumber?.toString(),
|
||||||
referralDate: referralDate?.toString(),
|
referralDate: referralDate?.toString(),
|
||||||
accountNumber: accountNumber,
|
parentAccountNumber: parentAccountNumber,
|
||||||
referralCorrelationId: referralCorrelationId,
|
referralCorrelationId: referralCorrelationId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -1420,8 +1421,8 @@ export const actions = {
|
||||||
savePaymentType(context, isInsurance) {
|
savePaymentType(context, isInsurance) {
|
||||||
context.commit(storeMutations.UPDATE_IS_INSURANCE, isInsurance);
|
context.commit(storeMutations.UPDATE_IS_INSURANCE, isInsurance);
|
||||||
},
|
},
|
||||||
saveAccountNumber(context, accountNumber) {
|
saveParentAccountNumber(context, parentAccountNumber) {
|
||||||
context.commit(storeMutations.UPDATE_PARENT_ACCT_NUMBER, accountNumber);
|
context.commit(storeMutations.UPDATE_PARENT_ACCT_NUMBER, parentAccountNumber);
|
||||||
},
|
},
|
||||||
saveSupportingItems(context, supportingItems) {
|
saveSupportingItems(context, supportingItems) {
|
||||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, supportingItems);
|
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, supportingItems);
|
||||||
|
|
|
||||||
|
|
@ -235,9 +235,9 @@ describe("Mutations", () => {
|
||||||
isVerified: false,
|
isVerified: false,
|
||||||
},
|
},
|
||||||
isInsurance: false,
|
isInsurance: false,
|
||||||
|
parentAccountNumber: "123456789",
|
||||||
},
|
},
|
||||||
parts: [],
|
parts: [],
|
||||||
accountNumber: "123456789",
|
|
||||||
insuranceInfo: {},
|
insuranceInfo: {},
|
||||||
serviceLocation: {},
|
serviceLocation: {},
|
||||||
customer: {},
|
customer: {},
|
||||||
|
|
@ -761,7 +761,7 @@ describe("Actions", () => {
|
||||||
referralNumber: "123",
|
referralNumber: "123",
|
||||||
referralDate: new Date().toUTCString(),
|
referralDate: new Date().toUTCString(),
|
||||||
referralCorrelationId: "xxx-xxx-xxx",
|
referralCorrelationId: "xxx-xxx-xxx",
|
||||||
accountNumber: "167132",
|
parentAccountNumber: "167132",
|
||||||
savedSessionId: "xxx-xxx-xxx",
|
savedSessionId: "xxx-xxx-xxx",
|
||||||
crmCustomerId: "xxx-xxx-xxx",
|
crmCustomerId: "xxx-xxx-xxx",
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue