Solo se muestra en pedido

This commit is contained in:
Alejandro Tasistro 2025-05-21 18:39:56 -03:00
parent 2f7ee48930
commit 59b6c29508
2 changed files with 56 additions and 45 deletions

View file

@ -1,5 +1,6 @@
<template>
<nav class="breadcrumb is-centered has-background-danger-light is-fixed-top" aria-label="breadcrumbs" v-show="visible">
<nav v-if="pedidoDefinido" class="breadcrumb is-centered has-background-danger-light is-fixed-top"
aria-label="breadcrumbs" v-show="visible">
<ul class="mt-4">
<li v-for="(miga, i) in migas" :key="i" :class="{'is-active': i == migaActiva}">
<a :href="miga.href" v-text="miga.nombre"
@ -10,6 +11,8 @@
</template>
<script>
import { mapGetters } from "vuex";
export default {
data() {
return {
@ -18,6 +21,7 @@
}
},
computed: {
...mapGetters('pedido', ["pedidoDefinido"]),
visible: function () {
return this.migas.length > 0
},

View file

@ -45,9 +45,16 @@ const actions = {
async modificarDevoluciones({ commit }, { monto, notas }) {}
};
const getters = {
pedidoDefinido() {
return state.lastFetch !== null;
},
}
export default {
namespaced: true,
state,
mutations,
actions,
getters,
};