Moved link to the bottom of the result page

Added back button on first question
This commit is contained in:
Tim Ktitarev 2020-03-22 23:08:38 +01:00
parent ce90e16c22
commit 9c48c5f8b6
2 changed files with 7 additions and 4 deletions

View file

@ -1,6 +1,6 @@
<template> <template>
<div class="questionnaire"> <div class="questionnaire">
<img id="back-button" v-if="$route.params.id != 0" v-on:click="goBack()" src="../assets/arrow-circle-left-outline.svg"> <img id="back-button" v-on:click="goBack()" src="../assets/arrow-circle-left-outline.svg">
<div id="status-bar-wrapper"> <div id="status-bar-wrapper">
<div class="progress"> <div class="progress">
<div v-bind:key="n" v-for="n in $store.state.questions.length" v-bind:class="getDotClass(n)"></div> <div v-bind:key="n" v-for="n in $store.state.questions.length" v-bind:class="getDotClass(n)"></div>
@ -32,6 +32,9 @@
const previousQuestion = parseInt(this.$route.params.id) - 1 const previousQuestion = parseInt(this.$route.params.id) - 1
this.$router.push("/questionnaire/" + previousQuestion) this.$router.push("/questionnaire/" + previousQuestion)
} }
else {
this.$router.push("/")
}
} }
}, },
} }

View file

@ -5,9 +5,6 @@
<p class="risk-chance warning" v-if="risk >= 33 && risk < 66">durchschnittlich</p> <p class="risk-chance warning" v-if="risk >= 33 && risk < 66">durchschnittlich</p>
<p class="risk-chance success" v-if="risk < 33 && risk >= 0">niedrig</p> <p class="risk-chance success" v-if="risk < 33 && risk >= 0">niedrig</p>
<p class="risk-chance" v-if=" risk < 0">nicht feststellbar</p> <p class="risk-chance" v-if=" risk < 0">nicht feststellbar</p>
<p class="text-center"><router-link style="text-decoration:none" to="/">
Zurück zum Anfang
</router-link></p>
<p v-if="bad.length > 0">Auf Folgendes sollten Sie achten:</p> <p v-if="bad.length > 0">Auf Folgendes sollten Sie achten:</p>
<div v-for="card in bad" v-bind:key="card.description" class="card-advice alert"> <div v-for="card in bad" v-bind:key="card.description" class="card-advice alert">
<div class="card-advice-title">{{ card.title }}</div> <div class="card-advice-title">{{ card.title }}</div>
@ -23,6 +20,9 @@
<div class="card-advice-title">{{ card.title }}</div> <div class="card-advice-title">{{ card.title }}</div>
<div class="card-advice-description">{{ card.description }}</div> <div class="card-advice-description">{{ card.description }}</div>
</div> </div>
<p class="text-center"><router-link to="/">
Zurück zum Anfang
</router-link></p>
</div> </div>
</template> </template>