diff --git a/src/components/Dropdown.vue b/src/components/Dropdown.vue index 7fb68bf91cb66f9d5583e6576056ba5b2d1b5c95..9c37eefcf222732d5af1d9ea81b93b065e23bc2e 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 8e085eddf482e6623cc70d4f1d53f4a3cf65c36f..b33b4ff3cc1120b273f47d1771c26d816de445de 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 d1120637b947ea8df5d629c4f1133823b27fcfe2..59cd5d1f1a489d7b76f4efbd8454f9c92d5002ea 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 22648eb93434372fa5cb3e6a442acc248caf504c..875f26881acfdaa661b329806197baa587022db8 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 39e36dd8add944dfab3bb6b8e6ec166b81d0b9ae..4bd7c5dce9535199139fb1ff2c04fedae386f099 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 69b931dd72496527d5b20f6d97f9f18e8732668d..691443a6d7d5ce34aa95be04ca40851e3e536a85 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 495d0d8e6435e45f5a4ffd9d3672e731973127bd..ddff358b08a2ed0bdacf60f88b1f951ce7f11252 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" >