annotate client/src/components/importconfiguration/types/WaterwayProfiles.vue @ 3947:5da5de770ec4

sr_upload: negate-z-index checkbox added
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 15 Jul 2019 11:45:59 +0200
parents 439e1865a2d2
children 1ff56484db4e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
2 <div>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
3 <div class="mb-2 px-2">
3013
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
4 <div :key="1" class="flex-column mr-4">
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
5 <div class="flex-row text-left">
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
6 <small class="text-muted">
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
7 <translate>Email Notification</translate>
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
8 </small>
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
9 </div>
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
10 <div class="flex-flex-row text-left">
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
11 <toggle-button
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
12 v-model="eMailNotification"
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
13 class="mt-2"
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
14 :speed="100"
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
15 :labels="{
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
16 checked: this.$options.on,
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
17 unchecked: this.$options.off
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
18 }"
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
19 :width="60"
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
20 :height="30"
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
21 />
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
22 </div>
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
23 </div>
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
24 <div class="d-flex flex-row">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
25 <div class="flex-column w-100">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
26 <div class="flex-row text-left">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
27 <small class="text-muted"> <translate>URL</translate> </small>
2134
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
28 </div>
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
29 <div class="w-100">
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
30 <input
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
31 class="form-control form-control-sm"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
32 type="url"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
33 v-model="url"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
34 />
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
35 </div>
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
36 </div>
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
37 </div>
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
38 <div v-if="!url" class="d-flex flex-row">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
39 <small
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
40 ><translate class="text-danger">Please enter a URL</translate></small
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
41 >
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
42 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
43 <div class="d-flex flex-row">
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
44 <div class="flex-column mt-2 mr-3 w-50">
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
45 <div class="flex-row text-left">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
46 <small class="text-muted">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
47 <translate>Featuretype</translate>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
48 </small>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
49 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
50 <div class="w-100">
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
51 <input
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
52 class="form-control form-control-sm"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
53 type="text"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
54 v-model="featureType"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
55 />
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
56 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
57 <div v-if="!featureType" class="d-flex flex-row">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
58 <small
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
59 ><translate class="text-danger"
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
60 >Please enter a Featuretype</translate
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
61 ></small
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
62 >
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
63 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
64 </div>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
65 <div class="flex-column mt-2 w-50">
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
66 <div class="flex-row text-left">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
67 <small class="text-muted">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
68 <translate>SortBy</translate>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
69 </small>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
70 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
71 <div class="w-100">
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
72 <input
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
73 class="form-control form-control-sm"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
74 type="text"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
75 v-model="sortBy"
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
76 />
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
77 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
78 <div v-if="!sortBy" class="d-flex flex-row">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
79 <small
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
80 ><translate class="text-danger"
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
81 >Please enter SortBy</translate
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
82 ></small
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
83 >
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
84 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
85 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
86 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
87 </div>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
88 <div class="d-flex text-left px-2">
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
89 <div class="mt-3 mb-3 flex-column w-100">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
90 <div class="custom-file">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
91 <input
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
92 accept=".csv"
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
93 type="file"
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
94 @change="fileSelected"
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
95 class="custom-file-input"
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
96 id="uploadFile"
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
97 />
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
98 <label class="pointer custom-file-label" for="uploadFile">
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
99 {{ uploadLabel }}
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
100 </label>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
101 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
102 </div>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
103 </div>
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
104 <div class="d-flex justify-content-between w-100 p-2 border-top">
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
105 <button :key="1" @click="back()" class="btn btn-sm btn-warning">
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
106 Back
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
107 </button>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
108 <button
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
109 :key="2"
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
110 type="submit"
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
111 @click="submit"
3281
439e1865a2d2 client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents: 3156
diff changeset
112 class="btn btn-sm btn-info submit-button"
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
113 >
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
114 <translate>Submit</translate>
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
115 </button>
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
116 </div>
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
117 </div>
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
118 </template>
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
119
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
120 <script>
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
121 /* This is Free Software under GNU Affero General Public License v >= 3.0
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
122 * without warranty, see README.md and license for details.
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
123 *
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
124 * SPDX-License-Identifier: AGPL-3.0-or-later
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
125 * License-Filename: LICENSES/AGPL-3.0.txt
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
126 *
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
127 * Copyright (C) 2018 by via donau
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
128 * – Österreichische Wasserstraßen-Gesellschaft mbH
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
129 * Software engineering by Intevation GmbH
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
130 *
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
131 * Author(s):
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
132 * Thomas Junk <thomas.junk@intevation.de>
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
133 */
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
134
2985
1b8bb4f89227 client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents: 2978
diff changeset
135 import { displayError, displayInfo } from "@/lib/errors";
2134
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
136 import { HTTP } from "@/lib/http";
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
137
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
138 export default {
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
139 data() {
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
140 return {
2135
60c493aaee43 import_waterwayprofile: prefill url
Thomas Junk <thomas.junk@intevation.de>
parents: 2134
diff changeset
141 url: "https://service.d4d-portal.info/wamos/wfs/",
2134
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
142 sortBy: "hydro_scamin",
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
143 featureType: "ws-wamos:ienc_wtwprf",
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
144 disableUploadButton: false,
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
145 uploadLabel: this.$gettext("choose file to upload"),
3013
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
146 uploadFile: null,
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
147 eMailNotification: false
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
148 };
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
149 },
2760
c6fba10926cc client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents: 2534
diff changeset
150 computed: {
c6fba10926cc client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents: 2534
diff changeset
151 importWaterwayProfilesLabel() {
c6fba10926cc client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents: 2534
diff changeset
152 return this.$gettext("Import Waterway Profiles");
c6fba10926cc client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents: 2534
diff changeset
153 }
c6fba10926cc client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents: 2534
diff changeset
154 },
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
155 methods: {
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
156 back() {
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
157 this.url = "https://service.d4d-portal.info/wamos/wfs/";
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
158 this.uploadFile = null;
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
159 this.uploadLabel = this.$gettext("choose file to upload");
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
160 this.$store.commit("importschedule/setListMode");
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
161 },
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
162 fileSelected(e) {
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
163 const files = e.target.files || e.dataTransfer.files;
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
164 if (!files) return;
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
165 this.uploadLabel = files[0].name;
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
166 this.uploadFile = files[0];
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
167 },
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
168 submit() {
2134
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
169 if (!this.url || !this.featureType || !this.sortBy || !this.uploadFile)
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
170 return;
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
171 let formData = new FormData();
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
172 formData.append("wp", this.uploadFile);
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
173 formData.append("url", this.url);
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
174 formData.append("feature-type", this.featureType);
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
175 formData.append("sort-by", this.sortBy);
3013
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
176 if (this.eMailNotification) {
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
177 formData.append("send-email", this.eMailNotification);
30222bcbfec9 import_configuration: add email option to onetime imports
Thomas Junk <thomas.junk@intevation.de>
parents: 2985
diff changeset
178 }
2134
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
179 HTTP.post("/imports/wp", formData, {
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
180 headers: {
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
181 "X-Gemma-Auth": localStorage.getItem("token"),
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
182 "Content-Type": "multipart/form-data"
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
183 }
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
184 })
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
185 .then(() => {
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
186 displayInfo({
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
187 title: this.$gettext("Import"),
2784
387fe9f088a6 Client: (minor) improve a string marking
Fadi Abbud <fadi.abbud@intevation.de>
parents: 2760
diff changeset
188 message:
2134
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
189 this.uploadLabel + this.$gettext(" was successfully uploaded.")
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
190 });
2975
2a29bf8776d0 unified_imports: waterway profiles moved to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2920
diff changeset
191 this.back();
2134
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
192 })
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
193 .catch(error => {
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
194 const { status, data } = error.response;
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
195 const messages = data.messages ? data.messages.join(", ") : "";
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
196 displayError({
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
197 title: this.$gettext("Backend Error"),
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
198 message: `${status}: ${messages}`
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
199 });
8ad8ce85fcbf import_waterwayprofiles: UI etd
Thomas Junk <thomas.junk@intevation.de>
parents: 2123
diff changeset
200 });
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
201 }
3156
cb3b31566e48 import_configuration: added missing labels
Thomas Junk <thomas.junk@intevation.de>
parents: 3013
diff changeset
202 },
cb3b31566e48 import_configuration: added missing labels
Thomas Junk <thomas.junk@intevation.de>
parents: 3013
diff changeset
203 on: "on",
cb3b31566e48 import_configuration: added missing labels
Thomas Junk <thomas.junk@intevation.de>
parents: 3013
diff changeset
204 off: "off"
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
205 };
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
206 </script>
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
207
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
208 <style lang="scss" scoped></style>