changeset 4501:8a6c410f6f03 v4-preview20190930

import_overview: export spawns info toast.
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 30 Sep 2019 16:07:48 +0200
parents e0e9cd86ec04
children 4c3851391b6d 92515c49c566
files client/src/components/importoverview/ImportOverview.vue
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importoverview/ImportOverview.vue	Mon Sep 30 15:58:32 2019 +0200
+++ b/client/src/components/importoverview/ImportOverview.vue	Mon Sep 30 16:07:48 2019 +0200
@@ -134,6 +134,7 @@
 import { STATES } from "@/store/imports";
 import { sortTable } from "@/lib/mixins";
 import { HTTP } from "@/lib/http";
+import app from "@/main";
 import {
   startOfDay,
   startOfHour,
@@ -242,6 +243,14 @@
           icon: "check",
           callback: dates => {
             const { from, to } = dates;
+            displayInfo({
+              title: "Generating CSV",
+              message: `${from} - ${to}`,
+              options: {
+                timeout: 0,
+                buttons: [{ text: "Ok", action: null, bold: true }]
+              }
+            });
             HTTP.get(
               `/imports?from=${encodeURIComponent(
                 format(startOfDay(new Date(from)), "YYYY-MM-DDTHH:mm:ssZ")
@@ -254,6 +263,7 @@
             )
               .then(response => {
                 const { imports } = response.data;
+                app.$snotify.clear();
                 if (!imports) return;
                 const csvLink =
                   "data:text/csv;charset=utf-8," +
@@ -278,6 +288,7 @@
               })
               .catch(error => {
                 const { status, data } = error.response;
+                app.$snotify.clear();
                 displayError({
                   title: this.$gettext("Backend Error"),
                   message: `${status}: ${data.message || data}`