Cambiada logica de devoluciones en chismosa para no mostrar si el pedido no es de un nucleo

This commit is contained in:
Alejandro Tasistro 2025-09-13 19:42:21 -03:00
parent 88deb88f04
commit 7c368c3d24

View file

@ -14,7 +14,7 @@
<th class="has-text-right">{{ cantidad_transporte }}</th> <th class="has-text-right">{{ cantidad_transporte }}</th>
<th class="has-text-right">{{ total_transporte }}</th> <th class="has-text-right">{{ total_transporte }}</th>
</tr> </tr>
<tr v-if="grupo_de_compra.devoluciones_habilitadas && !aprobado"> <tr v-if="mostrarDevoluciones">
<th><p>Devoluciones</p></th> <th><p>Devoluciones</p></th>
<td> <td>
<abbr :title="devoluciones_notas">{{ notas_abreviadas }}</abbr> <abbr :title="devoluciones_notas">{{ notas_abreviadas }}</abbr>
@ -49,6 +49,7 @@ import { mapMutations, mapState } from "vuex";
export default { export default {
components: { ProductoRow }, components: { ProductoRow },
computed: { computed: {
...mapState('login', ["rol"]),
...mapState('pedido',[ ...mapState('pedido',[
"grupo_de_compra", "grupo_de_compra",
"productos", "productos",
@ -65,6 +66,9 @@ export default {
mostrar_tabla() { mostrar_tabla() {
return this.productos?.length !== 0; return this.productos?.length !== 0;
}, },
mostrarDevoluciones() {
return this.rol === "barrio" && this.grupo_de_compra.devoluciones_habilitadas && !this.aprobado;
}
}, },
methods: { methods: {
...mapMutations('ui',["toggleDevoluciones"]), ...mapMutations('ui',["toggleDevoluciones"]),