From 4d579af6bfbe3e85d1c6c27ca0866f9c7111cd1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr>
Date: Tue, 5 Oct 2021 13:25:53 +0200
Subject: [PATCH] replace == by ===

---
 src/components/Dropdown.vue                   |  2 +-
 src/components/ImportTask.vue                 |  8 +++----
 src/components/map-layers/SidebarLayers.vue   |  2 +-
 src/views/feature/Feature_list.vue            | 24 +++++++++----------
 .../feature_type/Feature_type_detail.vue      | 16 ++++++-------
 src/views/feature_type/Feature_type_edit.vue  |  4 ++--
 src/views/project/Project_detail.vue          |  8 +++----
 7 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/src/components/Dropdown.vue b/src/components/Dropdown.vue
index 7fb68bf9..9c37eefc 100644
--- a/src/components/Dropdown.vue
+++ b/src/components/Dropdown.vue
@@ -50,7 +50,7 @@ export default {
     processedOptions: function () {
       //* si un objet {name, value}
       let options = this.options.map((el) =>
-        el.constructor == Object ? el.name : el
+        el.constructor === Object ? el.name : el
       );
       if (this.search && this.input !== "") {
         options = this.searchOptions(options);
diff --git a/src/components/ImportTask.vue b/src/components/ImportTask.vue
index 8e085edd..b33b4ff3 100644
--- a/src/components/ImportTask.vue
+++ b/src/components/ImportTask.vue
@@ -27,21 +27,21 @@
               class="ui icon margin-left"
             >
               <i
-                v-if="importFile.status == 'processing'"
+                v-if="importFile.status === 'processing'"
                 class="orange hourglass half icon"
               ></i>
               <i
-                v-else-if="importFile.status == 'finished'"
+                v-else-if="importFile.status === 'finished'"
                 class="green check circle outline icon"
               ></i>
               <i
-                v-else-if="importFile.status == 'failed'"
+                v-else-if="importFile.status === 'failed'"
                 class="red x icon"
               ></i>
               <i v-else class="red ban icon"></i>
             </span>
             <span
-              v-if="importFile.status == 'pending'"
+              v-if="importFile.status === 'pending'"
               data-tooltip="Statut en attente. Clickez pour rafraichir."
             >
               <i
diff --git a/src/components/map-layers/SidebarLayers.vue b/src/components/map-layers/SidebarLayers.vue
index d1120637..59cd5d1f 100644
--- a/src/components/map-layers/SidebarLayers.vue
+++ b/src/components/map-layers/SidebarLayers.vue
@@ -265,7 +265,7 @@ export default {
     addLayers(baseMap) {
      
       baseMap.layers.forEach((layer) => {
-        var layerOptions = this.layers.find((l) => l.id == layer.id);
+        var layerOptions = this.layers.find((l) => l.id === layer.id);
         console.log(layerOptions);
         layer = Object.assign(layer, layerOptions);
         layer.options.basemapId = baseMap.id;
diff --git a/src/views/feature/Feature_list.vue b/src/views/feature/Feature_list.vue
index 22648eb9..875f2688 100644
--- a/src/views/feature/Feature_list.vue
+++ b/src/views/feature/Feature_list.vue
@@ -213,25 +213,25 @@
 
             <td class="center">
               <div
-                v-if="feature.properties.status.value == 'archived'"
+                v-if="feature.properties.status.value === 'archived'"
                 data-tooltip="Archivé"
               >
                 <i class="grey archive icon"></i>
               </div>
               <div
-                v-else-if="feature.properties.status.value == 'pending'"
+                v-else-if="feature.properties.status.value === 'pending'"
                 data-tooltip="En attente de publication"
               >
                 <i class="teal hourglass outline icon"></i>
               </div>
               <div
-                v-else-if="feature.properties.status.value == 'published'"
+                v-else-if="feature.properties.status.value === 'published'"
                 data-tooltip="Publié"
               >
                 <i class="olive check icon"></i>
               </div>
               <div
-                v-else-if="feature.properties.status.value == 'draft'"
+                v-else-if="feature.properties.status.value === 'draft'"
                 data-tooltip="Brouillon"
               >
                 <i class="orange pencil alternate icon"></i>
@@ -340,7 +340,7 @@
         <div class="ui icon header">
           <i class="trash alternate icon"></i>
           Êtes-vous sûr de vouloir effacer
-          <span v-if="checkedFeatures.length == 1"> un signalement ? </span>
+          <span v-if="checkedFeatures.length === 1"> un signalement ? </span>
           <span v-else> ces {{ checkedFeatures.length }} signalements ? </span>
         </div>
         <div class="actions">
@@ -492,16 +492,16 @@ export default {
         filterdFeatures = filterdFeatures.sort((a, b) => {
           let aProp = this.getFeatureDisplayName(a);
           let bProp = this.getFeatureDisplayName(b);
-          if (this.sort.column == "statut") {
+          if (this.sort.column === "statut") {
             aProp = a.properties.status.value;
             bProp = b.properties.status.value;
-          } else if (this.sort.column == "type") {
+          } else if (this.sort.column === "type") {
             aProp = a.properties.feature_type.title;
             bProp = b.properties.feature_type.title;
-          } else if (this.sort.column == "updated_on") {
+          } else if (this.sort.column === "updated_on") {
             aProp = a.properties.updated_on;
             bProp = b.properties.updated_on;
-          } else if (this.sort.column == "display_creator") {
+          } else if (this.sort.column === "display_creator") {
             aProp = a.properties.display_creator;
             bProp = b.properties.display_creator;
           }
@@ -563,14 +563,14 @@ export default {
     },
 
     isSortedAsc(column) {
-      return this.sort.column == column && this.sort.ascending;
+      return this.sort.column === column && this.sort.ascending;
     },
     isSortedDesc(column) {
-      return this.sort.column == column && !this.sort.ascending;
+      return this.sort.column === column && !this.sort.ascending;
     },
 
     changeSort(column) {
-      if (this.sort.column == column) {
+      if (this.sort.column === column) {
         //changer order
         this.sort.ascending = !this.sort.ascending;
       } else {
diff --git a/src/views/feature_type/Feature_type_detail.vue b/src/views/feature_type/Feature_type_detail.vue
index 39e36dd8..4bd7c5dc 100644
--- a/src/views/feature_type/Feature_type_detail.vue
+++ b/src/views/feature_type/Feature_type_detail.vue
@@ -4,17 +4,17 @@
       <div class="ui attached secondary segment">
         <h1 class="ui center aligned header">
           <img
-            v-if="structure.geom_type == 'point'"
+            v-if="structure.geom_type === 'point'"
             class="ui medium image"
             src="@/assets/img/marker.png"
           />
           <img
-            v-if="structure.geom_type == 'linestring'"
+            v-if="structure.geom_type === 'linestring'"
             class="ui medium image"
             src="@/assets/img/line.png"
           />
           <img
-            v-if="structure.geom_type == 'polygon'"
+            v-if="structure.geom_type === 'polygon'"
             class="ui medium image"
             src="@/assets/img/polygon.png"
           />
@@ -74,7 +74,7 @@
                 />
               </div>
               <button
-                :disabled="fileToImport.size == 0"
+                :disabled="fileToImport.size === 0"
                 @click="importGeoJson"
                 class="ui fluid teal icon button"
               >
@@ -118,19 +118,19 @@
         :key="feature.feature_id + index"
         class="ui small header"
       >
-        <span v-if="feature.status == 'archived'" data-tooltip="Archivé">
+        <span v-if="feature.status === 'archived'" data-tooltip="Archivé">
           <i class="grey archive icon"></i>
         </span>
         <span
-          v-else-if="feature.status == 'pending'"
+          v-else-if="feature.status === 'pending'"
           data-tooltip="En attente de publication"
         >
           <i class="teal hourglass outline icon"></i>
         </span>
-        <span v-else-if="feature.status == 'published'" data-tooltip="Publié">
+        <span v-else-if="feature.status === 'published'" data-tooltip="Publié">
           <i class="olive check icon"></i>
         </span>
-        <span v-else-if="feature.status == 'draft'" data-tooltip="Brouillon">
+        <span v-else-if="feature.status === 'draft'" data-tooltip="Brouillon">
           <i class="orange pencil alternate icon"></i>
         </span>
         <router-link
diff --git a/src/views/feature_type/Feature_type_edit.vue b/src/views/feature_type/Feature_type_edit.vue
index 69b931dd..691443a6 100644
--- a/src/views/feature_type/Feature_type_edit.vue
+++ b/src/views/feature_type/Feature_type_edit.vue
@@ -446,9 +446,9 @@ export default {
     },
 
     translateLabel(value) {
-      if (value == "LineString") {
+      if (value === "LineString") {
         return "linestring";
-      } else if (value == "Polygon" || value == "MultiPolygon") {
+      } else if (value === "Polygon" || value === "MultiPolygon") {
         return "polygon";
       }
       return "point";
diff --git a/src/views/project/Project_detail.vue b/src/views/project/Project_detail.vue
index 495d0d8e..ddff358b 100644
--- a/src/views/project/Project_detail.vue
+++ b/src/views/project/Project_detail.vue
@@ -100,17 +100,17 @@
                   }"
                 >
                   <img
-                    v-if="type.geom_type == 'point'"
+                    v-if="type.geom_type === 'point'"
                     class="list-image-type"
                     src="@/assets/img/marker.png"
                   />
                   <img
-                    v-if="type.geom_type == 'linestring'"
+                    v-if="type.geom_type === 'linestring'"
                     class="list-image-type"
                     src="@/assets/img/line.png"
                   />
                   <img
-                    v-if="type.geom_type == 'polygon'"
+                    v-if="type.geom_type === 'polygon'"
                     class="list-image-type"
                     src="@/assets/img/polygon.png"
                   />
@@ -242,7 +242,7 @@
             <br />
             <div id="button-import" v-if="fileToImport.size > 0">
               <button
-                :disabled="fileToImport.size == 0"
+                :disabled="fileToImport.size === 0"
                 @click="toNewFeatureType"
                 class="ui fluid teal icon button"
               >
-- 
GitLab