total, productos, y devoluciones_habilitadas tomadas de vuex

This commit is contained in:
Alejandro Tasistro 2025-05-22 00:05:07 -03:00
parent b46b56159b
commit 1709468f1f

View file

@ -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");