covidassist/src/views/HelpPage.vue

37 lines
999 B
Vue
Raw Normal View History

2020-03-21 16:40:32 +01:00
<template>
<div class="help">
2020-03-22 14:21:58 +01:00
<p>{{ $store.state.questions[$route.params.id].description }}</p>
<router-link v-bind:to="'/questionnaire/' + $route.params.id"><button>Zurück zur Frage</button></router-link>
2020-03-21 22:40:01 +01:00
<br><br>
2020-03-22 14:21:58 +01:00
<button v-on:click="nextQuestion()" class="alert">Ich möchte diese Frage überspringen</button>
2020-03-21 16:40:32 +01:00
</div>
</template>
<script>
2020-03-22 14:21:58 +01:00
import router from "@/router";
2020-03-21 16:40:32 +01:00
export default {
name: "HelpPage",
props: {
text: String
2020-03-22 14:21:58 +01:00
},
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')
}
},
},
2020-03-21 16:40:32 +01:00
}
</script>
<style scoped>
.help {
padding: 1em;
}
2020-03-21 16:40:32 +01:00
</style>