Mercurial > gemma
changeset 1046:d5d72756645a
additional surveys not implemented infobox
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 25 Oct 2018 10:53:36 +0200 |
parents | 505ec57929aa |
children | 2cbc905ff0e9 |
files | client/src/application/lib/errors.js client/src/fairway/Fairwayprofile.vue |
diffstat | 2 files changed, 33 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/application/lib/errors.js Thu Oct 25 10:31:47 2018 +0200 +++ b/client/src/application/lib/errors.js Thu Oct 25 10:53:36 2018 +0200 @@ -23,4 +23,11 @@ }); }; -export { displayError }; +const displayInfo = ({ title, message }) => { + app.$toast.info({ + title: title, + message: message + }); +}; + +export { displayError, displayInfo };
--- a/client/src/fairway/Fairwayprofile.vue Thu Oct 25 10:31:47 2018 +0200 +++ b/client/src/fairway/Fairwayprofile.vue Thu Oct 25 10:53:36 2018 +0200 @@ -79,7 +79,7 @@ */ import * as d3 from "d3"; import { mapState } from "vuex"; -import { displayError } from "../application/lib/errors.js"; +import { displayInfo } from "../application/lib/errors.js"; const GROUND_COLOR = "#4A2F06"; @@ -150,26 +150,30 @@ methods: { selectAdditionalSurveyData() { if (!this.additionalSurvey || this.wait) return; - this.$store - .dispatch("fairwayprofile/loadProfile", this.additionalSurvey) - .then(() => { - this.wait = false; - this.drawDiagram(); - }) - .catch(error => { - this.wait = false; - let status = "ERROR"; - let data = error; - const response = error.response; - if (response) { - status = response.status; - data = response.data; - } - displayError({ - title: "Backend Error", - message: `${status}: ${data.message || data}` - }); - }); + // this.$store + // .dispatch("fairwayprofile/loadProfile", this.additionalSurvey) + // .then(() => { + // this.wait = false; + // this.drawDiagram(); + // }) + // .catch(error => { + // this.wait = false; + // let status = "ERROR"; + // let data = error; + // const response = error.response; + // if (response) { + // status = response.status; + // data = response.data; + // } + // displayError({ + // title: "Backend Error", + // message: `${status}: ${data.message || data}` + // }); + // }); + displayInfo({ + title: "Not Implemented", + message: `Currently under development` + }); }, drawDiagram() { const chartDiv = document.querySelector(".fairwayprofile");