changeset 2315:bd8ecc90ccf4

import_queue: 'abgelehnt' filters for declined instead of rejected
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 18 Feb 2019 16:19:00 +0100
parents da4c91866dfe
children bc43cd047ead
files client/src/components/importqueue/Importqueue.vue
diffstat 1 files changed, 3 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importqueue/Importqueue.vue	Mon Feb 18 16:08:33 2019 +0100
+++ b/client/src/components/importqueue/Importqueue.vue	Mon Feb 18 16:19:00 2019 +0100
@@ -28,12 +28,6 @@
                 />
               </div>
               <div class="filters">
-                <button
-                  @click="setFilter('successful')"
-                  :class="successfulStyle"
-                >
-                  <translate>Successful</translate>
-                </button>
                 <button @click="setFilter('failed')" :class="failedStyle">
                   <translate>Failed</translate>
                 </button>
@@ -134,11 +128,7 @@
     setFilter(name) {
       this[name] = !this[name];
       const allSet =
-        this.successful &&
-        this.failed &&
-        this.pending &&
-        this.accepted &&
-        this.rejected;
+        this.failed && this.pending && this.accepted && this.rejected;
       if (allSet) {
         this.successful = false;
         this.failed = false;
@@ -201,20 +191,13 @@
           });
         })
         .filter(y => {
-          if (
-            !this.successful &&
-            !this.failed &&
-            !this.pending &&
-            !this.accepted &&
-            !this.rejected
-          )
+          if (!this.failed && !this.pending && !this.accepted && !this.rejected)
             return true;
           let filterCriteria = [];
-          if (this.successful) filterCriteria.push("successful");
           if (this.failed) filterCriteria.push("failed");
           if (this.pending) filterCriteria.push("pending");
           if (this.accepted) filterCriteria.push("accepted");
-          if (this.rejected) filterCriteria.push("rejected");
+          if (this.rejected) filterCriteria.push("declined");
           const result = filterCriteria.map(selectedState => {
             return y.state === selectedState;
           });
@@ -222,13 +205,6 @@
         });
       return filtered;
     },
-    successfulStyle() {
-      return {
-        btn: true,
-        "btn-light": !this.successful,
-        "btn-dark": this.successful
-      };
-    },
     pendingStyle() {
       return {
         btn: true,