diff client/src/components/importschedule/Importscheduledetail.vue @ 1996:fda5c78fb7d3 importschedulerefac

moved components
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 24 Jan 2019 13:43:36 +0100
parents 29f02d0043a9
children 74c03fec0a91
line wrap: on
line diff
--- a/client/src/components/importschedule/Importscheduledetail.vue	Wed Jan 23 16:50:33 2019 +0100
+++ b/client/src/components/importschedule/Importscheduledetail.vue	Thu Jan 24 13:43:36 2019 +0100
@@ -72,27 +72,73 @@
 
           <Availablefairwaydepth
             v-if="import_ == $options.IMPORTTYPES.FAIRWAYAVAILABILITY"
+            @urlChanged="setUrl"
+            :url="url"
           ></Availablefairwaydepth>
           <Bottleneck
             v-if="import_ == $options.IMPORTTYPES.BOTTLENECK"
+            @urlChanged="setUrl"
+            :url="url"
           ></Bottleneck>
           <Distancemarksvirtual
             v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSVIRTUAL"
+            @urlChanged="setUrl"
+            @usernameChanged="setUsername"
+            @passwordChanged="setPassword"
+            :url="url"
+            :username="username"
+            :password="password"
           ></Distancemarksvirtual>
           <Faiwaydimensions
             v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSION"
+            @urlChanged="setUrl"
+            @featureTypeChanged="setFeatureType"
+            @sortByChanged="setSortBy"
+            @LOSChanged="setLOS"
+            @depthChanged="setDepth"
+            @minWidthChanged="setMinWidth"
+            @maxWidthChanged="setMaxWidth"
+            @sourceOrganizationChanged="setSourceOrganization"
+            :url="url"
+            :featureType="featureType"
+            :sortBy="sortBy"
+            :LOS="LOS"
+            :minWidth="minWidth"
+            :maxWidth="maxWidth"
+            :sourceOrganization="sourceOrganization"
+            :depth="depth"
           ></Faiwaydimensions>
           <Gaugemeasurement
             v-if="import_ == $options.IMPORTTYPES.GAUGEMEASUREMENT"
+            @urlChanged="setUrl"
+            :url="url"
           ></Gaugemeasurement>
           <Waterwayarea
             v-if="import_ == $options.IMPORTTYPES.WATERWAYAREA"
+            @urlChanged="setUrl"
+            @featureTypeChanged="setFeatureType"
+            @sortByChanged="setSortBy"
+            :url="url"
+            :featureType="featureType"
+            :sortBy="sortBy"
           ></Waterwayarea>
           <Waterwaygauges
             v-if="import_ == $options.IMPORTTYPES.WATERWAYGAUGES"
+            @urlChanged="setUrl"
+            @usernameChanged="setUsername"
+            @passwordChanged="setPassword"
+            :url="url"
+            :username="username"
+            :password="password"
           ></Waterwaygauges>
           <Waterwayaxis
             v-if="import_ == $options.IMPORTTYPES.WATERWAYAXIS"
+            @urlChanged="setUrl"
+            @featureTypeChanged="setFeatureType"
+            @sortByChanged="setSortBy"
+            :url="url"
+            :featureType="featureType"
+            :sortBy="sortBy"
           ></Waterwayaxis>
 
           <div class="d-flex flex-row">
@@ -344,14 +390,22 @@
 export default {
   name: "importscheduledetail",
   components: {
-    Availablefairwaydepth: () => import("./Availablefairwaydepth"),
-    Bottleneck: () => import("./Bottleneck"),
-    Distancemarksvirtual: () => import("./Distancemarksvirtual"),
-    Faiwaydimensions: () => import("./Fairwaydimensions"),
-    Gaugemeasurement: () => import("./Gaugemeasurement"),
-    Waterwayarea: () => import("./Waterwayarea"),
-    Waterwaygauges: () => import("./Waterwaygauges"),
-    Waterwayaxis: () => import("./Waterwayaxis")
+    Availablefairwaydepth: () =>
+      import("@/components/importschedule/importtypes/Availablefairwaydepth"),
+    Bottleneck: () =>
+      import("@/components/importschedule/importtypes/Bottleneck"),
+    Distancemarksvirtual: () =>
+      import("@/components/importschedule/importtypes/Distancemarksvirtual"),
+    Faiwaydimensions: () =>
+      import("@/components/importschedule/importtypes/Fairwaydimensions"),
+    Gaugemeasurement: () =>
+      import("@/components/importschedule/importtypes/Gaugemeasurement"),
+    Waterwayarea: () =>
+      import("@/components/importschedule/importtypes/Waterwayarea"),
+    Waterwaygauges: () =>
+      import("@/components/importschedule/importtypes/Waterwaygauges"),
+    Waterwayaxis: () =>
+      import("@/components/importschedule/importtypes/Waterwayaxis")
   },
   data() {
     return {
@@ -433,16 +487,42 @@
   },
   computed: {
     ...mapState("imports", ["importScheduleDetailVisible", "currentSchedule"]),
-    showPassword() {
-      if (this.passwordVisible) return "text";
-      return "password";
-    },
     dialogLabel() {
       if (this.id) return this.$gettext("Import") + " " + this.id;
       return this.$gettext("New Import");
     }
   },
   methods: {
+    setUrl(value) {
+      this.url = value;
+    },
+    setFeatureType(value) {
+      this.featureType = value;
+    },
+    setSortBy(value) {
+      this.sortBy = value;
+    },
+    setUsername(value) {
+      this.username = value;
+    },
+    setPassword(value) {
+      this.password = value;
+    },
+    setLOS(value) {
+      this.LOS = value;
+    },
+    setMinWidth(value) {
+      this.minWidth = value;
+    },
+    setMaxWidth(value) {
+      this.maxWidth = value;
+    },
+    setDepth(value) {
+      this.depth = value;
+    },
+    setSourceOrganization(value) {
+      this.sourceOrganization = value;
+    },
     calcCronString() {
       let getValue = value => {
         return this[value] ? this[value] : "*";