wip migration
This commit is contained in:
47
layouts/admin.vue
Normal file
47
layouts/admin.vue
Normal 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
14
layouts/default.vue
Normal 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
28
layouts/editar.vue
Normal 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
63
layouts/error.vue
Normal 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
9
layouts/main.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<NavBar />
|
||||
<NavBarSearch />
|
||||
<NuxtPage />
|
||||
<CookieUsageNotification />
|
||||
<Footer />
|
||||
</div>
|
||||
</template>
|
||||
10
layouts/mainbanner.vue
Normal file
10
layouts/mainbanner.vue
Normal file
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<NavBar />
|
||||
<NavBarSearch />
|
||||
<NuxtPage />
|
||||
<CookieUsageNotification />
|
||||
<BannerCoop />
|
||||
<Footer />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user