Переглянути джерело

:recycle: intermediary refactor for demonstration of cleaning up data-structures

tags/0.0.3^2
j 3 роки тому
джерело
коміт
f0248952fb

+ 18
- 13
frontend/src/components/onboarding/AccountType.vue Переглянути файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-h3 {{question}}
3
-//- w-button.ma1.grow(@click="this.$emit('go-to-step', currentStep + 1)") CANDIDATES
4
-w-button.ma1.grow(@click="handleSubmit('Recruiter')") CANDIDATES
5
-w-button.ma1.grow(@click="handleSubmit('Jobseeker')") JOBS
2
+.account-typpe
3
+    h3 {{ question }}
4
+    //- w-button.ma1.grow(@click="this.$emit('go-to-step', currentStep + 1)") CANDIDATES
5
+    w-button.ma1.grow(@click='handleSubmit("Recruiter")') CANDIDATES
6
+    w-button.ma1.grow(@click='handleSubmit("Jobseeker")') JOBS
6
 </template>
7
 </template>
7
 <script>
8
 <script>
8
 export default {
9
 export default {
9
     name: 'AccountType',
10
     name: 'AccountType',
10
     props: {
11
     props: {
11
-        currentStep:{
12
+        currentStep: {
12
             required: true,
13
             required: true,
13
             type: Number,
14
             type: Number,
14
-            default: 0
15
-        }
15
+            default: 0,
16
+        },
17
+        aspectQuestions: {
18
+            required: false,
19
+        },
16
     },
20
     },
17
     emits: ['go-to-step', 'update-answers'],
21
     emits: ['go-to-step', 'update-answers'],
18
     data: () => ({
22
     data: () => ({
19
-        question: "{Name}, let's get started on your profile while we verify your account.",
23
+        question:
24
+            "{Name}, let's get started on your profile while we verify your account.",
20
     }),
25
     }),
21
     methods: {
26
     methods: {
22
-        handleSubmit(accountType){
27
+        handleSubmit(accountType) {
23
             let payload = {
28
             let payload = {
24
                 key: 'AccountType',
29
                 key: 'AccountType',
25
                 question: this.question,
30
                 question: this.question,
26
-                answer: accountType
31
+                answer: accountType,
27
             }
32
             }
28
             this.$emit('update-answers', payload)
33
             this.$emit('update-answers', payload)
29
             this.$emit('go-to-step', this.currentStep + 1)
34
             this.$emit('go-to-step', this.currentStep + 1)
30
-        }
31
-    }
35
+        },
36
+    },
32
 }
37
 }
33
-</script>
38
+</script>

+ 27
- 32
frontend/src/components/onboarding/Aspects.vue Переглянути файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-form(@submit.prevent="this.$emit('handle-submit')").questionnaire
3
-    QuestionResponse(
4
-        v-for="question in aspectQuestions" 
5
-        :question="question" 
6
-        @updated="updateRadio"
7
-    )
8
-    w-button.ma1.grow(type="submit" bg-color="success")
9
-        w-icon.mr1 wi-check
10
-        | SUBMIT ANSWERS
2
+.aspects
3
+    form.questionnaire(@submit.prevent='this.$emit("handle-submit")')
4
+        QuestionResponse(
5
+            :question='question'
6
+            @updated='updateRadio'
7
+            v-for='question in aspectQuestions'
8
+        )
9
+        w-button.ma1.grow(bg-color='success' type='submit')
10
+            w-icon.mr1 wi-check
11
+            | SUBMIT ANSWERS
11
 </template>
12
 </template>
12
 <script>
13
 <script>
13
 import QuestionResponse from './QuestionResponse.vue'
14
 import QuestionResponse from './QuestionResponse.vue'
15
+const answered = {}
14
 
16
 
15
 export default {
17
 export default {
16
     name: 'Aspects',
18
     name: 'Aspects',
17
     components: {
19
     components: {
18
-        QuestionResponse
20
+        QuestionResponse,
19
     },
21
     },
20
     props: {
22
     props: {
21
-        aspectQuestions:{
23
+        aspectQuestions: {
22
             required: true,
24
             required: true,
23
-            type: Array
25
+            type: Array,
24
         },
26
         },
25
-        currentStep:{
27
+        currentStep: {
26
             required: true,
28
             required: true,
27
             type: Number,
29
             type: Number,
28
-            default: 0
29
-        }
30
+            default: 0,
31
+        },
30
     },
32
     },
31
     emits: ['handle-submit', 'update-answers'],
33
     emits: ['handle-submit', 'update-answers'],
32
     methods: {
34
     methods: {
33
-        updateRadio(newRadioSelection){
34
-            let old_answers = this.aspectQuestions.map(q=> q.answer)
35
-            console.log(old_answers)
36
-            console.log(newRadioSelection)
37
-            let new_answers = [...old_answers]
38
-            new_answers[newRadioSelection.id-1] = newRadioSelection.answer
39
-            console.log(new_answers)
40
-            // let payload = {
41
-            //     key: 'Aspects',
42
-            //     question: '?',
43
-            //     answer: new_answers
44
-            // }
45
-            // this.$emit('update-answers', payload)
46
-            // console.log(JSON.stringify(payload));
47
-        }
48
-    }
35
+        updateRadio(onRadioSelect) {
36
+            answered[onRadioSelect.id] = onRadioSelect.answer
37
+            this.$emit('update-answers', {
38
+                key: 'Aspects',
39
+                question: '?',
40
+                answer: answered,
41
+            })
42
+        },
43
+    },
49
 }
44
 }
50
-</script>
45
+</script>

+ 18
- 13
frontend/src/components/onboarding/CompanyID.vue Переглянути файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-h3 Company ID
3
-p {{question}}
4
-input(type="text" placeholder="Get this from your admin." v-model="companyID")
5
-w-button.ma1.grow(@click="handleSubmit") NEXT
2
+.company-id
3
+    h3 Company ID
4
+    p {{ question }}
5
+    input(
6
+        placeholder='Get this from your admin.'
7
+        type='text'
8
+        v-model='companyID'
9
+    )
10
+    w-button.ma1.grow(@click='handleSubmit') NEXT
6
 </template>
11
 </template>
7
 <script>
12
 <script>
8
 export default {
13
 export default {
9
     name: 'CompanyID',
14
     name: 'CompanyID',
10
     props: {
15
     props: {
11
-        currentStep:{
16
+        currentStep: {
12
             required: true,
17
             required: true,
13
             type: Number,
18
             type: Number,
14
-            default: 0
15
-        }
19
+            default: 0,
20
+        },
16
     },
21
     },
17
     emits: ['go-to-step', 'update-answers'],
22
     emits: ['go-to-step', 'update-answers'],
18
     data: () => ({
23
     data: () => ({
19
-        companyID: null, 
24
+        companyID: null,
20
         question: 'PLEASE ENTER YOUR COMPANY ID#:',
25
         question: 'PLEASE ENTER YOUR COMPANY ID#:',
21
     }),
26
     }),
22
     methods: {
27
     methods: {
23
-        handleSubmit(){
28
+        handleSubmit() {
24
             let payload = {
29
             let payload = {
25
                 key: 'CompanyID',
30
                 key: 'CompanyID',
26
                 question: this.question,
31
                 question: this.question,
27
-                answer: this.companyID
32
+                answer: this.companyID,
28
             }
33
             }
29
             this.$emit('update-answers', payload)
34
             this.$emit('update-answers', payload)
30
             this.$emit('go-to-step', this.currentStep + 1)
35
             this.$emit('go-to-step', this.currentStep + 1)
31
-        }
32
-    }
36
+        },
37
+    },
33
 }
38
 }
34
-</script>
39
+</script>

+ 18
- 15
frontend/src/components/onboarding/Interests.vue Переглянути файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-h3 Interests
3
-p {{question}}
4
-DynamicTagList(:tags="interests" :placeholder="'interest'")
5
-w-button.ma1.grow(@click="handleSubmit") NEXT
2
+.interests
3
+    h3 Interests
4
+    p {{ question }}
5
+    DynamicTagList(:placeholder='"interest"' :tags='interests')
6
+    w-button.ma1.grow(@click='handleSubmit') NEXT
6
 </template>
7
 </template>
8
+
7
 <script>
9
 <script>
8
 import DynamicTagList from '../DynamicTagList.vue'
10
 import DynamicTagList from '../DynamicTagList.vue'
9
 export default {
11
 export default {
10
     name: 'Interests',
12
     name: 'Interests',
11
-    components:{
12
-        DynamicTagList
13
+    components: {
14
+        DynamicTagList,
13
     },
15
     },
14
     props: {
16
     props: {
15
-        currentStep:{
17
+        currentStep: {
16
             required: true,
18
             required: true,
17
             type: Number,
19
             type: Number,
18
-            default: 0
19
-        }
20
+            default: 0,
21
+        },
20
     },
22
     },
21
     emits: ['go-to-step', 'update-answers'],
23
     emits: ['go-to-step', 'update-answers'],
22
     data: () => ({
24
     data: () => ({
23
         interests: [],
25
         interests: [],
24
-        question: 'What are some interests you would like in your next candidates?'
26
+        question:
27
+            'What are some interests you would like in your next candidates?',
25
     }),
28
     }),
26
     methods: {
29
     methods: {
27
-        handleSubmit(){
30
+        handleSubmit() {
28
             let payload = {
31
             let payload = {
29
                 key: 'Interests',
32
                 key: 'Interests',
30
                 question: this.question,
33
                 question: this.question,
31
-                answer: this.interests
34
+                answer: this.interests,
32
             }
35
             }
33
             this.$emit('update-answers', payload)
36
             this.$emit('update-answers', payload)
34
             this.$emit('go-to-step', this.currentStep + 1)
37
             this.$emit('go-to-step', this.currentStep + 1)
35
-        }
36
-    }
38
+        },
39
+    },
37
 }
40
 }
38
-</script>
41
+</script>

+ 19
- 15
frontend/src/components/onboarding/LicensesAndCertifications.vue Переглянути файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-h3 Licenses & Certifications
3
-p {{question}}
4
-DynamicTagList(:tags="licensesAndCertifications" :placeholder="'requirement'")
5
-w-button.ma1.grow(@click="handleSubmit") NEXT
2
+.licenses-certifications
3
+    h3 Licenses &amp; Certifications
4
+    p {{ question }}
5
+    DynamicTagList(
6
+        :placeholder='"requirement"'
7
+        :tags='licensesAndCertifications'
8
+    )
9
+    w-button.ma1.grow(@click='handleSubmit') NEXT
6
 </template>
10
 </template>
7
 <script>
11
 <script>
8
 import DynamicTagList from '../DynamicTagList.vue'
12
 import DynamicTagList from '../DynamicTagList.vue'
9
 export default {
13
 export default {
10
     name: 'LicensesAndCertifications',
14
     name: 'LicensesAndCertifications',
11
-    components:{
12
-        DynamicTagList
15
+    components: {
16
+        DynamicTagList,
13
     },
17
     },
14
     props: {
18
     props: {
15
-        currentStep:{
19
+        currentStep: {
16
             required: true,
20
             required: true,
17
             type: Number,
21
             type: Number,
18
-            default: 0
19
-        }
22
+            default: 0,
23
+        },
20
     },
24
     },
21
     emits: ['go-to-step', 'update-answers'],
25
     emits: ['go-to-step', 'update-answers'],
22
     data: () => ({
26
     data: () => ({
23
         licensesAndCertifications: [],
27
         licensesAndCertifications: [],
24
-        question: 'Are there any licenses and certification requirements?'
28
+        question: 'Are there any licenses and certification requirements?',
25
     }),
29
     }),
26
     methods: {
30
     methods: {
27
-        handleSubmit(){
31
+        handleSubmit() {
28
             let payload = {
32
             let payload = {
29
                 key: 'LicensesAndCertifications',
33
                 key: 'LicensesAndCertifications',
30
                 question: this.question,
34
                 question: this.question,
31
-                answer: this.licensesAndCertifications
35
+                answer: this.licensesAndCertifications,
32
             }
36
             }
33
             this.$emit('update-answers', payload)
37
             this.$emit('update-answers', payload)
34
             this.$emit('go-to-step', this.currentStep + 1)
38
             this.$emit('go-to-step', this.currentStep + 1)
35
-        }
36
-    }
39
+        },
40
+    },
37
 }
41
 }
38
-</script>
42
+</script>

+ 16
- 15
frontend/src/components/onboarding/Location.vue Переглянути файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-h3 Location
3
-p {{question}}
4
-DynamicTagList(:tags="locations" :placeholder="'location'")
5
-w-button.ma1.grow(@click="handleSubmit") NEXT
2
+.location
3
+    h3 Location
4
+    p {{ question }}
5
+    DynamicTagList(:placeholder='"location"' :tags='locations')
6
+    w-button.ma1.grow(@click='handleSubmit') NEXT
6
 </template>
7
 </template>
7
 <script>
8
 <script>
8
 import DynamicTagList from '../DynamicTagList.vue'
9
 import DynamicTagList from '../DynamicTagList.vue'
9
 export default {
10
 export default {
10
     name: 'Location',
11
     name: 'Location',
11
-    components:{
12
-        DynamicTagList
12
+    components: {
13
+        DynamicTagList,
13
     },
14
     },
14
     props: {
15
     props: {
15
-        currentStep:{
16
+        currentStep: {
16
             required: true,
17
             required: true,
17
             type: Number,
18
             type: Number,
18
-            default: 0
19
-        }
19
+            default: 0,
20
+        },
20
     },
21
     },
21
     emits: ['go-to-step', 'update-answers'],
22
     emits: ['go-to-step', 'update-answers'],
22
     data: () => ({
23
     data: () => ({
23
         locations: [],
24
         locations: [],
24
-        question: 'Where would you like to select your candidates from?'
25
+        question: 'Where would you like to select your candidates from?',
25
     }),
26
     }),
26
     methods: {
27
     methods: {
27
-        handleSubmit(){
28
+        handleSubmit() {
28
             let payload = {
29
             let payload = {
29
                 key: 'Location',
30
                 key: 'Location',
30
                 question: this.question,
31
                 question: this.question,
31
-                answer: this.locations
32
+                answer: this.locations,
32
             }
33
             }
33
             this.$emit('update-answers', payload)
34
             this.$emit('update-answers', payload)
34
             this.$emit('go-to-step', this.currentStep + 1)
35
             this.$emit('go-to-step', this.currentStep + 1)
35
-        }
36
-    }
36
+        },
37
+    },
37
 }
38
 }
38
-</script>
39
+</script>

+ 17
- 18
frontend/src/components/onboarding/Role.vue Переглянути файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-h3 ACTIVELY SEARCHING
3
-p {{question}}
4
-w-select.mt4(
5
-    v-model="selectedRole"
6
-    :items="items"
7
-    placeholder="i am")
8
-w-button.ma1.grow(@click="handleSubmit") NEXT
2
+.role
3
+    h3 ACTIVELY SEARCHING
4
+    p {{ question }}
5
+    w-select.mt4(:items='items' placeholder='i am' v-model='selectedRole')
6
+    w-button.ma1.grow(@click='handleSubmit') NEXT
9
 </template>
7
 </template>
8
+
10
 <script>
9
 <script>
11
 export default {
10
 export default {
12
     name: 'Role',
11
     name: 'Role',
13
     props: {
12
     props: {
14
-        currentStep:{
13
+        currentStep: {
15
             required: true,
14
             required: true,
16
             type: Number,
15
             type: Number,
17
-            default: 0
18
-        }
16
+            default: 0,
17
+        },
19
     },
18
     },
20
     data: () => ({
19
     data: () => ({
21
-        items: [{label: 'RECRUITER'},{label: 'HIRING MANAGER'}],
20
+        items: [{ label: 'RECRUITER' }, { label: 'HIRING MANAGER' }],
22
         question: 'What is your role at your company?',
21
         question: 'What is your role at your company?',
23
         selectedRole: null,
22
         selectedRole: null,
24
     }),
23
     }),
25
     methods: {
24
     methods: {
26
-        handleSubmit(){
27
-            if(!this.selectedRole) {
25
+        handleSubmit() {
26
+            if (!this.selectedRole) {
28
                 console.warn('Please select a role.')
27
                 console.warn('Please select a role.')
29
                 return
28
                 return
30
-            } 
29
+            }
31
             let payload = {
30
             let payload = {
32
                 key: 'Role',
31
                 key: 'Role',
33
                 question: this.question,
32
                 question: this.question,
34
-                answer: this.selectedRole
33
+                answer: this.selectedRole,
35
             }
34
             }
36
             this.$emit('update-answers', payload)
35
             this.$emit('update-answers', payload)
37
             this.$emit('go-to-step', this.currentStep + 1)
36
             this.$emit('go-to-step', this.currentStep + 1)
38
-        }
39
-    }
37
+        },
38
+    },
40
 }
39
 }
41
-</script>
40
+</script>

+ 16
- 15
frontend/src/components/onboarding/Skills.vue Переглянути файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-h3 RECRUITER
3
-p {{question}}
4
-DynamicTagList(:tags="skills" :placeholder="'skill'")
5
-w-button.ma1.grow(@click="handleSubmit") NEXT
2
+.skills
3
+    h3 RECRUITER
4
+    p {{ question }}
5
+    DynamicTagList(:placeholder='"skill"' :tags='skills')
6
+    w-button.ma1.grow(@click='handleSubmit') NEXT
6
 </template>
7
 </template>
7
 <script>
8
 <script>
8
 import DynamicTagList from '../DynamicTagList.vue'
9
 import DynamicTagList from '../DynamicTagList.vue'
9
 export default {
10
 export default {
10
     name: 'Skills',
11
     name: 'Skills',
11
-    components:{
12
-        DynamicTagList
12
+    components: {
13
+        DynamicTagList,
13
     },
14
     },
14
     props: {
15
     props: {
15
-        currentStep:{
16
+        currentStep: {
16
             required: true,
17
             required: true,
17
             type: Number,
18
             type: Number,
18
-            default: 0
19
-        }
19
+            default: 0,
20
+        },
20
     },
21
     },
21
     emits: ['go-to-step', 'update-answers'],
22
     emits: ['go-to-step', 'update-answers'],
22
     data: () => ({
23
     data: () => ({
23
         question: 'What are some skills you are looking for at your company?',
24
         question: 'What are some skills you are looking for at your company?',
24
-        skills: []
25
+        skills: [],
25
     }),
26
     }),
26
     methods: {
27
     methods: {
27
-        handleSubmit(){
28
+        handleSubmit() {
28
             let payload = {
29
             let payload = {
29
                 key: 'Skills',
30
                 key: 'Skills',
30
                 question: this.question,
31
                 question: this.question,
31
-                answer: this.skills
32
+                answer: this.skills,
32
             }
33
             }
33
             this.$emit('update-answers', payload)
34
             this.$emit('update-answers', payload)
34
             this.$emit('go-to-step', this.currentStep + 1)
35
             this.$emit('go-to-step', this.currentStep + 1)
35
-        }
36
-    }
36
+        },
37
+    },
37
 }
38
 }
38
-</script>
39
+</script>

+ 9
- 7
frontend/src/components/onboarding/Splash.vue Переглянути файл

1
 <template lang="pug">
1
 <template lang="pug">
2
-.splash-icon(style="width:347px; height:347px; background-color: red;")
3
-div(style="text-align:center;")
4
-    w-button.ma1.grow(@click="this.$emit('go-to-step', currentStep + 1)") GET STARTED
2
+.splash
3
+    .splash--icon(style='width: 347px; height: 347px; background-color: red')
4
+    div(style='text-align: center')
5
+        w-button.ma1.grow(@click='this.$emit("go-to-step", currentStep + 1)') GET STARTED
5
 </template>
6
 </template>
7
+
6
 <script>
8
 <script>
7
 export default {
9
 export default {
8
     name: 'Splash',
10
     name: 'Splash',
9
     props: {
11
     props: {
10
-        currentStep:{
12
+        currentStep: {
11
             required: true,
13
             required: true,
12
             type: Number,
14
             type: Number,
13
-            default: 0
14
-        }
15
+            default: 0,
16
+        },
15
     },
17
     },
16
 }
18
 }
17
-</script>
19
+</script>

+ 0
- 39
frontend/src/utils/onboardingStepComponents.js Переглянути файл

1
-const OnboardingStepComponents = [
2
-    {
3
-        id: 0,
4
-        component:'Splash',
5
-    },
6
-    {
7
-        id: 1,
8
-        component:'AccountType',
9
-    },
10
-    {
11
-        id: 2,
12
-        component:'CompanyID',
13
-    },
14
-    {
15
-        id: 3,
16
-        component:'Role',
17
-    },
18
-    {
19
-        id: 4,
20
-        component:'Skills',
21
-    },
22
-    {
23
-        id: 5,
24
-        component:'Location',
25
-    },
26
-    {
27
-        id: 6,
28
-        component:'Interests',
29
-    },
30
-    {
31
-        id: 7,
32
-        component:'LicensesAndCertifications',
33
-    },
34
-    {
35
-        id: 8,
36
-        component:'Aspects',
37
-    }
38
-]
39
-export default OnboardingStepComponents

+ 20
- 22
frontend/src/views/OnboardingView.vue Переглянути файл

2
 main.view--onboarding
2
 main.view--onboarding
3
     article(style='display: flex; flex-direction: column; align-items: center')
3
     article(style='display: flex; flex-direction: column; align-items: center')
4
         component(
4
         component(
5
-            :aspectQuestions='onboardingStep.component == "Aspects" ? aspectQuestions : null'
6
-            :currentStep='currentStep'
7
-            :is='onboardingStep.component'
5
+            :aspect-questions='steps[currentStep] == "Aspects" ? aspectQuestions : null'
6
+            :current-step='currentStep'
7
+            :is='steps[currentStep]'
8
             @go-to-step='goToStep'
8
             @go-to-step='goToStep'
9
-            @handle-submit="onSubmit"
10
-            @update-answers="updateAnswers"
9
+            @handle-submit='onSubmit'
10
+            @update-answers='updateAnswers'
11
         )
11
         )
12
 </template>
12
 </template>
13
 
13
 
15
 import { surveyFactory } from '@/utils'
15
 import { surveyFactory } from '@/utils'
16
 import { allSteps, possible } from '@/utils/lang'
16
 import { allSteps, possible } from '@/utils/lang'
17
 import stepViews from '@/components/onboarding'
17
 import stepViews from '@/components/onboarding'
18
-import OnboardingStepComponents from '../utils/onboardingStepComponents'
19
 
18
 
20
-const SCORED = [1, 2, 3, 4, 5, 6] 
19
+const SCORED = [1, 2, 3, 4, 5, 6]
20
+
21
 const _isScored = id => SCORED.includes(id)
21
 const _isScored = id => SCORED.includes(id)
22
 
22
 
23
 const _makeCategoryFriendly = responseCategory => {
23
 const _makeCategoryFriendly = responseCategory => {
54
         answered: {},
54
         answered: {},
55
         aspectQuestions: [],
55
         aspectQuestions: [],
56
         currentStep: 0,
56
         currentStep: 0,
57
-        onboardingStepComponents: [],
58
-        validSurvey: null,
57
+        steps: [
58
+            'Splash',
59
+            'AccountType',
60
+            'CompanyID',
61
+            'Role',
62
+            'Skills',
63
+            'Location',
64
+            'Interests',
65
+            'LicensesAndCertifications',
66
+            'Aspects',
67
+        ],
59
     }),
68
     }),
60
-    computed: {
61
-        onboardingStep() {
62
-            if (!this.onboardingStepComponents.length) return []
63
-            return this.onboardingStepComponents[this.currentStep]
64
-        },
65
-    },
66
     async created() {
69
     async created() {
67
         const survey = await surveyFactory.createSurvey(
70
         const survey = await surveyFactory.createSurvey(
68
             allSteps['usa'],
71
             allSteps['usa'],
69
             possible['usa']['roles'],
72
             possible['usa']['roles'],
70
         )
73
         )
71
         this.aspectQuestions = _formatAspectQuestions(survey.steps)
74
         this.aspectQuestions = _formatAspectQuestions(survey.steps)
72
-        this.onboardingStepComponents = OnboardingStepComponents
73
     },
75
     },
74
     methods: {
76
     methods: {
75
         onSubmit() {
77
         onSubmit() {
76
             console.log(JSON.stringify(this.answered))
78
             console.log(JSON.stringify(this.answered))
77
-            // Object.values(this.answered).forEach(ans =>
78
-            //     console.log(ans.question, ans.answer),
79
-            // )
80
         },
79
         },
81
         goToStep(num) {
80
         goToStep(num) {
82
             this.currentStep = num
81
             this.currentStep = num
83
         },
82
         },
84
-        updateAnswers(payload){
83
+        updateAnswers(payload) {
85
             this.answered[payload.key] = payload.answer
84
             this.answered[payload.key] = payload.answer
86
-            console.log(`Updated answers: ${JSON.stringify(this.answered)}`);
87
-        }
85
+        },
88
     },
86
     },
89
 }
87
 }
90
 </script>
88
 </script>

Завантаження…
Відмінити
Зберегти