annotate client/src/morphtool/Morphtool.vue @ 1251:d1903250390b

splitted mophtool into two components one shows the survey results and the other the info bar when a bottleneck is selected (and no profile is shown)
author Markus Kottlaender <markus@intevation.de>
date Wed, 21 Nov 2018 12:10:12 +0100
parents c14353e2cdb9
children da51fd6a72a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
1 <template>
1251
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
2 <div :class="['box ui-element rounded bg-white ml-auto mr-3 mb-3 text-nowrap', { expanded: selectedBottleneck && surveys && !selectedSurvey }]">
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
3 <div style="width: 15rem">
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
4 <h5 class="mb-0 py-2 border-bottom">
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
5 {{ selectedBottleneck }}
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
6 </h5>
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
7 <div class="p-3">
1111
f106aee673e7 selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents: 1064
diff changeset
8 <div
1251
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
9 v-for="(survey, i) of surveys"
1111
f106aee673e7 selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents: 1064
diff changeset
10 :key="survey.data_info"
1251
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
11 :class="{ 'mt-1': i }"
1111
f106aee673e7 selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents: 1064
diff changeset
12 @click.prevent="$store.commit('bottlenecks/setSelectedSurvey', survey)"
f106aee673e7 selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents: 1064
diff changeset
13 >
f106aee673e7 selected bottleneck and surveys now handled by bottleneck store
Markus Kottlaender <markus@intevation.de>
parents: 1064
diff changeset
14 <a href="#" @click.prevent>{{ survey.date_info }}</a>
1217
ba8cd80d68b6 made more use of bootstrap classes instead of custom css
Markus Kottlaender <markus@intevation.de>
parents: 1213
diff changeset
15 </div>
ba8cd80d68b6 made more use of bootstrap classes instead of custom css
Markus Kottlaender <markus@intevation.de>
parents: 1213
diff changeset
16 </div>
892
81b84ad962f8 morphtool streamlined
Thomas Junk <thomas.junk@intevation.de>
parents: 891
diff changeset
17 </div>
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
18 </div>
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
19 </template>
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
20
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
21 <script>
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
22 /*
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
23 * This is Free Software under GNU Affero General Public License v >= 3.0
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
24 * without warranty, see README.md and license for details.
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
25 *
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
26 * SPDX-License-Identifier: AGPL-3.0-or-later
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
27 * License-Filename: LICENSES/AGPL-3.0.txt
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
28 *
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
29 * Copyright (C) 2018 by via donau
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
30 * – Österreichische Wasserstraßen-Gesellschaft mbH
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
31 * Software engineering by Intevation GmbH
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
32 *
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
33 * Author(s):
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
34 * Thomas Junk <thomas.junk@intevation.de>
1251
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
35 * Markus Kottländer <markus.kottlaender@intevation.de>
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 1015
diff changeset
36 */
1251
d1903250390b splitted mophtool into two components
Markus Kottlaender <markus@intevation.de>
parents: 1247
diff changeset
37 import { mapState } from "vuex";
826
90a601884ff2 client: improve survey selection for Morphtool
Bernhard Reiter <bernhard@intevation.de>
parents: 823
diff changeset
38
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
39 export default {
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
40 name: "morphtool",
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
41 computed: {
1118
7e788814cbde removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents: 1115
diff changeset
42 ...mapState("bottlenecks", [
7e788814cbde removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents: 1115
diff changeset
43 "selectedBottleneck",
7e788814cbde removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents: 1115
diff changeset
44 "surveys",
7e788814cbde removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents: 1115
diff changeset
45 "selectedSurvey"
7e788814cbde removed unnecessary imports and formatted code
Markus Kottlaender <markus@intevation.de>
parents: 1115
diff changeset
46 ])
823
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
47 }
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
48 };
d7ae7338872d client: add morphtool again
Bernhard Reiter <bernhard@intevation.de>
parents:
diff changeset
49 </script>