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",
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@
|
|||
|
||||
<customerReview
|
||||
cmsWidgetName="CustomerReviewWidget"
|
||||
:customer="customerInfo"
|
||||
@edit-clicked="editCustomerDetails" />
|
||||
</div>
|
||||
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue