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>
|
||||
<q-item
|
||||
v-if="this.$store.state.auth.isAuthenticated"
|
||||
clickable
|
||||
class="text-primary"
|
||||
v-ripple
|
||||
|
||||
@ -166,10 +166,14 @@
|
||||
|
||||
<q-tab-panel name="startedCaches" class=" fit">
|
||||
<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
|
||||
class=""
|
||||
v-if="startedCache.cacheAccesDefinition.description === 'angefangen'"
|
||||
|
||||
expand-icon-toggle
|
||||
expand-separator
|
||||
icon="location_on"
|
||||
@ -267,8 +271,9 @@
|
||||
},
|
||||
methods: {
|
||||
fetchUserCaches: function () {
|
||||
let token;
|
||||
if (localStorage.getItem('userToken')) {
|
||||
const token = JSON.parse(localStorage.getItem('userToken')).token;
|
||||
token = JSON.parse(localStorage.getItem('userToken')).token;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -6,10 +6,10 @@
|
||||
src="https://www.buga2019.de/we-bilder/3.Gartenausstellung/Gelaendeplan/190320_Gelaendeplan-quadratisch.jpg"
|
||||
></q-img>
|
||||
<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 {{ data.station.position }}</p>-->
|
||||
<p>{{ data.station.description }}</p>
|
||||
<p>{{ station.description }}</p>
|
||||
<!--<q-input-->
|
||||
<!--v-model="description"-->
|
||||
<!--filled-->
|
||||
@ -54,19 +54,9 @@
|
||||
//code: "",
|
||||
cacheID: "",
|
||||
cacheName: "",
|
||||
//cache: null,
|
||||
cache: null,
|
||||
data: {
|
||||
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"
|
||||
}
|
||||
},
|
||||
station: null,
|
||||
|
||||
// Following Params belong to QR-Code Scanner
|
||||
askForPermission: true,
|
||||
@ -107,13 +97,15 @@
|
||||
this.$axios.get('/api/allCaches')
|
||||
.then((response) => {
|
||||
console.log("/api/allCaches");
|
||||
console.log(JSON.stringify(this.data));
|
||||
console.log(this.data);
|
||||
console.log(response.data);
|
||||
const cache = response.data.find(cache => cache.id === Number(this.$route.params.cache));
|
||||
this.cache = cache;
|
||||
this.station = cache.stationen.find(station => station.id === Number(this.$route.params.id));
|
||||
this.cacheName = cache.name;
|
||||
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