Compare commits
	
		
			No commits in common. "7e49633b2cc1027a51993dfb0040923001738ac6" and "fdfba78d21847b02b31efdb0b20f27238b95c1ae" have entirely different histories.
		
	
	
		
			7e49633b2c
			...
			fdfba78d21
		
	
		
					 5 changed files with 9 additions and 17 deletions
				
			
		|  | @ -133,12 +133,10 @@ class GrupoDeCompra extends Model | ||||||
|      */ |      */ | ||||||
|     public function exportarPedidosAPdf() |     public function exportarPedidosAPdf() | ||||||
|     { |     { | ||||||
|  |         $subpedidos = $this->pedidosAprobados(); | ||||||
|         $fecha = now()->format('Y-m-d'); |         $fecha = now()->format('Y-m-d'); | ||||||
|         $filepath = $this->nombre . '-' . $fecha . '.pdf'; |         $filepath = $this->nombre . '-' . $fecha . '.pdf'; | ||||||
|         $pedidoOllas = $this->subpedidos |         PdfHelper::exportarPedidos($filepath, $subpedidos); | ||||||
|             ->where('tipo_pedido_id', '=', TipoPedido::firstOrCreate(['nombre' => 'olla'])->id); |  | ||||||
|         $pedidos = $this->pedidosAprobados()->concat($pedidoOllas); |  | ||||||
|         PdfHelper::exportarPedidos($filepath, $pedidos); |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     function pedidoParaPdf(): array |     function pedidoParaPdf(): array | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ | ||||||
|             <burger/> |             <burger/> | ||||||
|         </div> |         </div> | ||||||
|         <div class="navbar-menu" :class="{'is-active': burger_activa}"> |         <div class="navbar-menu" :class="{'is-active': burger_activa}"> | ||||||
|             <div class="navbar-start is-flex is-justify-content-center is-flex-grow-1 hide-below-1024"> |             <div class="navbar-start is-flex is-justify-content-center is-flex-grow-1"> | ||||||
|                 <div v-if="mostrarAviso" class="is-absolute-center is-flex is-align-items-center navbar-item"> |                 <div v-if="mostrarAviso" class="is-absolute-center is-flex is-align-items-center navbar-item"> | ||||||
|                     <span class="tag is-warning is-size-6"> |                     <span class="tag is-warning is-size-6"> | ||||||
|                         Monto superado |                         Monto superado | ||||||
|  |  | ||||||
|  | @ -6,14 +6,10 @@ export default { | ||||||
|     name: "OllasNavBarBrand", |     name: "OllasNavBarBrand", | ||||||
|     components: { ChismosaDropdown }, |     components: { ChismosaDropdown }, | ||||||
|     computed: { |     computed: { | ||||||
|         ...mapGetters('ollas', ["montoTotal", "montoSuperado"]), |  | ||||||
|         ...mapGetters('pedido', ["pedidoDefinido"]), |         ...mapGetters('pedido', ["pedidoDefinido"]), | ||||||
|         ...mapState('login', ["rol"]), |         ...mapGetters('ollas', ["montoTotal"]), | ||||||
|         ...mapState('ui', ["burger_activa"]), |         ...mapState('ui', ["burger_activa"]), | ||||||
|         ...mapState('pedido', ["nombre"]), |         ...mapState('pedido', ["nombre"]), | ||||||
|         mostrarAviso() { |  | ||||||
|             return this.pedidoDefinido && this.rol === 'ollas' && this.montoSuperado; |  | ||||||
|         } |  | ||||||
|     }, |     }, | ||||||
|     methods: { |     methods: { | ||||||
|         ...mapActions('ollas', ["getMontoPorOlla"]), |         ...mapActions('ollas', ["getMontoPorOlla"]), | ||||||
|  | @ -26,14 +22,12 @@ export default { | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
|     <div class="navbar-item"> |     <div class="navbar-item hide-below-1024"> | ||||||
|  |         <p v-if="pedidoDefinido">{{ `${nombre}` }}</p> | ||||||
|         <chismosa-dropdown |         <chismosa-dropdown | ||||||
|             v-if="pedidoDefinido" |             v-if="pedidoDefinido" | ||||||
|             class="hide-above-1023" |             class="hide-above-1023" | ||||||
|             ariaControls="mobile"/> |             ariaControls="mobile"/> | ||||||
|         <span v-if="mostrarAviso" class="tag is-warning is-size-6"> |  | ||||||
|             Monto superado |  | ||||||
|         </span> |  | ||||||
|     </div> |     </div> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| <template> | <template> | ||||||
|     <div class="fixed-right mr-3 ml-3"> |     <div class="fixed-right mr-3 ml-3"> | ||||||
|         <table v-if="mostrar_tabla" class="table is-striped is-bordered tabla-chismosa is-narrow"> |         <table v-show="mostrar_tabla" class="table is-striped is-bordered tabla-chismosa is-narrow"> | ||||||
|             <thead> |             <thead> | ||||||
|             <tr> |             <tr> | ||||||
|                 <th>Producto</th> |                 <th>Producto</th> | ||||||
|  | @ -36,7 +36,7 @@ | ||||||
|             <producto-row v-for="producto in productos" :producto="producto" :key="producto.id"/> |             <producto-row v-for="producto in productos" :producto="producto" :key="producto.id"/> | ||||||
|             </tbody> |             </tbody> | ||||||
|         </table> |         </table> | ||||||
|         <p class="has-text-centered" v-else> |         <p class="has-text-centered" v-show="!mostrar_tabla"> | ||||||
|             Compa, todavía no agregaste nada a la chismosa. |             Compa, todavía no agregaste nada a la chismosa. | ||||||
|         </p> |         </p> | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ export default defineComponent({ | ||||||
|         <nav-migas/> |         <nav-migas/> | ||||||
|         <cantidad-ollas v-if="rol === 'ollas'"/> |         <cantidad-ollas v-if="rol === 'ollas'"/> | ||||||
|         <div class="columns"> |         <div class="columns"> | ||||||
|             <div class="column" :class="{ 'is-two-thirds-desktop': show_chismosa }"> |             <div class="column" :class="{ 'is-two-thirds-desktop is-hidden-touch': show_chismosa }"> | ||||||
|                 <slot name="cartel"></slot> |                 <slot name="cartel"></slot> | ||||||
|                 <canasta/> |                 <canasta/> | ||||||
|             </div> |             </div> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue