Mercurial > gemma
annotate client/src/components/map/contextbox/Staging.vue @ 1344:eda98694e678
staging: retrieve real data instead of displaying demodata
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 26 Nov 2018 11:30:02 +0100 |
parents | 97d9e689520b |
children | 58d41573e530 |
rev | line source |
---|---|
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
1 <template> |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
2 <div class="w-90"> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
3 <h6 class="mb-0 py-2 px-3 border-bottom d-flex align-items-center"> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
4 <font-awesome-icon icon="clipboard-check" class="mr-2"></font-awesome-icon>Staging Area |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
5 </h6> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
6 <table class="table mb-0"> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
7 <thead> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
8 <tr> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
9 <th>Name</th> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
10 <th>Datatype</th> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
11 <th>Importdate</th> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
12 <th>ImportID</th> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
13 <th> </th> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
14 <th> </th> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
15 </tr> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
16 </thead> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
17 <tbody v-if="filteredData.length"> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
18 <tr v-for="data in filteredData" :key="data.id"> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
19 <td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
20 <a @click="zoomTo(data.location)" href="#">{{ data.name }}</a> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
21 </td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
22 <td>{{ data.type }}</td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
23 <td>{{ data.date }}</td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
24 <td>{{ data.importID }}</td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
25 <td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
26 <button |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
27 @click="toggleApproval(data.id, $options.STATES.APPROVED)" |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
28 :class="{btn:true, 'btn-sm':true, 'btn-outline-success':needsApproval(data) || isRejected(data), 'btn-success':isApproved(data)}" |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
29 > |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
30 <font-awesome-icon icon="check"></font-awesome-icon> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
31 </button> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
32 </td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
33 <td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
34 <button |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
35 @click="toggleApproval(data.id, $options.STATES.REJECTED)" |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
36 :class="{btn:true, 'btn-sm':true, 'btn-outline-danger':needsApproval(data) || isApproved(data), 'btn-danger':isRejected(data)}" |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
37 > |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
38 <font-awesome-icon icon="times"></font-awesome-icon> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
39 </button> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
40 </td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
41 </tr> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
42 </tbody> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
43 <tbody v-else> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
44 <tr> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
45 <td class="text-center" colspan="6">No results.</td> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
46 </tr> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
47 </tbody> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
48 </table> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
49 <div class="p-3" v-if="filteredData.length"> |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
50 <button @click="confirmReview" class="btn btn-info">Confirm</button> |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
51 </div> |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
52 </div> |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
53 </template> |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
54 |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
55 <script> |
1279
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
56 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
57 * without warranty, see README.md and license for details. |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
58 * |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
59 * SPDX-License-Identifier: AGPL-3.0-or-later |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
60 * License-Filename: LICENSES/AGPL-3.0.txt |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
61 * |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
62 * Copyright (C) 2018 by via donau |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
63 * – Österreichische Wasserstraßen-Gesellschaft mbH |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
64 * Software engineering by Intevation GmbH |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
65 * |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
66 * Author(s): |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
67 * Thomas Junk <thomas.junk@intevation.de> |
60e15c2d26a2
licensing info updated
Thomas Junk <thomas.junk@intevation.de>
parents:
1276
diff
changeset
|
68 */ |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
69 import { mapState } from "vuex"; |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
70 import { STATES } from "../../../store/imports.js"; |
1311
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
71 import { displayError, displayInfo } from "../../../lib/errors.js"; |
1310
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
72 |
1290
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
73 export default { |
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
74 data() { |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
75 return {}; |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
76 }, |
1310
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
77 mounted() { |
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
78 this.$store.dispatch("imports/getStaging").catch(error => { |
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
79 const { status, data } = error.response; |
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
80 displayError({ |
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
81 title: "Backend Error", |
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
82 message: `${status}: ${data.message || data}` |
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
83 }); |
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
84 }); |
d675e6439aa5
staging view: prepare retrieving list of pending imports for staging
Thomas Junk <thomas.junk@intevation.de>
parents:
1299
diff
changeset
|
85 }, |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
86 computed: { |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
87 ...mapState("application", ["searchQuery"]), |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
88 ...mapState("imports", ["staging"]), |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
89 filteredData() { |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
90 return this.staging.filter(data => { |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
91 const nameFound = data.name |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
92 .toLowerCase() |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
93 .includes(this.searchQuery.toLowerCase()); |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
94 const dateFound = data.date |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
95 .toLowerCase() |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
96 .includes(this.searchQuery.toLowerCase()); |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
97 const locationFound = data.location.find(coord => { |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
98 return coord |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
99 .toString() |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
100 .toLowerCase() |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
101 .includes(this.searchQuery.toLowerCase()); |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
102 }); |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
103 const statusFound = data.status |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
104 .toLowerCase() |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
105 .includes(this.searchQuery.toLowerCase()); |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
106 const importIDFound = data.importID |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
107 .toLowerCase() |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
108 .includes(this.searchQuery.toLowerCase()); |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
109 const typeFound = data.type |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
110 .toLowerCase() |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
111 .includes(this.searchQuery.toLowerCase()); |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
112 |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
113 return ( |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
114 nameFound || |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
115 dateFound || |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
116 locationFound || |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
117 statusFound || |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
118 importIDFound || |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
119 typeFound |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
120 ); |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
121 }); |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
122 } |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
123 }, |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
124 methods: { |
1311
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
125 confirmReview() { |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
126 const message = this.demodata |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
127 .map(x => { |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
128 return x.name + ": " + x.status; |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
129 }) |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
130 .join("\n"); |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
131 displayInfo({ |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
132 title: "Staging Area", |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
133 message: message |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
134 }); |
d5eda9f79610
staging: display visual feedback for now due missing backendcall
Thomas Junk <thomas.junk@intevation.de>
parents:
1310
diff
changeset
|
135 }, |
1290
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
136 needsApproval(item) { |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
137 return item.status === STATES.NEEDSAPPROVAL; |
1290
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
138 }, |
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
139 isRejected(item) { |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
140 return item.status === STATES.REJECTED; |
1290
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
141 }, |
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
142 isApproved(item) { |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
143 return item.status === STATES.APPROVED; |
1290
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
144 }, |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
145 zoomTo(coordinates) { |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
146 this.$store.commit("map/moveMap", { |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
147 coordinates: coordinates, |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
148 zoom: 17, |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
149 preventZoomOut: true |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
150 }); |
1290
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
151 }, |
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
152 toggleApproval(id, newStatus) { |
1344
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
153 this.$store.commit("imports/toggleApproval", { |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
154 id: id, |
eda98694e678
staging: retrieve real data instead of displaying demodata
Thomas Junk <thomas.junk@intevation.de>
parents:
1314
diff
changeset
|
155 newStatus: newStatus |
1290
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
156 }); |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
157 } |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
158 } |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
159 }; |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
160 </script> |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
161 |
1290
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
162 <style lang="sass" scoped> |
ad528ad130d6
staging area: basic layout and selectionlogic
Thomas Junk <thomas.junk@intevation.de>
parents:
1279
diff
changeset
|
163 |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
164 .table th, |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
165 td |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
166 font-size: 0.9rem |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
167 border-top: 0px !important |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
168 border-bottom-width: 1px |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
169 text-align: left |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
170 padding: 0.5rem !important |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
171 </style> |