wip migration

This commit is contained in:
María
2025-08-14 15:12:29 +02:00
commit 61d96ac328
148 changed files with 31438 additions and 0 deletions

18
pages/busqueda.vue Normal file
View File

@@ -0,0 +1,18 @@
<template>
<div>
pagina busqueda
<h1>Busqueda</h1>
<p>Esta es la página de búsqueda.</p>
<p>Utiliza el componente NavBarSearch para navegar.</p>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

15
pages/c/[id].vue Normal file
View File

@@ -0,0 +1,15 @@
<template>
<div>
c/id page
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

15
pages/c/index.vue Normal file
View File

@@ -0,0 +1,15 @@
<template>
<div>
pagina cooperativas c/index
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,123 @@
<template>
<BContainer class="container">
<BRow align-h="center">
<BCol class="change-password">
<form class="form" autocomplete="off" @submit.prevent="submitUser">
<h1 class="title">Cambiar contraseña</h1>
<FormInput
v-model="form.old_password"
type="text"
label-text="Contraseña actual"
required
/>
<FormInput
v-model="form.password"
type="password"
label-text="Nueva contraseña"
required
/>
<FormInput
v-model="form.password2"
type="password"
label-text="Nueva contraseña"
required
/>
<small v-if="error" class="error">{{ error }}</small>
<small v-if="success" class="success">{{ success }}</small>
<div class="submit-btn">
<SubmitButton text="Actualizar" image-url="" />
</div>
</form>
</BCol>
</BRow>
</BContainer>
</template>
<script>
export default {
setup() {
definePageMeta({
layout: 'editar',
middleware: 'auth',
auth: { authority: 'SHOP_USER' },
})
},
data() {
return {
form: {
old_password: null,
password: null,
password2: null,
},
error: null,
success: null,
}
},
methods: {
async submitUser() {
this.error = null
this.success = null
if (this.form.password === this.form.password2) {
try {
await this.$api.put(
`/user/change_password/${this.$store.state.auth.id}/`,
this.form
)
this.success = 'Contraseña cambiada correctamente'
} catch {
this.error = 'La contraseña actual no es correcta'
}
} else {
this.error = 'La nueva contraseña no coincide'
}
},
},
}
</script>
<style lang="scss" scoped>
.container {
margin-top: 40px;
margin-bottom: 40px;
}
.change-password {
display: flex;
flex-direction: column;
align-items: center;
}
.title {
color: $color-navy;
font-size: $xxl;
margin-bottom: 40px;
text-align: left;
width: 45%;
@include mobile {
width: 80%;
margin-top: 70px;
}
@include desktop {
width: 25%;
}
}
.form {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40px;
label {
text-align: left;
color: $color-navy;
font-weight: $bold;
font-size: $xs;
}
}
.error {
color: crimson;
}
.success {
color: green;
}
</style>

View File

@@ -0,0 +1,163 @@
<template>
<BContainer class="container">
<BRow align-h="start">
<BCol class="edit-profile">
<form class="form" @submit.prevent="submitUser">
<h1 class="title">Editar perfil</h1>
<FormInput
v-model="form.full_name"
type="text"
label-text="Nombre de usuario"
@input="form.full_name = $event"
/>
<FormInput
v-model="form.email"
type="text"
label-text="Email"
@input="form.email = $event"
/>
<v-checkbox
v-model="form.notify"
label="Recibir notificaciones"
/>
<small v-if="error" class="error">Ha habido un error</small>
<small v-if="success" class="success">Perfil actualizado con éxito</small>
<div class="submit-btn">
<SubmitButton text="guardar" image-url="" />
</div>
</form>
<NuxtLink to="/editar/perfil/contrasena">Cambiar contraseña</NuxtLink>
</BCol>
</BRow>
</BContainer>
</template>
<script>
import { mapState, mapActions } from 'pinia'
import { useAuthStore } from '@/stores/auth'
export default {
setup() {
definePageMeta({
layout: 'editar',
middleware: 'auth',
auth: { authority: 'SHOP_USER' },
})
},
data() {
return {
form: {
full_name: null,
email: null,
notify: false,
},
error: false,
success: false,
}
},
async fetch() {
const config = useRuntimeConfig()
try {
const response = await $fetch(`/my_user/`, {
baseURL: config.public.baseURL,
method: 'GET',
body: JSON.stringify(this.form),
})
console.log('User data fetched successfully:', response)
} catch (err) {
console.error('Error fetching user data:', err)
this.error = true
return
}
this.form.full_name = response.full_name
this.form.email = response.email
this.form.notify = response.notify
},
computed: {
...mapState(useAuthStore, ['id', 'access']),
},
methods: {
...mapActions( useAuthStore, ['setUser']),
async submitUser() {
// TODO: configurar primero el estar logeado (estados, getters) para que peuda coger esa info y actualizarla
this.error = false
const config = useRuntimeConfig()
try {
const userId = this.id
const access = this.access
await $fetch(`/users/${userId}/`, {
baseURL: config.public.baseURL,
method: 'PUT',
body: this.form,
headers: {
Authorization: `Bearer ${access}`
}
})
await this.setUser()
this.success = true
} catch (err) {
console.error('Error updating user:', err)
this.error = true
}
},
},
}
</script>
<style lang="scss" scoped>
.container {
margin-top: 40px;
margin-bottom: 40px;
}
.edit-profile {
display: flex;
flex-direction: column;
align-items: center;
}
.title {
color: $color-navy;
font-size: $xxl;
margin-bottom: 40px;
text-align: left;
width: 45%;
@include mobile {
width: 80%;
margin-top: 70px;
}
@include desktop {
width: 25%;
}
}
.form {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40px;
label {
text-align: left;
color: $color-navy;
font-weight: $bold;
font-size: $xs;
}
}
.error {
color: crimson;
}
.success {
color: green;
}
.checkbox-group {
display: flex;
align-items: center;
border: 1px solid $color-navy;
padding: 10px;
border-radius: 5px;
}
</style>

168
pages/index.vue Normal file
View File

@@ -0,0 +1,168 @@
<template>
<div class="base">
<div class="gradient">
<div class="ilustration wrapper"></div>
<SearchHeader />
<img
class="search-dots"
src="@/assets/img/latienda-lineapuntos-1.svg"
alt=""
/>
<div class="container">
<div class="row">
<div class="col-sm-4">
<HighlightsCard
class="highlights"
:title="`Libros`"
:category="getKey(cards, 0)"
:products="getValue(cards, 0)"
/>
</div>
<div class="col-sm-4">
<HighlightsCard
class="highlights"
:title="`Cosméticos`"
:category="getKey(cards, 1)"
:products="getValue(cards, 1)"
/>
</div>
<div class="col-sm-4">
<HighlightsCard
class="highlights"
:title="`Plantas`"
:category="getKey(cards, 2)"
:products="getValue(cards, 2)"
/>
</div>
</div>
</div>
</div>
<div class="items container">
<h5 class="items-title">Últimos productos</h5>
<img
class="items-dots"
src="@/assets/img/latienda-lineapuntos-2.svg"
alt=""
/>
<ItemsRow :type="`product`" :items="carouselProducts" />
</div>
<div class="items container">
<h5 class="items-title">Últimas cooperativas</h5>
<img
class="items-dots"
src="@/assets/img/latienda-lineapuntos-2.svg"
alt=""
/>
<ItemsRow :type="`company`" :items="carouselCompanies" />
</div>
<div class="items container">
<h5 class="items-title">Categorías más populares</h5>
<img
class="items-dots"
src="@/assets/img/latienda-lineapuntos-2.svg"
alt=""
/>
<ItemsRow :type="`category`" :items="carouselCategories" />
</div>
</div>
</template>
<script>
export default {
data() {
return {
cards: null,
carouselProducts: null,
carouselCompanies: null,
carouselCategories: null
}
},
async mounted() {
try {
const response = await $fetch('/initial', {
baseURL: this.$config.public.baseURL,
method: 'GET'
})
this.cards = response.cards
this.carouselProducts = response.products
this.carouselCompanies = response.companies
this.carouselCategories = response.categories
} catch (err) {
console.error(err)
}
},
methods: {
getKey(object, key) {
return Object.keys(object || {})[key]
},
getValue(object, key) {
return Object.values(object || {})[key]
},
},
}
</script>
<style lang="scss" scoped>
.wrapper {
width: 100%;
margin: 0 auto;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
}
.ilustration {
height: 300px;
width: 500px;
align-self: center;
background-image: url('../assets/img/latienda-ilustracion.svg');
background-size: contain;
@include mobile {
width: 300px;
height: 170px;
margin-top: 70px;
}
}
.base {
margin-bottom: 80px;
}
.gradient {
background: linear-gradient(180deg, #8cead8, #ffffff);
position: relative;
left: 0;
right: 0;
margin-bottom: 50px;
}
.search-dots {
display: block;
margin: auto;
margin-bottom: 20px;
width: 100px;
@include mobile {
width: 70px;
margin: 0 auto 0;
}
}
.items {
width: 100%;
display: flex;
height: auto;
flex-direction: column;
justify-content: center;
&-title {
text-align: center;
}
&-dots {
width: 35px;
margin: 15px auto 30px auto;
}
}
.items-title {
color: $color-navy;
margin-top: 3rem;
}
</style>

125
pages/login/index.vue Normal file
View File

@@ -0,0 +1,125 @@
<template>
<div class="container-fluid">
<div class="row">
<FormHeader title="Login" class="col-12" />
</div>
<form class="form" align="center" @submit.prevent="userLogin">
<FormInput
v-model="loginData.email"
required
type="text"
label-text="Email"
@input="loginData.email = $event" />
<FormInput
v-model="loginData.password"
type="password"
label-text="Contraseña"
required
@input="loginData.password = $event"
/>
<p v-if="error" class="error">
{{ error }}
</p>
<small class="help" align="center">
<NuxtLink to="/login/restablecer"
>¿No recuerdas tu contraseña?</NuxtLink
>
</small>
<SubmitButton
text="Aceptar"
image-url="" />
</form>
<!-- Descomentar cuando esté la funcionalidad completa -->
<!-- <div class="row">
<div class="other-sign-in col-12" align="center">
<GoogleSignIn />
<FacebookSignIn />
</div>
</div> -->
<p class="help" align="center">
*Si no estás registrado puedes registrarte en este
<NuxtLink to="/registro"><b>enlace</b></NuxtLink
>.
</p>
<div class="row">
<BannerCoop />
</div>
</div>
</template>
<script>
import { useAuthStore } from '@/stores/auth'
import { mapActions } from 'pinia'
export default {
setup() {
definePageMeta({
layout: 'main',
})
const authStore = useAuthStore()
return { authStore }
},
data() {
return {
loginData: {
email: '',
password: '',
},
error: '',
}
},
methods: {
...mapActions(useAuthStore, ['login', 'setUser']),
async userLogin() {
this.error = ''
try {
await this.login(this.loginData.email, this.loginData.password)
await this.setUser()
this.$router.push('/')
} catch (err) {
if (err.status === 400 || err.status === 401) {
this.error =
'Los datos de acceso no son correctos o no se ha activado su cuenta.'
}
}
},
},
}
</script>
<style lang="scss" scoped>
.container-fluid {
margin-top: 5rem;
margin-bottom: 5rem;
@include mobile {
margin-top: 7rem;
}
}
.form {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40px;
}
.help {
color: $color-navy;
}
.other-sign-in {
display: flex;
flex-direction: column;
align-items: center;
}
.error {
color: $color-error;
}
</style>

View File

@@ -0,0 +1,98 @@
<template>
<div class="container-fluid">
<BModal
id="modal-center"
v-model="active"
centered
title="latienda.coop"
ok-variant="success"> Email enviado, revisa tu bandeja de entrada. </BModal>
<div class="row">
<FormHeader title="Restablecer Contraseña" class="col-12" />
</div>
<p class="help" align="center">
Introduce la dirección de correo asociada a tu cuenta y te enviaremos un
email con tu nueva contraseña.
<br />
Recuerda que siempre puedes cambiarla dentro del menú de edición.
</p>
<form class="form" align="center" @submit.prevent="sendEmail">
<FormInput
v-model="email"
required
type="email"
label-text="Email"
@input="email = $event"
/>
<p v-if="error" class="error">
{{ error }}
</p>
<SubmitButton :text="sending ? `Enviando...` : `Enviar`" image-url="" :disabled="sending" />
</form>
</div>
</template>
<script>
export default {
setup() {
definePageMeta({
layout: 'main',
})
},
data() {
return {
email: '',
error: '',
sending: false,
active: false,
}
},
methods: {
async sendEmail() {
this.sending = true
this.error = null
const config = useRuntimeConfig()
try {
await $fetch('/forgotten_password/', {
baseURL: config.public.baseURL,
method: 'POST',
body: { email: this.email },
})
this.active = true
} catch (err) {
this.error = 'Error al enviar el email. Por favor, inténtalo de nuevo.'
console.error('Error al enviar el email:', err)
}
this.sending = false
},
},
}
</script>
<style lang="scss" scoped>
.container-fluid {
margin-top: 5rem;
margin-bottom: 5rem;
@include mobile {
margin-top: 7rem;
}
}
.form {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40px;
}
.help {
color: $color-navy;
}
.error {
color: $color-error;
}
</style>

94
pages/page/cookies.vue Normal file
View File

@@ -0,0 +1,94 @@
<template>
<div class="container">
<div class="row justify-content-center">
<div class="col-10">
<h1 class="title">Política de cookies</h1>
<h2 class="question">¿Qué es una Cookie?</h2>
<p>
Una Cookie es un fichero que se descarga en el dispositivo desde el
que está navegando al acceder a la web y que contiene información
sobre la navegación realizada desde dicho dispositivo.
</p>
<h2 class="question">¿Para qué usamos las Cookies?</h2>
<p>
En nuestro caso, dichas Cookies son utilizadas para mejorar la
funcionalidad de la web para el usuario y obtener estadísticas sobre
los usuarios que acceden a nuestro sitio.
</p>
<h2 class="question">¿Qué Cookies utilizamos?</h2>
<div>
<p>Las cookies utilizadas en nuestra web son las siguientes:</p>
<ul>
<li><b>Sesión.</b> Las Cookies de sesión son utilizadas divara almacenar la infomación sobre el usuario que se ha conectado a la web con la finalidad de recordar sus preferencias, configuración, etc...</li>
<li><b>Google Analytics.</b> Las Cookies utilizadas para Google anayitics nos sirven para evaluar cuánta gente y de qué manera han visitado nuestro sitio web. Dichas cookies son gestionadas por Google y almacenan información referente a las páginas que han sido visitadas, cuánto tiempo ha estado en cada una, etc... En caso de duda, puede consultar si lo desea también la <a target="_blank" href="https://policies.google.com/technologies/cookies?hl=es&gl=es">política de cookies de Google</a>.</li>
</ul>
</div>
<h2 class="question">¿Qué ocurre si no quiero permitir las Cookies?</h2>
<p>
Como usuario, usted podrá elegir en cualquier momento qué Cookies desea aceptar o rechazar mediante la configuración de su navegador.
</p>
<p>
Como usuario, usted podrá elegir en cualquier momento qué Cookies desea aceptar o rechazar mediante la configuración de su navegador.
</p>
<div>
<p>Para esto, usted dispone de información en los siguientes enlaces:</p>
<ul>
<li><a href="https://support.google.com/chrome/answer/95647?hl=es" target="_blank">Chrome</a></li>
<li><a href="https://support.mozilla.org/es/kb/habilitar-y-deshabilitar-cookies-sitios-web-rastrear-preferencias?redirectslug=habilitar-y-deshabilitar-cookies-que-los-sitios-we&redirectlocale=es" target="_blank">Firefox</a></li>
<li><a href="https://support.microsoft.com/es-es/topic/eliminar-y-administrar-cookies-168dab11-0753-043d-7c16-ede5947fc64d#ie=ie-10" target="_blank">Internet Explorer</a></li>
</ul>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
setup() {
definePageMeta({
layout: 'main',
})
}
}
</script>
<style lang="scss" scoped>
.container {
margin-top: 5rem;
margin-bottom: 5rem;
@include mobile {
margin-top: 7rem;
}
}
.title {
color: $color-navy;
font-size: $xxl;
}
.question {
color: $color-navy;
font-weight: $bold;
font-size: $l;
margin: 40px auto 15px;
}
p,
ul {
margin-top: 8px;
font-family: $font-secondary;
font-size: $m;
color: $color-greytext;
}
li {
margin-bottom: 3px;
a {
text-decoration: underline;
}
}
</style>

50
pages/page/error.vue Normal file
View File

@@ -0,0 +1,50 @@
<template>
<div class="main">
<div class="error-message">
<FormHeader title="¡Uy! Algo no ha ido bien" />
<p>
Inténtalo de nuevo y, si el problema persiste,
<a href="mailto:info@latienda.coop">contáctanos</a> para resolverlo
</p>
</div>
</div>
</template>
<script>
export default {
setup() {
definePageMeta({
layout: 'mainbanner',
})
}
}
</script>
<style lang="scss" scoped>
.main {
height: 50vh;
display: flex;
align-items: center;
justify-content: center;
}
.error-message {
text-align: center;
width: 45vw;
h1 {
font-size: $xxl;
font-weight: $bold;
color: $color-navy;
margin-bottom: 15px;
}
p {
margin: 0;
a {
display: inline-block;
text-decoration: underline;
}
}
}
</style>

233
pages/page/info.vue Normal file
View File

@@ -0,0 +1,233 @@
<template>
<div class="container-fluid">
<div class="row">
<div class="header col-12" align="center">
<h1 class="title">Sobre nosotros</h1>
<img src="@/assets/img/latienda-lineapuntos-2.svg" alt="" class="" />
</div>
</div>
<div class="info-proj row justify-content-center">
<div class="col-md-4" align="center">
<img class="image" src="@/assets/img/footer-bolsa.svg" alt="" />
</div>
<div class="col-md-4">
<p>
Nueva plataforma creada por COCETA para facilitar que cualquier
persona pueda encontrar de forma sencilla los productos y servicios
ofrecidos por las cooperativas de trabajo de España.
</p>
</div>
</div>
<div class="info-proj tienda row col-md-12 justify-content-center">
<div class="col-md-4 tienda-content" align="center">
<p>
<b>latienda.coop</b> es un gran escaparate virtual que COCETA pone a
disposición de todas las cooperativas de trabajo para facilitar la
digitalización de su proceso de venta, así cómo para fomentar el
consumo de productos y servicios cooperativos.
</p>
</div>
<div class="col-md-4" align="center">
<img
class="image-escaparate"
src="@/assets/img/latienda-escaparate.png"
alt=""
/>
</div>
</div>
<div class="row options">
<div class="col-md-4 option" align="center">
<h1 class="options-title">Buscador inteligente</h1>
<p class="options-text">
Una vez encuentra el producto o servicio deseado la plataforma lo
redirige a la tienda de la cooperativa para realizar el proceso de
compra. En caso de que la cooperativa no cuente con una tienda online,
se le facilitará un formulario para que haga su pedido.
</p>
<img
src="@/assets/img/latienda-sobrenosotros-1.svg"
alt=""
class="options-image h-image"
/>
</div>
<div class="col-md-4 option" align="center">
<h1 class="options-title">Venta directa</h1>
<p class="options-text">
Funciona a modo de una gran buscador de productos y servicios
cooperativos, en el que usuario puede buscar lo que necesite,
filtrando por diferentes criterios.
</p>
<img
src="@/assets/img/latienda-sobrenosotros-2.svg"
alt=""
class="options-image"
/>
</div>
<div class="col-md-4 option" align="center">
<h1 class="options-title">Fácil gestión</h1>
<p class="options-text">
Cualquier cooperativa de trabajo de España puede incluir sus productos
o servicios en latienda.coop. Podrá gestionarlos desde el panel de
control o configurando la sicnronización con los productos de su
propia tienda online en <b>Woocommerce</b>.
</p>
<img
src="@/assets/img/latienda-sobrenosotros-3.svg"
alt=""
class="options-image h-image"
/>
</div>
</div>
<div class="row woo-banner">
<div class="col-md-12 woo-banner-content" align="center">
<span>Compatible con</span>
<img src="@/assets/img/latienda-woocommerce-logo.svg" alt="" />
</div>
</div>
<!-- <div class="row">
<BannerCoop />
</div> -->
</div>
</template>
<script>
export default {
setup() {
definePageMeta({
layout: 'main',
})
}
}
</script>
<style lang="scss" scoped>
.container-fluid {
padding-right: 0;
padding-left: 0;
@include mobile {
overflow: hidden;
}
}
.header {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 80px;
margin-bottom: 40px;
@include mobile {
margin-top: 120px;
overflow: hidden;
}
.title {
font-size: $xl;
color: $color-navy;
margin-bottom: 35px;
font-weight: 400;
}
img {
width: 40px;
}
}
.info-proj {
padding: 30px 30px;
margin: 0;
img {
width: 100px;
}
p {
font-size: $s;
color: $color-navy;
text-align: center;
}
.image-escaparate {
width: 18rem;
@include mobile {
width: 14rem;
}
}
}
.tienda {
background-color: $color-lighter-green;
}
.options {
padding: 80px 30px;
.option {
padding: 0 30px;
}
.options-title {
font-size: $s;
font-weight: $bold;
color: $color-navy;
}
.options-text {
margin-top: 8px;
font-family: $font-secondary;
font-size: $xs;
color: $color-greytext;
margin-bottom: 40px;
}
.options-image {
width: 150px;
@include mobile {
margin-bottom: 2rem;
}
}
.h-image {
width: 200px;
}
}
.woo-banner {
height: 150px;
background-color: #f6eef8;
@include mobile {
padding: 3em;
}
.woo-banner-content {
display: flex;
align-self: center;
justify-content: center;
align-items: center;
padding: 0 1rem;
span {
@include mobile {
font-size: $s;
}
img {
width: 200px;
@include mobile {
width: 150px;
}
}
}
}
span {
justify-self: center;
margin-right: 20px;
font-weight: $bold;
font-size: $l;
}
img {
width: 200px;
}
}
</style>

143
pages/page/legal.vue Normal file
View File

@@ -0,0 +1,143 @@
<template>
<div class="container">
<div class="row justify-content-center">
<div class="col-10">
<h1 class="title">Política de privacidad</h1>
<h2 class="question">Aviso legal</h2>
<p>
En cumplimiento con lo establecido en la Ley 34/2002 de 11 de julio
(LSSI, Ley de Servicios de la Información y Comercio Electrónico), se
comunica: El dominio coceta.coop es propiedad de la Confederación
Española de Cooperativas de Trabajo Asociado, Unión de Cooperativas
(en adelante COCETA) inscrita en el Registro central de cooperativas,
del Ministerio de Empleo y Seguridad Social, con CIF: F/78606514 y con
domicilio fiscal en C/ Virgen de los Peligros, 3 planta 4. CP 28013 de
Madrid.
</p>
<h2 class="question">Datos de contacto:</h2>
<p>
Contacto telefónico: 91 5930161
<br />
E-mail de contacto:
<a href="mailto:confederacion@coceta.coop"
>confederacion@coceta.coop</a
>
</p>
<h2 class="question">Propiedad Intelectual:</h2>
<p>
Las marcas, logotipos, imágenes, textos, y en general todo el
contenido de esta web son propiedad de COCETA o de las entidades y
organismos correspondientes, según los casos.
</p>
<p>
El material gráfico, informativo y divulgativo que contiene la web
puede ser reproducido citando expresamente la fuente y la propiedad
del mismo.
</p>
<h2 class="question">Ley de protección de datos</h2>
<p>
De conformidad con lo establecido en la normativa vigente en
Protección de Datos de Carácter Personal, le informamos que sus datos
serán incorporados al sistema de tratamiento titularidad de
CONFEDERACION ESPAÑOLA DE COOPERATIVAS DE TRABAJO ASOCIADO (COCETA)
con CIF F78606514 y domicilio social sito en C/ Virgen de los Peligros
3 4º. 28013, Madrid, con la finalidad de atender sus consultas y
remitirle información relacionada que pueda ser de su interés. En
cumplimiento con la normativa vigente, CONFEDERACION ESPAÑOLA DE
COOPERATIVAS DE TRABAJO ASOCIADO (COCETA) informa que los datos serán
conservados durante el plazo estrictamente necesario para cumplir con
los preceptos mencionados con anterioridad.
</p>
<p>
Mientras no nos comunique lo contrario, entenderemos que sus datos no
han sido modificados, que usted se compromete a notificarnos cualquier
variación y que tenemos su consentimiento para utilizarlos para las
finalidades mencionadas.
</p>
<p>
CONFEDERACION ESPAÑOLA DE COOPERATIVAS DE TRABAJO ASOCIADO (COCETA)
informa que procederá a tratar los datos de manera lícita, leal,
transparente, adecuada, pertinente, limitada, exacta y actualizada. Es
por ello que CONFEDERACION ESPAÑOLA DE COOPERATIVAS DE TRABAJO
ASOCIADO (COCETA) se compromete a adoptar todas las medidas razonables
para que estos se supriman o rectifiquen sin dilación cuando sean
inexactos.
</p>
<p>
De acuerdo con los derechos que le confiere la normativa vigente en
protección de datos podrá ejercer los derechos de acceso,
rectificación, limitación de tratamiento, supresión, portabilidad y
oposición al tratamiento de sus datos de carácter personal, así como
del consentimiento prestado para el tratamiento de los mismos,
dirigiendo su petición a la dirección postal indicada más arriba o al
correo electrónico
<a href="mailto:info@coceta.coop">info@coceta.coop</a>
</p>
<p>
A su vez, le informamos que puede contactar con el Delegado de
Protección de Datos de CONFEDERACION ESPAÑOLA DE COOPERATIVAS DE
TRABAJO ASOCIADO (COCETA), dirigiéndose por escrito a la dirección de
correo
<a href="mailto:dpo.cliente@conversia.es">dpo.cliente@conversia.es</a>
o al teléfono 902877192.
</p>
<p>
Podrá dirigirse a la Autoridad de Control competente para presentar la
reclamación que considere oportuna.
</p>
<p>
Con envío del formulario de recogida de datos usted acepta la política
de privacidad de CONFEDERACION ESPAÑOLA DE COOPERATIVAS DE TRABAJO
ASOCIADO (COCETA).
</p>
</div>
</div>
</div>
</template>
<script>
export default {
setup() {
definePageMeta({
layout: 'main',
})
}
}
</script>
<style lang="scss" scoped>
.container {
margin-top: 5rem;
margin-bottom: 5rem;
@include mobile {
margin-top: 7rem;
}
}
.title {
color: $color-navy;
font-size: $xxl;
}
.question {
color: $color-navy;
font-weight: $bold;
font-size: $l;
margin: 2.5rem auto 0.937rem;
}
p,
ul {
margin-top: 0.5rem;
font-family: $font-secondary;
font-size: $m;
color: $color-greytext;
}
li {
margin-bottom: 0.187rem;
a {
text-decoration: underline;
}
}
</style>

34
pages/page/terminos.vue Normal file
View File

@@ -0,0 +1,34 @@
<template>
<div class="container">
<div class="row justify-content-center">
<div class="col-10">
<h1 class="title">Términos y condiciones</h1>
</div>
</div>
</div>
</template>
<script>
export default {
setup() {
definePageMeta({
layout: 'main',
})
}
}
</script>
<style lang="scss" scoped>
.container {
margin-top: 5rem;
margin-bottom: 5rem;
@include mobile {
margin-top: 7rem;
}
}
.title {
color: $color-navy;
font-size: $xxl;
}
</style>

15
pages/productos/[id].vue Normal file
View File

@@ -0,0 +1,15 @@
<template>
<div>
Producto 1
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,42 @@
<template>
<div class="container">
<div class="welcome">
<div class="text-container">
<h1>¡Bienvenida!</h1>
<br />
<p>
Su formulario se ha recibido correctamente y en breve confirmaremos su
cuenta. Recibirá un correo para confirmar que su cuenta de cooperativa
se ha activado.
</p>
</div>
</div>
</div>
</template>
<script>
export default {}
</script>
<style lang="scss" scoped>
.welcome {
position: relative;
width: 100%;
height: 600px;
font-family: $font-primary;
color: $color-navy;
font-weight: 400;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.text-container {
max-width: 500px;
p,
h1 {
text-align: center;
}
}
}
</style>

View File

@@ -0,0 +1,47 @@
<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>

View File

@@ -0,0 +1,189 @@
<template>
<div class="container">
<FormHeader title="Registro de Cooperativa" />
<form class="form" @submit.prevent="userRegister">
<FormInput
v-model="register.user.email"
required
type="text"
label-text="Email"
@input="register.user.email = $event"
/>
<FormInput
v-model="register.user.password"
required
type="password"
label-text="Contraseña"
@input="register.user.password = $event"
/>
<FormInput
v-model="register.company.cif"
required
type="text"
label-text="CIF"
@input="register.company.cif = $event"
/>
<FormInput
v-model="register.company.company_name"
required
type="text"
label-text="Nombre de la cooperativa"
@input="register.company.company_name = $event"
/>
<FormInput
v-model="register.company.short_name"
required
type="text"
label-text="Nombre corto"
@input="register.company.short_name = $event"
/>
<FormInput
v-model="register.company.web_link"
type="text"
label-text="URL"
@input="register.company.web_link = $event"
/>
<small v-if="!isValidUrl(register.company.web_link)" class="error">La url no es válida</small>
<div class="checkbox-container">
<v-checkbox v-model="register.company.shop" label="¿Tiene tienda online?" />
</div>
<div class="googleaddress-container">
<!-- TODO: Arreglar este compoenente: -->
<!-- <GoogleAddress @added-data="getPlace" /> -->
<p v-if="error" class="error">
{{ error }}
</p>
</div>
<!-- {{ register }} -->
<SubmitButton text="registrar" image-url="" />
</form>
<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>
</div>
</template>
<script>
import dataProcessing from '~/utils/dataProcessing'
export default {
setup() {
definePageMeta({
layout: 'main',
})
},
data() {
return {
register: {
company: {
cif: '',
company_name: '',
short_name: '',
web_link: '',
shop: false,
},
user: {
full_name: '',
email: '',
password: '',
},
},
place: {
city: null,
geo: null,
address: null,
},
error: null,
}
},
methods: {
isValidUrl: dataProcessing.isValidUrl,
getPlace(value) {
this.place = value
},
async userRegister() {
const config = useRuntimeConfig()
this.error = null
if (this.place.address && this.place.city) {
this.register.company = { ...this.register.company, ...this.place }
this.register.user.full_name = this.register.company.short_name
try {
const response = await $fetch('/create_company_user/', {
baseURL: config.public.baseURL,
method: 'POST',
body: JSON.stringify(this.register),
})
if (response.status === 201) {
this.$router.push('bienvenida')
}
} catch (err) {
if (err.response.status === 409) {
this.error = 'Ya existe un usuario con esa cuenta de correo'
} else {
this.error = 'Ha habido un error'
}
}
} else {
this.error = 'Debe añadir una dirección válida'
}
}
},
}
</script>
<style lang="scss" scoped>
.container {
margin-top: 5rem;
margin-bottom: 5rem;
@include mobile {
margin-top: 7rem;
}
}
.form {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 80px;
}
.checkbox-container {
font-size: $s;
width: 45%;
@include mobile {
width: 80%;
}
}
.googleaddress-container {
margin-top: 1rem;
margin-bottom: 2rem;
width: 45%;
@include mobile {
width: 80%;
font-size: $s;
}
}
.error {
color: $color-error;
}
.help {
color: $color-navy;
margin-bottom: 80px;
font-size: $m;
@include mobile {
font-size: $s;
}
}
</style>

124
pages/registro/index.vue Normal file
View File

@@ -0,0 +1,124 @@
<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>

17
pages/test/admin.vue Normal file
View File

@@ -0,0 +1,17 @@
<script>
export default {
layout: 'admin',
}
// Esto debe estar fuera del export default
definePageMeta({
middleware: 'auth',
auth: {
authority: 'SITE_ADMIN',
},
})
</script>
<template>
<h1>Solo para admins</h1>
</template>