Compare commits
	
		
			2 commits
		
	
	
		
			401c0e888f
			...
			45e7fb1918
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
							 | 
						45e7fb1918 | ||
| 
							 | 
						20d5e8cbfc | 
					 2 changed files with 57 additions and 11 deletions
				
			
		
							
								
								
									
										38
									
								
								resources/js/components/TabMenu.vue
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								resources/js/components/TabMenu.vue
									
										
									
									
									
										Normal 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>
 | 
				
			||||||
| 
						 | 
					@ -16,6 +16,9 @@
 | 
				
			||||||
        <p class="subtitle has-text-white">
 | 
					        <p class="subtitle has-text-white">
 | 
				
			||||||
            Bienvenidx a la administración de pedidos del <strong class="has-text-white">Mercado Popular de Subsistencia</strong>
 | 
					            Bienvenidx a la administración de pedidos del <strong class="has-text-white">Mercado Popular de Subsistencia</strong>
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <tab-menu id="tabmenu" :tabs="['barrios','super']" :names="['Barrios', 'Super admin']">
 | 
				
			||||||
 | 
					            <template #barrios>
 | 
				
			||||||
                @error('name')
 | 
					                @error('name')
 | 
				
			||||||
                <div class="notification is-warning">
 | 
					                <div class="notification is-warning">
 | 
				
			||||||
                    Contraseña incorrecta, intentalo nuevamente.
 | 
					                    Contraseña incorrecta, intentalo nuevamente.
 | 
				
			||||||
| 
						 | 
					@ -27,6 +30,11 @@
 | 
				
			||||||
                    <barrio-select admin="true"></barrio-select>
 | 
					                    <barrio-select admin="true"></barrio-select>
 | 
				
			||||||
                    <login-admin></login-admin>
 | 
					                    <login-admin></login-admin>
 | 
				
			||||||
                </form>
 | 
					                </form>
 | 
				
			||||||
 | 
					            </template>
 | 
				
			||||||
 | 
					            <template #super>
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					            </template>
 | 
				
			||||||
 | 
					        </tab-menu>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</section>
 | 
					</section>
 | 
				
			||||||
<script src="{{ asset('js/app.js') }}" defer></script>
 | 
					<script src="{{ asset('js/app.js') }}" defer></script>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue