annotate client/src/components/staging/StagingDetail.vue @ 2351:9c4d6a61ad1d

staging: fix vanishing buttons when (U)BN list becomes too long
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 20 Feb 2019 11:08:20 +0100
parents ed6b0a43d42f
children 0d7b51930028
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
2333
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
98 @click="showDetails()"
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
99 class="pointer"
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
100 v-if="!show && !loading"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
101 icon="angle-down"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
102 fixed-width
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
103 ></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
104 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
105 </div>
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
106 <div v-if="isApprovedGaugeMeasurement(data.kind.toUpperCase())">
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
107 <div
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
108 @click="showAGMDetails = !showAGMDetails"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
109 class="mt-auto mb-auto text-info text-left"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
110 >
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
111 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
112 class="pointer"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
113 v-if="showAGMDetails"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
114 icon="angle-up"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
115 fixed-width
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
116 ></font-awesome-icon>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
117 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
118 class="pointer"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
119 v-if="!showAGMDetails"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
120 icon="angle-down"
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
121 fixed-width
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
122 ></font-awesome-icon>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
123 </div>
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
124 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
125 <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
126 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
127 </div>
2351
9c4d6a61ad1d staging: fix vanishing buttons when (U)BN list becomes too long
Thomas Junk <thomas.junk@intevation.de>
parents: 2350
diff changeset
128 <div v-if="show && bottlenecks.length > 0" class="bottlenecksdetails">
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
129 <div
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
130 v-for="(bottleneck, index) in bottlenecks"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
131 :key="index"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
132 class="d-flex flex-row"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
133 >
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
134 <div class="d-flex flex-column">
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
135 <div class="d-flex flex-row">
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
136 <a @click="moveToBottleneck(index)" class="small" href="#">{{
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
137 bottleneck.properties.objnam
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
138 }}</a>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
139 <div
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
140 @click="showBottleneckDetails = !showBottleneckDetails"
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
141 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
142 >
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
143 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
144 class="pointer"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
145 v-if="showBottleneckDetails"
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
146 icon="angle-up"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
147 fixed-width
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
148 ></font-awesome-icon>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
149 <font-awesome-icon
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
150 class="pointer"
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
151 v-if="!showBottleneckDetails"
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
152 icon="angle-down"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
153 fixed-width
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
154 ></font-awesome-icon>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
155 </div>
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
156 </div>
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
157
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
158 <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
159 <table>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
160 <tr
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
161 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
162 :key="index"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
163 class="mr-1 small text-muted"
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
164 >
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
165 <td class="condensed text-left">{{ info }}</td>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
166 <td class="condensed pl-3 text-left">
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
167 {{ bottleneck.properties[info] }}
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
168 </td>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
169 </tr>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
170 </table>
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
171 </div>
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
172 </div>
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
173 </div>
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
174 </div>
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
175 <div v-if="showAGMDetails">
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
176 <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
177 <span class="condensed agmcode text-left"
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
178 ><small><translate>ISRS Code</translate></small></span
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
179 >
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
180 <span class="condensed agmdetail text-left"
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
181 ><small><translate>Date of measurement</translate></small></span
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
182 >
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
183 </div>
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
184 <div class="diffs">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
185 <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
186 <div class="pl-3 d-flex flex-row">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
187 <span
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
188 v-if="result.versions.length == 1"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
189 class="condensed agmcode text-left"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
190 ><small
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
191 >{{ result["fk-gauge-id"] }}
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
192 <translate>( New )</translate></small
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
193 ></span
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
194 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
195 <span
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
196 v-if="result.versions.length == 2"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
197 class="condensed agmcode text-left"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
198 ><small>{{ result["fk-gauge-id"] }}</small></span
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
199 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
200 <span class="condensed agmdetail text-left"
2337
0f3b0937e7c1 staging: format datetime instead of format date in AGM Diff View
Thomas Junk <thomas.junk@intevation.de>
parents: 2333
diff changeset
201 ><small>{{ formatDateTime(result["measure-date"]) }}</small></span
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
202 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
203 <div
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
204 @click="toggleDiff(index)"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
205 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
206 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
207 <font-awesome-icon
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
208 class="pointer"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
209 v-if="showDiff == index"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
210 icon="angle-up"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
211 fixed-width
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
212 ></font-awesome-icon>
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 class="pointer"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
215 v-if="showDiff != index"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
216 icon="angle-down"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
217 fixed-width
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
218 ></font-awesome-icon>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
219 </div>
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
220 </div>
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
221 <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
222 <div>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
223 <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
224 <div class="header border-bottom agmdetailskeys">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
225 <small><translate>Value</translate></small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
226 </div>
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 v-if="result.versions.length == 2"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
229 class="header border-bottom agmdetailsvalues"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
230 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
231 <small><translate>Old</translate></small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
232 </div>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
233 <div class="header border-bottom agmdetailsvalues">
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
234 <small><translate>New</translate></small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
235 </div>
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
236 </div>
2165
82dad8d808a7 agm_diff: usability bug fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 2164
diff changeset
237 <div
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
238 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
239 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
240 :key="index"
2165
82dad8d808a7 agm_diff: usability bug fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 2164
diff changeset
241 >
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
242 <div
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
243 v-if="
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
244 result.versions.length == 1 ||
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
245 result.versions[0][entry] != result.versions[1][entry]
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
246 "
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
247 class="agmdetailskeys"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
248 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
249 <small>{{ entry }}</small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
250 </div>
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 v-if="
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
253 result.versions.length == 1 ||
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
254 result.versions[0][entry] != result.versions[1][entry]
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
255 "
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
256 class="agmdetailsvalues"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
257 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
258 <small>{{ result.versions[0][entry] }}</small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
259 </div>
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 v-if="
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
262 result.versions.length == 2 &&
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
263 result.versions[0][entry] != result.versions[1][entry]
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
264 "
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
265 class="agmdetailsvalues"
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
266 >
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
267 <small>{{ result.versions[1][entry] }}</small>
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
268 </div>
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
269 </div>
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>
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
275 </div>
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
276 </template>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
277
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
278 <script>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
279 /* 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
280 * without warranty, see README.md and license for details.
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
281 *
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
282 * SPDX-License-Identifier: AGPL-3.0-or-later
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
283 * License-Filename: LICENSES/AGPL-3.0.txt
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
284 *
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
285 * Copyright (C) 2018 by via donau
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
286 * – Österreichische Wasserstraßen-Gesellschaft mbH
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
287 * Software engineering by Intevation GmbH
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
288 *
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
289 * Author(s):
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
290 * Thomas Junk <thomas.junk@intevation.de>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
291 */
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
292
2337
0f3b0937e7c1 staging: format datetime instead of format date in AGM Diff View
Thomas Junk <thomas.junk@intevation.de>
parents: 2333
diff changeset
293 import { formatSurveyDate, formatDateTime } from "@/lib/date.js";
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
294 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
295 import { HTTP } from "@/lib/http";
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
296 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
297 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
298 import { displayError } from "@/lib/errors.js";
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
299 import { mapState } from "vuex";
2140
55bedb39295a feat: clicking on stretches activates according layer
Thomas Junk <thomas.junk@intevation.de>
parents: 2136
diff changeset
300 import { LAYERS } from "@/store/map.js";
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
301
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
302 const NO_DIFF = -1;
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
303
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
304 export default {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
305 name: "stagingdetail",
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
306 props: ["data"],
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
307 data() {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
308 return {
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
309 showDiff: NO_DIFF,
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
310 showAGMDetails: false,
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
311 showBottleneckDetails: false,
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
312 show: false,
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
313 loading: false,
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
314 bottlenecks: []
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
315 };
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
316 },
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
317 mounted() {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
318 this.bottlenecks = [];
2333
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
319 const { id } = this.$route.params;
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
320 this.$store.commit("imports/setImportToReview", id);
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
321 if (this.open) this.showDetails();
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
322 },
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
323 computed: {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
324 ...mapState("imports", ["importToReview"]),
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
325 open() {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
326 return this.importToReview == this.data.id;
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
327 },
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
328 detail() {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
329 return [
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
330 "pb-2",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
331 "pt-2",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
332 "d-flex",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
333 "flex-column",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
334 "w-100",
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
335 {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
336 highlight: this.open && this.needsApproval(this.data)
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 },
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
341 watch: {
2164
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
342 showAGMDetails() {
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
343 if (!this.showAGMDetails) this.showDiff = NO_DIFF;
0e2f4b059897 staging: agm diff visually adjusted
Thomas Junk <thomas.junk@intevation.de>
parents: 2154
diff changeset
344 },
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
345 open() {
2333
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
346 this.show = this.open;
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
347 },
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
348 $route() {
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
349 const { id } = this.$route.params;
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
350 this.$store.commit("imports/setImportToReview", id);
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
351 if (this.open) this.showDetails();
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
352 }
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
353 },
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
354 methods: {
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
355 toggleDiff(number) {
2165
82dad8d808a7 agm_diff: usability bug fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 2164
diff changeset
356 if (this.showDiff !== number || this.showDiff == -1) {
2154
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
357 this.showDiff = number;
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
358 } else {
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
359 this.showDiff = -1;
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
360 }
a08e0f532304 staging: improve UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2145
diff changeset
361 },
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
362 zoomToStretch(name) {
2140
55bedb39295a feat: clicking on stretches activates according layer
Thomas Junk <thomas.junk@intevation.de>
parents: 2136
diff changeset
363 this.$store.commit("map/setLayerVisible", LAYERS.STRETCHES);
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
364 this.$store
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
365 .dispatch("imports/loadStretch", name)
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
366 .then(response => {
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
367 if (response.data.features.length < 1)
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
368 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
369 this.moveToExtent(response.data.features[0]);
2107
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
370 })
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
371 .catch(error => {
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
372 console.log(error);
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
373 const { status, data } = error.response;
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
374 displayError({
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
375 title: this.$gettext("Backend Error"),
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
376 message: `${status}: ${data.message || data}`
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
377 });
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
378 });
6747a4cf3639 staging: zoom to Stretch implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2104
diff changeset
379 },
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
380 showDetails() {
2350
ed6b0a43d42f staging: open detailsview for UBN too
Thomas Junk <thomas.junk@intevation.de>
parents: 2348
diff changeset
381 if (!this.isBottleneck(this.data.kind.toUpperCase())) return;
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
382 if (this.show) {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
383 this.show = false;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
384 return;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
385 }
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
386 if (this.bottlenecks.length > 0) {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
387 this.show = true;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
388 return;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
389 }
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
390 this.loading = true;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
391 const generateFilter = () => {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
392 const { bottlenecks } = this.data.summary;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
393 if (bottlenecks.length === 1)
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
394 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
395 const orExpressions = bottlenecks.map(x => {
2333
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
396 return equalToFilter("bottleneck_id", x);
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
397 });
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
398 return orFilter(...orExpressions);
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
399 };
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
400 const filterExpression = generateFilter();
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
401 const bottleneckFeatureCollectionRequest = new WFS().writeGetFeature({
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
402 srsName: "EPSG:4326",
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
403 featureNS: "gemma",
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
404 featurePrefix: "gemma",
2333
eb82b273c615 staging: adapt to new routing concept. fix of problems with opening bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents: 2180
diff changeset
405 featureTypes: ["bottlenecks_geoserver"],
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
406 outputFormat: "application/json",
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
407 filter: filterExpression
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
408 });
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
409 HTTP.post(
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
410 "/internal/wfs",
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
411 new XMLSerializer().serializeToString(
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
412 bottleneckFeatureCollectionRequest
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
413 ),
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
414 {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
415 headers: {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
416 "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
417 "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
418 }
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
419 }
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
420 )
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
421 .then(response => {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
422 this.bottlenecks = response.data.features;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
423 this.show = true;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
424 this.loading = false;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
425 })
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
426 .catch(error => {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
427 const { status, data } = error.response;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
428 displayError({
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
429 title: this.$gettext("Backend Error"),
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
430 message: `${status}: ${data.message || data}`
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
431 });
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
432 });
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
433 },
1891
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
434 isFairwayDimension(kind) {
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
435 return kind === "FD";
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
436 },
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
437 isApprovedGaugeMeasurement(kind) {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
438 return kind === "AGM";
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
439 },
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
440 isBottleneck(kind) {
2348
7cdc211b90cd staging: introduce UBN as a variant to BN
Thomas Junk <thomas.junk@intevation.de>
parents: 2337
diff changeset
441 return kind === "BN" || kind === "UBN";
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
442 },
2103
404eae390298 make default errorfree
Thomas Junk <thomas.junk@intevation.de>
parents: 2102
diff changeset
443 isStretch(kind) {
404eae390298 make default errorfree
Thomas Junk <thomas.junk@intevation.de>
parents: 2102
diff changeset
444 return kind === "ST";
404eae390298 make default errorfree
Thomas Junk <thomas.junk@intevation.de>
parents: 2102
diff changeset
445 },
1891
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
446 isSoundingResult(kind) {
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
447 return kind === "SR";
80d3ac4328fe staging: fixed display of fd import
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
448 },
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
449 formatSurveyDate(date) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
450 return formatSurveyDate(date);
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
451 },
2337
0f3b0937e7c1 staging: format datetime instead of format date in AGM Diff View
Thomas Junk <thomas.junk@intevation.de>
parents: 2333
diff changeset
452 formatDateTime(date) {
0f3b0937e7c1 staging: format datetime instead of format date in AGM Diff View
Thomas Junk <thomas.junk@intevation.de>
parents: 2333
diff changeset
453 return formatDateTime(date);
0f3b0937e7c1 staging: format datetime instead of format date in AGM Diff View
Thomas Junk <thomas.junk@intevation.de>
parents: 2333
diff changeset
454 },
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
455 needsApproval(item) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
456 return item.status === STATES.NEEDSAPPROVAL;
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
457 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
458 isRejected(item) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
459 return item.status === STATES.REJECTED;
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
460 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
461 isApproved(item) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
462 return item.status === STATES.APPROVED;
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
463 },
1633
f034371c5d11 refac: move to map in staging component resolves now via id
Thomas Junk <thomas.junk@intevation.de>
parents: 1625
diff changeset
464 moveToBottleneck(index) {
2140
55bedb39295a feat: clicking on stretches activates according layer
Thomas Junk <thomas.junk@intevation.de>
parents: 2136
diff changeset
465 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
466 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
467 },
2132
7a2eedc182f7 staging: zoomable stretches. zoomToExtent etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2108
diff changeset
468 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
469 this.$store.commit("map/moveToExtent", {
2132
7a2eedc182f7 staging: zoomable stretches. zoomToExtent etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2108
diff changeset
470 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
471 zoom: 17,
cac5d2fba591 bbox tool from turfjs added. zoomToExtent function added to map.js
Thomas Junk <thomas.junk@intevation.de>
parents: 2107
diff changeset
472 preventZoomOut: true
cac5d2fba591 bbox tool from turfjs added. zoomToExtent function added to map.js
Thomas Junk <thomas.junk@intevation.de>
parents: 2107
diff changeset
473 });
cac5d2fba591 bbox tool from turfjs added. zoomToExtent function added to map.js
Thomas Junk <thomas.junk@intevation.de>
parents: 2107
diff changeset
474 },
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
475 moveMap(coordinates) {
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
476 this.$store.commit("map/moveMap", {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
477 coordinates: coordinates,
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
478 zoom: 17,
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
479 preventZoomOut: true
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
480 });
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
481 },
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
482 zoomTo() {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
483 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
484 const coordinates = [lat, lon];
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
485 this.moveMap(coordinates);
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
486 this.$store
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
487 .dispatch("bottlenecks/setSelectedBottleneck", bottleneck)
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
488 .then(() => {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
489 this.$store.commit("bottlenecks/setSelectedSurveyByDate", date);
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 toggleApproval(id, newStatus) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
493 this.$store.commit("imports/toggleApproval", {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
494 id: id,
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
495 newStatus: newStatus
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
496 });
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
497 }
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
498 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
499 STATES: STATES
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
500 };
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
501 </script>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
502
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
503 <style lang="scss" scoped>
2351
9c4d6a61ad1d staging: fix vanishing buttons when (U)BN list becomes too long
Thomas Junk <thomas.junk@intevation.de>
parents: 2350
diff changeset
504 .bottlenecksdetails {
9c4d6a61ad1d staging: fix vanishing buttons when (U)BN list becomes too long
Thomas Junk <thomas.junk@intevation.de>
parents: 2350
diff changeset
505 overflow-y: auto;
9c4d6a61ad1d staging: fix vanishing buttons when (U)BN list becomes too long
Thomas Junk <thomas.junk@intevation.de>
parents: 2350
diff changeset
506 max-height: 250px;
9c4d6a61ad1d staging: fix vanishing buttons when (U)BN list becomes too long
Thomas Junk <thomas.junk@intevation.de>
parents: 2350
diff changeset
507 }
2180
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
508 .diffs {
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
509 overflow-y: auto;
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
510 max-height: 250px;
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
511 }
256f98e1d954 staging: dynamic scrollbar for agm
Thomas Junk <thomas.junk@intevation.de>
parents: 2165
diff changeset
512
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
513 .highlight {
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
514 background-color: #f9f9f9;
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
515 }
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1643
diff changeset
516
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
517 .condensed {
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
518 font-stretch: condensed;
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
519 }
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
520
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
521 .empty {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
522 margin-right: 20px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
523 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
524
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
525 .name {
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1621
diff changeset
526 width: 180px;
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
527 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
528
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
529 .date {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
530 width: 90px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
531 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
532
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
533 .type {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
534 width: 40px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
535 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
536
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
537 .imported {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
538 width: 90px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
539 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
540
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
541 .username {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
542 width: 150px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
543 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
544
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
545 .controls {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
546 width: 60px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
547 }
2145
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
548
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
549 .agmcode {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
550 width: 200px;
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
551 }
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
552
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
553 .agmdate {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
554 width: 100px;
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
555 }
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
556
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
557 .agmdetailskeys {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
558 width: 130px;
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
559 }
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
560
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
561 .agmdetailsvalues {
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
562 width: 200px;
ba43b29e8694 agm: staging diff POC
Thomas Junk <thomas.junk@intevation.de>
parents: 2140
diff changeset
563 }
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
564 </style>