forked from nathalie/pedi2
		
	Editar producto en chismossa
This commit is contained in:
		
							parent
							
								
									3814022411
								
							
						
					
					
						commit
						fba73636de
					
				
					 2 changed files with 13 additions and 1 deletions
				
			
		
							
								
								
									
										12
									
								
								public/js/chismosa.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								public/js/chismosa.js
									
										
									
									
										vendored
									
									
								
							|  | @ -63,6 +63,11 @@ Vue.component('chismosa', { | ||||||
|                     this.subpedido = response.data.data; |                     this.subpedido = response.data.data; | ||||||
|                 }); |                 }); | ||||||
|         } |         } | ||||||
|  |     }, | ||||||
|  |     mounted() { | ||||||
|  |         Event.$on('sync-subpedido', () =>  { | ||||||
|  |             this.fetchSubpedido(); | ||||||
|  |         }); | ||||||
|     } |     } | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
|  | @ -72,7 +77,7 @@ Vue.component('producto-row', { | ||||||
|             <td>{{ this.producto.nombre }}</td> |             <td>{{ this.producto.nombre }}</td> | ||||||
|             <td>{{ this.producto.pivot.cantidad }}</td> |             <td>{{ this.producto.pivot.cantidad }}</td> | ||||||
|             <td>{{ this.producto.pivot.total }}</td> |             <td>{{ this.producto.pivot.total }}</td> | ||||||
|             <td><button class="button is-warning"> |             <td><button @click.capture="seleccionarProducto(producto)" class="button is-warning"> | ||||||
|                 <span class="icon"> |                 <span class="icon"> | ||||||
|                     <i class="fas fa-edit"></i> |                     <i class="fas fa-edit"></i> | ||||||
|                 </span> |                 </span> | ||||||
|  | @ -86,5 +91,10 @@ Vue.component('producto-row', { | ||||||
|     `,
 |     `,
 | ||||||
|     props: { |     props: { | ||||||
|         producto: Object |         producto: Object | ||||||
|  |     }, | ||||||
|  |     methods: { | ||||||
|  |         seleccionarProducto(producto) { | ||||||
|  |             Event.$emit("producto-seleccionado",producto); | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| }) | }) | ||||||
|  | @ -6,8 +6,10 @@ | ||||||
| 
 | 
 | ||||||
| @section('content') | @section('content') | ||||||
|     <chismosa></chismosa> |     <chismosa></chismosa> | ||||||
|  | 	<producto-container></producto-container> | ||||||
| @endsection | @endsection | ||||||
| 
 | 
 | ||||||
| @section('scripts') | @section('scripts') | ||||||
|     <script src="{{ asset('js/chismosa.js') }}"></script> |     <script src="{{ asset('js/chismosa.js') }}"></script> | ||||||
|  | 	<script src="{{ asset('js/productos.js') }}"></script> | ||||||
| @endsection | @endsection | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 nat
						nat