changeset 1233:c9c9c9cc61f6

Display "No result." in Bottleneck list and Staging area, when search has no results.
author Markus Kottlaender <markus@intevation.de>
date Tue, 20 Nov 2018 09:25:15 +0100
parents c24f934ffe43
children 1a5564655f2a
files client/src/bottlenecks/Bottlenecks.vue client/src/staging/Staging.vue
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/bottlenecks/Bottlenecks.vue	Tue Nov 20 09:14:17 2018 +0100
+++ b/client/src/bottlenecks/Bottlenecks.vue	Tue Nov 20 09:25:15 2018 +0100
@@ -21,7 +21,7 @@
             </div>
             <div class="col-2"></div>
         </div>
-        <div class="bottleneck-list small text-left">
+        <div class="bottleneck-list small text-left" v-if="filteredAndSortedBottlenecks().length">
             <div
                 v-for="bottleneck in filteredAndSortedBottlenecks()"
                 :key="bottleneck.properties.name"
@@ -60,6 +60,9 @@
                 </div>
             </div>
         </div>
+        <div v-else class="small text-center py-3 border-top">
+            No results.
+        </div>
     </div>
 </template>
 
--- a/client/src/staging/Staging.vue	Tue Nov 20 09:14:17 2018 +0100
+++ b/client/src/staging/Staging.vue	Tue Nov 20 09:25:15 2018 +0100
@@ -13,7 +13,7 @@
                   <th>&nbsp;</th>
               </tr>
           </thead>
-          <tbody>
+          <tbody v-if="filteredData.length">
               <tr v-for="data in filteredData" :key="data.id">
                   <td>{{ data.name }}</td>
                   <td>
@@ -33,8 +33,15 @@
                   </td>
               </tr>
           </tbody>
+          <tbody v-else>
+              <tr>
+                  <td class="text-center" colspan="6">
+                      No results.
+                  </td>
+              </tr>
+          </tbody>
       </table>
-      <div class="p-3">
+      <div class="p-3" v-if="filteredData.length">
           <button class="btn btn-info">Confirm</button>
       </div>
    </div>
@@ -137,6 +144,7 @@
 td
   font-size: 0.9rem
   border-top: 0px !important
+  border-bottom-width: 1px
   text-align: left
   padding: 0.5rem !important
 </style>