Mercurial > gemma
diff client/src/components/importschedule/Importschedule.vue @ 1731:8dd7452929ca
WIP: edit scheduled imports
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 09 Jan 2019 13:57:36 +0100 |
parents | 647195199dc8 |
children | 6eb099690279 |
line wrap: on
line diff
--- a/client/src/components/importschedule/Importschedule.vue Wed Jan 09 13:11:09 2019 +0100 +++ b/client/src/components/importschedule/Importschedule.vue Wed Jan 09 13:57:36 2019 +0100 @@ -57,6 +57,7 @@ </td> <td> <font-awesome-icon + @click="editSchedule(schedule.id)" icon="pencil-alt" fixed-width ></font-awesome-icon> @@ -130,6 +131,20 @@ this.getSchedules(); }, methods: { + editSchedule(id) { + this.$store + .dispatch("imports/loadSchedule", id) + .then(() => { + this.$store.commit("imports/setImportScheduleDetailVisible"); + }) + .catch(error => { + const { status, data } = error.response; + displayError({ + title: this.$gettext("Backend Error"), + message: `${status}: ${data.message || data}` + }); + }); + }, triggerManualImport(id) { HTTP.get("/imports/config/" + id, { headers: { "X-Gemma-Auth": localStorage.getItem("token") }