annotate client/src/components/staging/StagingDetail.vue @ 2180:256f98e1d954

staging: dynamic scrollbar for agm
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 11 Feb 2019 15:23:24 +0100
parents 82dad8d808a7
children eb82b273c615
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
2 <div :class="detail">
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
3 <div class="d-flex flex-row">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
4 <div class="mt-auto d-flex flex-row mb-auto small name text-left">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
5 <a
1891
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
6 v-if="isSoundingResult(data.kind.toUpperCase())"
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
7 class="text-left"
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
8 @click="zoomTo()"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
9 href="#"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
10 >{{ data.summary.bottleneck }}</a
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
11 >
1891
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
12 <span v-if="isBottleneck(data.kind.toUpperCase())" class="text-left"
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
13 ><translate>Bottlenecks</translate> ({{
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
14 data.summary.bottlenecks.length
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
15 }})</span
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
16 >
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
17 <a
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
18 v-if="isApprovedGaugeMeasurement(data.kind.toUpperCase())"
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
19 class="text-left"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
20 ><translate>Approved Gauge Measurements</translate> ({{
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
21 data.summary.length
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
22 }})</a
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
23 >
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
24 <span
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
25 class="text-left"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
26 v-if="isFairwayDimension(data.kind.toUpperCase())"
2028
a8d8e855cb26 staging. FD added source-organization and LOS as name for entry
Thomas Junk <thomas.junk@intevation.de>
parents: 1891
diff changeset
27 >{{ data.summary["source-organization"] }} (LOS:
a8d8e855cb26 staging. FD added source-organization and LOS as name for entry
Thomas Junk <thomas.junk@intevation.de>
parents: 1891
diff changeset
28 {{ data.summary.los }})</span
a8d8e855cb26 staging. FD added source-organization and LOS as name for entry
Thomas Junk <thomas.junk@intevation.de>
parents: 1891
diff changeset
29 >
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
30 <a
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
31 href="#"
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
32 class="text-left"
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
33 @click="zoomToStretch(data.summary.stretch)"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
34 v-if="isStretch(data.kind.toUpperCase())"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
35 >{{ data.summary.stretch }}</a
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
36 >
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
37 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
38 <div class="mt-auto mb-auto small text-left type">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
39 {{ data.kind.toUpperCase() }}
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
40 </div>
1891
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
41 <div v-if="data.summary" class="mt-auto mb-auto small text-left date">
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
42 {{ formatSurveyDate(data.summary.date) }}
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
43 </div>
1891
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
44 <div v-else class="mt-auto mb-auto small text-left date">-</div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
45 <div class="mt-auto mb-auto small text-left imported">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
46 {{ formatSurveyDate(data.enqueued.split("T")[0]) }}
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
47 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
48 <div class="mt-auto mb-auto small text-left username">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
49 {{ data.user }}
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
50 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
51 <div class="controls d-flex flex-row justify-content-end">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
52 <div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
53 <button
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
54 :class="{
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
55 'ml-3': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
56 'mr-3': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
57 btn: true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
58 'btn-sm': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
59 'btn-outline-success': needsApproval(data) || isRejected(data),
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
60 'btn-success': isApproved(data)
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
61 }"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
62 @click="toggleApproval(data.id, $options.STATES.APPROVED)"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
63 >
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
64 <font-awesome-icon icon="check"></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
65 </button>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
66 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
67 <div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
68 <button
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
69 :class="{
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
70 'mr-3': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
71 btn: true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
72 'btn-sm': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
73 'btn-outline-danger': needsApproval(data) || isApproved(data),
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
74 'btn-danger': isRejected(data)
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
75 }"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
76 @click="toggleApproval(data.id, $options.STATES.REJECTED)"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
77 >
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
78 <font-awesome-icon icon="times" class="pointer"></font-awesome-icon>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
79 </button>
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
80 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
81 <div v-if="isBottleneck(data.kind.toUpperCase())">
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
82 <div class="mt-auto mb-auto text-info text-left">
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
83 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
84 class="pointer"
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
85 @click="showDetails()"
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
86 v-if="show"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
87 icon="angle-up"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
88 fixed-width
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
89 ></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
90 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
91 class="pointer"
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
92 @click="showDetails()"
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
93 v-if="loading"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
94 icon="spinner"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
95 fixed-width
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
96 ></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
97 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
98 class="pointer"
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
99 v-if="!show && !loading"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
100 icon="angle-down"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
101 fixed-width
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
102 ></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
103 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
104 </div>
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
105 <div v-if="isApprovedGaugeMeasurement(data.kind.toUpperCase())">
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
106 <div
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
107 @click="showAGMDetails = !showAGMDetails"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
108 class="mt-auto mb-auto text-info text-left"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
109 >
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
110 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
111 class="pointer"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
112 v-if="showAGMDetails"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
113 icon="angle-up"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
114 fixed-width
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
115 ></font-awesome-icon>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
116 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
117 class="pointer"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
118 v-if="!showAGMDetails"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
119 icon="angle-down"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
120 fixed-width
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
121 ></font-awesome-icon>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
122 </div>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
123 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
124 <div v-else class="empty"></div>
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
125 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
126 </div>
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
127 <div v-if="show && bottlenecks.length > 0">
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
128 <div
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
129 v-for="(bottleneck, index) in bottlenecks"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
130 :key="index"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
131 class="d-flex flex-row"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
132 >
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
133 <div class="d-flex flex-column">
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
134 <div class="d-flex flex-row">
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
135 <a @click="moveToBottleneck(index)" class="small" href="#">{{
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
136 bottleneck.properties.objnam
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
137 }}</a>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
138 <div
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
139 @click="showBottleneckDetails = !showBottleneckDetails"
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
140 class="small mt-auto mb-auto text-info text-left"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
141 >
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
142 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
143 class="pointer"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
144 v-if="showBottleneckDetails"
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
145 icon="angle-up"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
146 fixed-width
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
147 ></font-awesome-icon>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
148 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
149 class="pointer"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
150 v-if="!showBottleneckDetails"
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
151 icon="angle-down"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
152 fixed-width
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
153 ></font-awesome-icon>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
154 </div>
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
155 </div>
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
156
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
157 <div class="d-flex flex-row" v-if="showBottleneckDetails">
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
158 <table>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
159 <tr
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
160 v-for="(info, index) in Object.keys(bottleneck.properties)"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
161 :key="index"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
162 class="mr-1 small text-muted"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
163 >
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
164 <td class="condensed text-left">{{ info }}</td>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
165 <td class="condensed pl-3 text-left">
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
166 {{ bottleneck.properties[info] }}
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
167 </td>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
168 </tr>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
169 </table>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
170 </div>
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
171 </div>
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
172 </div>
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
173 </div>
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
174 <div v-if="showAGMDetails">
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
175 <div class="pl-3 d-flex flex-row">
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
176 <span class="condensed agmcode text-left"
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
177 ><small><translate>ISRS Code</translate></small></span
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
178 >
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
179 <span class="condensed agmdetail text-left"
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
180 ><small><translate>Date of measurement</translate></small></span
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
181 >
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
182 </div>
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
183 <div class="diffs">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
184 <div v-for="(result, index) in data.summary" :key="index">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
185 <div class="pl-3 d-flex flex-row">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
186 <span
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
187 v-if="result.versions.length == 1"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
188 class="condensed agmcode text-left"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
189 ><small
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
190 >{{ result["fk-gauge-id"] }}
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
191 <translate>( New )</translate></small
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
192 ></span
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
193 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
194 <span
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
195 v-if="result.versions.length == 2"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
196 class="condensed agmcode text-left"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
197 ><small>{{ result["fk-gauge-id"] }}</small></span
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
198 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
199 <span class="condensed agmdetail text-left"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
200 ><small>{{
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
201 formatSurveyDate(result["measure-date"])
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
202 }}</small></span
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
203 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
204 <div
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
205 @click="toggleDiff(index)"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
206 class="small ml-auto mt-auto mb-auto text-info text-left"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
207 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
208 <font-awesome-icon
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
209 class="pointer"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
210 v-if="showDiff == index"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
211 icon="angle-up"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
212 fixed-width
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
213 ></font-awesome-icon>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
214 <font-awesome-icon
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
215 class="pointer"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
216 v-if="showDiff != index"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
217 icon="angle-down"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
218 fixed-width
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
219 ></font-awesome-icon>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
220 </div>
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
221 </div>
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
222 <div v-if="showDiff == index" class="pl-3 d-flex flex-row">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
223 <div>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
224 <div class="d-flex flex-row condensed pl-3 text-left">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
225 <div class="header border-bottom agmdetailskeys">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
226 <small><translate>Value</translate></small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
227 </div>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
228 <div
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
229 v-if="result.versions.length == 2"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
230 class="header border-bottom agmdetailsvalues"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
231 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
232 <small><translate>Old</translate></small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
233 </div>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
234 <div class="header border-bottom agmdetailsvalues">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
235 <small><translate>New</translate></small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
236 </div>
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
237 </div>
2165
82dad8d808a7 agm_diff: usability bug fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 2164
diff changeset
238 <div
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
239 class="d-flex flex-row condensed pl-3 text-left"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
240 v-for="(entry, index) in Object.keys(result.versions[0])"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
241 :key="index"
2165
82dad8d808a7 agm_diff: usability bug fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 2164
diff changeset
242 >
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
243 <div
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
244 v-if="
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
245 result.versions.length == 1 ||
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
246 result.versions[0][entry] != result.versions[1][entry]
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
247 "
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
248 class="agmdetailskeys"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
249 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
250 <small>{{ entry }}</small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
251 </div>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
252 <div
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
253 v-if="
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
254 result.versions.length == 1 ||
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
255 result.versions[0][entry] != result.versions[1][entry]
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
256 "
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
257 class="agmdetailsvalues"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
258 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
259 <small>{{ result.versions[0][entry] }}</small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
260 </div>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
261 <div
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
262 v-if="
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
263 result.versions.length == 2 &&
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
264 result.versions[0][entry] != result.versions[1][entry]
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
265 "
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
266 class="agmdetailsvalues"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
267 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
268 <small>{{ result.versions[1][entry] }}</small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
269 </div>
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
270 </div>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
271 </div>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
272 </div>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
273 </div>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
274 </div>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
275 </div>
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
276 </div>
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
277 </template>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
278
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
279 <script>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
280 /* This is Free Software under GNU Affero General Public License v >= 3.0
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
281 * without warranty, see README.md and license for details.
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
282 *
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
283 * SPDX-License-Identifier: AGPL-3.0-or-later
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
284 * License-Filename: LICENSES/AGPL-3.0.txt
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
285 *
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
286 * Copyright (C) 2018 by via donau
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
287 * – Österreichische Wasserstraßen-Gesellschaft mbH
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
288 * Software engineering by Intevation GmbH
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
289 *
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
290 * Author(s):
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
291 * Thomas Junk <thomas.junk@intevation.de>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
292 */
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
293
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
294 import { formatSurveyDate } from "@/lib/date.js";
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
295 import { STATES } from "@/store/imports.js";
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
296 import { HTTP } from "@/lib/http";
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
297 import { WFS } from "ol/format.js";
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
298 import { or as orFilter, equalTo as equalToFilter } from "ol/format/filter.js";
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
299 import { displayError } from "@/lib/errors.js";
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
300 import { mapState } from "vuex";
2140
55bedb39295a feat: clicking on stretches activates according layer
Thomas Junk <thomas.junk@intevation.de>
parents: 2136
diff changeset
301 import { LAYERS } from "@/store/map.js";
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
302
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
303 const NO_DIFF = -1;
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
304
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
305 export default {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
306 name: "stagingdetail",
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
307 props: ["data"],
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
308 data() {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
309 return {
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
310 showDiff: NO_DIFF,
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
311 showAGMDetails: false,
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
312 showBottleneckDetails: false,
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
313 show: false,
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
314 loading: false,
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
315 bottlenecks: []
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
316 };
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
317 },
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
318 mounted() {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
319 this.bottlenecks = [];
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
320 if (this.open) this.showDetails();
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
321 },
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
322 computed: {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
323 ...mapState("imports", ["importToReview"]),
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
324 open() {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
325 return this.importToReview == this.data.id;
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
326 },
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
327 detail() {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
328 return [
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
329 "pb-2",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
330 "pt-2",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
331 "d-flex",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
332 "flex-column",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
333 "w-100",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
334 {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
335 highlight: this.open && this.needsApproval(this.data)
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
336 }
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
337 ];
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
338 }
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
339 },
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
340 watch: {
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
341 showAGMDetails() {
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
342 if (!this.showAGMDetails) this.showDiff = NO_DIFF;
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
343 },
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
344 open() {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
345 const { review } = this.$route.query;
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
346 if (review) {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
347 this.showDetails();
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
348 }
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
349 }
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
350 },
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
351 methods: {
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
352 toggleDiff(number) {
2165
82dad8d808a7 agm_diff: usability bug fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 2164
diff changeset
353 if (this.showDiff !== number || this.showDiff == -1) {
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
354 this.showDiff = number;
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
355 } else {
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
356 this.showDiff = -1;
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
357 }
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
358 },
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
359 zoomToStretch(name) {
2140
55bedb39295a feat: clicking on stretches activates according layer
Thomas Junk <thomas.junk@intevation.de>
parents: 2136
diff changeset
360 this.$store.commit("map/setLayerVisible", LAYERS.STRETCHES);
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
361 this.$store
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
362 .dispatch("imports/loadStretch", name)
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
363 .then(response => {
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
364 if (response.data.features.length < 1)
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
365 throw new Error("no feaures found for: " + name);
2132
7a2eedc182f7 staging: zoomable stretches. zoomToExtent etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2108
diff changeset
366 this.moveToExtent(response.data.features[0]);
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
367 })
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
368 .catch(error => {
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
369 console.log(error);
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
370 const { status, data } = error.response;
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
371 displayError({
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
372 title: this.$gettext("Backend Error"),
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
373 message: `${status}: ${data.message || data}`
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
374 });
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
375 });
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
376 },
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
377 showDetails() {
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
378 if (this.data.kind.toUpperCase() !== "BN") return;
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
379 if (this.show) {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
380 this.show = false;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
381 return;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
382 }
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
383 if (this.bottlenecks.length > 0) {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
384 this.show = true;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
385 return;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
386 }
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
387 this.loading = true;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
388 const generateFilter = () => {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
389 const { bottlenecks } = this.data.summary;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
390 if (bottlenecks.length === 1)
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
391 return equalToFilter("bottleneck_id", bottlenecks[0]);
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
392 const orExpressions = bottlenecks.map(x => {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
393 equalToFilter("bottleneck_id", x);
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
394 });
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
395 return orFilter(...orExpressions);
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
396 };
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
397 const filterExpression = generateFilter();
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
398 const bottleneckFeatureCollectionRequest = new WFS().writeGetFeature({
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
399 srsName: "EPSG:4326",
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
400 featureNS: "gemma",
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
401 featurePrefix: "gemma",
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
402 featureTypes: ["bottlenecks"],
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
403 outputFormat: "application/json",
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
404 filter: filterExpression
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
405 });
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
406 HTTP.post(
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
407 "/internal/wfs",
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
408 new XMLSerializer().serializeToString(
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
409 bottleneckFeatureCollectionRequest
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
410 ),
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
411 {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
412 headers: {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
413 "X-Gemma-Auth": localStorage.getItem("token"),
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
414 "Content-type": "text/xml; charset=UTF-8"
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
415 }
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
416 }
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
417 )
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
418 .then(response => {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
419 this.bottlenecks = response.data.features;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
420 this.show = true;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
421 this.loading = false;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
422 })
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
423 .catch(error => {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
424 const { status, data } = error.response;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
425 displayError({
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
426 title: this.$gettext("Backend Error"),
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
427 message: `${status}: ${data.message || data}`
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
428 });
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
429 });
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
430 },
1891
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
431 isFairwayDimension(kind) {
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
432 return kind === "FD";
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
433 },
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
434 isApprovedGaugeMeasurement(kind) {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
435 return kind === "AGM";
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
436 },
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
437 isBottleneck(kind) {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
438 return kind === "BN";
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
439 },
2103
404eae390298 make default errorfree
Thomas Junk <thomas.junk@intevation.de>
parents: 2102
diff changeset
440 isStretch(kind) {
404eae390298 make default errorfree
Thomas Junk <thomas.junk@intevation.de>
parents: 2102
diff changeset
441 return kind === "ST";
404eae390298 make default errorfree
Thomas Junk <thomas.junk@intevation.de>
parents: 2102
diff changeset
442 },
1891
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
443 isSoundingResult(kind) {
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
444 return kind === "SR";
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
445 },
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
446 formatSurveyDate(date) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
447 return formatSurveyDate(date);
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
448 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
449 needsApproval(item) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
450 return item.status === STATES.NEEDSAPPROVAL;
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
451 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
452 isRejected(item) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
453 return item.status === STATES.REJECTED;
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
454 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
455 isApproved(item) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
456 return item.status === STATES.APPROVED;
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
457 },
1633
f034371c5d11 refac: move to map in staging component resolves now via id
Thomas Junk <thomas.junk@intevation.de>
parents: 1625
diff changeset
458 moveToBottleneck(index) {
2140
55bedb39295a feat: clicking on stretches activates according layer
Thomas Junk <thomas.junk@intevation.de>
parents: 2136
diff changeset
459 this.$store.commit("map/setLayerVisible", LAYERS.BOTTLENECKS);
2136
3138d60dd1a6 moveToExtent substitutes moveMap where easy doable
Thomas Junk <thomas.junk@intevation.de>
parents: 2132
diff changeset
460 this.moveToExtent(this.bottlenecks[index]);
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
461 },
2132
7a2eedc182f7 staging: zoomable stretches. zoomToExtent etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2108
diff changeset
462 moveToExtent(feature) {
2108
cac5d2fba591 bbox tool from turfjs added. zoomToExtent function added to map.js
Thomas Junk <thomas.junk@intevation.de>
parents: 2107
diff changeset
463 this.$store.commit("map/moveToExtent", {
2132
7a2eedc182f7 staging: zoomable stretches. zoomToExtent etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2108
diff changeset
464 feature: feature,
2108
cac5d2fba591 bbox tool from turfjs added. zoomToExtent function added to map.js
Thomas Junk <thomas.junk@intevation.de>
parents: 2107
diff changeset
465 zoom: 17,
cac5d2fba591 bbox tool from turfjs added. zoomToExtent function added to map.js
Thomas Junk <thomas.junk@intevation.de>
parents: 2107
diff changeset
466 preventZoomOut: true
cac5d2fba591 bbox tool from turfjs added. zoomToExtent function added to map.js
Thomas Junk <thomas.junk@intevation.de>
parents: 2107
diff changeset
467 });
cac5d2fba591 bbox tool from turfjs added. zoomToExtent function added to map.js
Thomas Junk <thomas.junk@intevation.de>
parents: 2107
diff changeset
468 },
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
469 moveMap(coordinates) {
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
470 this.$store.commit("map/moveMap", {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
471 coordinates: coordinates,
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
472 zoom: 17,
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
473 preventZoomOut: true
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
474 });
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
475 },
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
476 zoomTo() {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
477 const { lat, lon, bottleneck, date } = this.data.summary;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
478 const coordinates = [lat, lon];
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
479 this.moveMap(coordinates);
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
480 this.$store
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
481 .dispatch("bottlenecks/setSelectedBottleneck", bottleneck)
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
482 .then(() => {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
483 this.$store.commit("bottlenecks/setSelectedSurveyByDate", date);
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
484 });
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
485 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
486 toggleApproval(id, newStatus) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
487 this.$store.commit("imports/toggleApproval", {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
488 id: id,
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
489 newStatus: newStatus
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
490 });
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
491 }
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
492 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
493 STATES: STATES
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
494 };
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
495 </script>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
496
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
497 <style lang="scss" scoped>
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
498 .diffs {
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
499 overflow-y: auto;
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
500 max-height: 250px;
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
501 }
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
502
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
503 .highlight {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
504 background-color: #f9f9f9;
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
505 }
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
506
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
507 .condensed {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
508 font-stretch: condensed;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
509 }
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
510
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
511 .empty {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
512 margin-right: 20px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
513 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
514
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
515 .name {
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
516 width: 180px;
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
517 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
518
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
519 .date {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
520 width: 90px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
521 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
522
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
523 .type {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
524 width: 40px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
525 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
526
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
527 .imported {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
528 width: 90px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
529 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
530
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
531 .username {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
532 width: 150px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
533 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
534
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
535 .controls {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
536 width: 60px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
537 }
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
538
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
539 .agmcode {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
540 width: 200px;
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
541 }
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
542
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
543 .agmdate {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
544 width: 100px;
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
545 }
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
546
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
547 .agmdetailskeys {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
548 width: 130px;
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
549 }
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
550
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
551 .agmdetailsvalues {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
552 width: 200px;
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
553 }
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
554 </style>