39 lines
1.1 KiB
Vue
39 lines
1.1 KiB
Vue
<template>
|
|
<tr>
|
|
<td>{{ pedido.nombre }}</td>
|
|
<td v-if="devoluciones_habilitadas" class="has-text-right" >
|
|
{{ pedido.total_sin_devoluciones }}
|
|
</td>
|
|
<td v-if="devoluciones_habilitadas" class="has-text-right" >
|
|
<abbr :title="pedido.devoluciones_notas">
|
|
-{{ pedido.devoluciones_total }}
|
|
</abbr>
|
|
</td>
|
|
<td class="has-text-right" >
|
|
{{ devoluciones_habilitadas ? pedido.total : pedido.total_sin_devoluciones }}
|
|
</td>
|
|
<td><switch-aprobacion :pedido_id="pedido_id"></switch-aprobacion></td>
|
|
</tr>
|
|
</template>
|
|
|
|
<script>
|
|
import SwitchAprobacion from "./SwitchAprobacion.vue";
|
|
import { mapGetters, mapState } from "vuex";
|
|
export default {
|
|
components: {
|
|
SwitchAprobacion
|
|
},
|
|
props: {
|
|
pedido_id: Number
|
|
},
|
|
computed: {
|
|
...mapState('admin',["devoluciones_habilitadas"]),
|
|
...mapGetters('admin',["getPedido"]),
|
|
pedido() {
|
|
return this.getPedido(this.pedido_id);
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style scoped></style>
|