annotate client/src/staging/Staging.vue @ 1220:d11d5e39c8d0

staging layout
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 19 Nov 2018 16:02:34 +0100
parents 53981be1abe6
children a8b682f3d13d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1208
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
2 <div v-if="showStagingArea" :class="stagingAreaStyle">
1213
9d93968db2cd replaced custom css with bootstrap classes
Markus Kottlaender <markus@intevation.de>
parents: 1208
diff changeset
3 <div class="p-3">
1208
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
4 <div
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
5 @click="$store.commit('application/showStagingArea', !showStagingArea);"
1213
9d93968db2cd replaced custom css with bootstrap classes
Markus Kottlaender <markus@intevation.de>
parents: 1208
diff changeset
6 class="ui-element close-showStagingArea position-absolute"
1208
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
7 >
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
8 <i class="fa fa-close"></i>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
9 </div>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
10 <div class="card-title mb-4 headline">
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
11 <h4>Staging area</h4>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
12 <hr>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
13 </div>
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
14 <div class="d-flex flex-row input-group mb-4">
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
15 <table class="table">
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
16 <thead>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
17 <tr>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
18 <th>Name</th>
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
19 <th>Location</th>
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
20 <th>Datatype</th>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
21 <th>Importdate</th>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
22 <th>ImportID</th>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
23 <th>&nbsp;</th>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
24 </tr>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
25 </thead>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
26 <tbody>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
27 <tr v-for="data in filteredData" :key="data.id">
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
28 <td>{{data.name}}</td>
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
29 <td>{{data.location}}</td>
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
30 <td>{{data.date}}</td>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
31 <td>{{data.type}}</td>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
32 <td>{{data.importID}}</td>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
33 <td>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
34 <input
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
35 type="checkbox"
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
36 aria-label="Checkbox for following text input"
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
37 >
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
38 </td>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
39 </tr>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
40 </tbody>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
41 </table>
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
42 </div>
1208
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
43 </div>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
44 </div>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
45 </template>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
46
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
47 <script>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
48 import { mapState } from "vuex";
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
49
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
50 const demodata = [
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
51 {
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
52 id: 1,
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
53 name: "B1",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
54 date: "2018-11-19",
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
55 location: "bla",
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
56 status: "Not approved",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
57 importID: "123456789",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
58 type: "bottleneck"
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
59 },
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
60 {
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
61 id: 2,
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
62 name: "B2",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
63 date: "2018-11-19",
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
64 location: "bla",
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
65 status: "Not approved",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
66 importID: "123456789",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
67 type: "bottleneck"
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
68 },
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
69 {
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
70 id: 3,
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
71 name: "s1",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
72 date: "2018-11-13",
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
73 location: "bla",
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
74 status: "Not approved",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
75 importID: "987654321",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
76 type: "soundingresult"
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
77 },
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
78 {
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
79 id: 4,
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
80 name: "s2",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
81 date: "2018-11-13",
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
82 location: "bla",
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
83 status: "Not approved",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
84 importID: "987654321",
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
85 type: "soundingresult"
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
86 }
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
87 ];
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
88
1208
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
89 export default {
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
90 computed: {
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
91 ...mapState("application", ["showStagingArea"]),
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
92 filteredData() {
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
93 return demodata;
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
94 },
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
95 stagingAreaStyle() {
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
96 return [
1220
d11d5e39c8d0 staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1219
diff changeset
97 "ui-element staging-card bg-white ml-3 pt-3 mx-auto rounded border-top position-relative",
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
98 {
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
99 stagingcollapsed: !this.showStagingArea,
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
100 stagingextended: this.showStagingArea
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
101 }
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
102 ];
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
103 }
1208
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
104 }
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
105 };
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
106 </script>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
107
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
108 <style lang="sass" scoped>
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
109 .close-showStagingArea
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
110 z-index: 2
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
111 right: 0
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
112 top: 7px
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
113 height: $icon-width
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
114 width: $icon-height
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
115
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
116 .stagingcollapsed
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
117 width: 0
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
118 height: 0
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
119 transition: $transition-fast
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
120
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
121 .stagingextended
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
122 min-width: 600px
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
123
1208
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
124 .staging-card
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
125 position: relative
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
126 background-color: #ffffff
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
127 padding-top: $offset
1208
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
128 opacity: $slight-transparent
1218
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
129 transition: left 0.3s ease
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
130 overflow: hidden
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
131 background: #fff
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
132 margin-left: $offset !important
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
133 margin-top: -$offset !important
b0c98a31cb4e staging layout
Thomas Junk <thomas.junk@intevation.de>
parents: 1215
diff changeset
134 width: 90%
1215
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
135
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
136 .table th,
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
137 td
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
138 font-size: 0.9rem
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
139 border-top: 0px !important
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
140 text-align: left
5a8e8ee9034d staging prototypical listview
Thomas Junk <thomas.junk@intevation.de>
parents: 1213
diff changeset
141 padding: 0.5rem !important
1208
8df4ebbc5c3f staging area
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
142 </style>