mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-15 01:14:43 +00:00
Trigger email db mutation on click 'Send Mail'
This commit is contained in:
parent
1a9c8f22a6
commit
57fec436da
@ -208,8 +208,9 @@ export default {
|
||||
|
||||
try {
|
||||
const response = await this.$apollo.mutate({ mutation, variables }) // e-mail is send in emailMiddleware of backend
|
||||
console.log('handleSubmitVerify !!! response: ', response, ' this.sliderData.sliders[this.sliderIndex]: ', this.sliderData.sliders[this.sliderIndex])
|
||||
this.sliderData.sliders[this.sliderIndex].data.response = response.data
|
||||
// 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) {
|
||||
this.sliderData.collectedInputData.emailSend = true
|
||||
|
||||
@ -8,6 +8,9 @@ const plugins = [
|
||||
(app = {}) => {
|
||||
app.$apollo = {
|
||||
mutate: (data) => {
|
||||
if (JSON.stringify(data).includes('UpdateUser')) {
|
||||
return { data: { UpdateUser: { id: data.variables.id, locale: data.variables.locale } } }
|
||||
}
|
||||
if (JSON.stringify(data).includes('Signup')) {
|
||||
return { data: { Signup: { email: data.variables.email } } }
|
||||
}
|
||||
|
||||
@ -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 :sliderData="sliderData" :sendEmail="sendEmail" :invitation="false" />
|
||||
<registration-item-enter-email ref="RegistrationItemEnterEmail" :sliderData="sliderData" :sendEmail="sendEmail" :invitation="false" />
|
||||
</template>
|
||||
|
||||
<template
|
||||
@ -209,7 +209,8 @@ export default {
|
||||
if (this.sliderData.sliders[this.sliderIndex].name === 'enter-email') {
|
||||
// this.sliderData.sliders[this.sliderIndex].button.clicked = true
|
||||
this.sendEmail = true
|
||||
console.log('buttonCallback !!! this.sendEmail', this.sendEmail)
|
||||
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()
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
},
|
||||
"email": {
|
||||
"form": {
|
||||
"success": "Gültige E-Mail Adresse <b>{email}</b>!"
|
||||
"success": "Verifikations-E-Mail gesendet an <b>{email}</b>!"
|
||||
}
|
||||
},
|
||||
"invite-code": {
|
||||
|
||||
@ -163,7 +163,7 @@
|
||||
},
|
||||
"email": {
|
||||
"form": {
|
||||
"success": "Valid e-mail address <b>{email}</b>!"
|
||||
"success": "Verification e-mail send to <b>{email}</b>!"
|
||||
}
|
||||
},
|
||||
"invite-code": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user