2023-05-27 20:08:55 -03:00
|
|
|
<template>
|
|
|
|
<div class="dropdown is-right navbar-item" :class="{'is-active':activa}">
|
|
|
|
<div class="dropdown-trigger">
|
|
|
|
<a class="text-a" aria-haspopup="true" :aria-controls="id" @click.capture="toggle">
|
|
|
|
<span class="icon is-small mr-1">
|
|
|
|
<img src="/assets/chismosa.png">
|
|
|
|
</span>
|
2024-09-15 18:09:23 -03:00
|
|
|
<span v-text="'$' + total"></span>
|
2023-05-27 20:08:55 -03:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Chismosa from './Chismosa.vue'
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Chismosa
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
id: {
|
|
|
|
type: String,
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2024-09-15 18:09:23 -03:00
|
|
|
activa: false,
|
|
|
|
total: 0,
|
2023-05-27 20:08:55 -03:00
|
|
|
}
|
|
|
|
},
|
2024-09-15 18:09:23 -03:00
|
|
|
mounted() {
|
|
|
|
Event.$on('pedido-actualizado', this.actualizar);
|
|
|
|
},
|
2023-05-27 20:08:55 -03:00
|
|
|
methods: {
|
|
|
|
toggle() {
|
2024-09-10 21:31:49 -03:00
|
|
|
this.activa = !this.activa;
|
2024-09-10 22:07:16 -03:00
|
|
|
Event.$emit("toggle-chismosa", this.activa);
|
2023-05-27 20:08:55 -03:00
|
|
|
},
|
2024-09-15 18:09:23 -03:00
|
|
|
actualizar() {
|
|
|
|
this.total = this.$limpiarInt(this.$root.devoluciones ? this.$root.pedido.total_menos_devoluciones : this.$root.pedido.total);
|
|
|
|
},
|
2023-05-27 20:08:55 -03:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|