BarraDeNavegacion #49
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-app>
|
||||||
|
<NavBar />
|
||||||
<v-main>
|
<v-main>
|
||||||
<NavBar />
|
|
||||||
<router-view />
|
<router-view />
|
||||||
</v-main>
|
</v-main>
|
||||||
</v-app>
|
</v-app>
|
||||||
@ -17,26 +17,3 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
#app {
|
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
text-align: center;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav {
|
|
||||||
padding: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
font-weight: bold;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a.router-link-exact-active {
|
|
||||||
color: #42b983;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@ -1,64 +1,46 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-main>
|
<v-app-bar color="primary" prominent>
|
||||||
<v-card>
|
<v-app-bar-nav-icon variant="text" @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
|
||||||
<v-layout>
|
<v-toolbar-title>Menu</v-toolbar-title>
|
||||||
<v-app-bar color="primary" prominent app>
|
<v-spacer></v-spacer>
|
||||||
<v-app-bar-nav-icon variant="text" @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
|
<template v-if="$vuetify.display.mdAndUp">
|
||||||
<v-toolbar-title>My files</v-toolbar-title>
|
<v-btn icon="mdi-magnify" variant="text"></v-btn>
|
||||||
<v-spacer></v-spacer>
|
<v-btn icon="mdi-filter" variant="text"></v-btn>
|
||||||
|
</template>
|
||||||
<template v-if="$vuetify.display.mdAndUp">
|
<v-btn icon="mdi-dots-vertical" variant="text"></v-btn>
|
||||||
<v-btn icon="mdi-magnify" variant="text"></v-btn>
|
</v-app-bar>
|
||||||
<v-btn icon="mdi-filter" variant="text"></v-btn>
|
<v-navigation-drawer v-model="drawer"
|
||||||
</template>
|
:location="$vuetify.display.mobile ? 'bottom' : undefined"
|
||||||
<v-btn icon="mdi-dots-vertical" variant="text"></v-btn>
|
temporary>
|
||||||
</v-app-bar>
|
<v-list>
|
||||||
|
<v-list-item v-for="item in menuItems" :key="item.title" @click="navigate(item.route)">
|
||||||
<v-navigation-drawer
|
<v-list-item-title>{{ item.title }}</v-list-item-title>
|
||||||
v-model="drawer"
|
</v-list-item>
|
||||||
:location="$vuetify.display.mobile ? 'bottom' : undefined"
|
</v-list>
|
||||||
temporary>
|
</v-navigation-drawer>
|
||||||
<v-list :items="items"></v-list>
|
|
||||||
</v-navigation-drawer>
|
|
||||||
|
|
||||||
<v-main style="height: 500px;">
|
|
||||||
<v-card-text>
|
|
||||||
The navigation drawer will appear from the bottom on smaller size screens.
|
|
||||||
</v-card-text>
|
|
||||||
</v-main>
|
|
||||||
</v-layout>
|
|
||||||
</v-card>
|
|
||||||
</v-main>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
name: 'NavBar',
|
||||||
data: () => ({
|
data: () => ({
|
||||||
drawer: false,
|
drawer: false,
|
||||||
group: null,
|
group: null,
|
||||||
items: [
|
menuItems: [
|
||||||
{
|
{ title: 'Inicio', route: '/'},
|
||||||
title: 'Foo',
|
{ title: 'Comprar', route:'/comprar'},
|
||||||
value: 'foo',
|
{ title: 'Resumen de Compra', route:'/resumen_compra'},
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Bar',
|
|
||||||
value: 'bar',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Fizz',
|
|
||||||
value: 'fizz',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Buzz',
|
|
||||||
value: 'buzz',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
group () {
|
group () {
|
||||||
this.drawer = false
|
this.drawer = false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
navigate(route) {
|
||||||
|
this.$router.push(route);
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-form ref="form" v-model="valid">
|
<v-form ref="form" v-model="valid">
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
@ -35,8 +35,8 @@
|
|||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-toolbar>
|
<v-toolbar>
|
||||||
<v-toolbar-title secondary>Productos</v-toolbar-title>
|
<v-toolbar-title secondary>Productos</v-toolbar-title>
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
<v-container v-for="(line, index) in purchase.saleline_set" :key="line.id">
|
<v-container v-for="(line, index) in purchase.saleline_set" :key="line.id">
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
@ -87,11 +87,8 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
<v-btn @click="addLine" color="blue">Agregar</v-btn>
|
<v-btn @click="addLine" color="blue">Agregar</v-btn>
|
||||||
|
</v-container>
|
||||||
</v-container>
|
|
||||||
|
|
||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
|
|
||||||
<v-text-field
|
<v-text-field
|
||||||
:value="calculateTotal"
|
:value="calculateTotal"
|
||||||
label="Total"
|
label="Total"
|
||||||
@ -133,6 +130,11 @@
|
|||||||
this.fetchClients();
|
this.fetchClients();
|
||||||
this.fetchProducts();
|
this.fetchProducts();
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
group () {
|
||||||
|
this.drawer = false
|
||||||
|
},
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
calculateTotal() {
|
calculateTotal() {
|
||||||
return this.purchase.saleline_set.reduce((total, saleline) => {
|
return this.purchase.saleline_set.reduce((total, saleline) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user