changeset 2426:53323f701cf3

reload staging after confirm
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 28 Feb 2019 16:47:36 +0100
parents 4c16f5ad1905
children 171ea4b5e8dc
files client/src/components/importoverview/ImportOverview.vue client/src/components/importoverview/staging/Staging.vue
diffstat 2 files changed, 15 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importoverview/ImportOverview.vue	Thu Feb 28 16:36:49 2019 +0100
+++ b/client/src/components/importoverview/ImportOverview.vue	Thu Feb 28 16:47:36 2019 +0100
@@ -87,6 +87,15 @@
       this.loadLogs();
     },
     loadImportQueue() {
+      this.$store.dispatch("imports/getStaging").catch(error => {
+        const { status, data } = error.response;
+        displayError({
+          title: "Backend Error",
+          message: `${status}: ${data.message || data}`
+        });
+      });
+    },
+    loadLogs() {
       this.$store
         .dispatch("imports/getImports")
         .then(() => {})
@@ -97,15 +106,6 @@
             message: `${status}: ${data.message || data}`
           });
         });
-    },
-    loadLogs() {
-      this.$store.dispatch("imports/getStaging").catch(error => {
-        const { status, data } = error.response;
-        displayError({
-          title: "Backend Error",
-          message: `${status}: ${data.message || data}`
-        });
-      });
     }
   },
   mounted() {
--- a/client/src/components/importoverview/staging/Staging.vue	Thu Feb 28 16:36:49 2019 +0100
+++ b/client/src/components/importoverview/staging/Staging.vue	Thu Feb 28 16:47:36 2019 +0100
@@ -44,16 +44,13 @@
   },
   methods: {
     loadImportQueue() {
-      this.$store
-        .dispatch("imports/getImports")
-        .then(() => {})
-        .catch(error => {
-          const { status, data } = error.response;
-          displayError({
-            title: this.$gettext("Backend Error"),
-            message: `${status}: ${data.message || data}`
-          });
+      this.$store.dispatch("imports/getStaging").catch(error => {
+        const { status, data } = error.response;
+        displayError({
+          title: "Backend Error",
+          message: `${status}: ${data.message || data}`
         });
+      });
     },
     save() {
       if (!this.processedReviews.length) return;