Skip to content

Commit

Permalink
fix: radio button was not displayed and validation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bedon committed May 30, 2024
1 parent a79a2d0 commit b8bb684
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pages/LoginAndRegister/RegisterSocial.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ import SystemPage from '@/components/SystemFrame/SystemPage';
import strategicPartnerLoginInfoByPageIdQuery from '@/graphql/query/strategicPartnerLoginInfoByPageId.graphql';
import experimentVersionFragment from '@/graphql/fragments/experimentVersion.graphql';
import { trackExperimentVersion } from '@/util/experiment/experimentUtils';
import UserUpdatesPreference from '@/components/Checkout/UserUpdatesPreference';
import KvButton from '~/@kiva/kv-components/vue/KvButton';
const COMMS_OPT_IN_EXP_KEY = 'opt_in_comms';
Expand All @@ -175,6 +176,7 @@ export default {
KvButton,
ReCaptchaEnterprise,
SystemPage,
UserUpdatesPreference,
},
mixins: [
validationMixin,
Expand Down Expand Up @@ -207,6 +209,7 @@ export default {
fetchedLogoAltText: null,
fetchedLogoUrl: null,
enableCommsExperiment: false,
needsComms: true,
selectedComms: '',
enableRadioBtnExperiment: false,
};
Expand Down Expand Up @@ -259,7 +262,7 @@ export default {
checked: val => val,
};
}
if (this.enableRadioBtnExperiment) {
if (this.needsComms) {
validations.selectedComms = {
required,
checked: val => val !== '',
Expand Down Expand Up @@ -300,6 +303,7 @@ export default {
}
if (this.$route.query.passwordless) {
this.passwordless = true;
this.needsComms = false;
}
// Support legacy behavior of this page, which was to show the terms checkbox only
if (!this.$route.query.terms
Expand Down Expand Up @@ -331,6 +335,10 @@ export default {
this.enableRadioBtnExperiment = true;
this.newAcctTerms = true;
}
if (version !== 'c') {
this.needsComms = false;
}
}
},
apollo: {
Expand Down

0 comments on commit b8bb684

Please sign in to comment.