From 2ae0c0922bd93286a5b39150a84cbeab4dc7586f Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Thu, 10 Aug 2023 12:40:41 -0400 Subject: [PATCH] Hook into store info --- .../customer-review/customer-review.vue | 23 +++++++++++++++---- src/layouts/review/review.vue | 7 +++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/layouts/review/review-sections/customer-review/customer-review.vue b/src/layouts/review/review-sections/customer-review/customer-review.vue index 1f0b9e2d0..25c8f91dd 100644 --- a/src/layouts/review/review-sections/customer-review/customer-review.vue +++ b/src/layouts/review/review-sections/customer-review/customer-review.vue @@ -12,6 +12,7 @@ export default { name: "customer-review", props: { cmsWidgetName: String, + customer: Object, }, data() { return {}; @@ -24,12 +25,26 @@ export default { computed: { displayContent() { return [ - "Taylor Schliff", - "taylor.schliff@email.com", - "330-415-2879", - "Opted in to text message updates", + this.fullName, + this.email, + this.phoneNumber, + this.smsOptIn, ]; }, + fullName() { + return `${this.customer?.firstName} ${this.customer?.lastName}`; + }, + email() { + return this.customer?.emailAddress; + }, + phoneNumber() { + return this.customer?.phoneNumber; + }, + smsOptIn() { + return this.customer?.isSmsOptIn + ? "Opted in to text message updates" + : "Opted out of text message updates"; + } }, components: { reviewBlock, diff --git a/src/layouts/review/review.vue b/src/layouts/review/review.vue index 82057ffe4..72847998c 100644 --- a/src/layouts/review/review.vue +++ b/src/layouts/review/review.vue @@ -81,6 +81,7 @@ @@ -209,9 +210,9 @@ export default { appointmentType() { return this.$store.getters.order.serviceLocation.appointmentType; }, - exposeCms() { - return this.$root.cmsContentByWidget; - }, + customerInfo() { + return this.$store.getters.order.customer; + } }, components: { funnelHeader,