Compare commits

...

2 Commits

Author SHA1 Message Date
Rodrigo 45e7fb1918 Tab menu en admin_login_blade.php 2022-08-31 21:33:53 -03:00
Rodrigo 20d5e8cbfc TabMenu vue 2022-08-31 21:33:26 -03:00
2 changed files with 57 additions and 11 deletions

View File

@ -0,0 +1,38 @@
<template>
<div>
<div class="tabs is-centered">
<ul>
<li v-for="(tab, index) in tabs" :class="{ 'is-active': selected == index }">
<a @click="select(index)">
<span>{{ names[index] }}</span>
</a>
</li>
</ul>
</div>
<div v-for="(tab, index) in tabs" v-show="selected == index">
<slot :name="tab"></slot>
</div>
</div>
</template>
<script>
export default {
data() {
return {
selected: 0,
}
},
mounted() {
select(0)
},
methods: {
select(index) {
this.selected = index
}
},
props: {
'tabs': Array,
'names': Array,
},
}
</script>

View File

@ -16,17 +16,25 @@
<p class="subtitle has-text-white">
Bienvenidx a la administración de pedidos del <strong class="has-text-white">Mercado Popular de Subsistencia</strong>
</p>
@error('name')
<div class="notification is-warning">
Contraseña incorrecta, intentalo nuevamente.
</div>
@enderror
<region-select admin="true"></region-select>
<form method="post" action="login">
@csrf
<barrio-select admin="true"></barrio-select>
<login-admin></login-admin>
</form>
<tab-menu id="tabmenu" :tabs="['barrios','super']" :names="['Barrios', 'Super admin']">
<template #barrios>
@error('name')
<div class="notification is-warning">
Contraseña incorrecta, intentalo nuevamente.
</div>
@enderror
<region-select admin="true"></region-select>
<form method="post" action="login">
@csrf
<barrio-select admin="true"></barrio-select>
<login-admin></login-admin>
</form>
</template>
<template #super>
</template>
</tab-menu>
</div>
</section>
<script src="{{ asset('js/app.js') }}" defer></script>