Merge pull request #651 from Safelite/feature/SSR-1174

open links in new tab
This commit is contained in:
katiekroell 2024-04-25 16:54:24 -04:00 committed by GitHub
commit 120dee716c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,20 +70,22 @@
:cmsWidgetName="widget.notesQuestion" :cmsWidgetName="widget.notesQuestion"
maxLength="250" maxLength="250"
:inputRows="4" /> :inputRows="4" />
<p ref="disclaimerText" class="caption dark-gray mt-6"> <p
ref="disclaimerText"
class="caption dark-gray mt-6">
{{ textUpdateDisclaimerText }} I also agree to {{ textUpdateDisclaimerText }} I also agree to
Safelite's Safelite's
<textLink <textLink
ref="privacyPolicyLink" ref="privacyPolicyLink"
class="normal-line-height" class="normal-line-height"
linkType="text" linkType="newWindowLink"
text="Privacy Policy" text="Privacy Policy"
href="//www.safelite.com/privacy-center" /> href="//www.safelite.com/privacy-center" />
and and
<textLink <textLink
ref="termsOfUseLink" ref="termsOfUseLink"
class="normal-line-height" class="normal-line-height"
linkType="text" linkType="newWindowLink"
text="Terms of Use" text="Terms of Use"
href="//www.safelite.com/terms-of-use" />. href="//www.safelite.com/terms-of-use" />.
</p> </p>
@ -128,7 +130,7 @@ export default {
siteFooter, siteFooter,
// eslint-disable-next-line vue/no-reserved-component-names // eslint-disable-next-line vue/no-reserved-component-names
Form, Form,
textLink, textLink
}, },
mixins: [BaseFormMixin], mixins: [BaseFormMixin],
async beforeRouteEnter(to, from, next) { async beforeRouteEnter(to, from, next) {
@ -145,7 +147,7 @@ export default {
emailAddress, emailAddress,
servicePhone, servicePhone,
requestTextUpdates, requestTextUpdates,
notesForTechnician, notesForTechnician
} = useMainStore().contactInfo; } = useMainStore().contactInfo;
return { return {
firstName, firstName,
@ -164,14 +166,14 @@ export default {
requestTextUpdates: 'TextContentWidget', requestTextUpdates: 'TextContentWidget',
notesQuestion: 'NotesQuestionWidget', notesQuestion: 'NotesQuestionWidget',
disclaimer: 'TextUpdateDisclaimerWidget', disclaimer: 'TextUpdateDisclaimerWidget',
siteFooter: 'SiteFooterWidget', siteFooter: 'SiteFooterWidget'
}, },
rules: { rules: {
firstName: globalRules.FIRST_NAME_REQUIRED, firstName: globalRules.FIRST_NAME_REQUIRED,
lastName: globalRules.LAST_NAME_REQUIRED, lastName: globalRules.LAST_NAME_REQUIRED,
emailAddress: `${globalRules.EMAIL_ADDRESS_REQUIRED}|${globalRules.EMAIL_ADDRESS_FORMAT}`, emailAddress: `${globalRules.EMAIL_ADDRESS_REQUIRED}|${globalRules.EMAIL_ADDRESS_FORMAT}`,
phoneNumber: `${globalRules.PHONE_NUMBER_REQUIRED}|${globalRules.PHONE_NUMBER_FORMAT}`, phoneNumber: `${globalRules.PHONE_NUMBER_REQUIRED}|${globalRules.PHONE_NUMBER_FORMAT}`
}, }
}; };
}, },
computed: { computed: {
@ -192,7 +194,7 @@ export default {
}, },
phoneMask() { phoneMask() {
return MaskaFormattedMasks.PHONE_NUMBER; return MaskaFormattedMasks.PHONE_NUMBER;
}, }
}, },
methods: { methods: {
/** /**
@ -204,32 +206,32 @@ export default {
lastName: this.lastName, lastName: this.lastName,
emailAddress: this.emailAddress, emailAddress: this.emailAddress,
requestTextUpdates: this.requestTextUpdates, requestTextUpdates: this.requestTextUpdates,
notesForTechnician: this.notesForTechnician, notesForTechnician: this.notesForTechnician
}; };
useMainStore().updateContactInfo(contactInfo); useMainStore().updateContactInfo(contactInfo);
if (this.requestTextUpdates) { if (this.requestTextUpdates) {
useMainStore().updatePhoneNumbers({ useMainStore().updatePhoneNumbers({
service: this.phoneNumber, service: this.phoneNumber,
alternative: this.phoneNumber, alternative: this.phoneNumber
}); });
} else { } else {
useMainStore().updatePhoneNumbers({ useMainStore().updatePhoneNumbers({
home: this.phoneNumber, home: this.phoneNumber,
service: this.phoneNumber, service: this.phoneNumber
}); });
} }
const scenario = const scenario =
useMainStore().order.serviceLocation.IsSafeliteProvider === useMainStore().order.serviceLocation.IsSafeliteProvider
false === false
? this.navigationScenarios ? this.navigationScenarios
.CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP .CLICKED_FORWARD_WITH_NON_SAFELITE_SHOP
: this.navigationScenarios : this.navigationScenarios
.CLICKED_FORWARD_WITH_SAFELITE_SHOP; .CLICKED_FORWARD_WITH_SAFELITE_SHOP;
this.$router.navigate(scenario, this.$route); this.$router.navigate(scenario, this.$route);
}, }
}, }
}; };
</script> </script>