annotate client/src/components/importoverview/ApprovedGaugeMeasurementDetail.vue @ 2609:546ed93a9829

overview2: usability
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 13 Mar 2019 10:08:31 +0100
parents 13377f2a5c42
children 74031fbd3d50
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2602
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
2 <div class="diffs">
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
3 <div v-for="(result, index) in entry.summary" :key="index">
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
4 <div class="pl-3 d-flex flex-row">
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
5 <span v-if="result.versions.length == 1" class="agmcode text-left"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
6 ><small
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
7 >{{ result["fk-gauge-id"] }} <translate>( New )</translate></small
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
8 ></span
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
9 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
10 <span v-if="result.versions.length == 2" class="agmcode text-left"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
11 ><small>{{ result["fk-gauge-id"] }}</small></span
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
12 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
13 <span class="agmdetail text-left"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
14 ><small>{{ result["measure-date"] | dateTime }}</small></span
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
15 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
16 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
17 @click="toggleDiff(index)"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
18 class="small ml-auto mt-auto mb-auto text-info text-left"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
19 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
20 <font-awesome-icon
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
21 class="pointer"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
22 v-if="showDiff == index"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
23 icon="angle-up"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
24 fixed-width
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
25 ></font-awesome-icon>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
26 <font-awesome-icon
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
27 class="pointer"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
28 v-if="showDiff != index"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
29 icon="angle-down"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
30 fixed-width
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
31 ></font-awesome-icon>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
32 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
33 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
34 <div v-if="showDiff == index" class="pl-3 d-flex flex-row">
2609
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
35 <div class="w-100">
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
36 <div class="d-flex flex-row pl-3 text-left">
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
37 <div class="header border-bottom agmdetailskeys">
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
38 <small><translate>Value</translate></small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
39 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
40 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
41 v-if="result.versions.length == 2"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
42 class="header border-bottom agmdetailsvalues"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
43 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
44 <small><translate>Old</translate></small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
45 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
46 <div class="header border-bottom agmdetailsvalues">
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
47 <small><translate>New</translate></small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
48 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
49 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
50 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
51 class="d-flex flex-row pl-3 text-left"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
52 v-for="(entry, index) in Object.keys(result.versions[0])"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
53 :key="index"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
54 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
55 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
56 v-if="
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
57 result.versions.length == 1 ||
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
58 result.versions[0][entry] != result.versions[1][entry]
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
59 "
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
60 class="agmdetailskeys"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
61 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
62 <small>{{ entry }}</small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
63 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
64 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
65 v-if="
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
66 result.versions.length == 1 ||
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
67 result.versions[0][entry] != result.versions[1][entry]
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
68 "
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
69 class="agmdetailsvalues"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
70 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
71 <small>{{ result.versions[0][entry] }}</small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
72 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
73 <div
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
74 v-if="
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
75 result.versions.length == 2 &&
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
76 result.versions[0][entry] != result.versions[1][entry]
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
77 "
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
78 class="agmdetailsvalues"
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
79 >
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
80 <small>{{ result.versions[1][entry] }}</small>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
81 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
82 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
83 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
84 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
85 </div>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
86 </div>
2602
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
87 </template>
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
88
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
89 <script>
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
90 /* This is Free Software under GNU Affero General Public License v >= 3.0
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
91 * without warranty, see README.md and license for details.
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
92 *
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
93 * SPDX-License-Identifier: AGPL-3.0-or-later
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
94 * License-Filename: LICENSES/AGPL-3.0.txt
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
95 *
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
96 * Copyright (C) 2018 by via donau
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
97 * – Österreichische Wasserstraßen-Gesellschaft mbH
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
98 * Software engineering by Intevation GmbH
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
99 *
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
100 * Author(s):
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
101 * Thomas Junk <thomas.junk@intevation.de>
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
102 */
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
103
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
104 const NODIFF = -1;
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
105
2602
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
106 export default {
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
107 name: "agmdetails",
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
108 props: ["entry"],
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
109 data() {
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
110 return {
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
111 showDiff: NODIFF
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
112 };
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
113 },
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
114 methods: {
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
115 toggleDiff(number) {
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
116 if (this.showDiff !== number || this.showDiff == NODIFF) {
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
117 this.showDiff = number;
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
118 } else {
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
119 this.showDiff = NODIFF;
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
120 }
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
121 }
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
122 }
2602
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
123 };
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
124 </script>
5d0e5159190f overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
125
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
126 <style lang="scss" scoped>
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
127 .diffs {
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
128 width: 615px;
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
129 max-height: 20vh;
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
130 overflow-y: auto;
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
131 }
2609
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
132
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
133 .agmdetailskeys {
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
134 width: 33%;
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
135 }
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
136
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
137 .agmdetailsvalues {
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
138 width: 33%;
546ed93a9829 overview2: usability
Thomas Junk <thomas.junk@intevation.de>
parents: 2608
diff changeset
139 }
2608
13377f2a5c42 overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents: 2602
diff changeset
140 </style>