pedi2/resources/js/components/PedidosAdminDropdownDescarg...

57 lines
1.8 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-pedido-a-csv/' + gdc" class="dropdown-item has-background-primary">
Planilla para central (CSV)
</a>
<a :href="'/admin/exportar-planillas-a-pdf/' + gdc" class="dropdown-item">
Planillas para armado (PDF)
</a>
<a :href="'/admin/exportar-pedido-con-nucleos-a-csv/' + gdc" class="dropdown-item">
Planilla completa de la canasta (CSV)
</a>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "PedidosAdminDropdownDescargar",
props: {
gdc: {
type: Number,
required: true
},
},
data() {
return {
dropdownActivo: false
}
},
computed: {
hayAprobados: function() {
return this.$parent.hayAprobados;
}
},
}
</script>
<style>
</style>