Feat: Barra de Navegacion en Formulario de Compras
This commit is contained in:
		| @@ -1,21 +1,5 @@ | |||||||
| <template> | <template> | ||||||
|     <v-container> |  | ||||||
|     <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-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" |  | ||||||
|                            :location="$vuetify.display.mobile ? 'bottom' : undefined" |  | ||||||
|                            temporary> |  | ||||||
|           <v-list :items="items"></v-list> |  | ||||||
|       </v-navigation-drawer> |  | ||||||
|     </v-container> |  | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script> | <script> | ||||||
|   | |||||||
| @@ -1,6 +1,20 @@ | |||||||
| <template> | <template> | ||||||
|   <v-main> |   <v-app-bar color="primary" prominent> | ||||||
|     <v-container app> |     <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-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" | ||||||
|  |                        :location="$vuetify.display.mobile ? 'bottom' : undefined" | ||||||
|  |                        temporary> | ||||||
|  |     <v-list :items="items"></v-list> | ||||||
|  |   </v-navigation-drawer> | ||||||
|  |   <v-container app> | ||||||
|       <v-form ref="form" v-model="valid"> |       <v-form ref="form" v-model="valid"> | ||||||
|         <v-text-field |         <v-text-field | ||||||
|           v-model="purchase.date" |           v-model="purchase.date" | ||||||
| @@ -91,7 +105,6 @@ | |||||||
|         <v-btn @click="submit" color="green">Comprar</v-btn> |         <v-btn @click="submit" color="green">Comprar</v-btn> | ||||||
|       </v-form> |       </v-form> | ||||||
|     </v-container> |     </v-container> | ||||||
|   </v-main> |  | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script> | <script> | ||||||
| @@ -103,6 +116,26 @@ | |||||||
|     data() { |     data() { | ||||||
|       return { |       return { | ||||||
|         valid: false, |         valid: false, | ||||||
|  |         drawer: false, | ||||||
|  |         group: null, | ||||||
|  |         items: [ | ||||||
|  |           { | ||||||
|  |             title: 'Foo', | ||||||
|  |             value: 'foo', | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             title: 'Bar', | ||||||
|  |             value: 'bar', | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             title: 'Fizz', | ||||||
|  |             value: 'fizz', | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             title: 'Buzz', | ||||||
|  |             value: 'buzz', | ||||||
|  |           }, | ||||||
|  |         ], | ||||||
|         purchase: { |         purchase: { | ||||||
|           date: '', |           date: '', | ||||||
|           client: null, |           client: null, | ||||||
| @@ -124,6 +157,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) => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user