diff --git a/src/layouts/payment-method/payment-method.spec.js b/src/layouts/payment-method/payment-method.spec.js
index 65c3b9a11..65191ce6b 100644
--- a/src/layouts/payment-method/payment-method.spec.js
+++ b/src/layouts/payment-method/payment-method.spec.js
@@ -45,6 +45,7 @@ describe("payment-method.vue", () => {
});
function setupMocks() {
+
store.getters = {
damage: {},
lineItems: {
@@ -71,6 +72,13 @@ function setupMocks() {
isNoComp: false,
isItac: false,
},
+ serviceLocation: {
+ appointmentType: "Mobile",
+ address: "123 Test Ave",
+ city: "Anytown",
+ state: "OH",
+ zipCode: "00000",
+ },
},
policy: {
currentDeductible: 123,
@@ -106,6 +114,9 @@ function setupMocks() {
return "false";
}),
+ getCmsContent: jest.fn().mockImplementation(() => {
+ return "test text";
+ }),
},
};
diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue
index fa6fd234c..1efbf00f2 100644
--- a/src/layouts/payment-method/payment-method.vue
+++ b/src/layouts/payment-method/payment-method.vue
@@ -13,7 +13,10 @@
-
+
@@ -612,6 +615,59 @@ export default {
},
},
computed: {
+ AppointmentType() {
+ return this.hasSubmittedOrder()
+ ? this.getSubmittedOrder()?.serviceLocation?.appointmentType
+ : this.$store.getters.order.serviceLocation?.appointmentType;
+ },
+ ServiceLocationFullAddressText() {
+ return `${this.ServiceLocationAddress.toLowerCase()}${this.ServiceLocationAddress2 ? ", " + this.ServiceLocationAddress2 : ""}, ${this.ServiceLocationCity.toLowerCase()}, ${this.ServiceLocationState} ${this.ServiceLocationZipCode}`;
+ },
+ ServiceLocationFullAddress() {
+ if (this.AppointmentType === "Mobile") {
+ return {
+ streetAddress: this.$store.getters.order.serviceLocation?.address,
+ address2: this.$store.getters.order.serviceLocation?.address2,
+ city: this.$store.getters.order.serviceLocation?.city,
+ state: this.$store.getters.order.serviceLocation?.state,
+ zipCode: this.$store.getters.order.serviceLocation?.zipCode,
+ }
+ } else {
+ return this.$store.getters.order.serviceLocation?.provider?.address;
+ }
+ },
+ ServiceLocationAddress() {
+ return this.hasSubmittedOrder()
+ ? this.getSubmittedOrder()?.serviceLocation?.address
+ : this.ServiceLocationFullAddress.streetAddress;
+ },
+ ServiceLocationAddress2() {
+ return this.hasSubmittedOrder()
+ ? this.getSubmittedOrder()?.serviceLocation?.address
+ : this.ServiceLocationFullAddress.address2;
+ },
+ ServiceLocationCity() {
+ return this.hasSubmittedOrder()
+ ? this.getSubmittedOrder()?.serviceLocation?.city
+ : this.ServiceLocationFullAddress.city;
+ },
+ ServiceLocationState() {
+ return this.hasSubmittedOrder()
+ ? this.getSubmittedOrder()?.serviceLocation?.state
+ : this.ServiceLocationFullAddress.state;
+ },
+ ServiceLocationZipCode() {
+ return this.hasSubmittedOrder()
+ ? this.getSubmittedOrder()?.serviceLocation?.zipCode
+ : this.ServiceLocationFullAddress.zipCode;
+ },
+ AppointmentWordingText() {
+ return this.getCmsContent("ApptDetailsSnapshotWidget", "BodyText")
+ ?.replaceAll(
+ "{custom:ADDRESS}",
+ this.ServiceLocationFullAddressText
+ );
+ },
isRecalibrationOnOrder() {
const order = baseMixin.methods.hasSubmittedOrder()
? baseMixin.methods.getSubmittedOrder()
@@ -798,6 +854,17 @@ export default {
diff --git a/src/layouts/payment-method/review-dropdown/review-dropdown.vue b/src/layouts/payment-method/review-dropdown/review-dropdown.vue
index 321599820..ac1301feb 100644
--- a/src/layouts/payment-method/review-dropdown/review-dropdown.vue
+++ b/src/layouts/payment-method/review-dropdown/review-dropdown.vue
@@ -11,6 +11,9 @@
Appointment details
+
+
+
@@ -34,6 +37,7 @@
@@ -62,7 +66,10 @@ import { settleAllPromises } from "@/helpers/layout-helper";
export default {
name: "review-dropdown",
- props: {},
+ props: {
+ apptWordingText: String,
+ serviceLocationFullAddress: String,
+ },
data() {
return {
isExpanded: false,
@@ -130,11 +137,15 @@ export default {
transition: all 350ms ease-in;
overflow: hidden;
visibility: hidden;
+
+ :deep(.service-location) {
+ .review-block-content {
+ text-transform: capitalize;
+ }
+ }
}
.review-toggle {
- margin-bottom: 1rem;
-
&.expanded {
margin-bottom: 0;
}
@@ -156,7 +167,7 @@ export default {
&.expanded:after {
transform: rotate(180deg);
}
- &.expanded + .review-table {
+ &.expanded ~ .review-table {
max-height: 800px;
transition: all 150ms ease-in;
overflow: hidden;
diff --git a/src/layouts/payment-method/review-dropdown/review-sections/service-location-review/service-location-review.spec.js b/src/layouts/payment-method/review-dropdown/review-sections/service-location-review/service-location-review.spec.js
index 7b1429b19..757bd2824 100644
--- a/src/layouts/payment-method/review-dropdown/review-sections/service-location-review/service-location-review.spec.js
+++ b/src/layouts/payment-method/review-dropdown/review-sections/service-location-review/service-location-review.spec.js
@@ -24,7 +24,7 @@ describe("Service Location Review Block", () => {
// Assert
expect(wrapper.vm.displayContent).toEqual([
- "Mobile Address 1, Mobile Address 2, Mobile City, MO 11111",
+ "mobile address 1, mobile address 2, mobile city, MO 11111",
]);
});
@@ -43,7 +43,7 @@ describe("Service Location Review Block", () => {
// Assert
expect(wrapper.vm.displayContent).toEqual([
- "Service Location Address, Service Location City, SL 22222",
+ "service location address, service location city, SL 22222",
]);
});
@@ -62,7 +62,7 @@ describe("Service Location Review Block", () => {
// Assert
expect(wrapper.vm.displayContent).toEqual([
- "Service Location Address, Service Location City, SL 22222",
+ "service location address, service location city, SL 22222",
]);
});
@@ -80,7 +80,7 @@ describe("Service Location Review Block", () => {
await wrapper.vm.$nextTick();
// Assert
- expect(wrapper.vm.displayContent).toEqual(["Mobile Address 1, Mobile City, MO 11111"]);
+ expect(wrapper.vm.displayContent).toEqual(["mobile address 1, mobile city, MO 11111"]);
});
});
@@ -88,9 +88,9 @@ function generateDefaultProps() {
return {
cmsWidgetName: "ServiceLocationTitleWidget",
serviceLocation: {
- address: "Mobile Address 1",
- address2: "Mobile Address 2",
- city: "Mobile City",
+ address: "mobile address 1",
+ address2: "mobile address 2",
+ city: "mobile city",
state: "MO",
zipCode: "11111",
zipCodeCtu: "",
@@ -99,8 +99,8 @@ function generateDefaultProps() {
provider: {
providerNumber: "",
address: {
- streetAddress: "Service Location Address",
- city: "Service Location City",
+ streetAddress: "service location address",
+ city: "service location city",
state: "SL",
zipCode: "22222",
zipCodeCtu: "",
diff --git a/src/layouts/payment-method/review-dropdown/review-sections/service-location-review/service-location-review.vue b/src/layouts/payment-method/review-dropdown/review-sections/service-location-review/service-location-review.vue
index 55e384080..e4fa9ffa3 100644
--- a/src/layouts/payment-method/review-dropdown/review-sections/service-location-review/service-location-review.vue
+++ b/src/layouts/payment-method/review-dropdown/review-sections/service-location-review/service-location-review.vue
@@ -26,9 +26,7 @@ export default {
computed: {
displayContent() {
return [
- `${this.addressInfo.address}${this.addressInfo.address2 ? ", " : ""}${
- this.addressInfo.address2
- }, ${this.addressInfo.city}, ${this.addressInfo.state} ${this.addressInfo.zipCode}`,
+ `${this.addressInfo.address.toLowerCase()}${this.addressInfo.address2 ? ", " : ""}${this.addressInfo.address2.toLowerCase()}, ${this.addressInfo.city.toLowerCase()}, ${this.addressInfo.state} ${this.addressInfo.zipCode}`,
];
},
addressInfo() {