|
|
@@ -1,119 +1,48 @@
|
|
1
|
1
|
<template lang="pug">
|
|
2
|
2
|
main.f-col.start.w-full
|
|
3
|
|
- ButtonMulti
|
|
|
3
|
+ //- ButtonMulti
|
|
4
|
4
|
//- ButtonChoice
|
|
5
|
5
|
//- InputString
|
|
6
|
|
- h5(v-if="profileQuestions.length" v-for="q in profileQuestions")
|
|
7
|
|
- span(v-if="componentMap[q.response_key_prompt]") {{ componentMap[q.response_key_prompt] }}:
|
|
8
|
|
- span(v-else) InputString:
|
|
9
|
|
- span {{ q.response_key_prompt }} |
|
|
10
|
|
- span(v-if="q.responses")
|
|
11
|
|
- button(v-for="resp in q.responses") {{ resp }}
|
|
|
6
|
+ header.w-full.f-col
|
|
|
7
|
+ h3(v-if="!name") hello, what shall i call you?
|
|
|
8
|
+ h3(v-if="step == 1") What can i help you with,
|
|
|
9
|
+ span {{ name }}?
|
|
|
10
|
+ br
|
|
|
11
|
+ span I am seeking a ___________.
|
|
|
12
|
+ h3(v-else-if="step == 2") A {{ seeking }} then. You're in the right place.
|
|
|
13
|
+ span How would you like to use siimee?
|
|
|
14
|
+ br
|
|
|
15
|
+ span I am ________________.
|
|
|
16
|
+ h3(v-else-if="[3, 4, 5].includes(step)")
|
|
|
17
|
+ span I am a _________.
|
|
|
18
|
+ br
|
|
|
19
|
+ span Looking for a ________
|
|
|
20
|
+ span ________
|
|
|
21
|
+ span in _______.
|
|
12
|
22
|
|
|
13
|
23
|
article.match.w-full
|
|
14
|
24
|
ul.w-full
|
|
15
|
|
- li(v-if="step == 0")
|
|
16
|
|
- header
|
|
17
|
|
- p step 1
|
|
18
|
|
- section
|
|
19
|
|
- input(v-model="name")
|
|
20
|
|
- footer
|
|
21
|
|
- button(@click="step++").w-full next
|
|
22
|
|
-
|
|
23
|
|
- li(v-if="step == 1")
|
|
24
|
|
- header
|
|
25
|
|
- p step 1
|
|
26
|
|
- section
|
|
27
|
|
- p
|
|
28
|
|
- span(v-if="name") {{ name }}
|
|
29
|
|
- span(v-else) ______________
|
|
30
|
|
- span .
|
|
31
|
|
- span Let's get started on you profile while we verify your account.
|
|
32
|
|
- footer.f-row
|
|
33
|
|
- button(@click="step--").w-full back
|
|
34
|
|
- button(@click="step++").w-full next
|
|
35
|
|
-
|
|
36
|
|
- li(v-if="step == 2")
|
|
37
|
|
- header
|
|
38
|
|
- p step 2
|
|
39
|
|
- section
|
|
40
|
|
- p
|
|
41
|
|
- span What are you looking for
|
|
42
|
|
- span {{ name }}
|
|
43
|
|
- span ?
|
|
44
|
|
- footer.f-col.w-full
|
|
45
|
|
- button(@click="saveNext('position')") a position
|
|
46
|
|
- button(@click="saveNext('cadidate')") a candidate
|
|
47
|
|
-
|
|
48
|
|
- li(v-if="step == 3")
|
|
49
|
|
- header
|
|
50
|
|
- p step 3
|
|
51
|
|
- section
|
|
52
|
|
- p
|
|
53
|
|
- span {{ seeking }}
|
|
54
|
|
- span .
|
|
55
|
|
- span You're in the right place. How would you like to use siimee?
|
|
56
|
|
- section
|
|
57
|
|
- p
|
|
58
|
|
- span i am
|
|
59
|
|
- select
|
|
60
|
|
- option actively searching
|
|
61
|
|
- option networking
|
|
62
|
|
- option exploring
|
|
63
|
|
- footer.f-row
|
|
64
|
|
- button(@click="step--").w-full back
|
|
65
|
|
- button(@click="step++").w-full next
|
|
66
|
|
-
|
|
67
|
|
- li(v-if="step == 4")
|
|
68
|
|
- header
|
|
69
|
|
- p step 4
|
|
70
|
|
- section
|
|
71
|
|
- p
|
|
72
|
|
- span i am
|
|
73
|
|
- span(v-if="role") a {{ role }}.
|
|
74
|
|
- span(v-else) ______________.
|
|
75
|
|
- section
|
|
76
|
|
- p
|
|
77
|
|
- span(v-if="location") Looking for a {{ location }},
|
|
78
|
|
- span(v-else) Looking for a ______________,
|
|
79
|
|
- span(v-if="experience") {{ experience }}
|
|
80
|
|
- span(v-else) ______________
|
|
81
|
|
- span(v-if="position") {{ position }}ing role.
|
|
82
|
|
- span(v-else) ______________ role.
|
|
83
|
|
-
|
|
84
|
|
- footer(v-if="!role").f-row
|
|
85
|
|
- button(@click="role = 'recruiter'") a recruiter
|
|
86
|
|
- button(@click="role = 'hiring_manager'") a hiring manager
|
|
87
|
|
- footer.f-row(v-else-if="!location")
|
|
88
|
|
- button(@click="location = 'remote'") remote
|
|
89
|
|
- button(@click="location = 'in_person'") in person
|
|
90
|
|
- footer.f-row(v-else-if="location == 'in_person' && zipcode.length > 5")
|
|
91
|
|
- input(v-model="zipcode")
|
|
92
|
|
- footer.f-row(v-else-if="!experience")
|
|
93
|
|
- button(@click="experience = 'junior'") junior
|
|
94
|
|
- button(@click="experience = 'mid-level'") mid-level
|
|
95
|
|
- button(@click="experience = 'senior'") senior
|
|
96
|
|
- button(@click="experience = 'staff'") staff
|
|
97
|
|
- footer.f-row(v-else-if="!position")
|
|
98
|
|
- button(@click="position = 'engineer'") engineering
|
|
99
|
|
- footer.f-row(v-else)
|
|
100
|
|
- button(@click="step++").w-full next
|
|
101
|
|
-
|
|
102
|
|
- li(v-if="step == 5")
|
|
103
|
|
- header
|
|
104
|
|
- p step 5
|
|
105
|
|
- section
|
|
106
|
|
- SurveyForm(v-if="validSurvey && validSurvey.steps" :form="validSurvey.steps" :pid="pid")
|
|
107
|
|
- footer.f-row
|
|
108
|
|
- button(@click="step--").w-full back
|
|
109
|
|
- button(@click="step=0").w-full save
|
|
|
25
|
+ template(v-for="(q, i) in profileQuestions" :key="q.response_key_prompt")
|
|
|
26
|
+ li(v-if="step == i").f-col
|
|
|
27
|
+ p step: {{ i }}
|
|
|
28
|
+ component(
|
|
|
29
|
+ v-if="componentMap[q.response_key_prompt]"
|
|
|
30
|
+ :is="componentMap[q.response_key_prompt]"
|
|
|
31
|
+ :opts="q.responses"
|
|
|
32
|
+ :prompt="q.response_key_prompt"
|
|
|
33
|
+ @selected="onButtonSelect"
|
|
|
34
|
+ )
|
|
|
35
|
+ div(v-else-if="step >= priorityQuestions.length")
|
|
|
36
|
+ button(@click="step = 0") save
|
|
|
37
|
+ footer.f-row
|
|
|
38
|
+ button(@click="step--").w-full back
|
|
110
|
39
|
//- SurveyForm(v-if="validSurvey && validSurvey.steps" :form="validSurvey.steps" :pid="pid")
|
|
111
|
40
|
MainNav(:pid="pid" @show-sidebar="$emit('show-sidebar')")
|
|
112
|
41
|
</template>
|
|
113
|
42
|
|
|
114
|
43
|
<script>
|
|
115
|
44
|
import { surveyFactory } from '../utils'
|
|
116
|
|
-import { allSteps, stepToComponentMap } from '../utils/lang'
|
|
|
45
|
+import { allSteps, possible, stepToComponentMap } from '../utils/lang'
|
|
117
|
46
|
import SurveyForm from '../components/form.vue'
|
|
118
|
47
|
import ButtonMulti from '../components/form/button-multi.vue'
|
|
119
|
48
|
import ButtonChoice from '../components/form/button-choice.vue'
|
|
|
@@ -137,6 +66,7 @@ export default {
|
|
137
|
66
|
role: '',
|
|
138
|
67
|
experience: '',
|
|
139
|
68
|
position: '',
|
|
|
69
|
+ language: '',
|
|
140
|
70
|
location: '',
|
|
141
|
71
|
zipcode: '',
|
|
142
|
72
|
}
|
|
|
@@ -152,13 +82,21 @@ export default {
|
|
152
|
82
|
}
|
|
153
|
83
|
},
|
|
154
|
84
|
async created() {
|
|
155
|
|
- this.validSurvey = await surveyFactory.createSurvey(allSteps['usa'])
|
|
156
|
|
- console.log('profile:', this.profileQuestions)
|
|
|
85
|
+ this.validSurvey = await surveyFactory.createSurvey(allSteps['usa'], possible['usa']['roles'])
|
|
157
|
86
|
},
|
|
158
|
87
|
methods: {
|
|
159
|
|
- saveNext(val) {
|
|
160
|
|
- console.log(val)
|
|
161
|
|
- this.seeking = val
|
|
|
88
|
+ /**
|
|
|
89
|
+ * Set state from promptVal key:value object
|
|
|
90
|
+ * from button-coice or button-multi
|
|
|
91
|
+ */
|
|
|
92
|
+ onButtonSelect(promptVal){
|
|
|
93
|
+ console.log('promptVal :', promptVal)
|
|
|
94
|
+ for(const [prompt, val] of Object.entries(promptVal)) {
|
|
|
95
|
+ this[prompt] = val
|
|
|
96
|
+ if(prompt == 'seeking') {
|
|
|
97
|
+ this.validSurvey.setRoleResponses(val)
|
|
|
98
|
+ }
|
|
|
99
|
+ }
|
|
162
|
100
|
this.step++
|
|
163
|
101
|
},
|
|
164
|
102
|
},
|
|
|
@@ -172,6 +110,13 @@ h1
|
|
172
|
110
|
main
|
|
173
|
111
|
padding: 5vh
|
|
174
|
112
|
display: flex
|
|
|
113
|
+ header
|
|
|
114
|
+ p
|
|
|
115
|
+ color: #666
|
|
|
116
|
+ line-height: 1.3em
|
|
|
117
|
+ color: #ccc
|
|
|
118
|
+ font-style: italic
|
|
|
119
|
+ text-align: left
|
|
175
|
120
|
|
|
176
|
121
|
article
|
|
177
|
122
|
height: 100%
|
|
|
@@ -188,12 +133,6 @@ article
|
|
188
|
133
|
.form
|
|
189
|
134
|
border: 1px solid #fff
|
|
190
|
135
|
width: 100%
|
|
191
|
|
- header
|
|
192
|
|
- color: #ccc
|
|
193
|
|
- font-style: italic
|
|
194
|
|
- p
|
|
195
|
|
- line-height: 1.3em
|
|
196
|
|
- text-align: left
|
|
197
|
136
|
header, footer, ul
|
|
198
|
137
|
padding: 1vh
|
|
199
|
138
|
ul
|