Mercurial > gemma
annotate client/src/components/importoverview/LogDetail.vue @ 2605:11fd7ee37f10
overview2: added stretch zoom functionality
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 12 Mar 2019 17:08:49 +0100 |
parents | b9523d876d01 |
children | 13377f2a5c42 |
rev | line source |
---|---|
2592 | 1 <template> |
2 <div> | |
2594 | 3 <div class="d-flex fex-row"> |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
4 <div v-if="hasAdditionalInfo"> |
2601 | 5 <font-awesome-icon |
6 v-if="entry.id === showAdditional" | |
7 @click="toggleAdditionalInfo" | |
8 class="my-auto mr-1 text-info pointer" | |
9 icon="angle-down" | |
10 fixed-width | |
11 ></font-awesome-icon> | |
12 <font-awesome-icon | |
13 v-if="entry.id !== showAdditional" | |
14 @click="toggleAdditionalInfo" | |
15 class="my-auto mr-1 text-info pointer" | |
16 icon="angle-right" | |
17 fixed-width | |
18 ></font-awesome-icon> | |
19 <span class="text-info"><translate>Additional Info</translate></span> | |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
20 <span class="text-info" v-if="isApprovedGaugeMeasurement"> |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
21 ({{ entry.summary.length }})</span |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
22 > |
2601 | 23 </div> |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
24 <StretchDetail v-if="isStretch" :entry="entry"></StretchDetail> |
2594 | 25 </div> |
26 <AdditionalDetail | |
27 v-if="entry.id === showAdditional" | |
28 class="ml-2 d-flex flex-row" | |
2597 | 29 :entry="entry" |
2594 | 30 ></AdditionalDetail> |
31 <div class="d-flex fex-row"> | |
32 <font-awesome-icon | |
33 v-if="entry.id === showLogs" | |
34 @click="toggleAdditionalLogging" | |
35 class="my-auto mr-1 text-info pointer" | |
36 icon="angle-down" | |
37 fixed-width | |
38 ></font-awesome-icon> | |
39 <font-awesome-icon | |
40 v-if="entry.id !== showLogs" | |
41 @click="toggleAdditionalLogging" | |
42 class="my-auto mr-1 text-info pointer" | |
43 icon="angle-right" | |
44 fixed-width | |
45 ></font-awesome-icon> | |
2601 | 46 <span class="text-info"><translate>Logs</translate></span> |
2594 | 47 </div> |
48 | |
49 <AdditionalLog | |
50 v-if="entry.id === showLogs" | |
2599 | 51 class="ml-4 d-flex flex-row" |
2597 | 52 :entry="entry" |
2594 | 53 ></AdditionalLog> |
2592 | 54 </div> |
55 </template> | |
56 | |
57 <script> | |
58 /* This is Free Software under GNU Affero General Public License v >= 3.0 | |
59 * without warranty, see README.md and license for details. | |
60 * | |
61 * SPDX-License-Identifier: AGPL-3.0-or-later | |
62 * License-Filename: LICENSES/AGPL-3.0.txt | |
63 * | |
64 * Copyright (C) 2018 by via donau | |
65 * – Österreichische Wasserstraßen-Gesellschaft mbH | |
66 * Software engineering by Intevation GmbH | |
67 * | |
68 * Author(s): | |
69 * Thomas Junk <thomas.junk@intevation.de> | |
70 */ | |
2594 | 71 |
72 import { mapState } from "vuex"; | |
73 | |
2592 | 74 export default { |
2593 | 75 name: "logdetail", |
2594 | 76 props: ["entry"], |
77 components: { | |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
78 StretchDetail: () => import("./StretchDetails.vue"), |
2594 | 79 AdditionalDetail: () => import("./AdditionalDetail.vue"), |
80 AdditionalLog: () => import("./AdditionalLog.vue") | |
81 }, | |
82 methods: { | |
83 toggleAdditionalInfo() { | |
84 if (this.entry.id === this.showAdditional) { | |
85 this.$store.commit("imports/hideAdditionalInfo"); | |
86 } else { | |
87 this.$store.commit("imports/showAdditionalInfoFor", this.entry.id); | |
88 } | |
89 }, | |
90 toggleAdditionalLogging() { | |
91 if (this.entry.id === this.showLogs) { | |
92 this.$store.commit("imports/hideAdditionalLogs"); | |
93 } else { | |
94 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id); | |
95 } | |
96 } | |
97 }, | |
98 computed: { | |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
99 ...mapState("imports", ["showAdditional", "showLogs"]), |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
100 kind() { |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
101 return this.entry.kind.toUpperCase(); |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
102 }, |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
103 hasAdditionalInfo() { |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
104 return this.entry.state == "pending" && this.isApprovedGaugeMeasurement; |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
105 }, |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
106 isFairwayDimension() { |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
107 return this.kind === "FD"; |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
108 }, |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
109 isApprovedGaugeMeasurement() { |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
110 return this.kind === "AGM"; |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
111 }, |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
112 isBottleneck() { |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
113 return this.kind === "BN" || this.kind === "UBN"; |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
114 }, |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
115 isStretch() { |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
116 return this.kind === "ST"; |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
117 }, |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
118 isSoundingResult() { |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
119 return this.kind === "SR"; |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
120 } |
2594 | 121 } |
2592 | 122 }; |
123 </script> | |
124 | |
2594 | 125 <style lang="scss" scoped></style> |