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