diff client/src/components/importoverview/importlogs/Logs.vue @ 2449:0c9121abf120

staging: reload button clears filtering
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 01 Mar 2019 13:51:09 +0100
parents 522024fa06eb
children
line wrap: on
line diff
--- a/client/src/components/importoverview/importlogs/Logs.vue	Fri Mar 01 13:21:18 2019 +0100
+++ b/client/src/components/importoverview/importlogs/Logs.vue	Fri Mar 01 13:51:09 2019 +0100
@@ -51,6 +51,7 @@
   components: {
     LogDetail: () => import("./LogDetail.vue")
   },
+  props: ["reload"],
   data() {
     return {
       loading: false,
@@ -67,7 +68,7 @@
       return {
         btn: true,
         "btn-sm": true,
-        "btn-light": !this.pending,
+        "btn-outline-info": !this.pending,
         "btn-info": this.pending
       };
     },
@@ -75,7 +76,7 @@
       return {
         btn: true,
         "btn-sm": true,
-        "btn-light": !this.failed,
+        "btn-outline-info": !this.failed,
         "btn-info": this.failed
       };
     },
@@ -83,7 +84,7 @@
       return {
         btn: true,
         "btn-sm": true,
-        "btn-light": !this.declined,
+        "btn-outline-info": !this.declined,
         "btn-info": this.declined
       };
     },
@@ -91,7 +92,7 @@
       return {
         btn: true,
         "btn-sm": true,
-        "btn-light": !this.accepted,
+        "btn-outline-info": !this.accepted,
         "btn-info": this.accepted
       };
     },
@@ -99,11 +100,22 @@
       return {
         btn: true,
         "btn-sm": true,
-        "btn-light": !this.warning,
+        "btn-outline-info": !this.warning,
         "btn-info": this.warning
       };
     }
   },
+  watch: {
+    reload() {
+      if (!this.reload) return;
+      this.warning = false;
+      this.successful = false;
+      this.failed = false;
+      this.pending = false;
+      this.accepted = false;
+      this.declined = false;
+    }
+  },
   methods: {
     setFilter(name) {
       if (this.loading) return;