From 6f7fc61cd8821dc8d1af879a5a08dd9cb7549c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr> Date: Tue, 5 Oct 2021 10:06:38 +0200 Subject: [PATCH] fix url missing query parameter --- src/views/feature/Feature_detail.vue | 2 +- src/views/feature/Feature_edit.vue | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/feature/Feature_detail.vue b/src/views/feature/Feature_detail.vue index 827c688b..29080bc2 100644 --- a/src/views/feature/Feature_detail.vue +++ b/src/views/feature/Feature_detail.vue @@ -564,7 +564,7 @@ export default { addFeatureToMap() { const currentFeatureId = this.$route.params.slug_signal; - const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}features/${currentFeatureId}/?output=geojson`; + const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}features/${currentFeatureId}/?feature_type__slug=${this.$route.params.slug_type_signal}&output=geojson`; axios .get(url) .then((response) => { diff --git a/src/views/feature/Feature_edit.vue b/src/views/feature/Feature_edit.vue index 5a2d4742..74ee78c9 100644 --- a/src/views/feature/Feature_edit.vue +++ b/src/views/feature/Feature_edit.vue @@ -411,7 +411,7 @@ export default { } } } - return [] + return []; }, }, @@ -875,7 +875,7 @@ export default { }); const currentFeatureId = this.$route.params.slug_signal; - const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/${this.$route.params.slug}/feature/?output=geojson`; + const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/${this.$route.params.slug}/feature/?feature_type__slug=${this.feature_type.slug}&output=geojson`; axios .get(url) .then((response) => { @@ -932,13 +932,13 @@ export default { }, created() { - /* if (!this.project) { - console.log(this.$store.state.projects); - this.project = this.$store.state.projects.find( + //if (!this.project) { + //console.log(this.$store.state.projects); + /* this.project = this.$store.state.projects.find( (project) => project.slug === this.$store.state.project_slug - ); - this.filterStatusChoicesF(); - } */ + ); */ + //this.filterStatusChoicesF(); + //} this.$store.commit( "feature_type/SET_CURRENT_FEATURE_TYPE_SLUG", -- GitLab