2020-03-22 13:06:42 +01:00
|
|
|
<style scoped>
|
|
|
|
.help {
|
|
|
|
padding: 1em;
|
|
|
|
}
|
|
|
|
|
2020-03-22 19:01:06 +01:00
|
|
|
@media screen and (min-width : 906px) {
|
|
|
|
.help {
|
2020-03-22 19:21:50 +01:00
|
|
|
width: 600px;
|
2020-03-22 19:01:06 +01:00
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
|
|
|
}
|
|
|
|
}
|
2020-03-22 19:21:50 +01:00
|
|
|
|
2020-03-22 13:06:42 +01:00
|
|
|
button {
|
|
|
|
width: 80%;
|
|
|
|
margin-bottom: 5%;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2020-03-21 16:40:32 +01:00
|
|
|
<template>
|
2020-03-22 20:10:25 +01:00
|
|
|
<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>
|
2020-03-21 16:40:32 +01:00
|
|
|
</div>
|
2020-03-22 20:10:25 +01:00
|
|
|
</div>
|
2020-03-21 16:40:32 +01:00
|
|
|
</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() {
|
2020-03-22 22:08:45 +01:00
|
|
|
this.$store.commit("setSkipped", this.$route.params.id)
|
2020-03-22 14:21:58 +01:00
|
|
|
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 {
|
2020-03-22 19:23:06 +01:00
|
|
|
this.$store.commit("setSurveyCompleted")
|
2020-03-22 14:21:58 +01:00
|
|
|
router.push('/results')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2020-03-22 13:06:42 +01:00
|
|
|
}
|
2020-03-21 16:40:32 +01:00
|
|
|
</script>
|