changeset 2917:edc2633c3cc6

client: importsoverview: cleaned up html, removed unnecessary component
author Markus Kottlaender <markus@intevation.de>
date Wed, 03 Apr 2019 15:37:54 +0200
parents ea54e63deb40
children b22f84d312f2
files client/src/components/importoverview/AdditionalDetail.vue client/src/components/importoverview/FairwayDimension.vue client/src/components/importoverview/FairwayDimensionDetail.vue client/src/components/importoverview/LogDetail.vue
diffstat 4 files changed, 41 insertions(+), 103 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importoverview/AdditionalDetail.vue	Wed Apr 03 15:32:59 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-<template>
-  <div>
-    <FairwayDimensionDetail
-      :entry="entry"
-      :details="details"
-      v-if="isFairwayDimension"
-    ></FairwayDimensionDetail>
-    <ApprovedGaugeMeasurementDetail
-      :entry="entry"
-      :details="details"
-      v-if="isApprovedGaugeMeasurement"
-    ></ApprovedGaugeMeasurementDetail>
-    <BottleneckDetail
-      :details="details"
-      :entry="entry"
-      v-if="isBottleneck"
-    ></BottleneckDetail>
-  </div>
-</template>
-
-<script>
-/* This is Free Software under GNU Affero General Public License v >= 3.0
- * without warranty, see README.md and license for details.
- *
- * SPDX-License-Identifier: AGPL-3.0-or-later
- * License-Filename: LICENSES/AGPL-3.0.txt
- *
- * Copyright (C) 2018 by via donau
- *   – Österreichische Wasserstraßen-Gesellschaft mbH
- * Software engineering by Intevation GmbH
- *
- * Author(s):
- * Thomas Junk <thomas.junk@intevation.de>
- */
-import { mapState } from "vuex";
-
-export default {
-  props: ["entry"],
-  components: {
-    BottleneckDetail: () => import("./BottleneckDetail.vue"),
-    ApprovedGaugeMeasurementDetail: () =>
-      import("./ApprovedGaugeMeasurementDetail.vue"),
-    FairwayDimensionDetail: () => import("./FairwayDimension.vue")
-  },
-  computed: {
-    ...mapState("imports", ["showLogs", "details"]),
-    kind() {
-      return this.entry.kind.toUpperCase();
-    },
-    isFairwayDimension() {
-      return this.kind === "FD";
-    },
-    isApprovedGaugeMeasurement() {
-      return this.kind === "AGM";
-    },
-    isBottleneck() {
-      return this.kind === "BN" || this.kind === "UBN";
-    }
-  }
-};
-</script>
--- a/client/src/components/importoverview/FairwayDimension.vue	Wed Apr 03 15:32:59 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<template>
-  <div>Fairwaydimension</div>
-</template>
-
-<script>
-/* This is Free Software under GNU Affero General Public License v >= 3.0
- * without warranty, see README.md and license for details.
- *
- * SPDX-License-Identifier: AGPL-3.0-or-later
- * License-Filename: LICENSES/AGPL-3.0.txt
- *
- * Copyright (C) 2018 by via donau
- *   – Österreichische Wasserstraßen-Gesellschaft mbH
- * Software engineering by Intevation GmbH
- *
- * Author(s):
- * Thomas Junk <thomas.junk@intevation.de>
- */
-export default {};
-</script>
-
-<style></style>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/components/importoverview/FairwayDimensionDetail.vue	Wed Apr 03 15:37:54 2019 +0200
@@ -0,0 +1,20 @@
+<template>
+  <div>Fairwaydimension</div>
+</template>
+
+<script>
+/* This is Free Software under GNU Affero General Public License v >= 3.0
+ * without warranty, see README.md and license for details.
+ *
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ * License-Filename: LICENSES/AGPL-3.0.txt
+ *
+ * Copyright (C) 2018 by via donau
+ *   – Österreichische Wasserstraßen-Gesellschaft mbH
+ * Software engineering by Intevation GmbH
+ *
+ * Author(s):
+ * Thomas Junk <thomas.junk@intevation.de>
+ */
+export default {};
+</script>
--- a/client/src/components/importoverview/LogDetail.vue	Wed Apr 03 15:32:59 2019 +0200
+++ b/client/src/components/importoverview/LogDetail.vue	Wed Apr 03 15:37:54 2019 +0200
@@ -13,22 +13,19 @@
           class="text-info d-inline-block"
         />
         <span class="text-info"><translate>Additional Info</translate></span>
-        <span
-          class="text-info"
-          v-if="isApprovedGaugeMeasurement && details.summary"
-        >
-          ({{ details.summary.length }})</span
-        >
+        <span class="text-info" v-if="isAGM && details.summary">
+          ({{ details.summary.length }})
+        </span>
         <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"
-          >{{ details.summary["source-organization"] }} (LOS:
-          {{ details.summary.los }})</span
-        >
+          ({{ details.summary.bottlenecks.length }})
+        </span>
+        <span class="text-left" v-if="isFairwayDimension">
+          {{ details.summary["source-organization"] }}
+          (LOS: {{ details.summary.los }})
+        </span>
       </div>
       <StretchDetail
         v-if="isStretch && isPending"
@@ -39,11 +36,14 @@
         v-if="isSoundingResult && isPending"
       ></SoundingResultDetail>
     </div>
-    <AdditionalDetail
+    <div
       v-if="entry.id === showAdditional && isPending"
       class="ml-2 d-flex flex-row"
-      :entry="entry"
-    ></AdditionalDetail>
+    >
+      <FairwayDimensionDetail :entry="entry" v-if="isFairwayDimension" />
+      <ApprovedGaugeMeasurementDetail :entry="entry" v-if="isAGM" />
+      <BottleneckDetail :entry="entry" v-if="isBottleneck" />
+    </div>
     <div class="d-flex fex-row" style="padding-left: 3px;">
       <UISpinnerButton
         @click="toggleAdditionalLogging"
@@ -81,7 +81,10 @@
   components: {
     SoundingResultDetail: () => import("./SoundingResultDetail.vue"),
     StretchDetail: () => import("./StretchDetails.vue"),
-    AdditionalDetail: () => import("./AdditionalDetail.vue"),
+    FairwayDimensionDetail: () => import("./FairwayDimensionDetail.vue"),
+    ApprovedGaugeMeasurementDetail: () =>
+      import("./ApprovedGaugeMeasurementDetail.vue"),
+    BottleneckDetail: () => import("./BottleneckDetail.vue"),
     AdditionalLog: () => import("./AdditionalLog.vue")
   },
   props: ["entry"],
@@ -94,14 +97,12 @@
       return this.entry.state == "pending";
     },
     hasAdditionalInfo() {
-      return (
-        this.isPending && (this.isApprovedGaugeMeasurement || this.isBottleneck)
-      );
+      return this.isPending && (this.isAGM || this.isBottleneck);
     },
     isFairwayDimension() {
       return this.kind === "FD";
     },
-    isApprovedGaugeMeasurement() {
+    isAGM() {
       return this.kind === "AGM";
     },
     isBottleneck() {