changeset 3695:5754793ff9b0

import_configuration: adapt backend notation 'single-beam'
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 19 Jun 2019 08:53:48 +0200
parents 6f5297dc6039
children 982816fca381
files client/src/components/importconfiguration/types/Soundingresults.vue
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importconfiguration/types/Soundingresults.vue	Tue Jun 18 18:23:20 2019 +0200
+++ b/client/src/components/importconfiguration/types/Soundingresults.vue	Wed Jun 19 08:53:48 2019 +0200
@@ -279,12 +279,16 @@
           if (response.data.meta) {
             const { bottleneck, date, epsg } = response.data.meta;
             const depthReference = response.data.meta["depth-reference"];
+            const singlebeam = response.data.meta["single-beam"];
             this.bottleneck = this.bottlenecks.find(
               bn => bn.properties.objnam === bottleneck
             );
             this.depthReference = depthReference;
             this.importDate = new Date(date).toISOString().split("T")[0];
             this.projection = epsg;
+            this.beamType = singlebeam
+              ? this.$options.BEAMTYPES.SINGLEBEAM
+              : this.$options.BEAMTYPES.MULTIBEAM;
           }
           this.importState = IMPORTSTATE.EDIT;
           this.token = response.data.token;
@@ -309,7 +313,8 @@
       if (this.depthReference)
         formData.append("depth-reference", this.depthReference);
       if (this.projection) formData.append("epsg", this.projection);
-      if (this.beamType) formData.append("beam-type", this.beamType);
+      if (this.beamType)
+        formData.append("single-beam", this.$options.BEAMTYPES.SINGLEBEAM);
 
       HTTP.post("/imports/sr", formData, {
         headers: {
@@ -414,7 +419,8 @@
               "depth-reference": this.depthReference,
               bottleneck: this.bottleneck.properties.objnam,
               date: this.importDate,
-              beamType: this.beamType,
+              "single-beam":
+                this.beamType === this.$options.BEAMTYPES.SINGLEBEAM,
               projection: this.projection
             })
           )