Mercurial > gemma
changeset 2773:eb1b7479c5e3
Merged
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Fri, 22 Mar 2019 11:47:28 +0100 |
parents | 0f467af6bf5c (current diff) 838cf903538f (diff) |
children | 6c1c4f55d99b |
files | |
diffstat | 1 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importoverview/ImportOverview.vue Fri Mar 22 11:46:57 2019 +0100 +++ b/client/src/components/importoverview/ImportOverview.vue Fri Mar 22 11:47:28 2019 +0100 @@ -128,6 +128,8 @@ import { displayError, displayInfo } from "@/lib/errors"; import { STATES } from "@/store/imports"; import { sortTable } from "@/lib/mixins"; +import { HTTP } from "@/lib/http.js"; + import { startOfDay, startOfHour, @@ -158,6 +160,7 @@ computed: { ...mapState("application", ["searchQuery"]), ...mapState("imports", [ + "show", "imports", "reviewed", "startDate", @@ -223,7 +226,24 @@ query: this.searchQuery }) .then(() => { - this.loading = false; + if (this.show != -1) { + HTTP.get("/imports/" + this.show, { + headers: { "X-Gemma-Auth": localStorage.getItem("token") } + }) + .then(response => { + this.$store.commit("imports/setCurrentDetails", response.data); + this.loading = false; + }) + .catch(error => { + const { status, data } = error.response; + displayError({ + title: this.$gettext("Backend Error"), + message: `${status}: ${data.message || data}` + }); + }); + } else { + this.loading = false; + } }) .catch(error => { const { status, data } = error.response;