From bfd71f57a07c867801698c60bae595600402e07d Mon Sep 17 00:00:00 2001
From: florent <flavelle@neogeo.fr>
Date: Thu, 28 Apr 2022 16:05:09 +0200
Subject: [PATCH] dev

---
 src/views/Feature/FeatureDetail.vue         | 6 +++++-
 src/views/FeatureType/FeatureTypeDetail.vue | 6 +++++-
 src/views/FeatureType/FeatureTypeEdit.vue   | 1 +
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/views/Feature/FeatureDetail.vue b/src/views/Feature/FeatureDetail.vue
index 946b4629..32b4ed01 100644
--- a/src/views/Feature/FeatureDetail.vue
+++ b/src/views/Feature/FeatureDetail.vue
@@ -254,7 +254,11 @@ export default {
       this.map = mapService.createMap(this.$refs.map, {
         mapDefaultViewCenter,
         mapDefaultViewZoom,
-        interactions : { doubleClickZoom :false,mouseWheelZoom:false,dragPan:false }
+        interactions : {
+          doubleClickZoom :false,
+          mouseWheelZoom: false,
+          dragPan: false
+        }
       });
 
       // Update link to feature list with map zoom and center
diff --git a/src/views/FeatureType/FeatureTypeDetail.vue b/src/views/FeatureType/FeatureTypeDetail.vue
index 58303368..5f5db777 100644
--- a/src/views/FeatureType/FeatureTypeDetail.vue
+++ b/src/views/FeatureType/FeatureTypeDetail.vue
@@ -580,6 +580,8 @@ export default {
               if (field_type === 'list') {
                 //*then check if the value is an available option
                 if (!options.includes(fieldInFeature)) {
+                  this.importError = `Le fichier est invalide: la valeur [ ${fieldInFeature} ] n'est pas une option valide 
+                    pour le champ personnalisé "${name}".`;
                   return false;
                 }
               } else if (customType !== field_type) {
@@ -664,7 +666,8 @@ export default {
                 if (field_type === 'list') {
                   //*then check if the value is an available option
                   if (fieldInFeature && !options.includes(fieldInFeature)) {
-                    this.importError = `Le champ ${name} contient une valeur invalide.`;
+                    this.importError = `Le fichier est invalide: la valeur [ ${fieldInFeature} ] n'est pas une option valide 
+                      pour le champ personnalisé "${name}".`;
                     return false;
                   }
                 } else if (customType !== field_type) {
@@ -699,6 +702,7 @@ export default {
         } else {
           jsonValidity = true;
         }
+        console.log(jsonValidity);
 
         if (jsonValidity) {
           this.geojsonFileToImport = files[0]; // todo : remove this value from state as it stored (first attempt didn't work)
diff --git a/src/views/FeatureType/FeatureTypeEdit.vue b/src/views/FeatureType/FeatureTypeEdit.vue
index 303f3d2f..09f6b34e 100644
--- a/src/views/FeatureType/FeatureTypeEdit.vue
+++ b/src/views/FeatureType/FeatureTypeEdit.vue
@@ -645,6 +645,7 @@ export default {
     },
 
     transformProperties(prop) {
+      console.log(prop);
       const type = typeof prop;
       const date = new Date(prop);
       if (type === 'boolean') {
-- 
GitLab