Fix linting and clean up

This commit is contained in:
Wolfgang Huß 2021-02-10 18:23:33 +01:00
parent 197e6ab6d7
commit b09766a0a2
7 changed files with 14 additions and 25 deletions

View File

@ -58,8 +58,6 @@ export default {
return this.sliderData.sliderIndex // have a shorter notation
},
},
methods: {
},
}
</script>

View File

@ -37,7 +37,8 @@
@input="handleInput"
@input-valid="handleInputValid"
>
<!-- <template v-slot="{ errors }"> --> <!-- leave this here in case the scoped variable is needed in the future nobody would remember this -->
<!-- leave this here in case the scoped variable is needed in the future nobody would remember this -->
<!-- <template v-slot="{ errors }"> -->
<template>
<ds-input
id="name"
@ -238,7 +239,6 @@ export default {
this.minimumAge &&
this.noCommercial &&
this.noPolitical
console.log('valid : ', isValid)
return isValid
},
},

View File

@ -14,7 +14,10 @@
: $t('components.registration.signup.title', metadata)
}}
</h1> -->
<ds-text v-if="token" v-html="$t('registration.signup.form.invitation-code', { code: token })" />
<ds-text
v-if="token"
v-html="$t('registration.signup.form.invitation-code', { code: token })"
/>
<ds-text>
{{
invitation
@ -127,23 +130,19 @@ export default {
return this.$t('components.registration.signup.form.success', { email })
},
valid() {
let isValid
if (isEmail(this.formData.email)) {
this.formData.email = normalizeEmail(this.formData.email)
isValid = true
} else {
isValid = false
}
const isValid = isEmail(this.formData.email)
return isValid
},
},
methods: {
sendValidation() {
if (this.formData.email && isEmail(this.formData.email)) {
this.formData.email = normalizeEmail(this.formData.email)
}
const { email } = this.formData
const value = {
email,
}
// console.log('sendValidation !!! value: ', value)
this.sliderData.validateCallback(this.valid, value)
},
handleInput() {

View File

@ -46,7 +46,6 @@ export default {
mounted: function () {
this.$nextTick(function () {
// Code that will run only after the entire view has been rendered
console.log('mounted !!! this.sliderData.collectedInputData.inviteCode: ', this.sliderData.collectedInputData.inviteCode)
this.formData.inviteCode = this.sliderData.collectedInputData.inviteCode
? this.sliderData.collectedInputData.inviteCode
: ''
@ -55,8 +54,7 @@ export default {
},
computed: {
valid() {
const isValid =
this.formData.inviteCode.length === 6
const isValid = this.formData.inviteCode.length === 6
return isValid
},
},

View File

@ -64,8 +64,7 @@ export default {
},
computed: {
valid() {
const isValid =
this.formData.nonce.length === 6
const isValid = this.formData.nonce.length === 6
return isValid
},
},

View File

@ -11,8 +11,7 @@ storiesOf('RegistrationSlider', module)
.add('invite-code empty', () => ({
components: { RegistrationSlider },
store: helpers.store,
data: () => ({
}),
data: () => ({}),
template: `
<registration-slider registrationType="invite-code" />
`,
@ -48,8 +47,7 @@ storiesOf('RegistrationSlider', module)
.add('public-registration empty', () => ({
components: { RegistrationSlider },
store: helpers.store,
data: () => ({
}),
data: () => ({}),
template: `
<registration-slider registrationType="public-registration" />
`,

View File

@ -60,7 +60,6 @@
import links from '~/constants/links.js'
import metadata from '~/constants/metadata.js'
import ComponentSlider from '~/components/ComponentSlider/ComponentSlider'
import HcEmpty from '~/components/Empty/Empty'
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
import RegistrationItemCreateUserAccount from './RegistrationItemCreateUserAccount'
import RegistrationItemEnterEmail from '~/components/Registration/RegistrationItemEnterEmail'
@ -71,7 +70,6 @@ export default {
name: 'RegistrationSlider',
components: {
ComponentSlider,
HcEmpty,
LocaleSwitch,
RegistrationItemCreateUserAccount,
RegistrationItemEnterEmail,
@ -198,7 +196,6 @@ export default {
},
buttonCallback() {
if (this.sliderData.sliders[this.sliderIndex].name === 'enter-email') {
console.log('buttonCallback !!! enter-email')
this.sliderData.collectedInputData.emailSend = true
this.sliderData.sliders[this.sliderIndex].button.title = 'Resend E-Mail' // Wolle
}