<template>
    <tr>
        <td>{{ pedido.nombre }}</td>
        <td class="has-text-right" >{{ this.$limpiarInt(pedido.total) }}</td>
        <td>
            <pedidos-admin-switch-aprobacion
                :pedido="pedido">
            </pedidos-admin-switch-aprobacion>
        </td>
    </tr>
</template>

<script>
import PedidosAdminSwitchAprobacion from './PedidosAdminSwitchAprobacion.vue';
export default {
    name: "PedidosAdminFilaPedido",
    components: {
        PedidosAdminSwitchAprobacion
    },
    props: {
        pedido: Object
    },
    mounted() {
        Event.$on('sync-aprobacion', (unPedido) => {
            if (this.pedido.id === unPedido.id) {
                this.pedido = unPedido
            }
        })
    }
}
</script>

<style scoped>

</style>