From 57c5c7c39a877a16b0092880631eea27bf42660a Mon Sep 17 00:00:00 2001 From: Timo Volkmann Date: Thu, 25 Apr 2019 12:38:04 +0200 Subject: [PATCH] redirect finished station to CacheEnd. not tested --- frontend/src/pages/CacheEnd.vue | 2 +- frontend/src/pages/StationView.vue | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/CacheEnd.vue b/frontend/src/pages/CacheEnd.vue index 8ccc20b..faf8813 100644 --- a/frontend/src/pages/CacheEnd.vue +++ b/frontend/src/pages/CacheEnd.vue @@ -5,7 +5,7 @@

{{ end1 + rankingPoints + end2 }}

- + diff --git a/frontend/src/pages/StationView.vue b/frontend/src/pages/StationView.vue index 75fb24a..453ffb8 100644 --- a/frontend/src/pages/StationView.vue +++ b/frontend/src/pages/StationView.vue @@ -51,7 +51,7 @@ data() { return { - code: "", + //code: "", cache: null, data: { cacheId: 22, @@ -165,8 +165,8 @@ setParams() { console.log("setParams: "); let params = {}; - params.cacheID = this.code.split('/')[0]; - params.stationID = this.code.split('/')[1]; + params.cacheID = this.result.split('/')[0]; + params.stationID = this.result.split('/')[1]; params.durchgefuehrterCacheID = this.cacheID; console.log(params.cacheID + " und " + params.stationID); if (localStorage.getItem('userToken')) { @@ -198,7 +198,11 @@ .then((response) => { console.log("resolve(true)"); resolve(true); - this.$router.push({path: `/station/${params.cacheID}/${params.stationID}`}); + if (response.data.cache_acces_definition === 0) { + this.$router.push({path: `/station/${params.cacheID}/${params.stationID}`}); + } else if (response.data.cache_acces_definition === 1) { + this.$router.push({path: `/CacheEnd/${params.cacheID}`}); + } }).catch((error) => { console.log("resolve(false)"); // Error