Skip to content
Snippets Groups Projects
Commit 112e6a5a authored by Timothee P's avatar Timothee P :sunflower:
Browse files

Merge branch 'develop' into redmine-issues/12721

parents 64b50c32 2b43c0a7
No related branches found
No related tags found
2 merge requests!295Version 3.0.0,!237REDMINE_ISSUE-12721
const faIcons = [ const faIcons = [
'circle',
'address-book', 'address-book',
'address-card', 'address-card',
'adjust', 'adjust',
......
...@@ -394,7 +394,10 @@ const mapUtil = { ...@@ -394,7 +394,10 @@ const mapUtil = {
if (color == undefined){ if (color == undefined){
color = featureType.color; color = featureType.color;
} }
const colorValue = color.value ? color.value : color; const colorValue =
color.value && color.value.length ?
color.value : typeof color === 'string' && color.length ?
color : '#000000';
if (geomJSON.type === 'Point') { if (geomJSON.type === 'Point') {
if ( if (
customFieldOption && customFieldOption &&
...@@ -403,7 +406,10 @@ const mapUtil = { ...@@ -403,7 +406,10 @@ const mapUtil = {
featureType.colors_style.value.icons && featureType.colors_style.value.icons &&
!!Object.keys(featureType.colors_style.value.icons).length !!Object.keys(featureType.colors_style.value.icons).length
) { ) {
if (featureType.colors_style.value.icons[customFieldOption]) { if (
featureType.colors_style.value.icons[customFieldOption] &&
featureType.colors_style.value.icons[customFieldOption] !== 'circle'
) {
const iconHTML = ` const iconHTML = `
<i <i
class="fas fa-${featureType.colors_style.value.icons[customFieldOption]} fa-lg" class="fas fa-${featureType.colors_style.value.icons[customFieldOption]} fa-lg"
...@@ -424,7 +430,7 @@ const mapUtil = { ...@@ -424,7 +430,7 @@ const mapUtil = {
.addTo(featureGroup); .addTo(featureGroup);
} else { } else {
L.circleMarker(geomJSON.coordinates, { L.circleMarker(geomJSON.coordinates, {
color: color, color: colorValue,
radius: 4, radius: 4,
fillOpacity: 0.5, fillOpacity: 0.5,
weight: 3, weight: 3,
...@@ -433,7 +439,7 @@ const mapUtil = { ...@@ -433,7 +439,7 @@ const mapUtil = {
.addTo(featureGroup); .addTo(featureGroup);
} }
} else { } else {
if (featureType.icon) { if (featureType.icon && featureType.icon !== 'circle') {
const iconHTML = ` const iconHTML = `
<i <i
class="fas fa-${featureType.icon} fa-lg" class="fas fa-${featureType.icon} fa-lg"
......
...@@ -247,7 +247,16 @@ export default { ...@@ -247,7 +247,16 @@ export default {
this.GET_PROJECT_FEATURE_TYPES(this.$route.params.slug) this.GET_PROJECT_FEATURE_TYPES(this.$route.params.slug)
.then(() => { .then(() => {
this.loading = false; this.loading = false;
this.success = 'La modification de la symbologie a été prise en compte.'; this.success =
'La modification de la symbologie a été prise en compte. Vous allez être redirigé vers la page d\'acceuil du projet.';
setTimeout(() => {
this.$router.push({
name: 'project_detail',
params: {
slug: this.$store.state.project_slug,
},
});
}, 1500);
}) })
.catch((err) => { .catch((err) => {
console.error(err); console.error(err);
......
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