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

47
layouts/admin.vue Normal file
View File

@@ -0,0 +1,47 @@
<template>
<div>
<NavBar />
<div class="navsearch_container container-fluid">
<NuxtLink to="/admin/cooperativas"> Administrar cooperativas </NuxtLink>
<NuxtLink to="/admin/importar"> Alta de cooperativas por .csv </NuxtLink>
<NuxtLink to="/admin/estadisticas"> Estadísticas </NuxtLink>
<NuxtLink to="/" @click="logout">Cerrar sesión</NuxtLink>
</div>
<NuxtPage />
</div>
</template>
<script>
import { mapActions } from 'pinia'
export default {
methods: {
...mapActions('auth', ['logout']),
async logout() {
await this.logout()
},
},
}
</script>
<style lang="scss" scoped>
.navsearch_container {
border-bottom: 3px solid $color-grey-nav;
text-align: center;
padding: 20px 20px;
a {
font-size: $m;
font-weight: $bold;
color: $color-navy;
text-decoration: none;
}
a:nth-child(1):after,
a:nth-child(2):after,
a:nth-child(3):after {
color: $color-navy;
content: '\22EE';
margin: 0.5rem;
}
}
</style>

14
layouts/default.vue Normal file
View File

@@ -0,0 +1,14 @@
<template>
<div>
<NavBar />
<NuxtPage />
<CookieUsageNotification />
<BannerCoop />
<Footer />
</div>
</template>
<script>
export default {
}
</script>
<style></style>

28
layouts/editar.vue Normal file
View File

@@ -0,0 +1,28 @@
<template>
<div>
<NavBar />
<NavBarEditar v-if="isManager" />
<NavBarEditarUser v-else/>
<NuxtPage />
<CookieUsageNotification />
<Footer />
</div>
</template>
<script>
import { useAuthStore } from '@/stores/auth'
export default {
setup() {
const auth = useAuthStore();
return {
auth,
}
},
computed: {
isManager() {
return this.auth.isManager
},
}
}
</script>
<style></style>

63
layouts/error.vue Normal file
View File

@@ -0,0 +1,63 @@
<template>
<div class="main">
<div class="error-message">
<FormHeader v-if="error.statusCode === 404" :title="error.message" />
<FormHeader v-else 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 {
props: {
error: {
type: Object,
default: () => ({}),
},
},
}
</script>
<style lang="scss" scoped>
.main {
height: 50vh;
display: flex;
align-items: center;
justify-content: center;
@include mobile {
margin-top: 5rem;
}
}
.error-message {
text-align: center;
width: 45vw;
h1 {
font-size: $xxl;
font-weight: $bold;
color: $color-navy;
margin-bottom: 15px;
@include mobile {
font-size: $xl;
}
}
p {
margin: 0;
font-size: $m;
@include mobile {
font-size: $s;
}
a {
display: inline-block;
text-decoration: underline;
}
}
}
</style>

9
layouts/main.vue Normal file
View File

@@ -0,0 +1,9 @@
<template>
<div>
<NavBar />
<NavBarSearch />
<NuxtPage />
<CookieUsageNotification />
<Footer />
</div>
</template>

10
layouts/mainbanner.vue Normal file
View File

@@ -0,0 +1,10 @@
<template>
<div>
<NavBar />
<NavBarSearch />
<NuxtPage />
<CookieUsageNotification />
<BannerCoop />
<Footer />
</div>
</template>