Commit 3930b53f659836aab191d1d79e233871aab3f415
1 parent
196f4eb8f8
Exists in
master
object assign issue
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
src/components/Profile.vue
1 | <template> | 1 | <template> |
2 | <main class="landing-page"> | 2 | <main class="landing-page"> |
3 | <!-- profile --> | 3 | <!-- profile --> |
4 | <div class="popup-wrp" style="display: none"> | 4 | <div class="popup-wrp" style="display: none"> |
5 | <div class="overlay" @click="hideDialog"></div> | 5 | <div class="overlay" @click="hideDialog"></div> |
6 | <div class="popup-set" id="add-profile" style="display: none"> | 6 | <div class="popup-set" id="add-profile" style="display: none"> |
7 | <div class="popup-header"> | 7 | <div class="popup-header"> |
8 | <div class="user-photo common_color"> | 8 | <div class="user-photo common_color"> |
9 | <img :src="userData.profilePic" /> | 9 | <img :src="userData.profilePic" /> |
10 | </div> | 10 | </div> |
11 | <!-- header user --> | 11 | <!-- header user --> |
12 | 12 | ||
13 | <ul> | 13 | <ul> |
14 | <li> | 14 | <li> |
15 | <a href="javasript:void(0);" | 15 | <a href="javasript:void(0);" |
16 | ><img src="../assets/images/replace.svg" /><span | 16 | ><img src="../assets/images/replace.svg" /><span |
17 | >Replace Avatar</span | 17 | >Replace Avatar</span |
18 | ></a | 18 | ></a |
19 | > | 19 | > |
20 | </li> | 20 | </li> |
21 | <li> | 21 | <li> |
22 | <a href="javasript:void(0);" | 22 | <a href="javasript:void(0);" |
23 | @click="getRandomAvatar()"><img src="../assets/images/randomise.svg" /><span | 23 | @click="getRandomAvatar()"><img src="../assets/images/randomise.svg" /><span |
24 | >Randomise Avatar</span | 24 | >Randomise Avatar</span |
25 | ></a | 25 | ></a |
26 | > | 26 | > |
27 | </li> | 27 | </li> |
28 | </ul> | 28 | </ul> |
29 | </div> | 29 | </div> |
30 | <!-- header --> | 30 | <!-- header --> |
31 | <div class="popup-body"> | 31 | <div class="popup-body"> |
32 | <form class="popup-forms"> | 32 | <form class="popup-forms"> |
33 | <div class="row"> | 33 | <div class="row"> |
34 | <div class="col-sm-6 col-md-6 col-lg-6 col-xl-6"> | 34 | <div class="col-sm-6 col-md-6 col-lg-6 col-xl-6"> |
35 | <div class="form-group floating-label"> | 35 | <div class="form-group floating-label"> |
36 | <input | 36 | <input |
37 | type="text" | 37 | type="text" |
38 | class="form-control" | 38 | class="form-control" |
39 | v-model="userData.firstName" | 39 | v-model="userData.firstName" |
40 | placeholder=" " | 40 | placeholder=" " |
41 | id="fname" | 41 | id="fname" |
42 | /> | 42 | /> |
43 | <label for="fname">First Name</label> | 43 | <label for="fname">First Name</label> |
44 | </div> | 44 | </div> |
45 | </div> | 45 | </div> |
46 | <!-- input --> | 46 | <!-- input --> |
47 | <div class="col-sm-6 col-md-6 col-lg-6 col-xl-6"> | 47 | <div class="col-sm-6 col-md-6 col-lg-6 col-xl-6"> |
48 | <div class="form-group floating-label"> | 48 | <div class="form-group floating-label"> |
49 | <input | 49 | <input |
50 | type="text" | 50 | type="text" |
51 | class="form-control" | 51 | class="form-control" |
52 | value="" | 52 | value="" |
53 | placeholder=" " | 53 | placeholder=" " |
54 | id="lname" | 54 | id="lname" |
55 | v-model="userData.lastName" | 55 | v-model="userData.lastName" |
56 | /> | 56 | /> |
57 | <label for="lname" class="lname">Last Name</label> | 57 | <label for="lname" class="lname">Last Name</label> |
58 | </div> | 58 | </div> |
59 | </div> | 59 | </div> |
60 | <!-- input --> | 60 | <!-- input --> |
61 | <div class="col-sm-5 col-md-5 col-lg-5 col-xl-5"> | 61 | <div class="col-sm-5 col-md-5 col-lg-5 col-xl-5"> |
62 | <div class="form-group floating-label"> | 62 | <div class="form-group floating-label"> |
63 | <input | 63 | <input |
64 | type="text" | 64 | type="text" |
65 | class="form-control" | 65 | class="form-control" |
66 | value="" | 66 | value="" |
67 | v-model="userData.designation" | 67 | v-model="userData.designation" |
68 | placeholder=" " | 68 | placeholder=" " |
69 | id="designation" | 69 | id="designation" |
70 | /> | 70 | /> |
71 | <label for="designation">Designation</label> | 71 | <label for="designation">Designation</label> |
72 | </div> | 72 | </div> |
73 | </div> | 73 | </div> |
74 | <!-- input --> | 74 | <!-- input --> |
75 | <div class="col-sm-7 col-md-7 col-lg-7 col-xl-7"> | 75 | <div class="col-sm-7 col-md-7 col-lg-7 col-xl-7"> |
76 | <div class="form-group floating-label"> | 76 | <div class="form-group floating-label"> |
77 | <input | 77 | <input |
78 | type="text" | 78 | type="text" |
79 | class="form-control" | 79 | class="form-control" |
80 | v-model="userData.organisation" | 80 | v-model="userData.organisation" |
81 | id="company" | 81 | id="company" |
82 | placeholder=" " | 82 | placeholder=" " |
83 | /> | 83 | /> |
84 | <label for="company">Company</label> | 84 | <label for="company">Company</label> |
85 | </div> | 85 | </div> |
86 | </div> | 86 | </div> |
87 | <!-- input --> | 87 | <!-- input --> |
88 | <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12"> | 88 | <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12"> |
89 | <div class="form-group floating-label"> | 89 | <div class="form-group floating-label"> |
90 | <textarea | 90 | <textarea |
91 | type="text" | 91 | type="text" |
92 | class="form-control" | 92 | class="form-control" |
93 | value="" | 93 | value="" |
94 | v-model="userData.bio" | 94 | v-model="userData.bio" |
95 | id="yourself" | 95 | id="yourself" |
96 | placeholder=" " | 96 | placeholder=" " |
97 | ></textarea> | 97 | ></textarea> |
98 | <label for="yourself" | 98 | <label for="yourself" |
99 | >Tell others a little about yourself</label | 99 | >Tell others a little about yourself</label |
100 | > | 100 | > |
101 | </div> | 101 | </div> |
102 | </div> | 102 | </div> |
103 | <!-- input --> | 103 | <!-- input --> |
104 | <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12"> | 104 | <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12"> |
105 | <p class="things">Three things that you talk more about</p> | 105 | <p class="things">Three things that you talk more about</p> |
106 | 106 | ||
107 | <ul class="interests"> | 107 | <ul class="interests"> |
108 | <li v-for="(interest, i) in userData.interests" :key="i"> | 108 | <li v-for="(interest, i) in userData.interests" :key="i"> |
109 | <span>{{ interest }}</span> | 109 | <span>{{ interest }}</span> |
110 | <a | 110 | <a |
111 | href="javascript:void(0);" | 111 | href="javascript:void(0);" |
112 | @click="removeInterest(i)" | 112 | @click="removeInterest(i)" |
113 | class="cat-minus" | 113 | class="cat-minus" |
114 | ><img src="../assets/images/minus.svg" | 114 | ><img src="../assets/images/minus.svg" |
115 | /></a> | 115 | /></a> |
116 | </li> | 116 | </li> |
117 | <li> | 117 | <li> |
118 | <input | 118 | <input |
119 | class="" | 119 | class="" |
120 | placeholder="Add interest" | 120 | placeholder="Add interest" |
121 | v-on:keyup.enter="addInterest" | 121 | v-on:keyup.enter="addInterest" |
122 | v-model="interestName" | 122 | v-model="interestName" |
123 | /> | 123 | /> |
124 | <a href="javascript:void(0);" @click="addInterest()" | 124 | <a href="javascript:void(0);" @click="addInterest()" |
125 | ><img src="../assets/images/plus-circle.svg" | 125 | ><img src="../assets/images/plus-circle.svg" |
126 | /></a> | 126 | /></a> |
127 | </li> | 127 | </li> |
128 | </ul> | 128 | </ul> |
129 | </div> | 129 | </div> |
130 | <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12"> | 130 | <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12"> |
131 | <p class="things">Choose Background color</p> | 131 | <p class="things">Choose Background color</p> |
132 | 132 | ||
133 | <ul class="colors"> | 133 | <ul class="colors"> |
134 | <li> | 134 | <li> |
135 | <a | 135 | <a |
136 | href="javascript:void(0);" | 136 | href="javascript:void(0);" |
137 | id="#C4C4C4" | 137 | id="#C4C4C4" |
138 | class="silver" | 138 | class="silver" |
139 | @click="changeColor('#C4C4C4')" | 139 | @click="changeColor('#C4C4C4')" |
140 | ></a> | 140 | ></a> |
141 | </li> | 141 | </li> |
142 | <li> | 142 | <li> |
143 | <a | 143 | <a |
144 | href="javascript:void(0);" | 144 | href="javascript:void(0);" |
145 | id="#FFF6D7" | 145 | id="#FFF6D7" |
146 | class="milk-punch" | 146 | class="milk-punch" |
147 | @click="changeColor('#FFF6D7')" | 147 | @click="changeColor('#FFF6D7')" |
148 | ></a> | 148 | ></a> |
149 | </li> | 149 | </li> |
150 | <li> | 150 | <li> |
151 | <a | 151 | <a |
152 | href="javascript:void(0);" | 152 | href="javascript:void(0);" |
153 | id="#BDDBFF" | 153 | id="#BDDBFF" |
154 | class="french-pass" | 154 | class="french-pass" |
155 | @click="changeColor('#BDDBFF')" | 155 | @click="changeColor('#BDDBFF')" |
156 | ></a> | 156 | ></a> |
157 | </li> | 157 | </li> |
158 | <li> | 158 | <li> |
159 | <a | 159 | <a |
160 | href="javascript:void(0);" | 160 | href="javascript:void(0);" |
161 | id="#C0FAFE" | 161 | id="#C0FAFE" |
162 | class="cyan-french-pass" | 162 | class="cyan-french-pass" |
163 | @click="changeColor('#C0FAFE')" | 163 | @click="changeColor('#C0FAFE')" |
164 | ></a> | 164 | ></a> |
165 | </li> | 165 | </li> |
166 | <li> | 166 | <li> |
167 | <a | 167 | <a |
168 | href="javascript:void(0);" | 168 | href="javascript:void(0);" |
169 | id="#FFDBDC" | 169 | id="#FFDBDC" |
170 | class="cosmos" | 170 | class="cosmos" |
171 | @click="changeColor('#FFDBDC')" | 171 | @click="changeColor('#FFDBDC')" |
172 | ></a> | 172 | ></a> |
173 | </li> | 173 | </li> |
174 | <li> | 174 | <li> |
175 | <a | 175 | <a |
176 | href="javascript:void(0);" | 176 | href="javascript:void(0);" |
177 | id="#FEE6AC" | 177 | id="#FEE6AC" |
178 | class="cape-Honey" | 178 | class="cape-Honey" |
179 | @click="changeColor('#FEE6AC')" | 179 | @click="changeColor('#FEE6AC')" |
180 | ></a> | 180 | ></a> |
181 | </li> | 181 | </li> |
182 | <li> | 182 | <li> |
183 | <a | 183 | <a |
184 | href="javascript:void(0);" | 184 | href="javascript:void(0);" |
185 | id="#E5DFF0" | 185 | id="#E5DFF0" |
186 | class="snuff" | 186 | class="snuff" |
187 | @click="changeColor('#E5DFF0')" | 187 | @click="changeColor('#E5DFF0')" |
188 | ></a> | 188 | ></a> |
189 | </li> | 189 | </li> |
190 | <li> | 190 | <li> |
191 | <a | 191 | <a |
192 | href="javascript:void(0);" | 192 | href="javascript:void(0);" |
193 | id="#DFE7EF" | 193 | id="#DFE7EF" |
194 | class="catskillWhite" | 194 | class="catskillWhite" |
195 | @click="changeColor('#DFE7EF')" | 195 | @click="changeColor('#DFE7EF')" |
196 | ></a> | 196 | ></a> |
197 | </li> | 197 | </li> |
198 | <li> | 198 | <li> |
199 | <a | 199 | <a |
200 | href="javascript:void(0);" | 200 | href="javascript:void(0);" |
201 | id="#FFF" | 201 | id="#FFF" |
202 | class="white" | 202 | class="white" |
203 | @click="changeColor('#FFF')" | 203 | @click="changeColor('#FFF')" |
204 | ></a> | 204 | ></a> |
205 | </li> | 205 | </li> |
206 | </ul> | 206 | </ul> |
207 | </div> | 207 | </div> |
208 | <div class="col-lg-12 mt-50"> | 208 | <div class="col-lg-12 mt-50"> |
209 | <p class="notifications"> | 209 | <p class="notifications"> |
210 | Recieve notifications when you recieve a comment/ Upvote | 210 | Recieve notifications when you recieve a comment/ Upvote |
211 | </p> | 211 | </p> |
212 | <div class="switch-bt-wrp"> | 212 | <div class="switch-bt-wrp"> |
213 | <label class="switch-btn"> | 213 | <label class="switch-btn"> |
214 | <input type="checkbox" class="toggle-btn" /> | 214 | <input type="checkbox" class="toggle-btn" /> |
215 | <span class="rounded-toggle"></span> | 215 | <span class="rounded-toggle"></span> |
216 | </label> | 216 | </label> |
217 | <span class="onoff">on/off</span> | 217 | <span class="onoff">on/off</span> |
218 | </div> | 218 | </div> |
219 | </div> | 219 | </div> |
220 | <div class="col-lg-12"> | 220 | <div class="col-lg-12"> |
221 | <p class="add-socail-ch"> | 221 | <p class="add-socail-ch"> |
222 | Add your social Channels <span></span> | 222 | Add your social Channels <span></span> |
223 | </p> | 223 | </p> |
224 | </div> | 224 | </div> |
225 | <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> | 225 | <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> |
226 | <div class="form-group floating-label"> | 226 | <div class="form-group floating-label"> |
227 | <select class="form-group"> | 227 | <select class="form-group"> |
228 | <option value="Facebook">Facebook</option> | 228 | <option value="Facebook">Facebook</option> |
229 | </select> | 229 | </select> |
230 | <span class="select-arrow" | 230 | <span class="select-arrow" |
231 | ><img src="../assets/images/chevron-down.svg" | 231 | ><img src="../assets/images/chevron-down.svg" |
232 | /></span> | 232 | /></span> |
233 | </div> | 233 | </div> |
234 | </div> | 234 | </div> |
235 | <!-- input --> | 235 | <!-- input --> |
236 | <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8"> | 236 | <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8"> |
237 | <div class="form-group floating-label"> | 237 | <div class="form-group floating-label"> |
238 | <input | 238 | <input |
239 | type="text" | 239 | type="text" |
240 | class="form-control" | 240 | class="form-control" |
241 | value="" | 241 | value="" |
242 | placeholder="Paste your profile URL here" | 242 | placeholder="Paste your profile URL here" |
243 | id="" | 243 | id="" |
244 | v-model="userData.socialMediaProfiles.facebook" | 244 | v-model="userData.socialMediaProfiles.facebook" |
245 | /> | 245 | /> |
246 | </div> | 246 | </div> |
247 | </div> | 247 | </div> |
248 | <!-- input --> | 248 | <!-- input --> |
249 | <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> | 249 | <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> |
250 | <div class="form-group floating-label"> | 250 | <div class="form-group floating-label"> |
251 | <select class="form-group"> | 251 | <select class="form-group"> |
252 | <option value="Linkedin">Linkedin</option> | 252 | <option value="Linkedin">Linkedin</option> |
253 | </select> | 253 | </select> |
254 | <span class="select-arrow" | 254 | <span class="select-arrow" |
255 | ><img src="../assets/images/chevron-down.svg" | 255 | ><img src="../assets/images/chevron-down.svg" |
256 | /></span> | 256 | /></span> |
257 | </div> | 257 | </div> |
258 | </div> | 258 | </div> |
259 | <!-- input --> | 259 | <!-- input --> |
260 | <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8"> | 260 | <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8"> |
261 | <div class="form-group floating-label"> | 261 | <div class="form-group floating-label"> |
262 | <input | 262 | <input |
263 | type="text" | 263 | type="text" |
264 | class="form-control" | 264 | class="form-control" |
265 | value="" | 265 | value="" |
266 | placeholder="Paste your profile URL here" | 266 | placeholder="Paste your profile URL here" |
267 | id="" | 267 | id="" |
268 | v-model="userData.socialMediaProfiles.linkedin" | 268 | v-model="userData.socialMediaProfiles.linkedin" |
269 | /> | 269 | /> |
270 | </div> | 270 | </div> |
271 | </div> | 271 | </div> |
272 | <!-- input --> | 272 | <!-- input --> |
273 | 273 | ||
274 | <!-- input --> | 274 | <!-- input --> |
275 | <!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> | 275 | <!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> |
276 | <div class="form-group floating-label"> | 276 | <div class="form-group floating-label"> |
277 | <select class="form-group"> | 277 | <select class="form-group"> |
278 | <option @click="addSocialLink">Add another</option> | 278 | <option @click="addSocialLink">Add another</option> |
279 | </select> | 279 | </select> |
280 | <span class="select-arrow" | 280 | <span class="select-arrow" |
281 | ><img src="../assets/images/chevron-down.svg" | 281 | ><img src="../assets/images/chevron-down.svg" |
282 | /></span> | 282 | /></span> |
283 | </div> | 283 | </div> |
284 | </div> --> | 284 | </div> --> |
285 | <!-- input --> | 285 | <!-- input --> |
286 | </div> | 286 | </div> |
287 | <a href="javascript:void(0);" @click="saveProfile" class="next-bt" | 287 | <a href="javascript:void(0);" @click="saveProfile" class="next-bt" |
288 | >Save</a | 288 | >Save</a |
289 | > | 289 | > |
290 | </form> | 290 | </form> |
291 | </div> | 291 | </div> |
292 | <div class="clearfix"></div> | 292 | <div class="clearfix"></div> |
293 | </div> | 293 | </div> |
294 | <!-- add profile --> | 294 | <!-- add profile --> |
295 | </div> | 295 | </div> |
296 | <!-- profile --> | 296 | <!-- profile --> |
297 | <div class="container-fluid inner-wrp"> | 297 | <div class="container-fluid inner-wrp"> |
298 | <nav class="navbar navbar-expand-sm spotLight-nav"> | 298 | <nav class="navbar navbar-expand-sm spotLight-nav"> |
299 | <a class="navbar-brand" href="javasript:void(0);" | 299 | <a class="navbar-brand" href="javasript:void(0);" |
300 | ><img src="../assets/images/logo.png" | 300 | ><img src="../assets/images/logo.png" |
301 | /></a> | 301 | /></a> |
302 | <button | 302 | <button |
303 | class="navbar-toggler" | 303 | class="navbar-toggler" |
304 | type="button" | 304 | type="button" |
305 | data-toggle="collapse" | 305 | data-toggle="collapse" |
306 | data-target="#navbarsExample03" | 306 | data-target="#navbarsExample03" |
307 | aria-controls="navbarsExample03" | 307 | aria-controls="navbarsExample03" |
308 | aria-expanded="false" | 308 | aria-expanded="false" |
309 | aria-label="Toggle navigation" | 309 | aria-label="Toggle navigation" |
310 | > | 310 | > |
311 | <span class="navbar-toggler-icon"></span> | 311 | <span class="navbar-toggler-icon"></span> |
312 | <span class="navbar-toggler-icon"></span> | 312 | <span class="navbar-toggler-icon"></span> |
313 | <span class="navbar-toggler-icon"></span> | 313 | <span class="navbar-toggler-icon"></span> |
314 | </button> | 314 | </button> |
315 | 315 | ||
316 | <div class="collapse navbar-collapse" id="navbarsExample03"> | 316 | <div class="collapse navbar-collapse" id="navbarsExample03"> |
317 | <ul class="navbar-nav mr-auto"> | 317 | <ul class="navbar-nav mr-auto"> |
318 | <li class="nav-item active"> | 318 | <li class="nav-item active"> |
319 | <a class="nav-link" href="javasript:void(0);">About</a> | 319 | <a class="nav-link" href="javasript:void(0);">About</a> |
320 | </li> | 320 | </li> |
321 | <li class="nav-item"> | 321 | <li class="nav-item"> |
322 | <a class="nav-link" href="javasript:void(0);">Masterclass</a> | 322 | <a class="nav-link" href="javasript:void(0);">Masterclass</a> |
323 | </li> | 323 | </li> |
324 | <li class="nav-item"> | 324 | <li class="nav-item"> |
325 | <a class="nav-link" href="javasript:void(0);">Stories</a> | 325 | <a class="nav-link" href="javasript:void(0);">Stories</a> |
326 | </li> | 326 | </li> |
327 | <li class="nav-item"> | 327 | <li class="nav-item"> |
328 | <a class="nav-link" href="javasript:void(0);">Library</a> | 328 | <a class="nav-link" href="javasript:void(0);">Library</a> |
329 | </li> | 329 | </li> |
330 | </ul> | 330 | </ul> |
331 | </div> | 331 | </div> |
332 | <a href="javasript:void(0);" @click="addProfileDialog" class="update_profile"><span></span> Update Profile</a> | 332 | <a href="javasript:void(0);" @click="addProfileDialog" class="update_profile"><span></span> Update Profile</a> |
333 | <div class=""> | 333 | <div class=""> |
334 | 334 | ||
335 | <a href="javascript:void(0);" class="user-profile-photo common_color" @click="userprofileshowDialog"><img :src="userData.profilePic" /></a> | 335 | <a href="javascript:void(0);" class="user-profile-photo common_color" @click="userprofileshowDialog"><img :src="userData.profilePic" /></a> |
336 | <div class="sub-menu-user" id="userprofileshow" style="display: none"> | 336 | <div class="sub-menu-user" id="userprofileshow" style="display: none"> |
337 | <ul> | 337 | <ul> |
338 | <li> | 338 | <li> |
339 | <a href="javascript:void(0);" @click="addProfileDialog" | 339 | <a href="javascript:void(0);" @click="addProfileDialog" |
340 | >Edit Profile</a | 340 | >Edit Profile</a |
341 | > | 341 | > |
342 | </li> | 342 | </li> |
343 | <li><a href="javascript:void(0);" @click="logout">Log Out</a></li> | 343 | <li><a href="javascript:void(0);" @click="logout">Log Out</a></li> |
344 | </ul> | 344 | </ul> |
345 | </div> | 345 | </div> |
346 | </div> | 346 | </div> |
347 | </nav> | 347 | </nav> |
348 | <!-- menu wrapper --> | 348 | <!-- menu wrapper --> |
349 | <div class="row profile-tab-spc-top"> | 349 | <div class="row profile-tab-spc-top"> |
350 | <div class="col-sm-8 col-md-12 col-lg-8 col-xl-8"> | 350 | <div class="col-sm-8 col-md-12 col-lg-8 col-xl-8"> |
351 | <div class="inner-profile-ps common_color"> | 351 | <div class="inner-profile-ps common_color"> |
352 | <img :src="userData.profilePic" class="" /> | 352 | <img :src="userData.profilePic" class="" /> |
353 | </div> | 353 | </div> |
354 | <!-- user profile --> | 354 | <!-- user profile --> |
355 | 355 | ||
356 | <div class="user-profile"> | 356 | <div class="user-profile"> |
357 | <h1> | 357 | <h1> |
358 | {{ userData.firstName }} {{ userData.lastName }} | 358 | {{ userData.firstName }} {{ userData.lastName }} |
359 | <a href="javasript:void(0);" class="tags no-cursor">{{ userData.role }}</a> | 359 | <a href="javasript:void(0);" class="tags no-cursor">{{ userData.role }}</a> |
360 | </h1> | 360 | </h1> |
361 | <ul class="joined-info"> | 361 | <ul class="joined-info"> |
362 | <li> | 362 | <li> |
363 | <a href="javascript:void(0);" v-if="userData.designation.length == 0 && userData.organisation.length == 0" @click="addProfileDialog" | 363 | <a href="javascript:void(0);" v-if="userData.designation.length == 0 && userData.organisation.length == 0" @click="addProfileDialog" |
364 | >Add your work</a | 364 | >Add your work</a |
365 | > | 365 | > |
366 | <a href="javascript:void(0);" v-if="userData.designation.length != 0" | 366 | <a href="javascript:void(0);" v-if="userData.designation.length != 0" |
367 | >{{userData.designation}}</a | 367 | >{{userData.designation}}</a |
368 | > | 368 | > |
369 | <a href="javascript:void(0);" v-if="userData.designation.length != 0 && userData.organisation.length != 0" | 369 | <a href="javascript:void(0);" v-if="userData.designation.length != 0 && userData.organisation.length != 0" |
370 | >at</a | 370 | >at</a |
371 | > | 371 | > |
372 | <a href="javascript:void(0);" v-if="userData.organisation.length != 0" | 372 | <a href="javascript:void(0);" v-if="userData.organisation.length != 0" |
373 | >{{userData.organisation}}</a | 373 | >{{userData.organisation}}</a |
374 | > | 374 | > |
375 | <img src="../assets/images/u-info-icon.png" /> <span></span> | 375 | <img src="../assets/images/u-info-icon.png" /> <span></span> |
376 | </li> | 376 | </li> |
377 | <li> | 377 | <li> |
378 | <a href="javasript:void(0);" content="Karma Points" v-tippy> {{ userData.karmaPoints }} Karma</a> <span></span> | 378 | <a href="javasript:void(0);" content="Karma Points" v-tippy> {{ userData.karmaPoints }} Karma</a> <span></span> |
379 | </li> | 379 | </li> |
380 | <li> | 380 | <li> |
381 | <a href="javasript:void(0);" | 381 | <a href="javasript:void(0);" |
382 | class="no-cursor">Joined on | 382 | class="no-cursor">Joined on |
383 | {{ moment(userData.createdAt).format("MMM YYYY") }}</a | 383 | {{ moment(userData.createdAt).format("MMM YYYY") }}</a |
384 | > | 384 | > |
385 | </li> | 385 | </li> |
386 | </ul> | 386 | </ul> |
387 | <p>{{ userData.bio }}</p> | 387 | <p>{{ userData.bio }}</p> |
388 | </div> | 388 | </div> |
389 | </div> | 389 | </div> |
390 | <!-- user profile --> | 390 | <!-- user profile --> |
391 | <div class="col-sm-4 col-md-12 col-lg-4 col-xl-4"> | 391 | <div class="col-sm-4 col-md-12 col-lg-4 col-xl-4"> |
392 | <div class="list-style-group" v-if="userData.awards"> | 392 | <div class="list-style-group" v-if="userData.awards"> |
393 | <p>Awards</p> | 393 | <p>Awards</p> |
394 | <ul class="list-style"> | 394 | <ul class="list-style"> |
395 | <li> | 395 | <li> |
396 | <a href="javascript:void(0);" | 396 | <a href="javascript:void(0);" |
397 | ><img src="../assets/images/icon-1.png" | 397 | ><img src="../assets/images/icon-1.png" |
398 | /></a> | 398 | /></a> |
399 | </li> | 399 | </li> |
400 | </ul> | 400 | </ul> |
401 | </div> | 401 | </div> |
402 | <!-- list style --> | 402 | <!-- list style --> |
403 | </div> | 403 | </div> |
404 | </div> | 404 | </div> |
405 | <div class="clearfix"></div> | 405 | <div class="clearfix"></div> |
406 | <div class="row top-brd profile-tab-spc-top"> | 406 | <div class="row top-brd profile-tab-spc-top"> |
407 | <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8"> | 407 | <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8"> |
408 | <ul class="profile-tab"> | 408 | <ul class="profile-tab"> |
409 | <li class="active c-0"> | 409 | <li class="active c-0"> |
410 | <a href="javascript:void(0);" @click="caseDialog" | 410 | <a href="javascript:void(0);" @click="caseDialog" |
411 | >Case-studies({{ caseStudies.length }})</a | 411 | >Case-studies({{ caseStudies.length }})</a |
412 | > | 412 | > |
413 | </li> | 413 | </li> |
414 | <li class="rp-all"> | 414 | <li class="rp-all"> |
415 | <a href="javascript:void(0);" @click="repliesDialog" | 415 | <a href="javascript:void(0);" @click="repliesDialog" |
416 | >Comments/Replies(0)</a | 416 | >Comments/Replies(0)</a |
417 | > | 417 | > |
418 | </li> | 418 | </li> |
419 | </ul> | 419 | </ul> |
420 | </div> | 420 | </div> |
421 | <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> | 421 | <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"> |
422 | <ul class="social-connects"> | 422 | <ul class="social-connects"> |
423 | <li><span>Follow</span></li> | 423 | <li><span>Follow</span></li> |
424 | <li> | 424 | <li> |
425 | <a | 425 | <a |
426 | href="javascript:void(0);" | 426 | href="javascript:void(0);" |
427 | @click="addProfileDialog" | 427 | @click="addProfileDialog" |
428 | class="active" | 428 | class="active" |
429 | ><img src="../assets/images/plus.png" | 429 | ><img src="../assets/images/plus.png" |
430 | /></a> | 430 | /></a> |
431 | <span class="connect-social-channel" | 431 | <span class="connect-social-channel" |
432 | >Connect your social channels</span | 432 | >Connect your social channels</span |
433 | > | 433 | > |
434 | </li> | 434 | </li> |
435 | </ul> | 435 | </ul> |
436 | </div> | 436 | </div> |
437 | </div> | 437 | </div> |
438 | <!-- tab style --> | 438 | <!-- tab style --> |
439 | <div class="profile-data-wrp"> | 439 | <div class="profile-data-wrp"> |
440 | <div class="container-fluid data-wrp" id="case-study-0"> | 440 | <div class="container-fluid data-wrp" id="case-study-0"> |
441 | <div class="row" v-if="caseStudies.length == 0"> | 441 | <div class="row" v-if="caseStudies.length == 0"> |
442 | <div class="col-6 col-lg-6"> | 442 | <div class="col-6 col-lg-6"> |
443 | <div class="full-w-height-profile ex-light seats_bg" > | 443 | <div class="full-w-height-profile ex-light seats_bg" > |
444 | <a href="javasript:void(0);" class="profile-md-bt center-and-spc bt-spc-top" @click="openUrl('https://www.productgrowth.org/spotlight')">Explore Spotlights</a> | 444 | <a href="javasript:void(0);" class="profile-md-bt center-and-spc bt-spc-top" @click="openUrl('https://www.productgrowth.org/spotlight')">Explore Spotlights</a> |
445 | <p>Explore the spotlights others has put together</p> | 445 | <p>Explore the spotlights others has put together</p> |
446 | </div><!-- full width --> | 446 | </div><!-- full width --> |
447 | </div><!-- col 6 --> | 447 | </div><!-- col 6 --> |
448 | <div class="col-6 col-lg-6"> | 448 | <div class="col-6 col-lg-6"> |
449 | <div class="full-w-height-profile ex-light spotlight_bg"> | 449 | <div class="full-w-height-profile ex-light spotlight_bg"> |
450 | <img src="../assets/images/add-role.svg" class="add-role" /> | 450 | <img src="../assets/images/add-role.svg" class="add-role" /> |
451 | <div class="clearfix"></div><!-- clearfix --> | 451 | <div class="clearfix"></div><!-- clearfix --> |
452 | <a href="javasript:void(0);" class="profile-md-bt center-and-spc" @click="openUrl('https://www.productgrowth.org/spotlight#typeform-spotlight')">Publish Spotlight</a> | 452 | <a href="javasript:void(0);" class="profile-md-bt center-and-spc" @click="openUrl('https://www.productgrowth.org/spotlight#typeform-spotlight')">Publish Spotlight</a> |
453 | <p>Share your own insights through Spotlight</p> | 453 | <p>Share your own insights through Spotlight</p> |
454 | </div><!-- full width --> | 454 | </div><!-- full width --> |
455 | </div><!-- col 6 --> | 455 | </div><!-- col 6 --> |
456 | 456 | ||
457 | </div> | 457 | </div> |
458 | 458 | ||
459 | <div class="profile-data-wrp" v-if="caseStudies.length != 0"> | 459 | <div class="profile-data-wrp" v-if="caseStudies.length != 0"> |
460 | <div class="container-fluid data-wrp"> | 460 | <div class="container-fluid data-wrp"> |
461 | <div class="row"> | 461 | <div class="row"> |
462 | <div class="" v-for="(study, i) in caseStudies" :key="i"> | 462 | <div class="" v-for="(study, i) in caseStudies" :key="i"> |
463 | <div class="card-warpper" @click="openStudy(study)"> | 463 | <div class="card-warpper" @click="openStudy(study)"> |
464 | <div class="company-detail"> | 464 | <div class="company-detail"> |
465 | <div class="c-logo"> | 465 | <div class="c-logo"> |
466 | <!-- <img src="../assets/images/image 46.png" /> --> | 466 | <!-- <img src="../assets/images/image 46.png" /> --> |
467 | <img :src="study.intro.logoURL" /> | 467 | <img :src="study.intro.logoURL" /> |
468 | </div> | 468 | </div> |
469 | <div class="c-tag"> | 469 | <div class="c-tag"> |
470 | <img src="../assets/images/retake-blue.svg" v-if="study.intro.type == 'Retake'"/> | 470 | <img src="../assets/images/retake-blue.svg" v-if="study.intro.type == 'Retake'"/> |
471 | <img src="../assets/images/behind-blue.svg" v-if="study.intro.type == 'Behind-the-scenes'"/> | 471 | <img src="../assets/images/behind-blue.svg" v-if="study.intro.type == 'Behind-the-scenes'"/> |
472 | <img src="../assets/images/critique-blue.svg" v-if="study.intro.type == 'Critique'"/> | 472 | <img src="../assets/images/critique-blue.svg" v-if="study.intro.type == 'Critique'"/> |
473 | <img src="../assets/images/juxtapose-blue.svg" v-if="study.intro.type == 'Juxtapose'"/> | 473 | <img src="../assets/images/juxtapose-blue.svg" v-if="study.intro.type == 'Juxtapose'"/> |
474 | </div> | 474 | </div> |
475 | </div> | 475 | </div> |
476 | <!-- company detail--> | 476 | <!-- company detail--> |
477 | <h1>{{ study.intro.name }}</h1> | 477 | <h1>{{ study.intro.name }}</h1> |
478 | <div class="u-detail"> | 478 | <div class="u-detail"> |
479 | <img src="../assets/images/user-2.png" /> | 479 | <img src="../assets/images/user-2.png" /> |
480 | <h2 v-for="(name, j) in study.intro.authors" :key="j"> | 480 | <h2 v-for="(name, j) in study.intro.authors" :key="j"> |
481 | {{ name }} | 481 | {{ name }} |
482 | </h2> | 482 | </h2> |
483 | </div> | 483 | </div> |
484 | <!-- user detail --> | 484 | <!-- user detail --> |
485 | <p> | 485 | <p> |
486 | <span v-for="(area, j) in study.focusAreas" :key="j"> | 486 | <span v-for="(area, j) in study.focusAreas" :key="j"> |
487 | {{ area }} | 487 | {{ area }} |
488 | </span> | 488 | </span> |
489 | </p> | 489 | </p> |
490 | <ul class="tags-list" > | 490 | <ul class="tags-list" > |
491 | <li v-for="(tags, j) in study.insightTags" :key="j"> | 491 | <li v-for="(tags, j) in study.insightTags" :key="j"> |
492 | <a href="javasript:void(0);" class="insight-design" v-if="tags == 'Design'" >Design</a> | 492 | <a href="javasript:void(0);" class="insight-design" v-if="tags == 'Design'" >Design</a> |
493 | <a href="javasript:void(0);" class="insight-product" v-if="tags == 'Product'">Product</a> | 493 | <a href="javasript:void(0);" class="insight-product" v-if="tags == 'Product'">Product</a> |
494 | <a href="javasript:void(0);" class="insight-marketing" v-if="tags == 'Marketing'">Marketing</a> | 494 | <a href="javasript:void(0);" class="insight-marketing" v-if="tags == 'Marketing'">Marketing</a> |
495 | <a href="javasript:void(0);" class="insight-pricing" v-if="tags == 'Pricing'">Pricing</a> | 495 | <a href="javasript:void(0);" class="insight-pricing" v-if="tags == 'Pricing'">Pricing</a> |
496 | <a href="javasript:void(0);" class="insight-psychology" v-if="tags == 'Psychology'">Psychology</a> | 496 | <a href="javasript:void(0);" class="insight-psychology" v-if="tags == 'Psychology'">Psychology</a> |
497 | </li> | 497 | </li> |
498 | <!-- <li><a href="javasript:void(0);" class="rose-bud">Marketing</a></li> | 498 | <!-- <li><a href="javasript:void(0);" class="rose-bud">Marketing</a></li> |
499 | <li><a href="javasript:void(0);" class="pattens-blue">Product</a></li> --> | 499 | <li><a href="javasript:void(0);" class="pattens-blue">Product</a></li> --> |
500 | </ul> | 500 | </ul> |
501 | <div class="clearfix"></div> | 501 | <div class="clearfix"></div> |
502 | </div> | 502 | </div> |
503 | <!-- card wrpper --> | 503 | <!-- card wrpper --> |
504 | <!-- card wrpper --> | 504 | <!-- card wrpper --> |
505 | </div> | 505 | </div> |
506 | <!-- all card wrpper --> | 506 | <!-- all card wrpper --> |
507 | </div> | 507 | </div> |
508 | </div> | 508 | </div> |
509 | </div> | 509 | </div> |
510 | <!-- data wrp --> | 510 | <!-- data wrp --> |
511 | </div> | 511 | </div> |
512 | <!-- case study 0 --> | 512 | <!-- case study 0 --> |
513 | <div | 513 | <div |
514 | class="container-fluid data-wrp" | 514 | class="container-fluid data-wrp" |
515 | id="all-replies" | 515 | id="all-replies" |
516 | style="display: none" | 516 | style="display: none" |
517 | > | 517 | > |
518 | <div class="row"> | 518 | <div class="row"> |
519 | <div class="replies col-md-12"> | 519 | <div class="replies col-md-12"> |
520 | <div class="replies-wrp"> | 520 | <div class="replies-wrp"> |
521 | <!-- <h1>PhonePe vs GooglePay <span>Critique</span></h1> | 521 | <!-- <h1>PhonePe vs GooglePay <span>Critique</span></h1> |
522 | <ul class="joined-info"> | 522 | <ul class="joined-info"> |
523 | <li><a href="javasript:void(0);">37D</a> <span></span></li> | 523 | <li><a href="javasript:void(0);">37D</a> <span></span></li> |
524 | <li><img src="../assets/images/heart.png" /></li> | 524 | <li><img src="../assets/images/heart.png" /></li> |
525 | <li><a href="javasript:void(0);"> 4</a></li> | 525 | <li><a href="javasript:void(0);"> 4</a></li> |
526 | <li class="comment-spc"> | 526 | <li class="comment-spc"> |
527 | <img src="../assets/images/comment.svg" /> | 527 | <img src="../assets/images/comment.svg" /> |
528 | </li> | 528 | </li> |
529 | <li><a href="javasript:void(0);"> 6</a></li> | 529 | <li><a href="javasript:void(0);"> 6</a></li> |
530 | </ul> | 530 | </ul> |
531 | <p> | 531 | <p> |
532 | I wonder what the difference between โ<strong> | 532 | I wonder what the difference between โ<strong> |
533 | Assistant</strong | 533 | Assistant</strong |
534 | >โ and โ<strong>Pickup and Drop</strong>โ are. If they are the | 534 | >โ and โ<strong>Pickup and Drop</strong>โ are. If they are the |
535 | same, there are two โcall to actionsโ for the same workflow | 535 | same, there are two โcall to actionsโ for the same workflow |
536 | </p> --> | 536 | </p> --> |
537 | </div> | 537 | </div> |
538 | <!-- replies wrapper --> | 538 | <!-- replies wrapper --> |
539 | </div> | 539 | </div> |
540 | <!-- all card wrpper --> | 540 | <!-- all card wrpper --> |
541 | </div> | 541 | </div> |
542 | </div> | 542 | </div> |
543 | <!-- all Relpies --> | 543 | <!-- all Relpies --> |
544 | </div> | 544 | </div> |
545 | <!-- data wrp --> | 545 | <!-- data wrp --> |
546 | <!-- body wrapper --> | 546 | <!-- body wrapper --> |
547 | </div> | 547 | </div> |
548 | </main> | 548 | </main> |
549 | </template> | 549 | </template> |
550 | 550 | ||
551 | <script> | 551 | <script> |
552 | import Vue from "vue"; | 552 | import Vue from "vue"; |
553 | import router from "../router"; | 553 | import router from "../router"; |
554 | import $ from "jquery"; | 554 | import $ from "jquery"; |
555 | import axios from "axios"; | 555 | import axios from "axios"; |
556 | 556 | ||
557 | export default { | 557 | export default { |
558 | name: "Profile", | 558 | name: "Profile", |
559 | 559 | ||
560 | data() { | 560 | data() { |
561 | return { | 561 | return { |
562 | loggedinFlag: false, | 562 | loggedinFlag: false, |
563 | usertoken: null, | 563 | usertoken: null, |
564 | userData: {}, | 564 | userData: {}, |
565 | caseStudies: [], | 565 | caseStudies: [], |
566 | interestName: null, | 566 | interestName: null, |
567 | oldId: null, | 567 | oldId: null, |
568 | socialLink: null, | 568 | socialLink: null, |
569 | currentSocialLinkName: null, | 569 | currentSocialLinkName: null, |
570 | }; | 570 | }; |
571 | }, | 571 | }, |
572 | mounted() { | 572 | mounted() { |
573 | this.userData = {}; | 573 | this.userData = {}; |
574 | this.socialLink = []; | 574 | this.socialLink = []; |
575 | this.userData.interests = []; | 575 | this.userData.interests = []; |
576 | this.userData.socialMediaProfiles = {}; | 576 | this.userData.socialMediaProfiles = {}; |
577 | this.userData.designation = ""; | 577 | this.userData.designation = ""; |
578 | this.userData.organisation = ""; | 578 | this.userData.organisation = ""; |
579 | this.userData.socialMediaProfiles.facebook = null; | 579 | this.userData.socialMediaProfiles.facebook = null; |
580 | this.userData.socialMediaProfiles.linkedin = null; | 580 | this.userData.socialMediaProfiles.linkedin = null; |
581 | var userdata = localStorage.getItem("spotlight_usertoken"); | 581 | var userdata = localStorage.getItem("spotlight_usertoken"); |
582 | if (userdata) { | 582 | if (userdata) { |
583 | userdata = JSON.parse(userdata); | 583 | userdata = JSON.parse(userdata); |
584 | this.usertoken = userdata.token; | 584 | this.usertoken = userdata.token; |
585 | this.getProfile(); | 585 | this.getProfile(); |
586 | this.getCaseStudies(); | 586 | this.getCaseStudies(); |
587 | } | 587 | } |
588 | }, | 588 | }, |
589 | methods: { | 589 | methods: { |
590 | goToSignUp() { | 590 | goToSignUp() { |
591 | this.$router.push("/signup"); | 591 | this.$router.push("/signup"); |
592 | }, | 592 | }, |
593 | goToReset() { | 593 | goToReset() { |
594 | this.$router.push("/reset"); | 594 | this.$router.push("/reset"); |
595 | }, | 595 | }, |
596 | logout() { | 596 | logout() { |
597 | this.$router.push("/"); | 597 | this.$router.push("/"); |
598 | }, | 598 | }, |
599 | addSocialLink(obj) { | 599 | addSocialLink(obj) { |
600 | this.socialLink.push(); | 600 | this.socialLink.push(); |
601 | }, | 601 | }, |
602 | addInterest() { | 602 | addInterest() { |
603 | console.log(this.userData.interests.length, "called", this.interestName); | 603 | console.log(this.userData.interests.length, "called", this.interestName); |
604 | if (this.userData.interests.length <= 2) { | 604 | if (this.userData.interests.length <= 2) { |
605 | this.userData.interests.push(this.interestName); | 605 | this.userData.interests.push(this.interestName); |
606 | this.interestName = null; | 606 | this.interestName = null; |
607 | } else { | 607 | } else { |
608 | this.$toaster.info("Only 3 interest are allowed"); | 608 | this.$toaster.info("Only 3 interest are allowed"); |
609 | } | 609 | } |
610 | }, | 610 | }, |
611 | removeInterest(i) { | 611 | removeInterest(i) { |
612 | this.userData.interests.splice(i, 1); | 612 | this.userData.interests.splice(i, 1); |
613 | }, | 613 | }, |
614 | assignClass() { | 614 | assignClass() { |
615 | var element = document.getElementById(this.userData.bgColor); | 615 | var element = document.getElementById(this.userData.bgColor); |
616 | element.classList.add("active"); | 616 | element.classList.add("active"); |
617 | var cols = document.getElementsByClassName("common_color"); | 617 | var cols = document.getElementsByClassName("common_color"); |
618 | for (var i = 0; i < cols.length; i++) { | 618 | for (var i = 0; i < cols.length; i++) { |
619 | cols[i].style.backgroundColor = this.userData.bgColor; | 619 | cols[i].style.backgroundColor = this.userData.bgColor; |
620 | } | 620 | } |
621 | }, | 621 | }, |
622 | changeColor(clr) { | 622 | changeColor(clr) { |
623 | console.log(this.oldId, "clr", clr); | 623 | console.log(this.oldId, "clr", clr); |
624 | var element = document.getElementById(clr); | 624 | var element = document.getElementById(clr); |
625 | element.classList.add("active"); | 625 | element.classList.add("active"); |
626 | var removeelement = document.getElementById(this.oldId); | 626 | var removeelement = document.getElementById(this.oldId); |
627 | removeelement.classList.remove("active"); | 627 | removeelement.classList.remove("active"); |
628 | this.oldId = clr; | 628 | this.oldId = clr; |
629 | var cols = document.getElementsByClassName("common_color"); | 629 | var cols = document.getElementsByClassName("common_color"); |
630 | for (var i = 0; i < cols.length; i++) { | 630 | for (var i = 0; i < cols.length; i++) { |
631 | cols[i].style.backgroundColor = clr; | 631 | cols[i].style.backgroundColor = clr; |
632 | } | 632 | } |
633 | this.userData.bgColor = clr; | 633 | this.userData.bgColor = clr; |
634 | }, | 634 | }, |
635 | getProfile() { | 635 | getProfile() { |
636 | axios | 636 | axios |
637 | .get("/profile", { | 637 | .get("/profile", { |
638 | headers: { | 638 | headers: { |
639 | Authorization: "Bearer " + this.usertoken, | 639 | Authorization: "Bearer " + this.usertoken, |
640 | }, | 640 | }, |
641 | }) | 641 | }) |
642 | .then((response) => { | 642 | .then((response) => { |
643 | this.userData = response.data.data; | 643 | this.userData = Object.assign(this.userData, response.data.data) |
644 | // this.userData = response.data.data; | ||
644 | if (!this.userData.socialMediaProfiles) { | 645 | if (!this.userData.socialMediaProfiles) { |
645 | this.userData.socialMediaProfiles = {}; | 646 | this.userData.socialMediaProfiles = {}; |
646 | } | 647 | } |
647 | this.oldId = this.userData.bgColor; | 648 | this.oldId = this.userData.bgColor; |
648 | console.log(this.oldId, "this.userData.", this.userData.bgColor); | 649 | console.log(this.oldId, "this.userData.", this.userData); |
649 | 650 | ||
650 | this.assignClass(); | 651 | this.assignClass(); |
651 | console.log(response.data.data); | 652 | console.log(response.data.data); |
652 | }) | 653 | }) |
653 | .catch((error) => console.log(error)); | 654 | .catch((error) => console.log(error)); |
654 | }, | 655 | }, |
655 | getRandomAvatar() { | 656 | getRandomAvatar() { |
656 | axios | 657 | axios |
657 | .get("/randomAvatar", { | 658 | .get("/randomAvatar", { |
658 | headers: { | 659 | headers: { |
659 | Authorization: "Bearer " + this.usertoken, | 660 | Authorization: "Bearer " + this.usertoken, |
660 | }, | 661 | }, |
661 | }) | 662 | }) |
662 | .then((response) => { | 663 | .then((response) => { |
663 | this.userData.profilePic = response.data.imageURL; | 664 | this.userData.profilePic = response.data.imageURL; |
664 | console.log(response.data.imageURL); | 665 | console.log(response.data.imageURL); |
665 | }) | 666 | }) |
666 | .catch((error) => console.log(error)); | 667 | .catch((error) => console.log(error)); |
667 | }, | 668 | }, |
668 | getCaseStudies() { | 669 | getCaseStudies() { |
669 | axios | 670 | axios |
670 | .get("/caseStudy/all", { | 671 | .get("/caseStudy/all", { |
671 | headers: { | 672 | headers: { |
672 | Authorization: "Bearer " + this.usertoken, | 673 | Authorization: "Bearer " + this.usertoken, |
673 | }, | 674 | }, |
674 | }) | 675 | }) |
675 | .then((response) => { | 676 | .then((response) => { |
676 | console.log(response.data.data.caseStudies); | 677 | console.log(response.data.data.caseStudies); |
677 | this.caseStudies = response.data.data.caseStudies; | 678 | this.caseStudies = response.data.data.caseStudies; |
678 | }) | 679 | }) |
679 | .catch((error) => console.log(error)); | 680 | .catch((error) => console.log(error)); |
680 | }, | 681 | }, |
681 | openStudy(payload) { | 682 | openStudy(payload) { |
682 | console.log("payload-", payload); | 683 | console.log("payload-", payload); |
683 | payload.intro.date = payload.createdAt; | 684 | payload.intro.date = payload.createdAt; |
684 | payload.intro.focusPoint = payload.createdAt; | 685 | payload.intro.focusPoint = payload.createdAt; |
685 | axios | 686 | axios |
686 | .get("/caseStudy/slides?caseStudyId=" + payload._id, { | 687 | .get("/caseStudy/slides?caseStudyId=" + payload._id, { |
687 | headers: { | 688 | headers: { |
688 | Authorization: "Bearer " + this.usertoken, | 689 | Authorization: "Bearer " + this.usertoken, |
689 | }, | 690 | }, |
690 | }) | 691 | }) |
691 | .then((response) => { | 692 | .then((response) => { |
692 | this.createSlide(payload, response.data.data); | 693 | this.createSlide(payload, response.data.data); |
693 | }) | 694 | }) |
694 | .catch((error) => console.log(error)); | 695 | .catch((error) => console.log(error)); |
695 | }, | 696 | }, |
696 | 697 | ||
697 | createSlide(payload, slides) { | 698 | createSlide(payload, slides) { |
698 | var finalSlides = []; | 699 | var finalSlides = []; |
699 | slides.forEach((slides_) => { | 700 | slides.forEach((slides_) => { |
700 | var url = this.assignRoutes(slides_.templateId); | 701 | var url = this.assignRoutes(slides_.templateId); |
701 | var obj = { | 702 | var obj = { |
702 | forward: true, | 703 | forward: true, |
703 | backward: true, | 704 | backward: true, |
704 | ur: url, | 705 | ur: url, |
705 | slideId: slides_._id, | 706 | slideId: slides_._id, |
706 | caseStudyId: slides_.caseStudyId, | 707 | caseStudyId: slides_.caseStudyId, |
707 | payload: { | 708 | payload: { |
708 | metaData: slides_.metaData, | 709 | metaData: slides_.metaData, |
709 | comments: slides_.comments, | 710 | comments: slides_.comments, |
710 | insight: slides_.insight?slides_.insight:null, | 711 | insight: slides_.insight?slides_.insight:null, |
711 | }, | 712 | }, |
712 | }; | 713 | }; |
713 | // slides_ | 714 | // slides_ |
714 | finalSlides.push(obj); | 715 | finalSlides.push(obj); |
715 | }); | 716 | }); |
716 | console.log("payload", payload); | 717 | console.log("payload", payload); |
717 | // add first slide at begining | 718 | // add first slide at begining |
718 | finalSlides.unshift({ | 719 | finalSlides.unshift({ |
719 | forward: true, | 720 | forward: true, |
720 | backward: false, | 721 | backward: false, |
721 | ur: "EpisodeIntro", | 722 | ur: "EpisodeIntro", |
722 | slideId: "INTRO_oqkdMOVDrwRptsdWJ6Ye", | 723 | slideId: "INTRO_oqkdMOVDrwRptsdWJ6Ye", |
723 | caseStudyId: payload._id, | 724 | caseStudyId: payload._id, |
724 | payload: { | 725 | payload: { |
725 | metaData: payload.intro, | 726 | metaData: payload.intro, |
726 | comments: [], | 727 | comments: [], |
727 | }, | 728 | }, |
728 | }); | 729 | }); |
729 | finalSlides.push({ | 730 | finalSlides.push({ |
730 | forward: true, | 731 | forward: true, |
731 | backward: false, | 732 | backward: false, |
732 | ur: "Outro", | 733 | ur: "Outro", |
733 | slideId: "OUTRO_oqkdMOVDrwRptsdWJ6Ye", | 734 | slideId: "OUTRO_oqkdMOVDrwRptsdWJ6Ye", |
734 | caseStudyId: payload._id, | 735 | caseStudyId: payload._id, |
735 | payload: { | 736 | payload: { |
736 | metaData: payload.outro, | 737 | metaData: payload.outro, |
737 | comments: [], | 738 | comments: [], |
738 | }, | 739 | }, |
739 | }); | 740 | }); |
740 | 741 | ||
741 | console.log(finalSlides); | 742 | console.log(finalSlides); |
742 | localStorage.setItem('spotlight_slide'+payload._id, JSON.stringify(finalSlides)) | 743 | localStorage.setItem('spotlight_slide'+payload._id, JSON.stringify(finalSlides)) |
743 | this.$router.push({ | 744 | this.$router.push({ |
744 | name: "EpisodeIntro", | 745 | name: "EpisodeIntro", |
745 | params: { | 746 | params: { |
746 | caseStudyId: finalSlides[0].caseStudyId, | 747 | caseStudyId: finalSlides[0].caseStudyId, |
747 | slideId: finalSlides[0].slideId, | 748 | slideId: finalSlides[0].slideId, |
748 | }, | 749 | }, |
749 | }); | 750 | }); |
750 | }, | 751 | }, |
751 | assignRoutes(tempId) { | 752 | assignRoutes(tempId) { |
752 | // /episode-intro | 753 | // /episode-intro |
753 | // /outro | 754 | // /outro |
754 | var routes = [ | 755 | var routes = [ |
755 | { | 756 | { |
756 | url: "AuthorIntro", | 757 | url: "AuthorIntro", |
757 | tempId: "T1_RoeMG8130Xko1DvhC3Ou", | 758 | tempId: "T1_RoeMG8130Xko1DvhC3Ou", |
758 | }, | 759 | }, |
759 | { | 760 | { |
760 | url: "NoScreenshotSingleAuthor", | 761 | url: "NoScreenshotSingleAuthor", |
761 | tempId: "T2_ROsUOEy3vxsRAiQ72XdI", | 762 | tempId: "T2_ROsUOEy3vxsRAiQ72XdI", |
762 | }, | 763 | }, |
763 | { | 764 | { |
764 | url: "SingleMobileScreenInsightTwo", | 765 | url: "SingleMobileScreenInsightTwo", |
765 | tempId: "T3_cqNIf7tuqL4jyON63dA7", | 766 | tempId: "T3_cqNIf7tuqL4jyON63dA7", |
766 | }, | 767 | }, |
767 | { | 768 | { |
768 | url: "TwoScreenWithoutInsight", | 769 | url: "TwoScreenWithoutInsight", |
769 | tempId: "T4_4QC8W7kIYnJtZ26Jt0Go", | 770 | tempId: "T4_4QC8W7kIYnJtZ26Jt0Go", |
770 | }, | 771 | }, |
771 | { | 772 | { |
772 | url: "noscreenshotSingleautho", | 773 | url: "noscreenshotSingleautho", |
773 | tempId: "T5_za3c3sYgx7bVvtKz5r0e", | 774 | tempId: "T5_za3c3sYgx7bVvtKz5r0e", |
774 | }, | 775 | }, |
775 | { | 776 | { |
776 | url: "SingleMobileScreenInsightOne", | 777 | url: "SingleMobileScreenInsightOne", |
777 | tempId: "T6_za3c3sYgx7bVvtKz5sgf", | 778 | tempId: "T6_za3c3sYgx7bVvtKz5sgf", |
778 | }, | 779 | }, |
779 | { | 780 | { |
780 | url: "TwoScreenWithInsight", | 781 | url: "TwoScreenWithInsight", |
781 | tempId: "T7_za3c3sYgx7bVvtKzasdf", | 782 | tempId: "T7_za3c3sYgx7bVvtKzasdf", |
782 | }, | 783 | }, |
783 | ]; | 784 | ]; |
784 | var i = routes.findIndex((routes_) => routes_.tempId == tempId); | 785 | var i = routes.findIndex((routes_) => routes_.tempId == tempId); |
785 | return routes[i].url; | 786 | return routes[i].url; |
786 | }, | 787 | }, |
787 | saveProfile() { | 788 | saveProfile() { |
788 | var obj = {}; | 789 | var obj = {}; |
789 | this.userData.name = | 790 | this.userData.name = |
790 | this.userData.firstName + " " + this.userData.lastName; | 791 | this.userData.firstName + " " + this.userData.lastName; |
791 | obj = Object.assign(obj, this.userData); | 792 | obj = Object.assign(obj, this.userData); |
792 | // if(!obj.socialMediaProfiles){ | 793 | // if(!obj.socialMediaProfiles){ |
793 | // obj.socialMediaProfiles = {}; | 794 | // obj.socialMediaProfiles = {}; |
794 | // } | 795 | // } |
795 | delete obj.createdAt; | 796 | delete obj.createdAt; |
796 | delete obj.email; | 797 | delete obj.email; |
797 | delete obj.role; | 798 | delete obj.role; |
798 | delete obj.verified; | 799 | delete obj.verified; |
799 | delete obj.updatedAt; | 800 | delete obj.updatedAt; |
800 | delete obj.__v; | 801 | delete obj.__v; |
801 | delete obj._id; | 802 | delete obj._id; |
802 | delete obj.karmaPoints; | 803 | delete obj.karmaPoints; |
803 | delete obj.awards; | 804 | delete obj.awards; |
804 | delete obj.socialLogin; | 805 | delete obj.socialLogin; |
805 | axios | 806 | axios |
806 | .put("/profile", obj, { | 807 | .put("/profile", obj, { |
807 | headers: { | 808 | headers: { |
808 | Authorization: "Bearer " + this.usertoken, | 809 | Authorization: "Bearer " + this.usertoken, |
809 | }, | 810 | }, |
810 | }) | 811 | }) |
811 | .then((response) => { | 812 | .then((response) => { |
812 | // this.userData = response.data.data; | 813 | // this.userData = response.data.data; |
813 | this.$toaster.success("Profile Updated"); | 814 | this.$toaster.success("Profile Updated"); |
814 | this.closeDialog(); | 815 | this.closeDialog(); |
815 | console.log(response.data.data); | 816 | console.log(response.data.data); |
816 | }) | 817 | }) |
817 | .catch((error) => { | 818 | .catch((error) => { |
818 | if (error.response) { | 819 | if (error.response) { |
819 | this.$toaster.error(error.response.data.message); | 820 | this.$toaster.error(error.response.data.message); |
820 | } | 821 | } |
821 | }); | 822 | }); |
822 | }, | 823 | }, |
823 | addProfileDialog() { | 824 | addProfileDialog() { |
824 | $(".inner-wrp").addClass("body-blur"); | 825 | $(".inner-wrp").addClass("body-blur"); |
825 | $("#add-social-links").hide(); | 826 | $("#add-social-links").hide(); |
826 | $(".popup-wrp, #add-profile").show(); | 827 | $(".popup-wrp, #add-profile").show(); |
827 | }, | 828 | }, |
828 | nextProfileDialog() { | 829 | nextProfileDialog() { |
829 | $("#add-profile").hide(); | 830 | $("#add-profile").hide(); |
830 | $("#add-social-links").show(); | 831 | $("#add-social-links").show(); |
831 | this.saveProfile(); | 832 | this.saveProfile(); |
832 | }, | 833 | }, |
833 | closeDialog() { | 834 | closeDialog() { |
834 | $(".popup-wrp").hide(); | 835 | $(".popup-wrp").hide(); |
835 | $(".inner-wrp").removeClass("body-blur"); | 836 | $(".inner-wrp").removeClass("body-blur"); |
836 | // this.saveProfile(); | 837 | // this.saveProfile(); |
837 | }, | 838 | }, |
838 | hideDialog() { | 839 | hideDialog() { |
839 | $(".popup-wrp").hide(); | 840 | $(".popup-wrp").hide(); |
840 | $(".inner-wrp").removeClass("body-blur"); | 841 | $(".inner-wrp").removeClass("body-blur"); |
841 | }, | 842 | }, |
842 | /// | 843 | /// |
843 | caseDialog() { | 844 | caseDialog() { |
844 | $(".rp-all").removeClass("active"); | 845 | $(".rp-all").removeClass("active"); |
845 | $(".c-0").addClass("active"); | 846 | $(".c-0").addClass("active"); |
846 | $("#all-replies").hide(); | 847 | $("#all-replies").hide(); |
847 | $("#case-study-0").show(); | 848 | $("#case-study-0").show(); |
848 | }, | 849 | }, |
849 | repliesDialog() { | 850 | repliesDialog() { |
850 | $(".c-0").removeClass("active"); | 851 | $(".c-0").removeClass("active"); |
851 | $(".rp-all").addClass("active"); | 852 | $(".rp-all").addClass("active"); |
852 | $("#case-study-0").hide(); | 853 | $("#case-study-0").hide(); |
853 | $("#all-replies").show(); | 854 | $("#all-replies").show(); |
854 | }, | 855 | }, |
855 | 856 | ||
856 | userprofileshowDialog() { | 857 | userprofileshowDialog() { |
857 | $("#userprofileshow").toggle(); | 858 | $("#userprofileshow").toggle(); |
858 | }, | 859 | }, |
859 | openUrl(url){ | 860 | openUrl(url){ |
860 | window.open(url); | 861 | window.open(url); |
861 | }, | 862 | }, |
862 | }, | 863 | }, |
863 | }; | 864 | }; |
864 | </script> | 865 | </script> |
865 | <style> | 866 | <style> |
866 | .no-cursor{ | 867 | .no-cursor{ |
867 | cursor: default !important; | 868 | cursor: default !important; |
868 | } | 869 | } |
869 | </style> | 870 | </style> |
870 | 871 |