covidassist/src/views/HelpPage.vue
Thilo Billerbeck f91f917dbe Merge branch 'master' into 'thilo-fixes'
# Conflicts:
#   src/components/Question.vue
#   src/views/HelpPage.vue
#   src/views/Warning.vue
2020-03-22 14:26:51 +01:00

46 lines
1.1 KiB
Vue

<style scoped>
.help {
padding: 1em;
}
button {
width: 80%;
margin-bottom: 5%;
}
</style>
<template>
<div class="help">
<p>{{ $store.state.questions[$route.params.id].description }}</p>
<div class="button-wrapper">
<router-link v-bind:to="'/questionnaire/' + $route.params.id"><button>Zurück zur Frage</button></router-link>
<br><br>
<button v-on:click="nextQuestion()" class="alert">Ich möchte diese Frage überspringen</button>
</div>
</div>
</div>
</template>
<script>
import router from "@/router";
export default {
name: "HelpPage",
props: {
text: String
},
methods: {
nextQuestion() {
if (this.$route.params.id < this.$store.state.questions.length - 1) {
const nextQuestion = parseInt(this.$route.params.id) + 1
this.$router.push("/questionnaire/" + nextQuestion)
}
else {
router.push('/results')
}
},
},
}
}
</script>