|
|
@@ -30,8 +30,7 @@ main.view--onboarding
|
|
30
|
30
|
p(v-if='currentStep != 0') You have completed: {{ currentStep }} / {{ survey?.steps?.length }} survey steps
|
|
31
|
31
|
|
|
32
|
32
|
article(v-else)
|
|
33
|
|
- // TODO: format answers and surveySteps on created based off of existing responses
|
|
34
|
|
- SurveyCompleteView(:answers='answered' :surveySteps='survey.steps' :responses='responses')
|
|
|
33
|
+ SurveyCompleteView(:surveySteps='survey.steps' :responses='responses')
|
|
35
|
34
|
</template>
|
|
36
|
35
|
|
|
37
|
36
|
<script>
|
|
|
@@ -56,12 +55,10 @@ export default {
|
|
56
|
55
|
invalidResponse: false,
|
|
57
|
56
|
}),
|
|
58
|
57
|
async created() {
|
|
59
|
|
- // TODO: Troubleshoot bug where memberships are not returned from backend with 500 err
|
|
60
|
58
|
// TODO: Troubleshoot bug where not all responses are returned at SurveyCompleteView
|
|
61
|
59
|
console.log('currentProfile :=>', currentProfile)
|
|
62
|
60
|
this.survey = await surveyFactory.createSurvey()
|
|
63
|
61
|
hashedAccessToken = this.grabStoredCookie('siimee_access')
|
|
64
|
|
- console.log('currentProfile.isLoggedIn :=>', currentProfile.isLoggedIn)
|
|
65
|
62
|
try {
|
|
66
|
63
|
const sessionData = await this.verifySession(hashedAccessToken)
|
|
67
|
64
|
await currentProfile.login(
|
|
|
@@ -118,6 +115,7 @@ export default {
|
|
118
|
115
|
})
|
|
119
|
116
|
},
|
|
120
|
117
|
async updateAnswers(payload) {
|
|
|
118
|
+ console.log('this.survey.steps :=>', this.survey.steps)
|
|
121
|
119
|
if (payload) {
|
|
122
|
120
|
const k = payload.question.survey_stage
|
|
123
|
121
|
this.answered[k] = payload.input
|