ソースを参照

:wrench: rendering Aspects component

tags/0.0.3^2
juancarbajal98 3年前
コミット
c383dee01d
2個のファイルの変更15行の追加0行の削除
  1. 1
    0
      frontend/src/utils/survey.js
  2. 14
    0
      frontend/src/views/OnboardingView.vue

+ 1
- 0
frontend/src/utils/survey.js ファイルの表示

16
     distance: 'FormInput',
16
     distance: 'FormInput',
17
     zipcode: 'FormInput',
17
     zipcode: 'FormInput',
18
     blurb: 'FormInput',
18
     blurb: 'FormInput',
19
+    aspects: 'Aspects'
19
 }
20
 }
20
 /**
21
 /**
21
  * Make a step from match or step information
22
  * Make a step from match or step information

+ 14
- 0
frontend/src/views/OnboardingView.vue ファイルの表示

46
     }),
46
     }),
47
     async created() {
47
     async created() {
48
         this.survey = await surveyFactory.createSurvey(allSteps['usa'])
48
         this.survey = await surveyFactory.createSurvey(allSteps['usa'])
49
+        this.configureAspectStep()
49
     },
50
     },
50
     methods: {
51
     methods: {
52
+        configureAspectStep(){
53
+            // remove all steps regarding aspects
54
+            this.survey.steps = this.survey.steps.slice(0,this.survey.steps.length-6)
55
+            // insert single step to render Aspects component
56
+            this.survey.steps.push({
57
+                response_key_id:1,
58
+                response_key_category:"profile",
59
+                response_key_prompt:"aspects",
60
+                response_key_description:"",
61
+                responses:[],
62
+                component:"Aspects"
63
+            })
64
+        },
51
         onSubmit() {
65
         onSubmit() {
52
             console.log(JSON.stringify(this.answered))
66
             console.log(JSON.stringify(this.answered))
53
         },
67
         },

読み込み中…
キャンセル
保存