annotate client/src/imports/Imports.vue @ 1149:cc854d5dc96e

feat: Import sounding results UI improvements
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 13 Nov 2018 11:37:06 +0100
parents 67c45d2d1aad
children a499f450420e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
2 <div>
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
3 <div class="imports shadow d-flex content flex-column">
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
4 <div class="card importcard">
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
5 <div
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
6 class="card-header shadow-sm text-white bg-info mb-3"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
7 >Import of sounding results</div>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
8 <div class="card-body importcardbody">
1149
cc854d5dc96e feat: Import sounding results UI improvements
Thomas Junk <thomas.junk@intevation.de>
parents: 1148
diff changeset
9 <div class="input-group mb-4">
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
10 <div class="input-group-prepend">
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
11 <span class="input-group-text" id="bottlenecklabel">Bottleneck</span>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
12 </div>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
13 <input
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
14 type="text"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
15 class="form-control"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
16 placeholder="Name of Bottleneck"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
17 aria-label="bottleneck"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
18 aria-describedby="bottlenecklabel"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
19 v-model="bottleneck"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
20 >
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
21 </div>
1149
cc854d5dc96e feat: Import sounding results UI improvements
Thomas Junk <thomas.junk@intevation.de>
parents: 1148
diff changeset
22 <div class="input-group mb-4">
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
23 <div class="input-group-prepend">
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
24 <span class="input-group-text" id="importdatelabel">Date</span>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
25 </div>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
26 <input
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
27 type="text"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
28 class="form-control"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
29 placeholder="Date of import"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
30 aria-label="bottleneck"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
31 aria-describedby="bottlenecklabel"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
32 v-model="importDate"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
33 >
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
34 </div>
1149
cc854d5dc96e feat: Import sounding results UI improvements
Thomas Junk <thomas.junk@intevation.de>
parents: 1148
diff changeset
35 <div class="input-group mb-4">
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
36 <div class="input-group-prepend">
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
37 <label class="input-group-text" for="inputGroupSelect01">Depth reference</label>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
38 </div>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
39 <select v-model="depthReference" class="custom-select" id="depthreference">
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
40 <option
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
41 v-for="option in this.$options.depthReferenceOptions"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
42 :key="option"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
43 >{{option}}</option>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
44 </select>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
45 </div>
1149
cc854d5dc96e feat: Import sounding results UI improvements
Thomas Junk <thomas.junk@intevation.de>
parents: 1148
diff changeset
46 <div class="input-group mb-4">
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
47 <div class="custom-file">
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
48 <input type="file" class="custom-file-input" id="inputGroupFile04">
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
49 <label class="custom-file-label" for="inputGroupFile04">Choose file</label>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
50 </div>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
51 </div>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
52 <div class="downloadbtn">
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
53 <a
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
54 download="meta.json"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
55 :href="dataLink "
1148
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
56 class="btn btn-outline-info"
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
57 >Generate Meta.json</a>
1148
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
58 <button class="btn btn-info" type="button">Upload!</button>
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
59 </div>
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
60 </div>
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
61 </div>
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
62 </div>
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
63 </div>
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
64 </template>
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
65
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
66 <script>
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
67 export default {
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
68 name: "imports",
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
69 data() {
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
70 return {
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
71 depthReference: "",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
72 bottleneck: "",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
73 importDate: ""
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
74 };
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
75 },
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
76 computed: {
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
77 dataLink() {
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
78 return (
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
79 "data:text/json;charset=utf-8," +
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
80 encodeURIComponent(
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
81 JSON.stringify({
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
82 depthReference: this.depthReference,
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
83 bottleneck: this.bottleneck,
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
84 date: this.importDate
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
85 })
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
86 )
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
87 );
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
88 }
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
89 },
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
90 depthReferenceOptions: [
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
91 "",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
92 "NAP",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
93 "KP",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
94 "FZP",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
95 "ADR",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
96 "TAW",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
97 "PUL",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
98 "NGM",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
99 "ETRS",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
100 "POT",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
101 "LDC",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
102 "HDC",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
103 "ZPG",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
104 "GLW",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
105 "HSW",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
106 "LNW",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
107 "HNW",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
108 "IGN",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
109 "WGS",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
110 "RN",
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
111 "HBO"
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
112 ]
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
113 };
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
114 </script>
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
115
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
116 <style lang="scss" scoped>
1148
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
117 .input-group-text {
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
118 width: 10rem;
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
119 }
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
120 .importcard {
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
121 height: 100%;
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
122 }
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
123 .importcardbody {
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
124 position: relative;
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
125 height: 100%;
1148
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
126 width: 90%;
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
127 margin: auto;
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
128 }
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
129 .imports {
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
130 background-color: white;
1148
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
131 width: 40rem;
1149
cc854d5dc96e feat: Import sounding results UI improvements
Thomas Junk <thomas.junk@intevation.de>
parents: 1148
diff changeset
132 height: 25rem;
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
133 margin-left: auto;
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
134 margin-right: auto;
1145
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
135 margin-top: $offset;
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
136 }
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
137 .downloadbtn {
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
138 position: absolute;
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
139 right: $offset;
2d34715dd52e feat: Import of sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1144
diff changeset
140 bottom: $offset;
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
141 }
1148
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
142
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
143 .downloadbtn a {
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
144 margin-right: $offset;
67c45d2d1aad feat: Import sounding results
Thomas Junk <thomas.junk@intevation.de>
parents: 1145
diff changeset
145 }
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
146 </style>