diff client/src/components/importoverview/ImportOverview.vue @ 3416:b65c2530c680

client: import review: added button to go back to latest date
author Markus Kottlaender <markus@intevation.de>
date Thu, 23 May 2019 15:31:05 +0200
parents c0f5f62343c9
children e2ed741545e1
line wrap: on
line diff
--- a/client/src/components/importoverview/ImportOverview.vue	Thu May 23 15:30:25 2019 +0200
+++ b/client/src/components/importoverview/ImportOverview.vue	Thu May 23 15:31:05 2019 +0200
@@ -54,14 +54,23 @@
             </option>
           </select>
         </div>
-        <button
-          :disabled="!this.next"
-          @click="later"
-          class="btn btn-xs btn-outline-secondary"
-        >
-          <translate>Later</translate>
-          <font-awesome-icon icon="angle-right" fixed-width />
-        </button>
+        <div class="btn-group">
+          <button
+            :disabled="!this.next"
+            @click="later"
+            class="btn btn-xs btn-outline-secondary"
+          >
+            <translate>Later</translate>
+            <font-awesome-icon icon="angle-right" fixed-width />
+          </button>
+          <button
+            :disabled="!this.next"
+            @click="now"
+            class="btn btn-xs btn-outline-secondary"
+          >
+            <font-awesome-icon icon="angle-double-right" fixed-width />
+          </button>
+        </div>
       </div>
       <UITableHeader
         :columns="[
@@ -283,6 +292,13 @@
       this.$store.commit("imports/setEndDate", end);
       this.loadLogs();
     },
+    now() {
+      if (!this.next) return;
+      const [start, end] = this.determineInterval(new Date());
+      this.$store.commit("imports/setStartDate", start);
+      this.$store.commit("imports/setEndDate", end);
+      this.loadLogs();
+    },
     filteredImports() {
       return this.imports;
     },