<template> <tr> <td>{{ pedido.nombre }}</td> <td v-if="$root.devoluciones" class="has-text-right" >{{ pedido.total }}</td> <td v-if="$root.devoluciones" class="has-text-right" ><abbr :title="pedido.devoluciones_notas">-{{ pedido.devoluciones_total }}</abbr></td> <td class="has-text-right" >{{ $root.devoluciones ? pedido.total_menos_devoluciones : pedido.total }}</td> <td> <admin-switch-aprobacion :pedido="pedido"> </admin-switch-aprobacion> </td> </tr> </template> <script> import SwitchAprobacion from "./SwitchAprobacion.vue"; export default { components: { SwitchAprobacion }, props: { pedido: Object }, mounted() { Event.$on('sync-aprobacion', (unPedido) => { if (this.pedido.id === unPedido.id) { this.pedido = unPedido } }) } } </script> <style scoped> </style>