comparison client/src/components/importconfiguration/ImportDetails.vue @ 2979:8f266dc8b4e3 unified_import

unified_imports: moved imports partially to new UI
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 09 Apr 2019 14:52:55 +0200
parents d6dd158b8071
children 1b8bb4f89227
comparison
equal deleted inserted replaced
2978:d6dd158b8071 2979:8f266dc8b4e3
55 /> 55 />
56 <SoundingResults 56 <SoundingResults
57 class="mt-3" 57 class="mt-3"
58 v-if="Import === $options.IMPORTTYPES.SOUNDINGRESULTS" 58 v-if="Import === $options.IMPORTTYPES.SOUNDINGRESULTS"
59 /> 59 />
60 <ScheduledImports
61 class="mt-3"
62 v-if="Import && !isOnetime"
63 ></ScheduledImports>
64 <div v-if="!Import" class="d-flex flex-row w-100 mt-3">
65 <button :key="1" @click="back()" class="ml-auto btn btn-warning">
66 Back
67 </button>
68 </div>
60 </div> 69 </div>
61 </template> 70 </template>
62 71
63 <style lang="scss" scoped></style> 72 <style lang="scss" scoped></style>
64 73
75 * 84 *
76 * Author(s): 85 * Author(s):
77 * Thomas Junk <thomas.junk@intevation.de> 86 * Thomas Junk <thomas.junk@intevation.de>
78 * Tom Gottfried <tom.gottfried@intevation.de> 87 * Tom Gottfried <tom.gottfried@intevation.de>
79 */ 88 */
80 import { 89 import { IMPORTTYPES } from "@/store/importschedule";
81 IMPORTTYPES
82 // IMPORTTYPEKIND,
83 // initializeCurrentSchedule
84 } from "@/store/importschedule";
85 import { mapState } from "vuex"; 90 import { mapState } from "vuex";
86 // import { displayInfo, displayError } from "@/lib/errors.js";
87 // import app from "@/main.js";
88 // import { HTTP } from "@/lib/http";
89
90 export default { 91 export default {
91 components: { 92 components: {
92 ApprovedGaugeMeasurement: () => 93 ApprovedGaugeMeasurement: () =>
93 import("./types/ApprovedGaugeMeasurement.vue"), 94 import("./types/ApprovedGaugeMeasurement.vue"),
94 WaterwayProfiles: () => import("./types/WaterwayProfiles"), 95 WaterwayProfiles: () => import("./types/WaterwayProfiles"),
95 SoundingResults: () => import("./types/Soundingresults.vue") 96 SoundingResults: () => import("./types/Soundingresults.vue"),
97 ScheduledImports: () => import("./types/ScheduledImports.vue")
96 }, 98 },
97 data() { 99 data() {
98 return {}; 100 return {};
99 }, 101 },
100 computed: { 102 computed: {
101 ...mapState("importschedule", ["currentSchedule"]), 103 ...mapState("importschedule", ["currentSchedule"]),
104 isOnetime() {
105 for (let kind of [
106 this.$options.IMPORTTYPES.SOUNDINGRESULTS,
107 this.$options.IMPORTTYPES.APPROVEDGAUGEMEASUREMENTS,
108 this.$options.IMPORTTYPES.WATERWAYPROFILES
109 ]) {
110 if (kind === this.currentSchedule.importType) return true;
111 }
112 return false;
113 },
102 Import: { 114 Import: {
103 get() { 115 get() {
104 return this.currentSchedule.importType; 116 return this.currentSchedule.importType;
105 }, 117 },
106 set(value) { 118 set(value) {
112 }, 124 },
113 regularLabel() { 125 regularLabel() {
114 return this.$gettext("Regular Imports"); 126 return this.$gettext("Regular Imports");
115 } 127 }
116 }, 128 },
117 methods: {}, 129 methods: {
130 back() {
131 this.$store.commit("importschedule/setListMode");
132 }
133 },
118 IMPORTTYPES: IMPORTTYPES 134 IMPORTTYPES: IMPORTTYPES
119 }; 135 };
120 </script> 136 </script>