From 2723c59056449b2d03f8e9fff40e950d750d83ce Mon Sep 17 00:00:00 2001 From: Timo Volkmann Date: Tue, 9 Apr 2019 03:41:05 +0200 Subject: [PATCH] changes in Cache & Station Editpages, worked on cacheCollector store --- frontend/src/pages/Cache.vue | 243 +++++++++++------- frontend/src/pages/Overview.vue | 13 +- frontend/src/pages/StationEdit.vue | 36 ++- frontend/src/router/routes.js | 18 +- frontend/src/store/auth/mutations.js | 1 - frontend/src/store/cacheCollector/getters.js | 12 +- .../src/store/cacheCollector/mutations.js | 57 +++- frontend/src/store/cacheCollector/state.js | 37 ++- 8 files changed, 307 insertions(+), 110 deletions(-) diff --git a/frontend/src/pages/Cache.vue b/frontend/src/pages/Cache.vue index 6fee21b..5d6b325 100644 --- a/frontend/src/pages/Cache.vue +++ b/frontend/src/pages/Cache.vue @@ -1,111 +1,182 @@ diff --git a/frontend/src/pages/Overview.vue b/frontend/src/pages/Overview.vue index 019aac8..f3b3353 100644 --- a/frontend/src/pages/Overview.vue +++ b/frontend/src/pages/Overview.vue @@ -45,8 +45,8 @@ - - + + @@ -114,6 +114,10 @@ addCache() { this.$router.push({ path: `/cache` }) }, + editCache() { + }, + removeCache() { + }, startCache(cacheID) { const userToken = JSON.parse(localStorage.getItem('userToken')); let params = { cacheID: cacheID }; @@ -124,8 +128,9 @@ this.$axios.get('http://localhost:8080/api/startCache', { params }) .then((response) => { - console.log("Angefangen: " + response.data); - let stationID = response.data.aktuelleStation.id; + console.log(response.data); + // let stationID = response.data.stationen[0].id; + let stationID = this.caches.find(x => x.id === cacheID).stationen[0].id; console.log(stationID); this.$router.push({ path: `/station/${stationID}` }) }) diff --git a/frontend/src/pages/StationEdit.vue b/frontend/src/pages/StationEdit.vue index 547869f..a8e413c 100644 --- a/frontend/src/pages/StationEdit.vue +++ b/frontend/src/pages/StationEdit.vue @@ -28,7 +28,7 @@
- +
@@ -36,13 +36,13 @@