|
|
@@ -30,11 +30,11 @@ 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
|
|
- SurveyCompleteView(:answers='answered' :surveySteps='survey?.steps')
|
|
|
33
|
+ SurveyCompleteView(:answers='answered' :surveySteps='survey.steps' :responses='responses')
|
|
34
|
34
|
</template>
|
|
35
|
35
|
|
|
36
|
36
|
<script>
|
|
37
|
|
-import { currentProfile, Authenticator } from '../services'
|
|
|
37
|
+import { currentProfile, authenticator } from '../services'
|
|
38
|
38
|
import { surveyFactory } from '@/utils'
|
|
39
|
39
|
import stepViews from '@/components/onboarding'
|
|
40
|
40
|
import SurveyCompleteView from './SurveyCompleteView.vue'
|
|
|
@@ -53,11 +53,9 @@ export default {
|
|
53
|
53
|
currentStep: 0,
|
|
54
|
54
|
survey: null,
|
|
55
|
55
|
invalidResponse: false,
|
|
56
|
|
- authenticator: {},
|
|
57
|
56
|
}),
|
|
58
|
57
|
async created() {
|
|
59
|
58
|
this.survey = await surveyFactory.createSurvey()
|
|
60
|
|
- this.authenticator = new Authenticator()
|
|
61
|
59
|
hashedAccessToken = this.grabStoredCookie('siimee_access')
|
|
62
|
60
|
console.log('currentProfile.isLoggedIn :=>', currentProfile.isLoggedIn)
|
|
63
|
61
|
try {
|
|
|
@@ -99,7 +97,7 @@ export default {
|
|
99
|
97
|
async verifySession(hashedAccessToken) {
|
|
100
|
98
|
if (!hashedAccessToken)
|
|
101
|
99
|
return console.warn('WARNING :=> accessToken is not defined')
|
|
102
|
|
- const validatedToken = await this.authenticator.validateSession(
|
|
|
100
|
+ const validatedToken = await authenticator.validateSession(
|
|
103
|
101
|
hashedAccessToken,
|
|
104
|
102
|
)
|
|
105
|
103
|
if (validatedToken.error) {
|