BarraDeNavegacion #49
@@ -1,7 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <v-app>
 | 
			
		||||
      <v-main>
 | 
			
		||||
      <NavBar />
 | 
			
		||||
      <v-main>
 | 
			
		||||
          <router-view />
 | 
			
		||||
      </v-main>
 | 
			
		||||
  </v-app>
 | 
			
		||||
@@ -17,26 +17,3 @@
 | 
			
		||||
   },
 | 
			
		||||
 }
 | 
			
		||||
</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>
 | 
			
		||||
    <v-main>
 | 
			
		||||
    <v-card>
 | 
			
		||||
        <v-layout>
 | 
			
		||||
            <v-app-bar color="primary" prominent app>
 | 
			
		||||
    <v-app-bar color="primary" prominent>
 | 
			
		||||
    <v-app-bar-nav-icon variant="text" @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
 | 
			
		||||
                <v-toolbar-title>My files</v-toolbar-title>
 | 
			
		||||
    <v-toolbar-title>Menu</v-toolbar-title>
 | 
			
		||||
    <v-spacer></v-spacer>
 | 
			
		||||
 | 
			
		||||
    <template v-if="$vuetify.display.mdAndUp">
 | 
			
		||||
      <v-btn icon="mdi-magnify" variant="text"></v-btn>
 | 
			
		||||
      <v-btn icon="mdi-filter" variant="text"></v-btn>
 | 
			
		||||
    </template>
 | 
			
		||||
    <v-btn icon="mdi-dots-vertical" variant="text"></v-btn>
 | 
			
		||||
  </v-app-bar>
 | 
			
		||||
 | 
			
		||||
            <v-navigation-drawer
 | 
			
		||||
                v-model="drawer"
 | 
			
		||||
  <v-navigation-drawer v-model="drawer"
 | 
			
		||||
                       :location="$vuetify.display.mobile ? 'bottom' : undefined"
 | 
			
		||||
                       temporary>
 | 
			
		||||
                <v-list :items="items"></v-list>
 | 
			
		||||
      <v-list>
 | 
			
		||||
          <v-list-item v-for="item in menuItems" :key="item.title" @click="navigate(item.route)">
 | 
			
		||||
              <v-list-item-title>{{ item.title }}</v-list-item-title>
 | 
			
		||||
          </v-list-item>
 | 
			
		||||
      </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>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
 export default {
 | 
			
		||||
     name: 'NavBar',
 | 
			
		||||
     data: () => ({
 | 
			
		||||
         drawer: false,
 | 
			
		||||
         group: null,
 | 
			
		||||
         items: [
 | 
			
		||||
             {
 | 
			
		||||
                 title: 'Foo',
 | 
			
		||||
                 value: 'foo',
 | 
			
		||||
             },
 | 
			
		||||
             {
 | 
			
		||||
                 title: 'Bar',
 | 
			
		||||
                 value: 'bar',
 | 
			
		||||
             },
 | 
			
		||||
             {
 | 
			
		||||
                 title: 'Fizz',
 | 
			
		||||
                 value: 'fizz',
 | 
			
		||||
             },
 | 
			
		||||
             {
 | 
			
		||||
                 title: 'Buzz',
 | 
			
		||||
                 value: 'buzz',
 | 
			
		||||
             },
 | 
			
		||||
         menuItems: [
 | 
			
		||||
             { title: 'Inicio', route: '/'},
 | 
			
		||||
             { title: 'Comprar', route:'/comprar'},
 | 
			
		||||
             { title: 'Resumen de Compra', route:'/resumen_compra'},
 | 
			
		||||
         ],
 | 
			
		||||
     }),
 | 
			
		||||
 | 
			
		||||
     watch: {
 | 
			
		||||
         group () {
 | 
			
		||||
             this.drawer = false
 | 
			
		||||
         },
 | 
			
		||||
     },
 | 
			
		||||
     methods: {
 | 
			
		||||
         navigate(route) {
 | 
			
		||||
             this.$router.push(route);
 | 
			
		||||
         },
 | 
			
		||||
     }
 | 
			
		||||
 }
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
@@ -87,11 +87,8 @@
 | 
			
		||||
          </v-row>
 | 
			
		||||
        </v-container>
 | 
			
		||||
        <v-btn @click="addLine" color="blue">Agregar</v-btn>
 | 
			
		||||
 | 
			
		||||
        </v-container>
 | 
			
		||||
 | 
			
		||||
        <v-divider></v-divider>
 | 
			
		||||
 | 
			
		||||
        <v-text-field
 | 
			
		||||
          :value="calculateTotal"
 | 
			
		||||
          label="Total"
 | 
			
		||||
@@ -133,6 +130,11 @@
 | 
			
		||||
      this.fetchClients();
 | 
			
		||||
      this.fetchProducts();
 | 
			
		||||
    },
 | 
			
		||||
    watch: {
 | 
			
		||||
      group () {
 | 
			
		||||
        this.drawer = false
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    computed: {
 | 
			
		||||
      calculateTotal() {
 | 
			
		||||
        return this.purchase.saleline_set.reduce((total, saleline) => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user