Mercurial > gemma
annotate client/src/components/ImportStretches.vue @ 1965:f845236e76bd
Translated using Weblate (Bulgarian)
Currently translated at 2.7% (6 of 221 strings)
Translation: Gemma/client
Translate-URL: https://hosted.weblate.org/projects/gemma/client/bg/
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Wed, 23 Jan 2019 09:38:17 +0000 |
parents | d1b7b1c70410 |
children | 84e475938b75 |
rev | line source |
---|---|
1610
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
1803
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
2 <div class="d-flex flex-column mb-3"> |
1797
67340ceecc5f
feat: define sections and stretches etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1669
diff
changeset
|
3 <h6 class="mb-0 py-2 px-3 border-bottom d-flex align-items-center"> |
67340ceecc5f
feat: define sections and stretches etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1669
diff
changeset
|
4 <font-awesome-icon icon="road" class="mr-2"></font-awesome-icon> |
1870
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
5 <translate>Define stretches</translate> |
1797
67340ceecc5f
feat: define sections and stretches etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1669
diff
changeset
|
6 </h6> |
1942
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
7 <div v-if="!edit" class="mb-3 mr-3 ml-3 text-left"> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
8 <table v-if="stretches.length > 0" class="table"> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
9 <thead> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
10 <tr> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
11 <th class="header"><translate>Name</translate></th> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
12 <th class="header"><translate>Datum</translate></th> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
13 <th class="header"><translate>Source organization</translate></th> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
14 <th class="tools"> </th> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
15 <th class="tools"> </th> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
16 </tr> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
17 </thead> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
18 <tbody> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
19 <tr class="small" v-for="(stretch, index) in stretches" :key="index"> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
20 <td class=""> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
21 <a @click="moveMapToStretch(index)" href="#">{{ |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
22 stretch.properties.name |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
23 }}</a> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
24 </td> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
25 <td class=""> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
26 {{ formatSurveyDate(stretch.properties["date_info"]) }} |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
27 </td> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
28 <td>{{ stretch.properties["source_organization"] }}</td> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
29 <td> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
30 <font-awesome-icon |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
31 @click="editStretch(index)" |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
32 icon="pencil-alt" |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
33 fixed-width |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
34 ></font-awesome-icon> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
35 </td> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
36 <td> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
37 <font-awesome-icon |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
38 @click="deleteStretch(index)" |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
39 icon="trash" |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
40 fixed-width |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
41 ></font-awesome-icon> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
42 </td> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
43 </tr> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
44 </tbody> |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
45 </table> |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
46 <div class="mt-3" v-if="stretches.length == 0"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
47 <translate>No results.</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
48 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
49 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
50 <div v-if="edit"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
51 <div class="ml-3 mr-3"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
52 <div class="d-flex flex-row justify-content-between"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
53 <div class="mt-2 w-50 mr-2 text-left"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
54 <small class="text-muted"> <translate>ID</translate> </small> |
1870
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
55 <input |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
56 id="id" |
1870
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
57 type="text" |
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
58 class="form-control" |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
59 placeholder="AT_Section_12" |
1870
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
60 aria-label="id" |
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
61 v-model="id" |
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
62 /> |
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
63 <span class="text-left text-danger"> |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
64 <small v-if="idError && !id"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
65 <translate>Please enter an id</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
66 </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
67 </span> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
68 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
69 <div class="mt-2 w-50 ml-2 text-left"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
70 <div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
71 <small class="text-muted"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
72 <translate>Countrycode</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
73 </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
74 <input |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
75 id="countryCode" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
76 type="text" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
77 class="form-control" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
78 placeholder="AT" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
79 aria-label="id" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
80 v-model="countryCode" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
81 /> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
82 <span class="text-left text-danger"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
83 <small v-if="countryCodeError && !countryCode"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
84 <translate>Please enter a countrycode </translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
85 </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
86 </span> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
87 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
88 <div class="w-50 ml-2"></div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
89 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
90 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
91 <div class="d-flex flex-column justify-content-between"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
92 <div class="mt-2 text-left"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
93 <small class="text-muted"> <translate>Start rhm</translate> </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
94 <div class="d-flex flex-row"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
95 <input |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
96 id="startrhm" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
97 type="text" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
98 class="form-control" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
99 placeholder="e.g. ATXXX00001000000019900" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
100 aria-label="startrhm" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
101 v-model="startrhm" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
102 /> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
103 <span class="input-group-text"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
104 <font-awesome-icon |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
105 @click="togglePipette('start')" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
106 :class="{ 'text-info': pipetteStart }" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
107 icon="bullseye" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
108 ></font-awesome-icon> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
109 </span> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
110 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
111 <span class="text-left text-danger"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
112 <small v-if="startrhmError && !startrhm"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
113 <translate>Please enter a start point</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
114 </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
115 </span> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
116 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
117 <div class="mt-2 text-left"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
118 <small class="text-muted"> <translate>End rhm</translate> </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
119 <div class="d-flex flex-row"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
120 <input |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
121 id="endrhm" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
122 type="text" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
123 class="form-control" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
124 placeholder="e.g. ATXXX00001000000019900" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
125 aria-label="endrhm" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
126 v-model="endrhm" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
127 /> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
128 <span class="input-group-text"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
129 <font-awesome-icon |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
130 @click="togglePipette('end')" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
131 :class="{ 'text-info': pipetteEnd }" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
132 icon="bullseye" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
133 ></font-awesome-icon> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
134 </span> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
135 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
136 <span class="text-left text-danger"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
137 <small v-if="endrhmError && !endrhm"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
138 <translate>Please enter an end point</translate> |
1870
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
139 </small> |
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
140 </span> |
3050d702913a
sections and stretches: only stretches. only sysadmin.
Thomas Junk <thomas.junk@intevation.de>
parents:
1827
diff
changeset
|
141 </div> |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
142 </div> |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
143 <div class="d-flex flex-row justify-content-between"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
144 <div class="mt-2 mr-2 w-50 text-left"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
145 <small class="text-muted"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
146 <translate>Object name</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
147 </small> |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
148 <input |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
149 id="objbn" |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
150 type="text" |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
151 class="form-control" |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
152 placeholder="" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
153 aria-label="objbn" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
154 v-model="objbn" |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
155 /> |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
156 <span class="text-left text-danger"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
157 <small v-if="objbnError && !objbn"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
158 <translate>Please enter an objectname</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
159 </small> |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
160 </span> |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
161 </div> |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
162 <div class="mt-2 ml-2 w-50 text-left"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
163 <small class="text-muted"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
164 <translate>National Object name</translate> |
1803
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
165 </small> |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
166 <input |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
167 id="nobjbn" |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
168 type="text" |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
169 class="form-control" |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
170 placeholder="" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
171 aria-label="nobjbn" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
172 v-model="nobjbn" |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
173 /> |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
174 <span class="text-left text-danger"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
175 <small v-if="nobjbnError && !nobjbn"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
176 <translate>Please enter an objectname</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
177 </small> |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
178 </span> |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
179 </div> |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
180 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
181 <div class="d-flex flex-row justify-content-between"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
182 <div class="mt-2 mr-2 w-50 text-left"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
183 <small class="text-muted"> <translate>Date info</translate> </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
184 <input |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
185 id="date_info" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
186 type="date" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
187 class="form-control" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
188 placeholder="date_info" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
189 aria-label="date_info" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
190 v-model="date_info" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
191 /> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
192 <span class="text-left text-danger"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
193 <small v-if="date_infoError && !date_info"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
194 <translate>Please enter a date</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
195 </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
196 </span> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
197 </div> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
198 <div class="mt-2 ml-2 w-50 text-left"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
199 <small class="text-muted"> <translate>Source</translate> </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
200 <input |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
201 id="source" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
202 type="text" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
203 class="form-control" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
204 placeholder="source" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
205 aria-label="source" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
206 v-model="source" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
207 /> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
208 <span class="text-left text-danger"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
209 <small v-if="sourceError && !source"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
210 <translate>Please enter a source</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
211 </small> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
212 </span> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
213 </div> |
1803
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
214 </div> |
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
215 </div> |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
216 <div class="text-right mt-2 mr-3 mb-3"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
217 <button @click="edit = false" class="btn btn-warning mr-2">Back</button> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
218 <button |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
219 @click="save" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
220 type="submit" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
221 class="shadow-sm btn btn-info submit-button" |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
222 > |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
223 <translate>Submit</translate> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
224 </button> |
1803
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
225 </div> |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
226 </div> |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
227 <div class="text-right mr-3"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
228 <button v-if="!edit" @click="startEdit()" class="btn btn-info"> |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
229 <translate>New stretch</translate> |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
230 </button> |
1803
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
231 </div> |
1610
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
232 </div> |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
233 </template> |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
234 |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
235 <script> |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
236 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
237 * without warranty, see README.md and license for details. |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
238 * |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
239 * SPDX-License-Identifier: AGPL-3.0-or-later |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
240 * License-Filename: LICENSES/AGPL-3.0.txt |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
241 * |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
242 * Copyright (C) 2018 by via donau |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
243 * – Österreichische Wasserstraßen-Gesellschaft mbH |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
244 * Software engineering by Intevation GmbH |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
245 * |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
246 * Author(s): |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
247 * Thomas Junk <thomas.junk@intevation.de> |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
248 */ |
1827
27c4effba5b1
stretches only for sysadmin plus country code
Thomas Junk <thomas.junk@intevation.de>
parents:
1823
diff
changeset
|
249 import { mapState, mapGetters } from "vuex"; |
1921
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
250 import { displayError, displayInfo } from "@/lib/errors.js"; |
1942
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
251 import { formatSurveyDate } from "@/lib/date.js"; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
252 import center from "@turf/center"; |
1610
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
253 |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
254 export default { |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
255 name: "importstretches", |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
256 data() { |
1803
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
257 return { |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
258 edit: false, |
1803
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
259 id: "", |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
260 funktion: "", |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
261 startrhm: "", |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
262 endrhm: "", |
1803
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
263 objbn: "", |
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
264 nobjbn: "", |
1827
27c4effba5b1
stretches only for sysadmin plus country code
Thomas Junk <thomas.junk@intevation.de>
parents:
1823
diff
changeset
|
265 countryCode: "", |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
266 date_info: new Date().toISOString().split("T")[0], |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
267 source: "", |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
268 pipetteStart: false, |
1816
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
269 pipetteEnd: false, |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
270 idError: false, |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
271 funktionError: false, |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
272 startrhmError: false, |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
273 endrhmError: false, |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
274 objbnError: false, |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
275 nobjbnError: false, |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
276 date_infoError: false, |
1827
27c4effba5b1
stretches only for sysadmin plus country code
Thomas Junk <thomas.junk@intevation.de>
parents:
1823
diff
changeset
|
277 sourceError: false, |
27c4effba5b1
stretches only for sysadmin plus country code
Thomas Junk <thomas.junk@intevation.de>
parents:
1823
diff
changeset
|
278 countryCodeError: false |
1803
975a7de89f05
define stretches WIP
Thomas Junk <thomas.junk@intevation.de>
parents:
1797
diff
changeset
|
279 }; |
1610
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
280 }, |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
281 mounted() { |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
282 this.edit = false; |
1942
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
283 this.loadStretches(); |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
284 }, |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
285 methods: { |
1942
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
286 editStretch(index) { |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
287 const { date_info, name, objnam, nobjnam } = this.stretches[ |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
288 index |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
289 ].properties; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
290 this.date_info = date_info; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
291 this.id = name; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
292 this.nobjbn = nobjnam; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
293 this.objbn = objnam; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
294 this.source = this.stretches[index]; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
295 this.edit = true; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
296 }, |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
297 deleteStretch(index) { |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
298 displayInfo({ |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
299 title: this.$gettext("Not implemented"), |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
300 message: this.$gettext("Deleting " + this.stretches[index].id) |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
301 }); |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
302 }, |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
303 moveMapToStretch(index) { |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
304 const { coordinates } = center(this.stretches[index]).geometry; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
305 this.$store.commit("map/moveMap", { |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
306 coordinates: coordinates, |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
307 zoom: 17, |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
308 preventZoomOut: true |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
309 }); |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
310 }, |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
311 formatSurveyDate(d) { |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
312 return formatSurveyDate(d); |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
313 }, |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
314 loadStretches() { |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
315 this.$store.dispatch("imports/loadStretches").catch(error => { |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
316 const { status, data } = error.response; |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
317 displayError({ |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
318 title: this.$gettext("Backend Error"), |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
319 message: `${status}: ${data.message || data}` |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
320 }); |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
321 }); |
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
322 }, |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
323 clean() { |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
324 this.id = ""; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
325 this.funktion = ""; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
326 this.startrhm = ""; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
327 this.endrhm = ""; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
328 this.objbn = ""; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
329 this.nobjbn = ""; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
330 this.countryCode = ""; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
331 this.date_info = new Date().toISOString().split("T")[0]; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
332 this.source = ""; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
333 this.pipetteStart = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
334 this.pipetteEnd = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
335 this.idError = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
336 this.funktionError = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
337 this.startrhmError = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
338 this.endrhmError = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
339 this.objbnError = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
340 this.nobjbnError = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
341 this.date_infoError = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
342 this.sourceError = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
343 this.countryCodeError = false; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
344 }, |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
345 startEdit() { |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
346 this.clean(); |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
347 this.edit = true; |
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
348 }, |
1823
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
349 togglePipette(t) { |
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
350 if (t === "start") { |
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
351 this.pipetteStart = !this.pipetteStart; |
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
352 this.pipetteEnd = false; |
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
353 } else { |
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
354 this.pipetteEnd = !this.pipetteEnd; |
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
355 this.pipetteStart = false; |
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
356 } |
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
357 }, |
1816
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
358 validate() { |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
359 const fields = [ |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
360 "id", |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
361 "funktion", |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
362 "startrhm", |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
363 "endrhm", |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
364 "objbn", |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
365 "date_info", |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
366 "source" |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
367 ]; |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
368 fields.forEach(field => { |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
369 if (!this[field]) { |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
370 this[field + "Error"] = true; |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
371 } else { |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
372 this[field + "Error"] = false; |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
373 } |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
374 }); |
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
375 }, |
1871
8ae7a1fba4cd
prototypical listview for stretches. new and back buttons. have fun
Thomas Junk <thomas.junk@intevation.de>
parents:
1870
diff
changeset
|
376 save() { |
1816
199fa7e759aa
define stretches: more userfriendly errormessage behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1809
diff
changeset
|
377 this.validate(); |
1930
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
378 const data = { |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
379 name: this.id, |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
380 from: this.startrhm, |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
381 to: this.endrhm, |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
382 "source-organization": this.source, |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
383 "date-info": this.date_info, |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
384 objnam: this.objbn, |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
385 nobjnam: this.nobjbn, |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
386 countries: this.countryCode.split(",") |
1889
b6d0460b069d
define stretches: Now with store-backend
Thomas Junk <thomas.junk@intevation.de>
parents:
1888
diff
changeset
|
387 }; |
1930
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
388 this.$store |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
389 .dispatch("imports/saveStretch", data) |
1921
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
390 .then(() => { |
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
391 displayInfo({ |
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
392 title: this.$gettext("Import"), |
1930
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
393 message: this.$gettext("Starting import of stretch") |
1921
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
394 }); |
1930
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
395 this.clean(); |
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
396 this.edit = false; |
1942
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
397 this.loadStretches(); |
1921
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
398 }) |
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
399 .catch(error => { |
1930
1aa864cccddc
define stretches: converted to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
1921
diff
changeset
|
400 console.log(error); |
1921
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
401 const { status, data } = error.response; |
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
402 displayError({ |
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
403 title: this.$gettext("Backend Error"), |
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
404 message: `${status}: ${data.message || data}` |
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
405 }); |
0059aa870a39
Hotfixed stretch import.
Sascha Wilde <wilde@intevation.de>
parents:
1896
diff
changeset
|
406 }); |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
407 } |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
408 }, |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
409 watch: { |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
410 identifiedFeatures() { |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
411 const filterDistanceMarks = x => { |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
412 return /^distance_marks/.test(x["id_"]); |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
413 }; |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
414 const distanceMark = this.identifiedFeatures.filter(filterDistanceMarks); |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
415 if (distanceMark.length > 0) { |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
416 const value = distanceMark[0]["id_"] |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
417 .split(".")[1] |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
418 .replace(/,|\(|\)/g, ""); |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
419 this.startrhm = this.pipetteStart ? value : this.startrhm; |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
420 this.endrhm = this.pipetteEnd ? value : this.endrhm; |
1823
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
421 this.pipetteStart = false; |
7d37d9f5f272
define stretches: better targetting behaviour
Thomas Junk <thomas.junk@intevation.de>
parents:
1816
diff
changeset
|
422 this.pipetteEnd = false; |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
423 } |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
424 } |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
425 }, |
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
426 computed: { |
1827
27c4effba5b1
stretches only for sysadmin plus country code
Thomas Junk <thomas.junk@intevation.de>
parents:
1823
diff
changeset
|
427 ...mapState("map", ["identifiedFeatures", "currentMeasurement"]), |
1889
b6d0460b069d
define stretches: Now with store-backend
Thomas Junk <thomas.junk@intevation.de>
parents:
1888
diff
changeset
|
428 ...mapGetters("user", ["isSysAdmin"]), |
b6d0460b069d
define stretches: Now with store-backend
Thomas Junk <thomas.junk@intevation.de>
parents:
1888
diff
changeset
|
429 ...mapState("imports", ["stretches"]) |
1809
b16a6db0008f
feat: define sections and stretches with targetting option
Thomas Junk <thomas.junk@intevation.de>
parents:
1803
diff
changeset
|
430 } |
1610
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
431 }; |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
432 </script> |
2ee243f9a7ee
import stretches boilerplate added
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
433 |
1942
d1b7b1c70410
import stretch: listview with edit-function
Thomas Junk <thomas.junk@intevation.de>
parents:
1930
diff
changeset
|
434 <style lang="scss" scoped></style> |