changeset 2733:4ae3453fcf50

import_review: fixed minor state bugs
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 19 Mar 2019 15:58:09 +0100
parents 0ab7985ef008
children 375c9dd935ad
files client/src/components/importoverview/LogDetail.vue client/src/store/imports.js
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importoverview/LogDetail.vue	Tue Mar 19 14:50:56 2019 +0100
+++ b/client/src/components/importoverview/LogDetail.vue	Tue Mar 19 15:58:09 2019 +0100
@@ -21,10 +21,16 @@
           fixed-width
         ></font-awesome-icon>
         <span class="text-info"><translate>Additional Info</translate></span>
-        <span class="text-info" v-if="isApprovedGaugeMeasurement">
+        <span
+          class="text-info"
+          v-if="isApprovedGaugeMeasurement && details.summary"
+        >
           ({{ details.summary.length }})</span
         >
-        <span v-if="isBottleneck" class="text-info text-left">
+        <span
+          v-if="isBottleneck && details.summary && details.summary.bottlenecks"
+          class="text-info text-left"
+        >
           ({{ details.summary.bottlenecks.length }})</span
         >
         <span class="text-left" v-if="isFairwayDimension"
@@ -131,7 +137,7 @@
     }
   },
   computed: {
-    ...mapState("imports", ["showAdditional", "showLogs"]),
+    ...mapState("imports", ["showAdditional", "showLogs", "details"]),
     kind() {
       return this.entry.kind.toUpperCase();
     },
--- a/client/src/store/imports.js	Tue Mar 19 14:50:56 2019 +0100
+++ b/client/src/store/imports.js	Tue Mar 19 15:58:09 2019 +0100
@@ -40,7 +40,7 @@
     show: NODETAILS,
     showAdditional: NODETAILS,
     showLogs: NODETAILS,
-    details: null
+    details: []
   };
 };