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