diff client/src/components/importconfiguration/ImportDetails.vue @ 5664:daa39433bef1

Fixed UI for import configuration: kind can not be changed on update Currently WAMOS does not allow for changing the kind of an existing import. However the UI allowed for changing the kind during updating the configuration of an existing import, which didn't work and resulted in unexpected results. Therefor the kind selector is now disabled during update of existing imports.
author Sascha Wilde <wilde@sha-bang.de>
date Mon, 04 Dec 2023 12:44:04 +0100
parents 84d01a536bec
children 8fc26cc61ba8
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ImportDetails.vue	Wed Nov 29 13:22:05 2023 +0100
+++ b/client/src/components/importconfiguration/ImportDetails.vue	Mon Dec 04 12:44:04 2023 +0100
@@ -9,6 +9,7 @@
           v-model="Import"
           class="custom-select custom-select-sm"
           id="importtype"
+          :disabled="updateImport"
         >
           <optgroup :label="onetimeLabel">
             <option :value="$options.IMPORTTYPES.SOUNDINGRESULTS">
@@ -115,7 +116,9 @@
     ScheduledImports: () => import("./ScheduledImports")
   },
   data() {
-    return {};
+    return {
+      updateImport: false
+    };
   },
   computed: {
     ...mapState("importschedule", ["currentSchedule"]),
@@ -148,6 +151,9 @@
       return this.$gettext("Regular Imports");
     }
   },
+  mounted() {
+    this.updateImport = !!this.Import
+  },
   methods: {
     back() {
       this.$store.commit("importschedule/setListMode");