diff --git a/client/src/hep-client/index.js b/client/src/hep-client/index.js new file mode 100644 index 00000000..56f4a4eb --- /dev/null +++ b/client/src/hep-client/index.js @@ -0,0 +1,11 @@ +import * as axios from 'axios' + +const hepBaseUrl = 'https://stage.hep-verlag.ch'; + +export function register(registrationData) { + return axios.post(`${hepBaseUrl}/rest/deutsch/V1/customers`, registrationData); +} + +export function login(username, password) { + return axios.post(`${hepBaseUrl}/rest/deutsch/V1/customers`, {username, password}); +} diff --git a/client/src/main.js b/client/src/main.js index 63336b3e..89f42ff4 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -11,7 +11,7 @@ import store from '@/store/index' import VueScrollTo from 'vue-scrollto'; import VueAnalytics from 'vue-analytics'; import {Validator, install as VeeValidate} from 'vee-validate/dist/vee-validate.minimal.esm.js'; -import {required, min} from 'vee-validate/dist/rules.esm.js'; +import {required, min, decimal} from 'vee-validate/dist/rules.esm.js'; import veeDe from 'vee-validate/dist/locale/de'; import {dateFilter} from './filters/date-filter'; import autoGrow from '@/directives/auto-grow' @@ -76,6 +76,7 @@ const apolloProvider = new VueApollo({ Validator.extend('required', required); Validator.extend('min', min); +Validator.extend('decimal', decimal); const dict = { custom: { @@ -91,6 +92,7 @@ const dict = { Validator.localize('de', veeDe) Validator.localize('de', dict) + // https://github.com/baianat/vee-validate/issues/51 Validator.extend('strongPassword', { getMessage: field => 'Das Passwort muss Grossbuchstaben, Zahlen und Sonderzeichen beinhalten', diff --git a/client/src/pages/check-email.vue b/client/src/pages/check-email.vue new file mode 100644 index 00000000..d983c3ec --- /dev/null +++ b/client/src/pages/check-email.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/client/src/pages/registration.vue b/client/src/pages/registration.vue index 7ff3d1b8..08f71c22 100644 --- a/client/src/pages/registration.vue +++ b/client/src/pages/registration.vue @@ -2,6 +2,23 @@

Registrieren Sie ihr persönliches Konto.

+
+ + +
{{ error }}
- + {{ errors.first('licenseKey') }} + data-cy="address-local-errors" + >{{ errors.first('address') }} {{ error }} +
+
+ + + {{ errors.first('zipCode') }} + {{ error }} +
+
+ + + {{ errors.first('city') }} + {{ error }}
@@ -122,7 +191,8 @@