Implement db mutation in createUserAccount and cleanup

This commit is contained in:
Wolfgang Huß 2021-02-27 19:04:12 +01:00
parent 1add3bde86
commit ac3a1685b2
4 changed files with 6 additions and 47 deletions

View File

@ -23,7 +23,7 @@
</ds-space>
</div>
<div v-else class="create-account-card">
<!-- <ds-space margin-top="large">
<!-- Wolle <ds-space margin-top="large">
<ds-heading size="h3">
{{ $t('components.registration.create-user-account.title') }}
</ds-heading>
@ -121,23 +121,6 @@
v-html="$t('components.registration.signup.form.no-political')"
></label>
</ds-text>
<!-- Wolle <base-button
style="float: right"
icon="check"
type="submit"
filled
:loading="$apollo.loading"
:disabled="
errors ||
!termsAndConditionsConfirmed ||
!dataPrivacy ||
!minimumAge ||
!noCommercial ||
!noPolitical
"
>
{{ $t('actions.save') }}
</base-button> -->
</template>
</ds-form>
</div>
@ -183,7 +166,7 @@ export default {
},
...passwordForm.formSchema,
},
response: null,
response: null, // Wolle
// TODO: Our styleguide does not support checkmarks.
// Integrate termsAndConditionsConfirmed into `this.formData` once we
// have checkmarks available.
@ -301,7 +284,6 @@ export default {
},
async submit() {
const { name, password, about } = this.formData
// Wolle const { email, nonce } = this
const { email, nonce } = this.sliderData.collectedInputData
const termsAndConditionsAgreedVersion = VERSION
const locale = this.$i18n.locale()
@ -330,6 +312,7 @@ export default {
}
},
onNextClick() {
this.submit()
return true
},
},

View File

@ -32,19 +32,8 @@
name="email"
icon="envelope"
/>
<!-- Wolle <base-button
:disabled="disabled"
:loading="$apollo.loading"
filled
name="submit"
type="submit"
icon="envelope"
>
{{ $t('components.registration.signup.form.submit') }}
</base-button> -->
<slot></slot>
<ds-text v-if="sliderData.collectedInputData.emailSend">
<!-- Wolle <ds-text v-if="sliderData.collectedInputData.emailSend"> -->
<input id="checkbox" type="checkbox" v-model="sendEmailAgain" :checked="sendEmailAgain" />
<label for="checkbox0">
<!-- Wolle {{ $t('termsAndConditions.termsAndConditionsConfirmed') }} -->
@ -120,8 +109,6 @@ export default {
// Integrate termsAndConditionsConfirmed into `this.formData` once we
// have checkmarks available.
sendEmailAgain: false,
// Wolle disabled: true,
// Wolle data: null,
error: null, // Wolle
}
},

View File

@ -22,9 +22,6 @@
<ds-text>
{{ $t('components.enter-nonce.form.description') }}
</ds-text>
<!-- Wolle <base-button :disabled="disabled" filled name="submit" type="submit">
{{ $t('components.enter-nonce.form.next') }}
</base-button> -->
<slot></slot>
</ds-form>
</template>
@ -49,7 +46,6 @@ export default {
message: this.$t('components.enter-nonce.form.validations.length'),
},
},
// Wolle disabled: true,
}
},
mounted: function () {
@ -89,22 +85,12 @@ export default {
})
},
async handleInput() {
// this.disabled = true
// this.sliderData.setSliderValuesCallback(false)
this.sendValidation()
},
async handleInputValid() {
// this.disabled = false
// const { nonce } = this.formData
// validate in backend?
// toaster?
// this.sliderData.setSliderValuesCallback(true, { nonce })
this.sendValidation()
},
handleSubmitVerify() {
// const { nonce } = this.formData
// const email = this.email
// this.$emit('nonceEntered', { email, nonce })
},
onNextClick() {
return true

View File

@ -17,6 +17,9 @@ const plugins = [
if (JSON.stringify(data).includes('SignupByInvitation')) {
return { data: { SignupByInvitation: { email: data.variables.email } } }
}
if (JSON.stringify(data).includes('SignupVerification')) {
return { data: { SignupByInvitation: { ...data.variables } } }
}
throw new Error(`Mutation name not found!`)
},
query: (data) => {