diff client/src/components/importoverview/AdditionalLog.vue @ 2685:39a05f8c34e6 import-overview-rework

import_overview: Refactoring of detailed information. When the entry is opened, a request is made to retrieve the detailed information for this entry. It contains the log protocol information as well as the executive summary. This is passed down to child components of the entry.
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 15 Mar 2019 13:42:49 +0100
parents b219ca1514f4
children c887666b110f
line wrap: on
line diff
--- a/client/src/components/importoverview/AdditionalLog.vue	Fri Mar 15 12:29:49 2019 +0100
+++ b/client/src/components/importoverview/AdditionalLog.vue	Fri Mar 15 13:42:49 2019 +0100
@@ -49,37 +49,13 @@
  * Author(s):
  * Thomas Junk <thomas.junk@intevation.de>
  */
-import { displayError } from "@/lib/errors.js";
-import { HTTP } from "@/lib/http.js";
-
 export default {
   name: "additionallogs",
-  props: ["entry"],
+  props: ["details"],
   data() {
     return {
-      logLines: []
+      logLines: this.details.entries
     };
-  },
-  methods: {
-    loadEntries() {
-      HTTP.get("/imports/" + this.entry.id, {
-        headers: { "X-Gemma-Auth": localStorage.getItem("token") }
-      })
-        .then(response => {
-          const { entries } = response.data;
-          this.logLines = entries;
-        })
-        .catch(error => {
-          const { status, data } = error.response;
-          displayError({
-            title: this.$gettext("Backend Error"),
-            message: `${status}: ${data.message || data}`
-          });
-        });
-    }
-  },
-  mounted() {
-    this.loadEntries();
   }
 };
 </script>