fixed bugs in cache creation and processing
This commit is contained in:
parent
5246249bf8
commit
bac0a31fd3
@ -44,6 +44,7 @@
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
|
v-if="this.$store.state.auth.isAuthenticated"
|
||||||
clickable
|
clickable
|
||||||
class="text-primary"
|
class="text-primary"
|
||||||
v-ripple
|
v-ripple
|
||||||
|
|||||||
@ -166,10 +166,14 @@
|
|||||||
|
|
||||||
<q-tab-panel name="startedCaches" class=" fit">
|
<q-tab-panel name="startedCaches" class=" fit">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-card class="q-mb-md" v-for="startedCache in startedCaches" :key="startedCache.id">
|
<q-card
|
||||||
|
class="q-mb-md"
|
||||||
|
v-for="startedCache in startedCaches.filter(cache => cache.cacheAccesDefinition.id === 0)"
|
||||||
|
:key="startedCache.id"
|
||||||
|
>
|
||||||
<q-expansion-item
|
<q-expansion-item
|
||||||
class=""
|
class=""
|
||||||
v-if="startedCache.cacheAccesDefinition.description === 'angefangen'"
|
|
||||||
expand-icon-toggle
|
expand-icon-toggle
|
||||||
expand-separator
|
expand-separator
|
||||||
icon="location_on"
|
icon="location_on"
|
||||||
@ -267,8 +271,9 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchUserCaches: function () {
|
fetchUserCaches: function () {
|
||||||
|
let token;
|
||||||
if (localStorage.getItem('userToken')) {
|
if (localStorage.getItem('userToken')) {
|
||||||
const token = JSON.parse(localStorage.getItem('userToken')).token;
|
token = JSON.parse(localStorage.getItem('userToken')).token;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,10 @@
|
|||||||
src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg"
|
src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg"
|
||||||
></q-img>
|
></q-img>
|
||||||
<div class="q-ma-md">
|
<div class="q-ma-md">
|
||||||
<p class="text-h4">{{ data.cacheName }}</p>
|
<p class="text-h4">{{ cache.name }}</p>
|
||||||
<p class="text-h5">Station {{ showCacheProgress }}</p>
|
<p class="text-h5">Station {{ showCacheProgress }}</p>
|
||||||
<!-- <p class="text-h5">Station {{ data.station.position }}</p>-->
|
<!-- <p class="text-h5">Station {{ data.station.position }}</p>-->
|
||||||
<p>{{ data.station.description }}</p>
|
<p>{{ station.description }}</p>
|
||||||
<!--<q-input-->
|
<!--<q-input-->
|
||||||
<!--v-model="description"-->
|
<!--v-model="description"-->
|
||||||
<!--filled-->
|
<!--filled-->
|
||||||
@ -54,19 +54,9 @@
|
|||||||
//code: "",
|
//code: "",
|
||||||
cacheID: "",
|
cacheID: "",
|
||||||
cacheName: "",
|
cacheName: "",
|
||||||
|
//cache: null,
|
||||||
cache: null,
|
cache: null,
|
||||||
data: {
|
station: null,
|
||||||
cacheId: 22,
|
|
||||||
cacheName: "Wasserfall Cache",
|
|
||||||
station: {
|
|
||||||
id: 22,
|
|
||||||
description: "Ein kleines winterliches Schlaginstrument. Welche Blume ist damit gemeint?",
|
|
||||||
longitude: 9.206628,
|
|
||||||
lattitude: 49.147734,
|
|
||||||
code: 213812,
|
|
||||||
solution: "Schneeglöckchen"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Following Params belong to QR-Code Scanner
|
// Following Params belong to QR-Code Scanner
|
||||||
askForPermission: true,
|
askForPermission: true,
|
||||||
@ -107,13 +97,15 @@
|
|||||||
this.$axios.get('/api/allCaches')
|
this.$axios.get('/api/allCaches')
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log("/api/allCaches");
|
console.log("/api/allCaches");
|
||||||
console.log(JSON.stringify(this.data));
|
|
||||||
console.log(this.data);
|
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
const cache = response.data.find(cache => cache.id === Number(this.$route.params.cache));
|
const cache = response.data.find(cache => cache.id === Number(this.$route.params.cache));
|
||||||
this.cache = cache;
|
this.cache = cache;
|
||||||
|
this.station = cache.stationen.find(station => station.id === Number(this.$route.params.id));
|
||||||
this.cacheName = cache.name;
|
this.cacheName = cache.name;
|
||||||
this.cacheID = this.$route.params.cache;
|
this.cacheID = this.$route.params.cache;
|
||||||
|
console.log(JSON.stringify(this.cache));
|
||||||
|
console.log(JSON.stringify(this.station));
|
||||||
|
console.log(this.cache);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user