mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Cleanup
This commit is contained in:
parent
57fec436da
commit
b747c1ca42
@ -92,7 +92,6 @@ export default {
|
||||
},
|
||||
props: {
|
||||
sliderData: { type: Object, required: true },
|
||||
sendEmail: { type: Boolean, required: true },
|
||||
token: { type: String, default: null }, // Wolle not used???
|
||||
invitation: { type: Boolean, default: false },
|
||||
},
|
||||
@ -121,9 +120,6 @@ export default {
|
||||
? this.sliderData.collectedInputData.email
|
||||
: ''
|
||||
this.sendValidation()
|
||||
|
||||
// this.sliderData.sliders[this.sliderIndex].button.clickCallback = this.handleSubmitVerify
|
||||
// this.sliderData.sliders[this.sliderIndex].button.installClickCallback(this.handleSubmitVerify)
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
@ -138,34 +134,6 @@ export default {
|
||||
return isEmail(this.formData.email)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
sendEmail(value) {
|
||||
console.log('sendEmail !!!')
|
||||
if (value) {
|
||||
console.log('value: ', value)
|
||||
this.handleSubmitVerify()
|
||||
this.sendEmail = false
|
||||
}
|
||||
},
|
||||
// sliderData(sliderData) {
|
||||
// console.log('sliderData !!! clicked: ', sliderData.sliders[this.sliderIndex].button.clicked)
|
||||
// if (sliderData.sliders[this.sliderIndex].button.clicked) {
|
||||
// this.handleSubmitVerify()
|
||||
// }
|
||||
// },
|
||||
// sliderData: {
|
||||
// handler(sliderData) {
|
||||
// console.log('sliderData handler !!!')
|
||||
// if (sliderData.sliders[this.sliderIndex].button.clicked) {
|
||||
// console.log('sliderData handler !!! clicked: ', sliderData.sliders[this.sliderIndex].button.clicked)
|
||||
// this.sliderData.sliders[this.sliderIndex].button.clicked = false
|
||||
// this.handleSubmitVerify()
|
||||
// }
|
||||
// },
|
||||
// deep: true,
|
||||
// immediate: true,
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
async sendValidation() {
|
||||
if (this.formData.email && isEmail(this.formData.email)) {
|
||||
@ -174,15 +142,6 @@ export default {
|
||||
const { email } = this.formData
|
||||
const value = { email }
|
||||
|
||||
// let validated = false
|
||||
// if (this.validInput) {
|
||||
// await this.handleSubmitVerify()
|
||||
// if (this.sliderData.sliders[this.sliderIndex].data.response) {
|
||||
// const {email: respnseEmail} = this.sliderData.sliders[this.sliderIndex].data.response.Signup || this.sliderData.sliders[this.sliderIndex].data.response.SignupByInvitation
|
||||
// validated = (email === respnseEmail)
|
||||
// }
|
||||
// }
|
||||
// this.sliderData.validateCallback(validated, value)
|
||||
this.sliderData.validateCallback(this.validInput, value)
|
||||
},
|
||||
async handleInput() {
|
||||
@ -204,12 +163,10 @@ export default {
|
||||
!this.sliderData.sliders[this.sliderIndex].data.request.variables.is(variables))
|
||||
)
|
||||
{
|
||||
this.sliderData.sliders[this.sliderIndex].data.request = { variables }
|
||||
this.sliderData.sliders[this.sliderIndex].data = {...this.sliderData.sliders[this.sliderIndex].data, request: { variables }}
|
||||
|
||||
try {
|
||||
const response = await this.$apollo.mutate({ mutation, variables }) // e-mail is send in emailMiddleware of backend
|
||||
// this.sliderData.sliders[this.sliderIndex].data.response = response.data
|
||||
// this.sliderData.sliders[this.sliderIndex].data.response = { Signup: { email } }
|
||||
this.sliderData.sliders[this.sliderIndex].data = {...this.sliderData.sliders[this.sliderIndex].data, response: response.data}
|
||||
|
||||
if (this.sliderData.sliders[this.sliderIndex].data.response) {
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
>
|
||||
<!-- Wolle !!! may create same source with 'webapp/pages/registration/signup.vue' -->
|
||||
<!-- <signup v-if="publicRegistration" :invitation="false" @submit="handleSubmitted"> -->
|
||||
<registration-item-enter-email ref="RegistrationItemEnterEmail" :sliderData="sliderData" :sendEmail="sendEmail" :invitation="false" />
|
||||
<registration-item-enter-email ref="RegistrationItemEnterEmail" :sliderData="sliderData" :invitation="false" />
|
||||
</template>
|
||||
|
||||
<template
|
||||
@ -104,9 +104,6 @@ export default {
|
||||
title: this.enterEmailButtonTitle(this.overwriteSliderData.emailSend), // Wolle
|
||||
icon: 'envelope',
|
||||
callback: this.buttonCallback,
|
||||
// clicked: false,
|
||||
installClickCallback: this.installClickCallback, // set by component
|
||||
clickCallback: null, // set by component
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -176,7 +173,6 @@ export default {
|
||||
validateCallback: this.validateCallback,
|
||||
...this.overwriteSliderData,
|
||||
},
|
||||
sendEmail: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -188,9 +184,6 @@ export default {
|
||||
enterEmailButtonTitle(emailSend) {
|
||||
return emailSend ? 'Resend E-Mail' : 'Send E-Mail'
|
||||
},
|
||||
installClickCallback(clickCallback) {
|
||||
this.sliderData.sliders[this.sliderIndex].button.clickCallback = clickCallback
|
||||
},
|
||||
validateCallback(isValid, data = null) {
|
||||
this.sliderData.sliders[this.sliderIndex].validated = isValid
|
||||
if (data) {
|
||||
@ -207,14 +200,7 @@ export default {
|
||||
},
|
||||
buttonCallback() {
|
||||
if (this.sliderData.sliders[this.sliderIndex].name === 'enter-email') {
|
||||
// this.sliderData.sliders[this.sliderIndex].button.clicked = true
|
||||
this.sendEmail = true
|
||||
console.log('buttonCallback !!! ', this.sliderData.sliders[this.sliderIndex].data)
|
||||
this.$refs.RegistrationItemEnterEmail.handleSubmitVerify()
|
||||
// if (this.sliderData.sliders[this.sliderIndex].button.clickCallback) {
|
||||
// console.log('buttonCallback !!! clicked')
|
||||
// this.sliderData.sliders[this.sliderIndex].button.clickCallback()
|
||||
// }
|
||||
this.sliderData.sliders[this.sliderIndex].button.title = this.enterEmailButtonTitle(this.sliderData.collectedInputData.emailSend)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user