diff client/src/components/gauge/Waterlevel.vue @ 3404:0c9467003d14

client: waterlevel diagrams: disabled export buttons when no data is available
author Markus Kottlaender <markus@intevation.de>
date Thu, 23 May 2019 12:48:55 +0200
parents d7cc5cda82a9
children a26c1d745fc3
line wrap: on
line diff
--- a/client/src/components/gauge/Waterlevel.vue	Thu May 23 12:42:26 2019 +0200
+++ b/client/src/components/gauge/Waterlevel.vue	Thu May 23 12:48:55 2019 +0200
@@ -44,11 +44,15 @@
             @click="downloadPDF"
             type="button"
             class="btn btn-sm btn-info d-block w-100 mt-2"
+            :disabled="!waterlevels.length"
           >
             <translate>Export to PDF</translate>
           </button>
           <a
-            class="btn btn-sm btn-info d-block w-100 mt-2"
+            :class="[
+              'btn btn-sm btn-info d-block w-100 mt-2',
+              { disabled: !waterlevels.length }
+            ]"
             :href="csvLink"
             :download="csvFileName"
           >