changeset 1418:547bbe64d188

sorted surveys in bottleneck list from new to old
author Markus Kottlaender <markus@intevation.de>
date Thu, 29 Nov 2018 11:21:18 +0100
parents bd9253eec499
children 24b7f71c4406
files client/src/components/map/contextbox/Bottlenecks.vue
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/map/contextbox/Bottlenecks.vue	Thu Nov 29 11:16:36 2018 +0100
+++ b/client/src/components/map/contextbox/Bottlenecks.vue	Thu Nov 29 11:21:18 2018 +0100
@@ -192,7 +192,9 @@
           }
         })
           .then(response => {
-            this.openBottleneckSurveys = response.data.surveys;
+            this.openBottleneckSurveys = response.data.surveys.sort(
+              (a, b) => (a.date_info < b.date_info ? 1 : -1)
+            );
           })
           .catch(error => {
             const { status, data } = error.response;