'latienda.coop' ids/alts changed
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="welcome">
|
||||
<div class="text-container">
|
||||
<h1>Bienvenido/a {{ userName }}</h1>
|
||||
<br />
|
||||
<p>
|
||||
Su formulario se ha recibido correctamente debe confirmar su correo
|
||||
electronico para activar su cuenta.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
computed: {
|
||||
userName() {
|
||||
return this.$route.params.name
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.welcome {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
font-family: $font-primary;
|
||||
color: $color-navy;
|
||||
font-weight: $regular;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.text-container {
|
||||
max-width: 500px;
|
||||
p,
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,124 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<FormHeader title="Registro de Usuario" />
|
||||
<form class="form" @submit.prevent="userRegister">
|
||||
<FormInput
|
||||
v-model="register.email"
|
||||
class="input"
|
||||
required
|
||||
type="text"
|
||||
label-text="Email"
|
||||
@input="register.email = $event"
|
||||
/>
|
||||
<FormInput
|
||||
v-model="register.full_name"
|
||||
class="input"
|
||||
required
|
||||
type="text"
|
||||
label-text="Nombre completo"
|
||||
@input="register.full_name = $event"
|
||||
/>
|
||||
|
||||
<FormInput
|
||||
|
||||
class="input"
|
||||
required
|
||||
type="password"
|
||||
label-text="Contraseña"
|
||||
@input="register.password = $event"
|
||||
/>
|
||||
|
||||
<small v-if="error" class="text-danger" >{{ error }}</small>
|
||||
|
||||
<SubmitButton text="registrar" image-url="" />
|
||||
</form>
|
||||
|
||||
<p class="help" align="center">
|
||||
*Si quieres que tu cooperativa forme parte de este proyecto registrate en
|
||||
el siguiente
|
||||
<NuxtLink to="/registro/cooperativa"><b>formulario</b></NuxtLink
|
||||
>.
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
setup() {
|
||||
definePageMeta({
|
||||
layout: 'main',
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
error: null,
|
||||
register: {
|
||||
email: '',
|
||||
full_name: '',
|
||||
password: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async userRegister() {
|
||||
this.error = null
|
||||
const config = useRuntimeConfig()
|
||||
try {
|
||||
const response = await $fetch('/users/', {
|
||||
baseURL: config.public.baseURL,
|
||||
method: 'POST',
|
||||
body: JSON.stringify(this.register),
|
||||
})
|
||||
if (response) {
|
||||
this.$router.push(`/registro/bienvenidausuario/${this.register.full_name}`)
|
||||
}
|
||||
} catch (err) {
|
||||
if (err?.response?.status === 404) {
|
||||
this.error = 'Usuario no encontrado'
|
||||
} else {
|
||||
this.error = 'Ha habido un error'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
margin-top: 5rem;
|
||||
margin-bottom: 5rem;
|
||||
|
||||
@include mobile {
|
||||
margin-top: 7rem;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 80px;
|
||||
|
||||
@include mobile {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.checkbox-container {
|
||||
text-align: left;
|
||||
}
|
||||
// input[type='checkbox'] {
|
||||
// margin-left: 10px;
|
||||
// }
|
||||
}
|
||||
|
||||
.help {
|
||||
color: $color-navy;
|
||||
margin-bottom: 80px;
|
||||
font-size: $m;
|
||||
@include mobile {
|
||||
font-size: $s;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user