Mercurial > gemma
annotate client/src/components/importoverview/ApprovedGaugeMeasurementDetail.vue @ 5629:84d01a536bec 729-node-js-newer-version
Transformed scss and sass styles into css
author | Luisa Beerboom <lbeerboom@intevation.de> |
---|---|
date | Thu, 11 May 2023 13:23:52 +0200 |
parents | da3fd4c3d1b5 |
children |
rev | line source |
---|---|
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
2 <div |
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
3 :class="{ |
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
4 diffs: true, |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
5 full: !showLogs, |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
6 split: showLogs |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
7 }" |
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
8 > |
5290
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
9 <virtual-list |
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
10 :size="scrollistConfig.size" |
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
11 :remain="scrollistConfig.remain" |
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
12 :bench="scrollistConfig.bench" |
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
13 > |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
14 <Item |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
15 class="d-flex flex-row px-2 border-top" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
16 v-for="(item, index) in details.summary" |
3767
fd6d62b08af7
review_agm: fixed open diff bug. Only selected diff is opened and stays open
Thomas Junk <thomas.junk@intevation.de>
parents:
3766
diff
changeset
|
17 @openDiff="toggleDiff" |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
18 :key="index" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
19 :line="item" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
20 :index="index" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
21 :showDiff="showDiff" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
22 /> |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
23 </virtual-list> |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
24 </div> |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
25 </template> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
26 |
5629
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
27 <style scoped> |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
28 .diffs { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
29 width: 100%; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
30 overflow-y: auto; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
31 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
32 .diffs > div { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
33 border-top: dashed 1px #dee2e6; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
34 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
35 .diffs > div:first-child { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
36 border-top: none; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
37 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
38 .diffs > div .compare-table { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
39 position: relative; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
40 overflow: hidden; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
41 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
42 .diffs > div .compare-table::after { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
43 content: ""; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
44 position: absolute; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
45 top: 0; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
46 right: -5px; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
47 bottom: 0; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
48 left: -5px; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
49 box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4); |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
50 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
51 .diffs > div .compare-table > div { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
52 font-size: 0.7rem; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
53 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
54 .diffs > div .compare-table > div:nth-child(odd) { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
55 background-color: #f8f9fa; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
56 } |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
57 |
5629
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
58 .split { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
59 max-height: 35vh; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
60 } |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
61 |
5629
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
62 .full { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
63 max-height: 70vh; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5290
diff
changeset
|
64 } |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
65 </style> |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
66 |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
67 <script> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
68 /* 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
|
69 * 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
|
70 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
71 * SPDX-License-Identifier: AGPL-3.0-or-later |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
72 * License-Filename: LICENSES/AGPL-3.0.txt |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
73 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
74 * Copyright (C) 2018 by via donau |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
75 * – Österreichische Wasserstraßen-Gesellschaft mbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
76 * Software engineering by Intevation GmbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
77 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
78 * Author(s): |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
79 * Thomas Junk <thomas.junk@intevation.de> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
80 */ |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
81 import { mapState } from "vuex"; |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
82 import virtualList from "vue-virtual-scroll-list"; |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
83 |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
84 export default { |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
85 data() { |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
86 return { |
2914
84a40983bb9f
client: importsoverview: improved opening mechanism for additional details
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
87 showDiff: 0 // open first item by default |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
88 }; |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
89 }, |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
90 components: { |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
91 "virtual-list": virtualList, |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
92 Item: () => import("./AGMLogItem") |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
93 }, |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
94 computed: { |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
95 ...mapState("imports", ["showLogs", "details"]), |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
96 scrollistConfig() { |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
97 const smallLayout = { |
5290
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
98 size: 20, |
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
99 remain: 10, |
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
100 bench: 12 |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
101 }; |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
102 const largeLayout = { |
5290
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
103 size: 22, |
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
104 remain: 12, |
da3fd4c3d1b5
Client: adjust virtual-list properties to prevent truncating of the import logs
Fadi Abbud <fadi.abbud@intevation.de>
parents:
4454
diff
changeset
|
105 bench: 14 |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
106 }; |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
107 if (this.showAdditional) return smallLayout; |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
108 return largeLayout; |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
109 } |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
110 }, |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
111 methods: { |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
112 toggleDiff(number) { |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
113 if (this.showDiff !== number) { |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
114 this.showDiff = number; |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
115 } else { |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
116 this.showDiff = false; |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
117 } |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
118 } |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
119 } |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
120 }; |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
121 </script> |