# HG changeset patch # User Thomas Junk # Date 1554814375 -7200 # Node ID 8f266dc8b4e32a2565ad576b2fa353ede18538d7 # Parent d6dd158b80710dec65213052a570d0552b15e2f9 unified_imports: moved imports partially to new UI diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/Sidebar.vue --- a/client/src/components/Sidebar.vue Tue Apr 09 13:42:44 2019 +0200 +++ b/client/src/components/Sidebar.vue Tue Apr 09 14:52:55 2019 +0200 @@ -43,14 +43,10 @@
- + Imports - - - Imports (New) - Systemadministration diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/Import.vue --- a/client/src/components/importconfiguration/Import.vue Tue Apr 09 13:42:44 2019 +0200 +++ b/client/src/components/importconfiguration/Import.vue Tue Apr 09 14:52:55 2019 +0200 @@ -58,48 +58,15 @@
-
- - +
-
diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/ImportDetails.vue --- a/client/src/components/importconfiguration/ImportDetails.vue Tue Apr 09 13:42:44 2019 +0200 +++ b/client/src/components/importconfiguration/ImportDetails.vue Tue Apr 09 14:52:55 2019 +0200 @@ -57,6 +57,15 @@ class="mt-3" v-if="Import === $options.IMPORTTYPES.SOUNDINGRESULTS" /> + +
+ +
@@ -77,28 +86,31 @@ * Thomas Junk * Tom Gottfried */ -import { - IMPORTTYPES - // IMPORTTYPEKIND, - // initializeCurrentSchedule -} from "@/store/importschedule"; +import { IMPORTTYPES } from "@/store/importschedule"; import { mapState } from "vuex"; -// import { displayInfo, displayError } from "@/lib/errors.js"; -// import app from "@/main.js"; -// import { HTTP } from "@/lib/http"; - export default { components: { ApprovedGaugeMeasurement: () => import("./types/ApprovedGaugeMeasurement.vue"), WaterwayProfiles: () => import("./types/WaterwayProfiles"), - SoundingResults: () => import("./types/Soundingresults.vue") + SoundingResults: () => import("./types/Soundingresults.vue"), + ScheduledImports: () => import("./types/ScheduledImports.vue") }, data() { return {}; }, computed: { ...mapState("importschedule", ["currentSchedule"]), + isOnetime() { + for (let kind of [ + this.$options.IMPORTTYPES.SOUNDINGRESULTS, + this.$options.IMPORTTYPES.APPROVEDGAUGEMEASUREMENTS, + this.$options.IMPORTTYPES.WATERWAYPROFILES + ]) { + if (kind === this.currentSchedule.importType) return true; + } + return false; + }, Import: { get() { return this.currentSchedule.importType; @@ -114,7 +126,11 @@ return this.$gettext("Regular Imports"); } }, - methods: {}, + methods: { + back() { + this.$store.commit("importschedule/setListMode"); + } + }, IMPORTTYPES: IMPORTTYPES }; diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/Availablefairwaydepth.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Availablefairwaydepth.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,51 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/Bottleneck.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Bottleneck.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,107 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/Distancemarksashore.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Distancemarksashore.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,99 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/Distancemarksvirtual.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Distancemarksvirtual.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,116 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/Fairwaydimensions.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Fairwaydimensions.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,243 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/Gaugemeasurement.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Gaugemeasurement.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,51 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/ScheduledImports.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/ScheduledImports.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,957 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/Waterwayarea.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Waterwayarea.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,99 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/Waterwayaxis.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Waterwayaxis.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,99 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importconfiguration/types/Waterwaygauges.vue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/types/Waterwaygauges.vue Tue Apr 09 14:52:55 2019 +0200 @@ -0,0 +1,116 @@ + + + + + diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/Importschedule.vue --- a/client/src/components/importschedule/Importschedule.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,273 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/Importscheduledetail.vue --- a/client/src/components/importschedule/Importscheduledetail.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1027 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/importtypes/Availablefairwaydepth.vue --- a/client/src/components/importschedule/importtypes/Availablefairwaydepth.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/importtypes/Bottleneck.vue --- a/client/src/components/importschedule/importtypes/Bottleneck.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/importtypes/Distancemarksashore.vue --- a/client/src/components/importschedule/importtypes/Distancemarksashore.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/importtypes/Distancemarksvirtual.vue --- a/client/src/components/importschedule/importtypes/Distancemarksvirtual.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/importtypes/Fairwaydimensions.vue --- a/client/src/components/importschedule/importtypes/Fairwaydimensions.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,243 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/importtypes/Gaugemeasurement.vue --- a/client/src/components/importschedule/importtypes/Gaugemeasurement.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/importtypes/Waterwayarea.vue --- a/client/src/components/importschedule/importtypes/Waterwayarea.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/importtypes/Waterwayaxis.vue --- a/client/src/components/importschedule/importtypes/Waterwayaxis.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/components/importschedule/importtypes/Waterwaygauges.vue --- a/client/src/components/importschedule/importtypes/Waterwaygauges.vue Tue Apr 09 13:42:44 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ - - - - - diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/router.js --- a/client/src/router.js Tue Apr 09 13:42:44 2019 +0200 +++ b/client/src/router.js Tue Apr 09 14:52:55 2019 +0200 @@ -81,22 +81,6 @@ } }, { - path: "/importschedule", - name: "importschedule", - component: () => import("./components/importschedule/Importschedule.vue"), - meta: { - requiresAuth: true - }, - beforeEnter: (to, from, next) => { - const isWaterwayAdmin = store.getters["user/isWaterwayAdmin"]; - if (!isWaterwayAdmin) { - next("/login"); - } else { - next(); - } - } - }, - { path: "/", name: "mainview", component: Maplayer, diff -r d6dd158b8071 -r 8f266dc8b4e3 client/src/store/importschedule.js --- a/client/src/store/importschedule.js Tue Apr 09 13:42:44 2019 +0200 +++ b/client/src/store/importschedule.js Tue Apr 09 14:52:55 2019 +0200 @@ -62,7 +62,6 @@ id: null, importType: null, schedule: null, - import_: null, importSource: null, eMailNotification: false, scheduled: false, @@ -137,7 +136,7 @@ const { kind, config, id } = payload; const eMailNotification = config["send-email"]; const { cron, url } = config; - Vue.set(state.currentSchedule, "import_", KINDIMPORTTYPE[kind]); + Vue.set(state.currentSchedule, "importType", KINDIMPORTTYPE[kind]); Vue.set(state.currentSchedule, "id", id); if (cron) { Vue.set(state.currentSchedule, "scheduled", true);