resgitro cooperativa & bienvenida

This commit is contained in:
María
2025-09-10 14:41:41 +02:00
parent b6358f30b9
commit 07251e1b83
5 changed files with 75 additions and 31 deletions

View File

@@ -42,8 +42,8 @@
</div> -->
<p class="help" align="center">
*¿Todavía no formas parte de Consumo Cuidado?
<NuxtLink to="/registro"><b>Únete</b></NuxtLink
¿Todavía no formas parte de Consumo Cuidado?
<NuxtLink to="/registro/cooperativa"><b>Únete</b></NuxtLink
>.
</p>

View File

@@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container-fluid">
<div class="welcome">
<div class="text-container">
<h1>¡Bienvenida!</h1>
@@ -19,12 +19,30 @@ export default {}
</script>
<style lang="scss" scoped>
.container-fluid {
margin-top: 5rem;
margin-bottom: 5rem;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background: linear-gradient($color-consumo-base-light, $color-bg-light);
border-radius: 1rem;
padding: 2rem;
gap: 3rem;
margin: 2rem 0 4rem;
color: $color-primary;
@include mobile {
margin-top: 7rem;
}
}
.welcome {
position: relative;
width: 100%;
height: 600px;
font-family: $font-primary;
color: $color-navy;
color: $color-primary;
font-weight: 400;
display: flex;
flex-direction: column;

View File

@@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container-fluid">
<FormHeader title="Registro de Cooperativa" />
<form class="form" @submit.prevent="userRegister">
<FormInput
@@ -64,22 +64,22 @@
<!-- {{ register }} -->
<SubmitButton text="registrar" image-url="" />
</form>
<p class="help" align="center">
<!-- <p class="help" align="center">
*Para más información sobre este proyecto, visita la siguiente
<NuxtLink to="/page/info"><b>página</b></NuxtLink
>.
</p>
</p> -->
</div>
</template>
<script>
import dataProcessing from '~/utils/dataProcessing'
export default {
setup() {
definePageMeta({
layout: 'main',
})
},
// setup() {
// definePageMeta({
// layout: 'main',
// })
// },
data() {
return {
register: {
@@ -104,7 +104,21 @@ export default {
error: null,
}
},
computed: {
isValidForm() {
if (
this.register.user.email &&
this.register.user.password &&
this.register.company.cif &&
this.register.company.company_name &&
this.register.company.short_name &&
this.register.company.web_link
) {
return true
}
return false
},
},
methods: {
isValidUrl: dataProcessing.isValidUrl,
getPlace(value) {
@@ -113,7 +127,7 @@ export default {
async userRegister() {
const config = useRuntimeConfig()
this.error = null
if (this.place.address && this.place.city) {
if (this.isValidForm) {
this.register.company = { ...this.register.company, ...this.place }
this.register.user.full_name = this.register.company.short_name
try {
@@ -140,9 +154,19 @@ export default {
}
</script>
<style lang="scss" scoped>
.container {
.container-fluid {
margin-top: 5rem;
margin-bottom: 5rem;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background: linear-gradient($color-consumo-base-light, $color-bg-light);
border-radius: 1rem;
padding: 2rem;
gap: 3rem;
margin: 2rem 0 4rem;
color: $color-primary;
@include mobile {
margin-top: 7rem;
@@ -153,7 +177,9 @@ export default {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
margin-bottom: 80px;
width: 100%;
}
.checkbox-container {
@@ -164,15 +190,15 @@ export default {
}
}
.googleaddress-container {
margin-top: 1rem;
margin-bottom: 2rem;
width: 45%;
@include mobile {
width: 80%;
font-size: $s;
}
}
// .googleaddress-container {
// margin-top: 1rem;
// margin-bottom: 2rem;
// width: 45%;
// @include mobile {
// width: 80%;
// font-size: $s;
// }
// }
.error {
color: $color-error;
@@ -180,7 +206,7 @@ export default {
.help {
color: $color-navy;
margin-bottom: 80px;
// margin-bottom: 80px;
font-size: $m;
@include mobile {
font-size: $s;