Solo se muestra en pedido
This commit is contained in:
parent
2f7ee48930
commit
59b6c29508
2 changed files with 56 additions and 45 deletions
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<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">
|
<ul class="mt-4">
|
||||||
<li v-for="(miga, i) in migas" :key="i" :class="{'is-active': i == migaActiva}">
|
<li v-for="(miga, i) in migas" :key="i" :class="{'is-active': i == migaActiva}">
|
||||||
<a :href="miga.href" v-text="miga.nombre"
|
<a :href="miga.href" v-text="miga.nombre"
|
||||||
|
@ -10,7 +11,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import { mapGetters } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
initial: [{ nombre: 'Categorías', href: '/productos' }],
|
initial: [{ nombre: 'Categorías', href: '/productos' }],
|
||||||
|
@ -18,11 +21,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
visible: function() {
|
...mapGetters('pedido', ["pedidoDefinido"]),
|
||||||
|
visible: function () {
|
||||||
return this.migas.length > 0
|
return this.migas.length > 0
|
||||||
},
|
},
|
||||||
migaActiva: function() {
|
migaActiva: function () {
|
||||||
return this.migas.length-1
|
return this.migas.length - 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -40,7 +44,7 @@
|
||||||
this.migas.pop();
|
this.migas.pop();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
7
resources/js/store/modules/pedido.js
vendored
7
resources/js/store/modules/pedido.js
vendored
|
@ -45,9 +45,16 @@ const actions = {
|
||||||
async modificarDevoluciones({ commit }, { monto, notas }) {}
|
async modificarDevoluciones({ commit }, { monto, notas }) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getters = {
|
||||||
|
pedidoDefinido() {
|
||||||
|
return state.lastFetch !== null;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
state,
|
state,
|
||||||
mutations,
|
mutations,
|
||||||
actions,
|
actions,
|
||||||
|
getters,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue