forked from nathalie/pedi2
Deshabilita botones de eportar pedido barrial e imprimir planillas cuando no hay subpedidos aprobados
This commit is contained in:
parent
85f0a5a06b
commit
f67232f55c
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container is-max-widescreen is-max-desktop animate__animated" :class="animation" v-show="!init">
|
<div class="container is-max-widescreen is-max-desktop animate__animated" :class="animation" v-show="!init">
|
||||||
<div class="buttons is-right">
|
<div class="buttons is-right">
|
||||||
<a class="button is-success" :href="'/admin/exportar-pedido-a-csv/'+gdc">
|
<a class="button is-success" :href="hayAprobados ? '/admin/exportar-pedido-a-csv/'+gdc : '#'" :disabled="!hayAprobados">
|
||||||
<span>
|
<span>
|
||||||
Exportar pedido barrial
|
Exportar pedido barrial
|
||||||
</span>
|
</span>
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
<i class="fas fa-download"></i>
|
<i class="fas fa-download"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="button is-info" :href="'/admin/exportar-planillas-a-pdf/'+gdc">
|
<a class="button is-info" :href="hayAprobados ? '/admin/exportar-planillas-a-pdf/'+gdc : '#'" :disabled="!hayAprobados">
|
||||||
<span>
|
<span>
|
||||||
Imprimir Planillas
|
Imprimir Planillas
|
||||||
</span>
|
</span>
|
||||||
|
@ -56,6 +56,11 @@ export default {
|
||||||
subpedidos: []
|
subpedidos: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
hayAprobados: function() {
|
||||||
|
return this.subpedidos.filter(sp => sp.aprobado).length > 0
|
||||||
|
}
|
||||||
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
axios.get("/admin/obtener_sesion").then(response => {
|
axios.get("/admin/obtener_sesion").then(response => {
|
||||||
this.gdc = response.data.gdc;
|
this.gdc = response.data.gdc;
|
||||||
|
|
Loading…
Reference in New Issue