annotate client/src/components/staging/StagingDetail.vue @ 1621:eeddc5dcb80c

staging now with details
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 18 Dec 2018 16:25:03 +0100
parents 2e4ec4251c57
children de4e4dcb8f87
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
2 <div class="pb-2 d-flex flex-column w-100">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
3 <div class="d-flex flex-row">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
4 <div class="mt-auto d-flex flex-row mb-auto small name text-left">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
5 <a
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
6 v-if="!isBottleneck(data.kind.toUpperCase())"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
7 @click="zoomTo()"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
8 href="#"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
9 >{{ data.summary.bottleneck }}</a
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
10 >
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
11 <span v-else class="mr-auto ml-auto">*</span>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
12 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
13 <div class="mt-auto mb-auto small text-left type">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
14 {{ data.kind.toUpperCase() }}
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
15 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
16 <div class="mt-auto mb-auto small text-left date">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
17 {{ formatSurveyDate(data.summary.date) }}
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
18 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
19 <div class="mt-auto mb-auto small text-left imported">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
20 {{ formatSurveyDate(data.enqueued.split("T")[0]) }}
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
21 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
22 <div class="mt-auto mb-auto small text-left username">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
23 {{ data.user }}
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
24 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
25 <div class="controls d-flex flex-row justify-content-end">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
26 <div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
27 <button
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
28 :class="{
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
29 'ml-3': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
30 'mr-3': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
31 btn: true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
32 'btn-sm': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
33 'btn-outline-success': needsApproval(data) || isRejected(data),
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
34 'btn-success': isApproved(data)
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
35 }"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
36 @click="toggleApproval(data.id, $options.STATES.APPROVED)"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
37 >
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
38 <font-awesome-icon icon="check"></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
39 </button>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
40 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
41 <div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
42 <button
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
43 :class="{
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
44 'mr-3': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
45 btn: true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
46 'btn-sm': true,
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
47 'btn-outline-danger': needsApproval(data) || isApproved(data),
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
48 'btn-danger': isRejected(data)
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
49 }"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
50 @click="toggleApproval(data.id, $options.STATES.REJECTED)"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
51 >
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
52 <font-awesome-icon icon="times"></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
53 </button>
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
54 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
55 <div v-if="isBottleneck(data.kind.toUpperCase())">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
56 <div
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
57 @click="showDetails()"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
58 class="mt-auto mb-auto text-info text-left"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
59 >
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
60 <font-awesome-icon
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
61 v-if="show"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
62 icon="angle-up"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
63 fixed-width
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
64 ></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
65 <font-awesome-icon
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
66 v-if="loading"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
67 icon="spinner"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
68 fixed-width
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
69 ></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
70 <font-awesome-icon
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
71 v-if="!show && !loading"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
72 icon="angle-down"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
73 fixed-width
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
74 ></font-awesome-icon>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
75 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
76 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
77 <div v-else class="empty"></div>
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
78 </div>
1621
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
79 </div>
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
80 <div class="d-flex flex-row" v-if="show">
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
81 <a
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
82 class="small"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
83 v-for="(bottleneck, index) in data.summary.bottlenecks"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
84 :key="index"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
85 href="#"
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
86 >{{ bottleneck }}</a
eeddc5dcb80c staging now with details
Thomas Junk <thomas.junk@intevation.de>
parents: 1620
diff changeset
87 >
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
88 </div>
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
89 </div>
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
90 </template>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
91
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
92 <script>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
93 /* This is Free Software under GNU Affero General Public License v >= 3.0
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
94 * without warranty, see README.md and license for details.
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
95 *
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
96 * SPDX-License-Identifier: AGPL-3.0-or-later
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
97 * License-Filename: LICENSES/AGPL-3.0.txt
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
98 *
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
99 * Copyright (C) 2018 by via donau
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
100 * – Österreichische Wasserstraßen-Gesellschaft mbH
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
101 * Software engineering by Intevation GmbH
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
102 *
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
103 * Author(s):
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
104 * Thomas Junk <thomas.junk@intevation.de>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
105 */
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
106
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
107 import { formatSurveyDate } from "@/lib/date.js";
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
108 import { STATES } from "@/store/imports.js";
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
109
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
110 export default {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
111 name: "stagingdetail",
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
112 props: ["data"],
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
113 data() {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
114 return {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
115 show: false,
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
116 loading: false
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
117 };
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
118 },
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
119 methods: {
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
120 showDetails() {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
121 if (this.show) {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
122 this.show = false;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
123 return;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
124 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
125 this.show = true;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
126 },
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
127 isBottleneck(kind) {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
128 return kind === "BN";
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
129 },
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
130 formatSurveyDate(date) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
131 return formatSurveyDate(date);
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
132 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
133 needsApproval(item) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
134 return item.status === STATES.NEEDSAPPROVAL;
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
135 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
136 isRejected(item) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
137 return item.status === STATES.REJECTED;
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
138 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
139 isApproved(item) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
140 return item.status === STATES.APPROVED;
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
141 },
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
142 zoomTo() {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
143 const { lat, lon, bottleneck, date } = this.data.summary;
1615
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
144 const coordinates = [lat, lon];
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
145
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
146 this.$store.commit("map/moveMap", {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
147 coordinates: coordinates,
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
148 zoom: 17,
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
149 preventZoomOut: true
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
150 });
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
151 this.$store
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
152 .dispatch("bottlenecks/setSelectedBottleneck", bottleneck)
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
153 .then(() => {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
154 this.$store.commit("bottlenecks/setSelectedSurveyByDate", date);
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
155 });
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
156 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
157 toggleApproval(id, newStatus) {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
158 this.$store.commit("imports/toggleApproval", {
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
159 id: id,
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
160 newStatus: newStatus
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
161 });
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
162 }
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
163 },
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
164 STATES: STATES
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
165 };
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
166 </script>
95641748383f refac: extracted staging details view
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
167
1620
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
168 <style lang="scss" scoped>
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
169 .empty {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
170 margin-right: 20px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
171 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
172
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
173 .name {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
174 width: 120px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
175 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
176
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
177 .date {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
178 width: 90px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
179 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
180
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
181 .type {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
182 width: 40px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
183 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
184
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
185 .imported {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
186 width: 90px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
187 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
188
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
189 .username {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
190 width: 150px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
191 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
192
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
193 .controls {
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
194 width: 60px;
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
195 }
2e4ec4251c57 refac: staging rebuilt with divs instead tables to accomplish detailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 1615
diff changeset
196 </style>