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

Merge branch 'redmine-issues/16828-version-with-only-geojson' into 'develop'

REDMINE_ISSUE-16828|REDMINE_ISSUE-17022|REDMINE_ISSUE-17031|REDMINE_ISSUE-17033| Page utilisateur - lien non valide vers signalement

See merge request !563
parents 8c4732a8 5c62aab3
No related branches found
No related tags found
1 merge request!563REDMINE_ISSUE-16828|REDMINE_ISSUE-17022|REDMINE_ISSUE-17031|REDMINE_ISSUE-17033| Page utilisateur - lien non valide vers signalement
......@@ -21,7 +21,8 @@
v-else
class="ellipsis"
>
{{ currentFeature.properties.title || currentFeature.id }}
{{ currentFeature.properties ?
currentFeature.properties.title : currentFeature.id }}
</div>
<div
......
......@@ -68,7 +68,7 @@
/>
<FeatureEditStatusField
v-if="fastEditionMode && canEditFeature && form"
:status="form.status.value"
:status="form.status.value.value || form.status.value"
class="inline"
/>
<span v-else>
......
......@@ -424,8 +424,11 @@ const feature = {
const feature = state.currentFeature;
const featureType = rootGetters['feature-type/feature_type'];
function findCurrentValue(label) {
const field = feature.feature_data.find((el) => el.label === label);
return field ? field.value : null;
if (feature && feature.feature_data) {
const field = feature.feature_data.find((el) => el.label === label);
return field ? field.value : null;
}
return null;
}
if (featureType && featureType.customfield_set) {
//* retrieve 'name', 'options', 'position' from current feature_type data to display in the form
......@@ -433,7 +436,8 @@ const feature = {
return {
...field,
//* add value field to extra forms from feature_type and existing values if feature is defined
value: feature.properties ? feature.properties[field.label] : findCurrentValue(field.label) || null
value: feature.properties ?
feature.properties[field.label] : findCurrentValue(field.label) || null
};
});
commit('SET_EXTRA_FORMS', extraForm);
......
......@@ -444,7 +444,6 @@ export default {
const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/${this.$route.params.slug}/feature-paginated/?limit=1&${queryString}&output=geojson`;
return featureAPI.getPaginatedFeatures(url)
.then((data) => {
console.log(data);
if (data && data.results && data.results.features && data.results.features[0]) {
this.featuresCount = data.count;
this.previous = data.previous;
......
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