diff --git a/src/views/feature_type/Feature_type_detail.vue b/src/views/feature_type/Feature_type_detail.vue index cd18f5ec2fa0f784d0cf5452bbaef8081649ba32..e342caabe1dacdb531765fc2379fe99a0ec1d28f 100644 --- a/src/views/feature_type/Feature_type_detail.vue +++ b/src/views/feature_type/Feature_type_detail.vue @@ -29,7 +29,7 @@ <div class="ui basic segment"> <div class="ui horizontal tiny statistic"> <div class="value"> - {{ features.length }} + {{ feature_type_features.length }} </div> <div class="label"> Signalement{{ features.length > 1 ? "s" : "" }} @@ -222,8 +222,15 @@ export default { } return null; }, + + feature_type_features: function () { + return this.features.filter( + (el) => el.feature_type.slug === this.$route.params.feature_type_slug + ); + }, + lastFeatures: function () { - return this.features.slice(0, 5); + return this.feature_type_features.slice(0, 5); }, }, @@ -250,7 +257,7 @@ export default { }, exportFeatures() { const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/${this.$route.params.slug}/feature-type/${this.$route.params.feature_type_slug}/export/`; - console.log(url) + console.log(url); window.open(url); }, },