|
|
@@ -4,15 +4,13 @@ main.view--onboarding
|
|
4
|
4
|
style='display: flex; flex-direction: column; align-items: center'
|
|
5
|
5
|
v-if='survey'
|
|
6
|
6
|
)
|
|
|
7
|
+ p {{ currentStep }}
|
|
7
|
8
|
p(v-if='currentStep != 0') You have completed: {{ currentStep - 1 }} / 7 survey steps
|
|
8
|
9
|
.answers(v-for='(value, key) in answered')
|
|
9
|
|
- span(v-if='key == "name" && value') Welcome {{ value }}!
|
|
10
|
|
- span(v-if='key == "email" && value') All messages we will send to: {{ value }}
|
|
11
|
|
- span(v-if='key == "zipcode" && value') Your zipcode is: {{ value }}
|
|
12
|
|
- span(v-if='key == "blurb" && value') This is your Origin Story:
|
|
13
|
|
- p {{ value }}
|
|
14
|
|
- p(v-if='key == "image" && value') You've uploaded the following image:
|
|
15
|
|
- p {{ value }}
|
|
|
10
|
+ span(v-if='key == "name" && value && currentStep == 2') Hi {{ value }}!
|
|
|
11
|
+ span(v-if='key == "email" && value && currentStep == 3') Thanks for the contact info, {{ answered.name }}!
|
|
|
12
|
+ span(v-if='key == "zipcode" && value && currentStep == 5') Very cool, {{ answered.name }}, we'll be sure only to show you results in your area. Now let's get to know more about you!
|
|
|
13
|
+
|
|
16
|
14
|
.step(v-for='(step, i) in survey.steps')
|
|
17
|
15
|
component(
|
|
18
|
16
|
:aspect-questions='step.component == "Aspects" ? survey.aspectQuestions : null'
|
|
|
@@ -22,6 +20,23 @@ main.view--onboarding
|
|
22
|
20
|
@update-answers='updateAnswers'
|
|
23
|
21
|
v-if='step && currentStep == i'
|
|
24
|
22
|
)
|
|
|
23
|
+ // TODO: change to different vue component
|
|
|
24
|
+ article(
|
|
|
25
|
+ style='display: flex; flex-direction: column; align-items: center; text-align: center;'
|
|
|
26
|
+ v-if='currentStep == 8'
|
|
|
27
|
+ )
|
|
|
28
|
+ h1 Thanks for Completing Our Survey!!
|
|
|
29
|
+ h2 Please review your answers and let us know if you need to change anything.
|
|
|
30
|
+ span Your name: {{ answered.name }}
|
|
|
31
|
+ span Your email: {{ answered.email }}
|
|
|
32
|
+ span Your zipcode: {{ answered.zipcode }}
|
|
|
33
|
+ span Your blurb: {{ answered.blurb }}
|
|
|
34
|
+ span Your image: {{ answered.image }}
|
|
|
35
|
+ br
|
|
|
36
|
+ button(@click="changeAnswers") Change Answers
|
|
|
37
|
+ br
|
|
|
38
|
+ button(@click="finalSubmit") Submit Answers
|
|
|
39
|
+
|
|
25
|
40
|
</template>
|
|
26
|
41
|
|
|
27
|
42
|
<script>
|
|
|
@@ -48,7 +63,8 @@ export default {
|
|
48
|
63
|
methods: {
|
|
49
|
64
|
onSubmit() {
|
|
50
|
65
|
console.log(JSON.stringify(this.answered))
|
|
51
|
|
- this.$router.push({ name: 'SurveyView' })
|
|
|
66
|
+ // TODO: Change to different vue component
|
|
|
67
|
+ this.goToStep(this.currentStep + 1)
|
|
52
|
68
|
},
|
|
53
|
69
|
goToStep(num) {
|
|
54
|
70
|
this.currentStep = num
|
|
|
@@ -80,6 +96,9 @@ export default {
|
|
80
|
96
|
article
|
|
81
|
97
|
height: 100vh
|
|
82
|
98
|
|
|
|
99
|
+ .answers
|
|
|
100
|
+ text-align: center
|
|
|
101
|
+
|
|
83
|
102
|
.w-button
|
|
84
|
103
|
display: flex
|
|
85
|
104
|
width: 315px
|