pedi2/resources/js/components/admin/TablaPedidos.vue

44 lines
1.3 KiB
Vue

<template>
<div>
<table class="table is-fullwidth is-striped is-bordered">
<thead>
<tr>
<th>Núcleo</th>
<th v-if="devoluciones_habilitadas"><abbr title="Total sin tomar en cuenta las devoluciones">Total parcial $</abbr></th>
<th v-if="devoluciones_habilitadas"><abbr title="Devoluciones correspondientes al núcleo">Devoluciones $</abbr></th>
<th><abbr title="Total a Pagar por el núleo">{{ devoluciones_habilitadas ? 'Total real' : 'Total' }} $</abbr></th>
<th class="is-1"><abbr title="Aprobado">Aprobado</abbr></th>
</tr>
</thead>
<tbody>
<fila-pedido
v-for="pedido in pedidos"
:pedido_id="pedido.id"
:key="pedido.id"
/>
</tbody>
</table>
<tabla-totales/>
</div>
</template>
<script>
import FilaPedido from "./FilaPedido.vue";
import { mapGetters, mapState } from "vuex";
import TablaTotales from "./TablaTotales.vue";
export default {
components: {
TablaTotales,
FilaPedido
},
computed: {
...mapState('admin', [
"devoluciones_habilitadas",
"pedidos",
]),
...mapGetters('admin', ['pedidosAprobados']),
},
}
</script>
<style></style>