diff --git a/resources/js/components/pedidos/Chismosa.vue b/resources/js/components/pedidos/Chismosa.vue index 7b4e277..800020c 100644 --- a/resources/js/components/pedidos/Chismosa.vue +++ b/resources/js/components/pedidos/Chismosa.vue @@ -15,7 +15,7 @@ <th class="has-text-right">{{ cantidad_bonos_transporte }}</th> <th class="has-text-right">{{ total_bonos_transporte }}</th> </tr> - <tr v-if="this.$root.devoluciones"> + <tr v-if="devoluciones_habilitadas"> <th><p>Devoluciones</p></th> <td> <abbr :title="notas_devoluciones">{{ notas_devoluciones_abbr }}</abbr> @@ -46,9 +46,21 @@ <script> import ProductoRow from "./ProductoRow.vue"; +import { mapState } from "vuex"; export default { components: { ProductoRow }, + computed: { + ...mapState('barrio',["devoluciones_habilitadas"]), + ...mapState('pedido',[ + "productos", + "total", + "total_transporte", + "cantidad_transporte", + "devoluciones_total", + "devoluciones_notas", + ]), + }, data() { return { mostrar_tabla: false, @@ -57,8 +69,6 @@ export default { devoluciones: 0, notas_devoluciones: "", notas_devoluciones_abbr: "", - total: 0, - productos: [], } }, mounted() { @@ -76,8 +86,6 @@ export default { if (this.notas_devoluciones.length > 15) { this.notas_devoluciones_abbr += "..."; } - this.total = this.$root.pedido.total; - this.productos = this.$root.productos; }, modificarDevoluciones: function () { Event.$emit("modificar-devoluciones");