|
|
@@ -4,16 +4,23 @@ main.view--surveycomplete
|
|
4
|
4
|
h2 Thanks for Completing Our Survey!!
|
|
5
|
5
|
h1 Please review your answers and let us know if you need to change anything.
|
|
6
|
6
|
br
|
|
7
|
|
- h1 Your Profile Info:
|
|
8
|
|
- div(v-for='(answer, key) in answers')
|
|
9
|
|
- span(v-if='answer && key != "aspects"') Your {{ key }}: {{ answer }}
|
|
|
7
|
+ p(v-for='input in formInputs')
|
|
|
8
|
+ p(v-for='(value, key) in answers')
|
|
|
9
|
+ p(v-if='input.survey_stage == key && key !== "password"')
|
|
|
10
|
+ p Your {{ key }}: {{ value }}
|
|
10
|
11
|
br
|
|
11
|
|
- div(v-if="answers.aspects")
|
|
12
|
|
- h1 Your Survey Answers:
|
|
13
|
|
- div(v-for='(aspect, index) in answers.aspects')
|
|
14
|
|
- div(v-if='aspect')
|
|
15
|
|
- p {{ surveyObjects[index].response_key_prompt }}
|
|
16
|
|
- p You Answered: {{ aspect }}
|
|
|
12
|
+ p(v-for='input in formDropdowns')
|
|
|
13
|
+ p(v-for='(value, key) in answers')
|
|
|
14
|
+ p(v-if='input.survey_stage == key')
|
|
|
15
|
+ p Your {{ key }}: {{ value }}
|
|
|
16
|
+ br
|
|
|
17
|
+ p(v-for='(response, responseIndex) in questionResponses')
|
|
|
18
|
+ p(v-for='(value, key) in answers')
|
|
|
19
|
+ p(v-if='response.survey_stage == key')
|
|
|
20
|
+ p Survey Question {{ responseIndex + 1 }}:
|
|
|
21
|
+ p {{ key }}
|
|
|
22
|
+ p You Answered: {{ value }}
|
|
|
23
|
+ br
|
|
17
|
24
|
w-button.ma1(@click="changeAnswers") Change Answers
|
|
18
|
25
|
w-button.ma1(@click="finalSubmit") Submit Answers
|
|
19
|
26
|
</template>
|
|
|
@@ -32,10 +39,24 @@ export default {
|
|
32
|
39
|
},
|
|
33
|
40
|
data: () => ({
|
|
34
|
41
|
surveyObjects: [],
|
|
|
42
|
+ formInputs: [],
|
|
|
43
|
+ questionResponses: [],
|
|
|
44
|
+ formDropdowns: [],
|
|
35
|
45
|
}),
|
|
36
|
46
|
created() {
|
|
37
|
|
- // TO ADD ASPECT: when creating new survey aspect step, increment slice number here
|
|
38
|
|
- this.surveyObjects = this.surveySteps.slice(-7)
|
|
|
47
|
+ this.surveySteps.forEach((step) => {
|
|
|
48
|
+ switch (step.component) {
|
|
|
49
|
+ case 'FormInput':
|
|
|
50
|
+ this.formInputs.push(step)
|
|
|
51
|
+ break
|
|
|
52
|
+ case 'FormDropdown':
|
|
|
53
|
+ this.formDropdowns.push(step)
|
|
|
54
|
+ break
|
|
|
55
|
+ case 'QuestionResponse':
|
|
|
56
|
+ this.questionResponses.push(step)
|
|
|
57
|
+ break
|
|
|
58
|
+ }
|
|
|
59
|
+ })
|
|
39
|
60
|
},
|
|
40
|
61
|
}
|
|
41
|
62
|
</script>
|