Hook into store info
This commit is contained in:
parent
d276740e63
commit
2ae0c0922b
2 changed files with 23 additions and 7 deletions
|
|
@ -12,6 +12,7 @@ export default {
|
||||||
name: "customer-review",
|
name: "customer-review",
|
||||||
props: {
|
props: {
|
||||||
cmsWidgetName: String,
|
cmsWidgetName: String,
|
||||||
|
customer: Object,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
|
|
@ -24,12 +25,26 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
displayContent() {
|
displayContent() {
|
||||||
return [
|
return [
|
||||||
"Taylor Schliff",
|
this.fullName,
|
||||||
"taylor.schliff@email.com",
|
this.email,
|
||||||
"330-415-2879",
|
this.phoneNumber,
|
||||||
"Opted in to text message updates",
|
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: {
|
components: {
|
||||||
reviewBlock,
|
reviewBlock,
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@
|
||||||
|
|
||||||
<customerReview
|
<customerReview
|
||||||
cmsWidgetName="CustomerReviewWidget"
|
cmsWidgetName="CustomerReviewWidget"
|
||||||
|
:customer="customerInfo"
|
||||||
@edit-clicked="editCustomerDetails" />
|
@edit-clicked="editCustomerDetails" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -209,9 +210,9 @@ export default {
|
||||||
appointmentType() {
|
appointmentType() {
|
||||||
return this.$store.getters.order.serviceLocation.appointmentType;
|
return this.$store.getters.order.serviceLocation.appointmentType;
|
||||||
},
|
},
|
||||||
exposeCms() {
|
customerInfo() {
|
||||||
return this.$root.cmsContentByWidget;
|
return this.$store.getters.order.customer;
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
funnelHeader,
|
funnelHeader,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue