commit
aac389ffee
1 changed files with 12 additions and 5 deletions
|
|
@ -202,11 +202,18 @@ export default {
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
const zipCodeData = await this.getZipCodeData(this.serviceZipCode);
|
const zipCodeData = await this.getZipCodeData(this.serviceZipCode);
|
||||||
|
|
||||||
if (vinPagesMixin.methods.isPhoneNumber(this.emailOrSms)) {
|
// if no value due to field being optional, blank both phone and email address
|
||||||
const phone = this.emailOrSms.replace(/[()]/g, "");
|
if (!this.emailOrSms) {
|
||||||
await this.dispatchStoreAction(storeActions.SAVE_PHONE_NUMBER, phone, false);
|
await this.dispatchStoreAction(storeActions.SAVE_PHONE_NUMBER, "", false);
|
||||||
} else {
|
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, "", false);
|
||||||
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailOrSms, false);
|
}
|
||||||
|
else {
|
||||||
|
if (vinPagesMixin.methods.isPhoneNumber(this.emailOrSms)) {
|
||||||
|
const phone = this.emailOrSms.replace(/[()]/g, "");
|
||||||
|
await this.dispatchStoreAction(storeActions.SAVE_PHONE_NUMBER, phone, false);
|
||||||
|
} else {
|
||||||
|
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailOrSms, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.dispatchStoreAction(
|
await this.dispatchStoreAction(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue