parent
36baf174a5
commit
18d1ddacf7
|
@ -219,16 +219,30 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, reactive, watch } from "vue";
|
||||
import { computed, ref, reactive, defineProps } from "vue";
|
||||
import axios from "redaxios";
|
||||
import isEmail from 'validator/es/lib/isEmail';
|
||||
import isMobilePhone from 'validator/es/lib/isMobilePhone';
|
||||
import isPostalCode from 'validator/es/lib/isPostalCode';
|
||||
import { useToast } from "vue-toastification";
|
||||
|
||||
const props = defineProps({
|
||||
token: String
|
||||
})
|
||||
if (props.token) {
|
||||
axios.get(`${config.baseurl}api/organizations/selfservice/${props.token}`)
|
||||
.then(({ data }) => {
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
let userdetails = ref({ firstname: "", lastname: "", middlename: "", mail: "", phone: "", address: { street: "", address2: "", city: "", zipcode: "" } });
|
||||
let provide_address = ref(false);
|
||||
let agb_accepted = ref(false);
|
||||
let firma = ref("");
|
||||
//
|
||||
const state = reactive({
|
||||
submit_enabled: computed(() => agb_accepted.value === true && (isMobilePhone(userdetails.value.phone) || !userdetails.value.phone.trim()) && isEmail(userdetails.value.mail)
|
||||
|
|
|
@ -36,6 +36,7 @@ if (typeof config !== 'undefined') {
|
|||
{ path: '/imprint', component: Imprint },
|
||||
{ path: '/privacy', component: Privacy },
|
||||
{ path: '/register', component: Register },
|
||||
{ path: '/register/:token', component: Register, props: true },
|
||||
{ path: '/profile', component: Profile }
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue