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

toggle features count display without geometry

parent ef28155d
No related branches found
No related tags found
1 merge request!741REDMINE_ISSUE-19119 | Permettre la gestion de signalements non-géographiques
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
> >
<div class="ui stackable grid"> <div class="ui stackable grid">
<div class="five wide column"> <div class="five wide column">
<div id="feature-type-title" class="ui attached secondary segment"> <div
id="feature-type-title"
class="ui attached secondary segment"
>
<h1 class="ui center aligned header ellipsis"> <h1 class="ui center aligned header ellipsis">
<img <img
v-if="feature_type.geom_type === 'point'" v-if="feature_type.geom_type === 'point'"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="column"> <div class="column">
<FeaturesListAndMapFilters <FeaturesListAndMapFilters
:show-map="showMap" :show-map="showMap"
:features-count="featuresCount" :features-count="featuresCountDisplay"
:pagination="pagination" :pagination="pagination"
:edit-attributes-feature-type="editAttributesFeatureType" :edit-attributes-feature-type="editAttributesFeatureType"
@set-filter="setFilters" @set-filter="setFilters"
...@@ -134,6 +134,7 @@ export default { ...@@ -134,6 +134,7 @@ export default {
editAttributesFeatureType: null, editAttributesFeatureType: null,
currentLayer: null, currentLayer: null,
featuresCount: 0, featuresCount: 0,
featuresWithGeomCount:0,
form: { form: {
type: { type: {
selected: '', selected: '',
...@@ -185,6 +186,10 @@ export default { ...@@ -185,6 +186,10 @@ export default {
pageNumbers() { pageNumbers() {
return this.createPagesArray(this.featuresCount, this.pagination.pagesize); return this.createPagesArray(this.featuresCount, this.pagination.pagesize);
}, },
featuresCountDisplay() {
return this.showMap ? this.featuresWithGeomCount : this.featuresCount;
}
}, },
...@@ -432,6 +437,7 @@ export default { ...@@ -432,6 +437,7 @@ export default {
.then((data) => { .then((data) => {
if (data) { if (data) {
this.featuresCount = data.count; this.featuresCount = data.count;
this.featuresWithGeomCount = data.geom_count;
this.previous = data.previous; this.previous = data.previous;
this.next = data.next; this.next = data.next;
this.paginatedFeatures = data.results; this.paginatedFeatures = data.results;
......
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