diff --git a/resources/js/app.js b/resources/js/app.js index 068e9a6..76282e5 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -95,6 +95,7 @@ const app = new Vue({ axios.get('/api/subpedidos/' + this.pedido) .then(response => { this.pedido = response.data.data; + Event.$emit("pedido-actualizado"); }); } else { axios.get('/admin/obtener_sesion') @@ -116,21 +117,23 @@ const app = new Vue({ }).then((response) => { this.pedido = response.data.data this.$toast('Pedido actualizado exitosamente') + Event.$emit("pedido-actualizado"); }); - }); + }); // Actualizar monto y notas de devoluciones Event.$on('sync-devoluciones', (total, notas) => { if (this.pedido.aprobado) { this.$toast('No se puede modificar un pedido ya aprobado', 2000); return; } - + axios.post("api/subpedidos/" + this.pedido.id + "/sync_devoluciones", { total: total, notas: notas, }).then((response) => { this.pedido = response.data.data; this.$toast('Pedido actualizado'); + Event.$emit("pedido-actualizado"); }); }); diff --git a/resources/js/components/CartelPedidoAprobado.vue b/resources/js/components/CartelPedidoAprobado.vue index c43fa1f..be6f8a4 100644 --- a/resources/js/components/CartelPedidoAprobado.vue +++ b/resources/js/components/CartelPedidoAprobado.vue @@ -1,10 +1,31 @@ + .fixed-right { + position: fixed; + overflow-y: auto; + max-height: 81vh; + margin-right: 20px; + } + \ No newline at end of file diff --git a/resources/js/components/ChismosaDropdown.vue b/resources/js/components/ChismosaDropdown.vue index 9e8c834..26bb8e3 100644 --- a/resources/js/components/ChismosaDropdown.vue +++ b/resources/js/components/ChismosaDropdown.vue @@ -5,16 +5,9 @@ - + - @@ -32,33 +25,21 @@ export default { }, data() { return { - activa: false + activa: false, + total: 0, } }, + mounted() { + Event.$on('pedido-actualizado', this.actualizar); + }, methods: { toggle() { - this.activa = !this.activa + this.activa = !this.activa; + Event.$emit("toggle-chismosa", this.activa); + }, + actualizar() { + this.total = this.$limpiarInt(this.$root.devoluciones ? this.$root.pedido.total_menos_devoluciones : this.$root.pedido.total); }, }, } - - diff --git a/resources/js/components/PedidoBody.vue b/resources/js/components/PedidoBody.vue new file mode 100644 index 0000000..d8e671d --- /dev/null +++ b/resources/js/components/PedidoBody.vue @@ -0,0 +1,31 @@ + + + diff --git a/resources/js/components/Producto/ProductoCantidad.vue b/resources/js/components/Producto/ProductoCantidad.vue new file mode 100644 index 0000000..93ec5cd --- /dev/null +++ b/resources/js/components/Producto/ProductoCantidad.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/resources/js/components/ProductoCard.vue b/resources/js/components/ProductoCard.vue index 1d5cc0d..1ee70b6 100644 --- a/resources/js/components/ProductoCard.vue +++ b/resources/js/components/ProductoCard.vue @@ -1,6 +1,11 @@ diff --git a/resources/js/components/ProductosContainer.vue b/resources/js/components/ProductosContainer.vue index 6c22916..3f34f15 100644 --- a/resources/js/components/ProductosContainer.vue +++ b/resources/js/components/ProductosContainer.vue @@ -1,5 +1,5 @@