INSR-7759: More payment-method updates

- Updates to how saving/closing contact details affects other fields
- Updates to loading payment method and smsOptIn from store
- Wiper offer panel
This commit is contained in:
Alex Humphries 2026-02-19 16:03:32 -05:00
parent f0ef62597b
commit 7b694f2fc3

View file

@ -261,7 +261,7 @@ export default {
cartTotal() {
return formatAmountInDollars(getCartTotal(this.mainStore.order));
},
isOptedInSMSPreviously() {
hideSMSOptIn() {
return false;
},
smsOptInHeaderText() {
@ -402,10 +402,12 @@ export default {
},
async forwardButtonAction() {
this.mainStore.savePaymentMethodChoice(this.paymentMethod);
const requestTextUpdates = this.smsOptIn === 'Yes';
this.mainStore.updateContactInfo({ requestTextUpdates });
if (requestTextUpdates) {
this.mainStore.updatePhoneNumbers({ alternative: this.smsPhoneNumber, service: this.smsPhoneNumber });
if (!this.hideSMSOptIn) {
const requestTextUpdates = this.smsOptIn === 'Yes';
this.mainStore.updateContactInfo({ requestTextUpdates });
if (requestTextUpdates) {
this.mainStore.updatePhoneNumbers({ alternative: this.smsPhoneNumber, service: this.smsPhoneNumber });
}
}
if (this.paymentMethod === paymentMethods.PAY_AT_TIME_OF_SERVICE) {
try {