54 lines
1.6 KiB
Vue
54 lines
1.6 KiB
Vue
|
<template>
|
||
|
<div class="buttons is-right">
|
||
|
<div class="dropdown" :class="{'is-active': dropdownActivo}" @mouseleave="dropdownActivo = false">
|
||
|
<div class="dropdown-trigger">
|
||
|
<button class="button" aria-haspopup="true" aria-controls="dropdown-menu" :disabled="!hayAprobados" @click="dropdownActivo = !dropdownActivo">
|
||
|
<span class="icon is-small">
|
||
|
<i class="fas fa-download"></i>
|
||
|
</span>
|
||
|
<span>Descargar pedido</span>
|
||
|
<span class="icon is-small">
|
||
|
<i class="fas fa-angle-down" aria-hidden="true"></i>
|
||
|
</span>
|
||
|
</button>
|
||
|
</div>
|
||
|
<div class="dropdown-menu" id="dropdown-menu" role="menu">
|
||
|
<div class="dropdown-content">
|
||
|
<a :href="'/admin/exportar-planillas-a-pdf/' + gdc" class="dropdown-item">
|
||
|
Exportar planillas a pdf
|
||
|
</a>
|
||
|
<a :href="'/admin/exportar-pedido-a-csv/' + gdc" class="dropdown-item">
|
||
|
Exportar pedido a csv
|
||
|
</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: "PedidosAdminDropdownDescargar",
|
||
|
props: {
|
||
|
gdc: {
|
||
|
type: Number,
|
||
|
required: true
|
||
|
},
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
dropdownActivo: this.$parent.dropdownActivo
|
||
|
}
|
||
|
},
|
||
|
computed: {
|
||
|
hayAprobados: function() {
|
||
|
return this.$parent.hayAprobados;
|
||
|
}
|
||
|
},
|
||
|
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
|
||
|
</style>
|