Compare commits

..

No commits in common. "7e49633b2cc1027a51993dfb0040923001738ac6" and "fdfba78d21847b02b31efdb0b20f27238b95c1ae" have entirely different histories.

5 changed files with 9 additions and 17 deletions

View file

@ -133,12 +133,10 @@ class GrupoDeCompra extends Model
*/
public function exportarPedidosAPdf()
{
$subpedidos = $this->pedidosAprobados();
$fecha = now()->format('Y-m-d');
$filepath = $this->nombre . '-' . $fecha . '.pdf';
$pedidoOllas = $this->subpedidos
->where('tipo_pedido_id', '=', TipoPedido::firstOrCreate(['nombre' => 'olla'])->id);
$pedidos = $this->pedidosAprobados()->concat($pedidoOllas);
PdfHelper::exportarPedidos($filepath, $pedidos);
PdfHelper::exportarPedidos($filepath, $subpedidos);
}
function pedidoParaPdf(): array

View file

@ -14,7 +14,7 @@
<burger/>
</div>
<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">
<span class="tag is-warning is-size-6">
Monto superado

View file

@ -6,14 +6,10 @@ export default {
name: "OllasNavBarBrand",
components: { ChismosaDropdown },
computed: {
...mapGetters('ollas', ["montoTotal", "montoSuperado"]),
...mapGetters('pedido', ["pedidoDefinido"]),
...mapState('login', ["rol"]),
...mapGetters('ollas', ["montoTotal"]),
...mapState('ui', ["burger_activa"]),
...mapState('pedido', ["nombre"]),
mostrarAviso() {
return this.pedidoDefinido && this.rol === 'ollas' && this.montoSuperado;
}
},
methods: {
...mapActions('ollas', ["getMontoPorOlla"]),
@ -26,14 +22,12 @@ export default {
</script>
<template>
<div class="navbar-item">
<div class="navbar-item hide-below-1024">
<p v-if="pedidoDefinido">{{ `${nombre}` }}</p>
<chismosa-dropdown
v-if="pedidoDefinido"
class="hide-above-1023"
ariaControls="mobile"/>
<span v-if="mostrarAviso" class="tag is-warning is-size-6">
Monto superado
</span>
</div>
</template>

View file

@ -1,6 +1,6 @@
<template>
<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>
<tr>
<th>Producto</th>
@ -36,7 +36,7 @@
<producto-row v-for="producto in productos" :producto="producto" :key="producto.id"/>
</tbody>
</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.
</p>
</div>

View file

@ -27,7 +27,7 @@ export default defineComponent({
<nav-migas/>
<cantidad-ollas v-if="rol === 'ollas'"/>
<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>
<canasta/>
</div>