Commit changed values to store on submit.

This commit is contained in:
Chloe Herd 2023-08-15 13:22:15 -04:00
parent 505000fd32
commit 0cddad3cf4

View file

@ -105,7 +105,17 @@ export default {
}, },
async setContactDetails() { async setContactDetails() {
if (this.haveCustomerDetailsChanged) { if (this.haveCustomerDetailsChanged) {
console.log("change detected"); await this.dispatchStoreAction(
this.storeActions.SAVE_CUSTOMER_DETAILS,
{
firstName: this.firstName,
lastName: this.lastName,
emailAddress: this.emailAddress,
phoneNumber: this.phoneNumber,
isSmsOptIn: this.isSmsOptIn,
},
false
);
} }
this.closeModal(); this.closeModal();