diff --git a/resources/js/components/pedidos/Chismosa.vue b/resources/js/components/pedidos/Chismosa.vue
index 800020c..b6bb492 100644
--- a/resources/js/components/pedidos/Chismosa.vue
+++ b/resources/js/components/pedidos/Chismosa.vue
@@ -12,20 +12,20 @@
B. Transporte |
- {{ cantidad_bonos_transporte }} |
- {{ total_bonos_transporte }} |
+ {{ cantidad_transporte }} |
+ {{ total_transporte }} |
Devoluciones |
- {{ notas_devoluciones_abbr }}
+ {{ notas_abreviadas }}
|
- -{{ devoluciones }} |
+ -{{ devoluciones_total }} |
Total total |
@@ -60,33 +60,18 @@ export default {
"devoluciones_total",
"devoluciones_notas",
]),
- },
- data() {
- return {
- mostrar_tabla: false,
- cantidad_bonos_transporte: 0,
- total_bonos_transporte: 0,
- devoluciones: 0,
- notas_devoluciones: "",
- notas_devoluciones_abbr: "",
- }
+ notas_abreviadas() {
+ return this.devoluciones_notas.substring(0, 15) + (this.devoluciones_notas.length > 15 ? "..." : "");
+ },
+ mostrar_tabla() {
+ return this.productos?.length !== 0;
+ },
},
mounted() {
Event.$on('pedido-actualizado', this.pedidoActualizado);
Event.$on('toggle-chismosa', this.pedidoActualizado);
},
methods: {
- pedidoActualizado: function () {
- this.mostrar_tabla = this.$root.productos.length > 0;
- this.cantidad_bonos_transporte = this.cantidadBonosDeTransporte();
- this.total_bonos_transporte = this.totalBonosDeTransporte();
- this.devoluciones = this.$root.pedido.devoluciones_total;
- this.notas_devoluciones = this.$root.pedido.devoluciones_notas;
- this.notas_devoluciones_abbr = this.notas_devoluciones.substring(0, 15);
- if (this.notas_devoluciones.length > 15) {
- this.notas_devoluciones_abbr += "...";
- }
- },
modificarDevoluciones: function () {
Event.$emit("modificar-devoluciones");
},