Skip to content
Snippets Groups Projects
Commit e74df91e authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Merge branch 'redmine-issues/11786' into 'develop'

REDMINE_ISSUE-11786

See merge request !73
parents 597ec394 4d579af6
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
processedOptions: function () { processedOptions: function () {
//* si un objet {name, value} //* si un objet {name, value}
let options = this.options.map((el) => let options = this.options.map((el) =>
el.constructor == Object ? el.name : el el.constructor === Object ? el.name : el
); );
if (this.search && this.input !== "") { if (this.search && this.input !== "") {
options = this.searchOptions(options); options = this.searchOptions(options);
......
...@@ -27,21 +27,21 @@ ...@@ -27,21 +27,21 @@
class="ui icon margin-left" class="ui icon margin-left"
> >
<i <i
v-if="importFile.status == 'processing'" v-if="importFile.status === 'processing'"
class="orange hourglass half icon" class="orange hourglass half icon"
></i> ></i>
<i <i
v-else-if="importFile.status == 'finished'" v-else-if="importFile.status === 'finished'"
class="green check circle outline icon" class="green check circle outline icon"
></i> ></i>
<i <i
v-else-if="importFile.status == 'failed'" v-else-if="importFile.status === 'failed'"
class="red x icon" class="red x icon"
></i> ></i>
<i v-else class="red ban icon"></i> <i v-else class="red ban icon"></i>
</span> </span>
<span <span
v-if="importFile.status == 'pending'" v-if="importFile.status === 'pending'"
data-tooltip="Statut en attente. Clickez pour rafraichir." data-tooltip="Statut en attente. Clickez pour rafraichir."
> >
<i <i
......
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
addLayers(baseMap) { addLayers(baseMap) {
baseMap.layers.forEach((layer) => { 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); console.log(layerOptions);
layer = Object.assign(layer, layerOptions); layer = Object.assign(layer, layerOptions);
layer.options.basemapId = baseMap.id; layer.options.basemapId = baseMap.id;
......
...@@ -213,25 +213,25 @@ ...@@ -213,25 +213,25 @@
<td class="center"> <td class="center">
<div <div
v-if="feature.properties.status.value == 'archived'" v-if="feature.properties.status.value === 'archived'"
data-tooltip="Archivé" data-tooltip="Archivé"
> >
<i class="grey archive icon"></i> <i class="grey archive icon"></i>
</div> </div>
<div <div
v-else-if="feature.properties.status.value == 'pending'" v-else-if="feature.properties.status.value === 'pending'"
data-tooltip="En attente de publication" data-tooltip="En attente de publication"
> >
<i class="teal hourglass outline icon"></i> <i class="teal hourglass outline icon"></i>
</div> </div>
<div <div
v-else-if="feature.properties.status.value == 'published'" v-else-if="feature.properties.status.value === 'published'"
data-tooltip="Publié" data-tooltip="Publié"
> >
<i class="olive check icon"></i> <i class="olive check icon"></i>
</div> </div>
<div <div
v-else-if="feature.properties.status.value == 'draft'" v-else-if="feature.properties.status.value === 'draft'"
data-tooltip="Brouillon" data-tooltip="Brouillon"
> >
<i class="orange pencil alternate icon"></i> <i class="orange pencil alternate icon"></i>
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
<div class="ui icon header"> <div class="ui icon header">
<i class="trash alternate icon"></i> <i class="trash alternate icon"></i>
Êtes-vous sûr de vouloir effacer Ê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> <span v-else> ces {{ checkedFeatures.length }} signalements ? </span>
</div> </div>
<div class="actions"> <div class="actions">
...@@ -492,16 +492,16 @@ export default { ...@@ -492,16 +492,16 @@ export default {
filterdFeatures = filterdFeatures.sort((a, b) => { filterdFeatures = filterdFeatures.sort((a, b) => {
let aProp = this.getFeatureDisplayName(a); let aProp = this.getFeatureDisplayName(a);
let bProp = this.getFeatureDisplayName(b); let bProp = this.getFeatureDisplayName(b);
if (this.sort.column == "statut") { if (this.sort.column === "statut") {
aProp = a.properties.status.value; aProp = a.properties.status.value;
bProp = b.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; aProp = a.properties.feature_type.title;
bProp = b.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; aProp = a.properties.updated_on;
bProp = b.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; aProp = a.properties.display_creator;
bProp = b.properties.display_creator; bProp = b.properties.display_creator;
} }
...@@ -563,14 +563,14 @@ export default { ...@@ -563,14 +563,14 @@ export default {
}, },
isSortedAsc(column) { isSortedAsc(column) {
return this.sort.column == column && this.sort.ascending; return this.sort.column === column && this.sort.ascending;
}, },
isSortedDesc(column) { isSortedDesc(column) {
return this.sort.column == column && !this.sort.ascending; return this.sort.column === column && !this.sort.ascending;
}, },
changeSort(column) { changeSort(column) {
if (this.sort.column == column) { if (this.sort.column === column) {
//changer order //changer order
this.sort.ascending = !this.sort.ascending; this.sort.ascending = !this.sort.ascending;
} else { } else {
......
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
<div class="ui attached secondary segment"> <div class="ui attached secondary segment">
<h1 class="ui center aligned header"> <h1 class="ui center aligned header">
<img <img
v-if="structure.geom_type == 'point'" v-if="structure.geom_type === 'point'"
class="ui medium image" class="ui medium image"
src="@/assets/img/marker.png" src="@/assets/img/marker.png"
/> />
<img <img
v-if="structure.geom_type == 'linestring'" v-if="structure.geom_type === 'linestring'"
class="ui medium image" class="ui medium image"
src="@/assets/img/line.png" src="@/assets/img/line.png"
/> />
<img <img
v-if="structure.geom_type == 'polygon'" v-if="structure.geom_type === 'polygon'"
class="ui medium image" class="ui medium image"
src="@/assets/img/polygon.png" src="@/assets/img/polygon.png"
/> />
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
/> />
</div> </div>
<button <button
:disabled="fileToImport.size == 0" :disabled="fileToImport.size === 0"
@click="importGeoJson" @click="importGeoJson"
class="ui fluid teal icon button" class="ui fluid teal icon button"
> >
...@@ -118,19 +118,19 @@ ...@@ -118,19 +118,19 @@
:key="feature.feature_id + index" :key="feature.feature_id + index"
class="ui small header" 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> <i class="grey archive icon"></i>
</span> </span>
<span <span
v-else-if="feature.status == 'pending'" v-else-if="feature.status === 'pending'"
data-tooltip="En attente de publication" data-tooltip="En attente de publication"
> >
<i class="teal hourglass outline icon"></i> <i class="teal hourglass outline icon"></i>
</span> </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> <i class="olive check icon"></i>
</span> </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> <i class="orange pencil alternate icon"></i>
</span> </span>
<router-link <router-link
......
...@@ -446,9 +446,9 @@ export default { ...@@ -446,9 +446,9 @@ export default {
}, },
translateLabel(value) { translateLabel(value) {
if (value == "LineString") { if (value === "LineString") {
return "linestring"; return "linestring";
} else if (value == "Polygon" || value == "MultiPolygon") { } else if (value === "Polygon" || value === "MultiPolygon") {
return "polygon"; return "polygon";
} }
return "point"; return "point";
......
...@@ -100,17 +100,17 @@ ...@@ -100,17 +100,17 @@
}" }"
> >
<img <img
v-if="type.geom_type == 'point'" v-if="type.geom_type === 'point'"
class="list-image-type" class="list-image-type"
src="@/assets/img/marker.png" src="@/assets/img/marker.png"
/> />
<img <img
v-if="type.geom_type == 'linestring'" v-if="type.geom_type === 'linestring'"
class="list-image-type" class="list-image-type"
src="@/assets/img/line.png" src="@/assets/img/line.png"
/> />
<img <img
v-if="type.geom_type == 'polygon'" v-if="type.geom_type === 'polygon'"
class="list-image-type" class="list-image-type"
src="@/assets/img/polygon.png" src="@/assets/img/polygon.png"
/> />
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
<br /> <br />
<div id="button-import" v-if="fileToImport.size > 0"> <div id="button-import" v-if="fileToImport.size > 0">
<button <button
:disabled="fileToImport.size == 0" :disabled="fileToImport.size === 0"
@click="toNewFeatureType" @click="toNewFeatureType"
class="ui fluid teal icon button" class="ui fluid teal icon button"
> >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment