Mercurial > gemma
annotate client/src/components/importoverview/LogDetail.vue @ 4950:427f87ac96d6 fairway-marks-import
One more header line.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 20 Feb 2020 18:19:47 +0100 |
parents | 8c0f2377ff47 |
children |
rev | line source |
---|---|
2592 | 1 <template> |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2875
diff
changeset
|
2 <div> |
2727
0fe0b3f1720f
client: import overview: several style fixes
Markus Kottlaender <markus@intevation.de>
parents:
2718
diff
changeset
|
3 <div |
2925
ce148a7fb896
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2919
diff
changeset
|
4 class="d-flex border-bottom" |
2727
0fe0b3f1720f
client: import overview: several style fixes
Markus Kottlaender <markus@intevation.de>
parents:
2718
diff
changeset
|
5 style="padding-left: 3px;" |
3358
c0c880553cd5
client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
6 v-if="hasAdditionalInfo || isST || isSEC || isSR" |
2727
0fe0b3f1720f
client: import overview: several style fixes
Markus Kottlaender <markus@intevation.de>
parents:
2718
diff
changeset
|
7 > |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
8 <div v-if="hasAdditionalInfo"> |
2902
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
9 <UISpinnerButton |
2601 | 10 @click="toggleAdditionalInfo" |
2902
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
11 :state="entry.id === showAdditional" |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
12 :icons="['angle-right', 'angle-down']" |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
13 class="text-info d-inline-block" |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
14 /> |
2601 | 15 <span class="text-info"><translate>Additional Info</translate></span> |
2917
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
16 <span class="text-info" v-if="isAGM && details.summary"> |
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
17 ({{ details.summary.length }}) |
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
18 </span> |
2733
4ae3453fcf50
import_review: fixed minor state bugs
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
19 <span |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
20 v-if="isBN && details.summary && details.summary.bottlenecks" |
2733
4ae3453fcf50
import_review: fixed minor state bugs
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
21 class="text-info text-left" |
4ae3453fcf50
import_review: fixed minor state bugs
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
22 > |
2917
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
23 ({{ details.summary.bottlenecks.length }}) |
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
24 </span> |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
25 <span class="text-left" v-if="isFD"> |
2917
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
26 {{ details.summary["source-organization"] }} |
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
27 (LOS: {{ details.summary.los }}) |
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
28 </span> |
2601 | 29 </div> |
3358
c0c880553cd5
client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
30 <SectionDetails v-if="isSEC && isPending" :entry="entry" /> |
c0c880553cd5
client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
31 <StretchDetails v-if="isST && isPending" :entry="entry" /> |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
32 <SoundingResultDetail :entry="entry" v-if="isSR && isPending" /> |
2594 | 33 </div> |
2917
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
34 <div |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
35 v-if="entry.id === showAdditional && isPending && (isFD || isAGM || isBN)" |
2925
ce148a7fb896
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2919
diff
changeset
|
36 class="d-flex border-bottom" |
2917
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
37 > |
4336
45307cf4931a
Review of fairway dimensions
Thomas Junk <thomas.junk@intevation.de>
parents:
3358
diff
changeset
|
38 <FairwayDimensionDetail :summary="details.summary" v-if="isFD" /> |
2944
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2927
diff
changeset
|
39 <ApprovedGaugeMeasurementDetail v-if="isAGM" /> |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
40 <BottleneckDetail :entry="entry" v-if="isBN" /> |
2917
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
41 </div> |
2925
ce148a7fb896
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2919
diff
changeset
|
42 <div class="d-flex" style="padding-left: 3px;"> |
2902
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
43 <UISpinnerButton |
2594 | 44 @click="toggleAdditionalLogging" |
2902
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
45 :state="entry.id === showLogs" |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
46 :icons="['angle-right', 'angle-down']" |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
47 classes="text-info" |
399b03e59411
client: use UISpinnerButton in bottlenecks list and imports overview
Markus Kottlaender <markus@intevation.de>
parents:
2887
diff
changeset
|
48 /> |
2601 | 49 <span class="text-info"><translate>Logs</translate></span> |
2594 | 50 </div> |
2919
6c5364ff0abb
client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents:
2917
diff
changeset
|
51 <AdditionalLog v-if="entry.id === showLogs" class="d-flex flex-row" /> |
2592 | 52 </div> |
53 </template> | |
54 | |
55 <script> | |
56 /* This is Free Software under GNU Affero General Public License v >= 3.0 | |
57 * without warranty, see README.md and license for details. | |
58 * | |
59 * SPDX-License-Identifier: AGPL-3.0-or-later | |
60 * License-Filename: LICENSES/AGPL-3.0.txt | |
61 * | |
62 * Copyright (C) 2018 by via donau | |
63 * – Österreichische Wasserstraßen-Gesellschaft mbH | |
64 * Software engineering by Intevation GmbH | |
65 * | |
66 * Author(s): | |
67 * Thomas Junk <thomas.junk@intevation.de> | |
68 */ | |
2594 | 69 |
70 import { mapState } from "vuex"; | |
71 | |
2592 | 72 export default { |
2594 | 73 components: { |
2985
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2944
diff
changeset
|
74 SoundingResultDetail: () => import("./SoundingResultDetail"), |
3358
c0c880553cd5
client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
75 StretchDetails: () => import("./StretchDetails"), |
c0c880553cd5
client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
76 SectionDetails: () => import("./SectionDetails"), |
2985
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2944
diff
changeset
|
77 FairwayDimensionDetail: () => import("./FairwayDimensionDetail"), |
2917
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
78 ApprovedGaugeMeasurementDetail: () => |
2985
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2944
diff
changeset
|
79 import("./ApprovedGaugeMeasurementDetail"), |
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2944
diff
changeset
|
80 BottleneckDetail: () => import("./BottleneckDetail"), |
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2944
diff
changeset
|
81 AdditionalLog: () => import("./AdditionalLog") |
2594 | 82 }, |
2875
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
83 props: ["entry"], |
2594 | 84 computed: { |
2733
4ae3453fcf50
import_review: fixed minor state bugs
Thomas Junk <thomas.junk@intevation.de>
parents:
2732
diff
changeset
|
85 ...mapState("imports", ["showAdditional", "showLogs", "details"]), |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
86 kind() { |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
87 return this.entry.kind.toUpperCase(); |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
88 }, |
2776
a0b63e2fca99
import_overview: only display additional info when state of current entry is pending
Thomas Junk <thomas.junk@intevation.de>
parents:
2736
diff
changeset
|
89 isPending() { |
a0b63e2fca99
import_overview: only display additional info when state of current entry is pending
Thomas Junk <thomas.junk@intevation.de>
parents:
2736
diff
changeset
|
90 return this.entry.state == "pending"; |
a0b63e2fca99
import_overview: only display additional info when state of current entry is pending
Thomas Junk <thomas.junk@intevation.de>
parents:
2736
diff
changeset
|
91 }, |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
92 hasAdditionalInfo() { |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
93 return this.isPending && (this.isAGM || this.isBN); |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
94 }, |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
95 isFD() { |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
96 return this.kind === "FD"; |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
97 }, |
2917
edc2633c3cc6
client: importsoverview: cleaned up html, removed unnecessary component
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
98 isAGM() { |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
99 return this.kind === "AGM"; |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
100 }, |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
101 isBN() { |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
102 return this.kind === "BN" || this.kind === "UBN"; |
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
103 }, |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
104 isST() { |
4340 | 105 return this.kind === "STSH"; |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
106 }, |
3358
c0c880553cd5
client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
107 isSEC() { |
c0c880553cd5
client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
108 return this.kind === "SEC"; |
c0c880553cd5
client: import review: added section details (actually just the link to move the map to the feature)
Markus Kottlaender <markus@intevation.de>
parents:
2985
diff
changeset
|
109 }, |
2927
80815b0a665c
client: importoverview: further improved styles and shortened variable names
Markus Kottlaender <markus@intevation.de>
parents:
2925
diff
changeset
|
110 isSR() { |
4407
8c0f2377ff47
import_overview: DSR review details added
Thomas Junk <thomas.junk@intevation.de>
parents:
4340
diff
changeset
|
111 return this.kind === "SR" || this.kind === "DSR"; |
2605
11fd7ee37f10
overview2: added stretch zoom functionality
Thomas Junk <thomas.junk@intevation.de>
parents:
2601
diff
changeset
|
112 } |
2875
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
113 }, |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
114 methods: { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
115 toggleAdditionalInfo() { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
116 if (this.entry.id === this.showAdditional) { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
117 this.$store.commit("imports/hideAdditionalInfo"); |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
118 } else { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
119 this.$store.commit("imports/showAdditionalInfoFor", this.entry.id); |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
120 } |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
121 }, |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
122 toggleAdditionalLogging() { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
123 if (this.entry.id === this.showLogs) { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
124 this.$store.commit("imports/hideAdditionalLogs"); |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
125 } else { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
126 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id); |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
127 } |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
128 } |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
129 }, |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
130 mounted() { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
131 if (this.entry.state === "pending") { |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
132 this.$store.commit("imports/showAdditionalInfoFor", this.entry.id); |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
133 } |
84effca50751
client: importoverview: cleaned up code
Markus Kottlaender <markus@intevation.de>
parents:
2799
diff
changeset
|
134 this.$store.commit("imports/showAdditionalLogsFor", this.entry.id); |
2594 | 135 } |
2592 | 136 }; |
137 </script> |