Deploy testing
This commit is contained in:
parent
7380e0e5dc
commit
3d8e04bc10
@ -24,18 +24,43 @@
|
||||
<q-card class="q-mb-md" v-for="(user) in rankinglist" :key="user.id">
|
||||
<q-item class="q-pr-sm ">
|
||||
<q-item-section>
|
||||
<q-item-label v-if="username === user.username" @click="gotoProfile"><a class="text-green" style="text-decoration: none"><span>{{user.rank}}. {{user.username}}</span></a></q-item-label>
|
||||
<q-item-label v-if="username !== user.username"><a class="text-black" style="text-decoration: none"><span>{{user.rank}}. {{user.username}}</span></a></q-item-label>
|
||||
<q-item-label v-if="username === user.username" @click="gotoProfile"><a class="text-green"
|
||||
style="text-decoration: none"><span>{{user.rank}}. {{user.username}}</span></a>
|
||||
</q-item-label>
|
||||
<q-item-label v-if="username !== user.username"><a class="text-black"
|
||||
style="text-decoration: none"><span>{{user.rank}}. {{user.username}}</span></a>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<span class="text-grey">{{user.rankingPointsSum}} Punkte </span>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-card>
|
||||
<div class="column q-gutter-lg" style="">
|
||||
<div v-if="hasAdminState" class="col">
|
||||
<div class="">
|
||||
<div class="" style="max-width: 440px">
|
||||
<q-input lazy-rules outlined filled stack-label
|
||||
type="text"
|
||||
label="Username eingeben"
|
||||
unelevated color="negative"
|
||||
></q-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="hasAdminState" class="row">
|
||||
<q-btn @click="resetRankingList" unelevated color="negative" label="Rangliste zurücksetzen"
|
||||
<q-btn
|
||||
label="Punkte des Nutzer zurücksetzen"
|
||||
color="negative"
|
||||
class="full-width"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="hasAdminState" class="row">
|
||||
<q-btn @click="resetRankingList" unelevated color="negative" label="Gesamte Rangliste zurücksetzen"
|
||||
class="full-width"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</q-list>
|
||||
</q-tab-panel>
|
||||
|
||||
@ -44,7 +69,9 @@
|
||||
<q-card class="q-mb-md" v-for="(team,index) in teamRankinglist" :key="team.id">
|
||||
<q-item class="q-pr-sm ">
|
||||
<q-item-section>
|
||||
<q-item-label><a class="text-black" style="text-decoration: none"><span>{{index+1}}. {{team.teamname}}</span></a></q-item-label>
|
||||
<q-item-label><a class="text-black"
|
||||
style="text-decoration: none"><span>{{index+1}}. {{team.teamname}}</span></a>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<span class="text-grey">{{team.rankingPointsSum}} Punkte </span>
|
||||
@ -60,10 +87,10 @@
|
||||
</template>
|
||||
|
||||
<style>
|
||||
/*
|
||||
/*
|
||||
.my-list-card-item
|
||||
padding-left: 8px
|
||||
*/
|
||||
*/
|
||||
</style>
|
||||
<script>
|
||||
import {dom} from 'quasar'
|
||||
@ -78,7 +105,7 @@
|
||||
username: null
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
created: function () {
|
||||
console.log("created(): " + this.rankinglist);
|
||||
console.log("created(): " + this.teamRankinglist);
|
||||
this.fetchRankinglist();
|
||||
@ -93,7 +120,7 @@
|
||||
methods: {
|
||||
fetchRankinglist() {
|
||||
let token;
|
||||
if(localStorage.getItem('userToken')){
|
||||
if (localStorage.getItem('userToken')) {
|
||||
token = JSON.parse(localStorage.getItem('userToken')).token;
|
||||
this.$axios.get('/api/getRankingList', {params: {token}})
|
||||
.then((response) => {
|
||||
@ -121,10 +148,10 @@
|
||||
}).catch((error) => {
|
||||
})
|
||||
},
|
||||
gotoProfile(){
|
||||
gotoProfile() {
|
||||
this.$router.push({path: `/Profile`})
|
||||
},
|
||||
resetRankingList(){
|
||||
resetRankingList() {
|
||||
let token = JSON.parse(localStorage.getItem('userToken')).token;
|
||||
this.$axios.get('/api/resetRankingList', {params: {token}})
|
||||
.then((response) => {
|
||||
@ -143,7 +170,6 @@
|
||||
})
|
||||
}).catch((error) => {
|
||||
}).then()
|
||||
|
||||
},
|
||||
calculateRank() {
|
||||
// TODO
|
||||
@ -156,7 +182,10 @@
|
||||
// }
|
||||
// lastSum = ranking.rankingPointsSum;
|
||||
// }
|
||||
},
|
||||
resetPoints(username){
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user