Blame view

src/components/Profile.vue 30 KB
f06677bfc   Digvijay Singh   profile screen added
1
2
  <template>
    <main class="landing-page">
298fff252   Digvijay Singh   new design added
3
4
      <!-- profile -->
      <div class="popup-wrp" style="display: none">
1620582c6   Digvijay Singh   close dialog
5
        <div class="overlay" @click="hideDialog"></div>
5684145ce   Digvijay Singh   reset password,ot...
6
        <div class="popup-set" id="add-profile" style="display: none">
298fff252   Digvijay Singh   new design added
7
          <div class="popup-header">
5684145ce   Digvijay Singh   reset password,ot...
8
            <div class="user-photo common_color">
7832f2f48   Digvijay Singh   randmise avatar
9
              <img :src="userData.profilePic" />
5684145ce   Digvijay Singh   reset password,ot...
10
11
            </div>
            <!-- header user -->
298fff252   Digvijay Singh   new design added
12
13
            <ul>
              <li>
d0186c77a   Digvijay Singh   changes in ui
14
                <a href="javasript:void(0);"
298fff252   Digvijay Singh   new design added
15
16
17
18
19
20
                  ><img src="../assets/images/replace.svg" /><span
                    >Replace Avatar</span
                  ></a
                >
              </li>
              <li>
d0186c77a   Digvijay Singh   changes in ui
21
                <a href="javasript:void(0);"
7832f2f48   Digvijay Singh   randmise avatar
22
                  @click="getRandomAvatar()"><img src="../assets/images/randomise.svg" /><span
298fff252   Digvijay Singh   new design added
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
                    >Randomise Avatar</span
                  ></a
                >
              </li>
            </ul>
          </div>
          <!-- header -->
          <div class="popup-body">
            <form class="popup-forms">
              <div class="row">
                <div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
                  <div class="form-group floating-label">
                    <input
                      type="text"
                      class="form-control"
5684145ce   Digvijay Singh   reset password,ot...
38
                      v-model="userData.firstName"
298fff252   Digvijay Singh   new design added
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
                      placeholder=" "
                      id="fname"
                    />
                    <label for="fname">First Name</label>
                  </div>
                </div>
                <!-- input -->
                <div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
                  <div class="form-group floating-label">
                    <input
                      type="text"
                      class="form-control"
                      value=""
                      placeholder=" "
                      id="lname"
5684145ce   Digvijay Singh   reset password,ot...
54
                      v-model="userData.lastName"
298fff252   Digvijay Singh   new design added
55
56
57
58
59
60
61
62
63
64
65
                    />
                    <label for="lname" class="lname">Last Name</label>
                  </div>
                </div>
                <!-- input -->
                <div class="col-sm-5 col-md-5 col-lg-5 col-xl-5">
                  <div class="form-group floating-label">
                    <input
                      type="text"
                      class="form-control"
                      value=""
5684145ce   Digvijay Singh   reset password,ot...
66
                      v-model="userData.designation"
298fff252   Digvijay Singh   new design added
67
68
69
70
71
72
73
74
75
76
77
78
                      placeholder=" "
                      id="designation"
                    />
                    <label for="designation">Designation</label>
                  </div>
                </div>
                <!-- input -->
                <div class="col-sm-7 col-md-7 col-lg-7 col-xl-7">
                  <div class="form-group floating-label">
                    <input
                      type="text"
                      class="form-control"
5684145ce   Digvijay Singh   reset password,ot...
79
                      v-model="userData.organisation"
298fff252   Digvijay Singh   new design added
80
                      id="company"
5684145ce   Digvijay Singh   reset password,ot...
81
                      placeholder=" "
298fff252   Digvijay Singh   new design added
82
83
84
85
86
87
88
89
90
91
92
                    />
                    <label for="company">Company</label>
                  </div>
                </div>
                <!-- input -->
                <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12">
                  <div class="form-group floating-label">
                    <textarea
                      type="text"
                      class="form-control"
                      value=""
5684145ce   Digvijay Singh   reset password,ot...
93
                      v-model="userData.bio"
298fff252   Digvijay Singh   new design added
94
                      id="yourself"
5684145ce   Digvijay Singh   reset password,ot...
95
                      placeholder=" "
298fff252   Digvijay Singh   new design added
96
97
98
99
100
101
102
103
104
                    ></textarea>
                    <label for="yourself"
                      >Tell others a little about yourself</label
                    >
                  </div>
                </div>
                <!-- input -->
                <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12">
                  <p class="things">Three things that you talk more about</p>
f06677bfc   Digvijay Singh   profile screen added
105

298fff252   Digvijay Singh   new design added
106
                  <ul class="interests">
5684145ce   Digvijay Singh   reset password,ot...
107
108
109
110
111
112
                    <li v-for="(interest, i) in userData.interests" :key="i">
                      <span>{{ interest }}</span>
                      <a
                        href="javascript:void(0);"
                        @click="removeInterest(i)"
                        class="cat-minus"
24ced0ae7   Gurvinder Singh   new changes files
113
114
115
                        ><img src="../assets/images/minus.svg"
                      /></a>
                    </li>
298fff252   Digvijay Singh   new design added
116
                    <li>
5684145ce   Digvijay Singh   reset password,ot...
117
118
119
                      <input
                        class=""
                        placeholder="Add interest"
196f4eb8f   Digvijay Singh   tooltip added
120
                        v-on:keyup.enter="addInterest" 
5684145ce   Digvijay Singh   reset password,ot...
121
122
123
                        v-model="interestName"
                      />
                      <a href="javascript:void(0);" @click="addInterest()"
298fff252   Digvijay Singh   new design added
124
125
126
127
128
129
130
                        ><img src="../assets/images/plus-circle.svg"
                      /></a>
                    </li>
                  </ul>
                </div>
                <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12">
                  <p class="things">Choose Background color</p>
f06677bfc   Digvijay Singh   profile screen added
131

298fff252   Digvijay Singh   new design added
132
                  <ul class="colors">
5684145ce   Digvijay Singh   reset password,ot...
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
                    <li>
                      <a
                        href="javascript:void(0);"
                        id="#C4C4C4"
                        class="silver"
                        @click="changeColor('#C4C4C4')"
                      ></a>
                    </li>
                    <li>
                      <a
                        href="javascript:void(0);"
                        id="#FFF6D7"
                        class="milk-punch"
                        @click="changeColor('#FFF6D7')"
                      ></a>
                    </li>
                    <li>
                      <a
                        href="javascript:void(0);"
                        id="#BDDBFF"
                        class="french-pass"
                        @click="changeColor('#BDDBFF')"
                      ></a>
                    </li>
                    <li>
                      <a
                        href="javascript:void(0);"
                        id="#C0FAFE"
                        class="cyan-french-pass"
                        @click="changeColor('#C0FAFE')"
                      ></a>
                    </li>
                    <li>
                      <a
                        href="javascript:void(0);"
                        id="#FFDBDC"
                        class="cosmos"
                        @click="changeColor('#FFDBDC')"
                      ></a>
                    </li>
                    <li>
                      <a
                        href="javascript:void(0);"
                        id="#FEE6AC"
                        class="cape-Honey"
                        @click="changeColor('#FEE6AC')"
                      ></a>
                    </li>
                    <li>
                      <a
                        href="javascript:void(0);"
                        id="#E5DFF0"
                        class="snuff"
                        @click="changeColor('#E5DFF0')"
                      ></a>
                    </li>
                    <li>
                      <a
                        href="javascript:void(0);"
                        id="#DFE7EF"
                        class="catskillWhite"
                        @click="changeColor('#DFE7EF')"
                      ></a>
                    </li>
                    <li>
                      <a
                        href="javascript:void(0);"
                        id="#FFF"
                        class="white"
                        @click="changeColor('#FFF')"
                      ></a>
                    </li>
298fff252   Digvijay Singh   new design added
205
206
                  </ul>
                </div>
5684145ce   Digvijay Singh   reset password,ot...
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
                <div class="col-lg-12 mt-50">
                  <p class="notifications">
                    Recieve notifications when you recieve a comment/ Upvote
                  </p>
                  <div class="switch-bt-wrp">
                    <label class="switch-btn">
                      <input type="checkbox" class="toggle-btn" />
                      <span class="rounded-toggle"></span>
                    </label>
                    <span class="onoff">on/off</span>
                  </div>
                </div>
                <div class="col-lg-12">
                  <p class="add-socail-ch">
                    Add your social Channels <span></span>
                  </p>
                </div>
                <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
                  <div class="form-group floating-label">
c65b51996   Digvijay Singh   new ui changes
226
                    <select class="form-group">
5684145ce   Digvijay Singh   reset password,ot...
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
                      <option value="Facebook">Facebook</option>
                    </select>
                    <span class="select-arrow"
                      ><img src="../assets/images/chevron-down.svg"
                    /></span>
                  </div>
                </div>
                <!-- input -->
                <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8">
                  <div class="form-group floating-label">
                    <input
                      type="text"
                      class="form-control"
                      value=""
                      placeholder="Paste your profile URL here"
                      id=""
                      v-model="userData.socialMediaProfiles.facebook"
                    />
                  </div>
                </div>
                <!-- input -->
c65b51996   Digvijay Singh   new ui changes
248
                <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
5684145ce   Digvijay Singh   reset password,ot...
249
                  <div class="form-group floating-label">
c65b51996   Digvijay Singh   new ui changes
250
                    <select class="form-group">
5684145ce   Digvijay Singh   reset password,ot...
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
                      <option value="Linkedin">Linkedin</option>
                    </select>
                    <span class="select-arrow"
                      ><img src="../assets/images/chevron-down.svg"
                    /></span>
                  </div>
                </div>
                <!-- input -->
                <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8">
                  <div class="form-group floating-label">
                    <input
                      type="text"
                      class="form-control"
                      value=""
                      placeholder="Paste your profile URL here"
                      id=""
c65b51996   Digvijay Singh   new ui changes
267
                      v-model="userData.socialMediaProfiles.linkedin"
5684145ce   Digvijay Singh   reset password,ot...
268
269
270
271
                    />
                  </div>
                </div>
                <!-- input -->
c65b51996   Digvijay Singh   new ui changes
272

5684145ce   Digvijay Singh   reset password,ot...
273
274
275
276
277
278
279
280
281
282
283
284
                <!-- input -->
                <!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
                  <div class="form-group floating-label">
                    <select class="form-group">
                      <option @click="addSocialLink">Add another</option>
                    </select>
                    <span class="select-arrow"
                      ><img src="../assets/images/chevron-down.svg"
                    /></span>
                  </div>
                </div> -->
                <!-- input -->
24ced0ae7   Gurvinder Singh   new changes files
285
              </div>
196f4eb8f   Digvijay Singh   tooltip added
286
              <a href="javascript:void(0);" @click="saveProfile" class="next-bt"
5684145ce   Digvijay Singh   reset password,ot...
287
288
                >Save</a
              >
24ced0ae7   Gurvinder Singh   new changes files
289
290
291
            </form>
          </div>
          <div class="clearfix"></div>
5684145ce   Digvijay Singh   reset password,ot...
292
293
        </div>
        <!-- add profile -->
298fff252   Digvijay Singh   new design added
294
295
296
      </div>
      <!-- profile -->
      <div class="container-fluid inner-wrp">
f06677bfc   Digvijay Singh   profile screen added
297
        <nav class="navbar navbar-expand-sm spotLight-nav">
d0186c77a   Digvijay Singh   changes in ui
298
          <a class="navbar-brand" href="javasript:void(0);"
298fff252   Digvijay Singh   new design added
299
300
301
302
303
304
305
306
307
308
309
            ><img src="../assets/images/logo.png"
          /></a>
          <button
            class="navbar-toggler"
            type="button"
            data-toggle="collapse"
            data-target="#navbarsExample03"
            aria-controls="navbarsExample03"
            aria-expanded="false"
            aria-label="Toggle navigation"
          >
f06677bfc   Digvijay Singh   profile screen added
310
311
312
313
            <span class="navbar-toggler-icon"></span>
            <span class="navbar-toggler-icon"></span>
            <span class="navbar-toggler-icon"></span>
          </button>
298fff252   Digvijay Singh   new design added
314

f06677bfc   Digvijay Singh   profile screen added
315
316
317
          <div class="collapse navbar-collapse" id="navbarsExample03">
            <ul class="navbar-nav mr-auto">
              <li class="nav-item active">
d0186c77a   Digvijay Singh   changes in ui
318
                <a class="nav-link" href="javasript:void(0);">About</a>
f06677bfc   Digvijay Singh   profile screen added
319
320
              </li>
              <li class="nav-item">
d0186c77a   Digvijay Singh   changes in ui
321
                <a class="nav-link" href="javasript:void(0);">Masterclass</a>
f06677bfc   Digvijay Singh   profile screen added
322
323
              </li>
              <li class="nav-item">
d0186c77a   Digvijay Singh   changes in ui
324
                <a class="nav-link" href="javasript:void(0);">Stories</a>
f06677bfc   Digvijay Singh   profile screen added
325
326
              </li>
              <li class="nav-item">
d0186c77a   Digvijay Singh   changes in ui
327
                <a class="nav-link" href="javasript:void(0);">Library</a>
f06677bfc   Digvijay Singh   profile screen added
328
329
330
              </li>
            </ul>
          </div>
196f4eb8f   Digvijay Singh   tooltip added
331
            <a href="javasript:void(0);"  @click="addProfileDialog" class="update_profile"><span></span> Update Profile</a>
d0186c77a   Digvijay Singh   changes in ui
332
333
          <div class="">
          
7832f2f48   Digvijay Singh   randmise avatar
334
            <a href="javascript:void(0);" class="user-profile-photo common_color" @click="userprofileshowDialog"><img :src="userData.profilePic" /></a>
5684145ce   Digvijay Singh   reset password,ot...
335
            <div class="sub-menu-user" id="userprofileshow" style="display: none">
24ced0ae7   Gurvinder Singh   new changes files
336
              <ul>
c65b51996   Digvijay Singh   new ui changes
337
338
339
340
341
                <li>
                  <a href="javascript:void(0);" @click="addProfileDialog"
                    >Edit Profile</a
                  >
                </li>
5684145ce   Digvijay Singh   reset password,ot...
342
                <li><a href="javascript:void(0);" @click="logout">Log Out</a></li>
24ced0ae7   Gurvinder Singh   new changes files
343
344
              </ul>
            </div>
f06677bfc   Digvijay Singh   profile screen added
345
          </div>
298fff252   Digvijay Singh   new design added
346
347
348
349
        </nav>
        <!-- menu wrapper -->
        <div class="row profile-tab-spc-top">
          <div class="col-sm-8 col-md-12 col-lg-8 col-xl-8">
5684145ce   Digvijay Singh   reset password,ot...
350
            <div class="inner-profile-ps common_color">
7832f2f48   Digvijay Singh   randmise avatar
351
              <img :src="userData.profilePic" class="" />
5684145ce   Digvijay Singh   reset password,ot...
352
353
            </div>
            <!-- user profile -->
298fff252   Digvijay Singh   new design added
354
            <div class="user-profile">
5684145ce   Digvijay Singh   reset password,ot...
355
356
              <h1>
                {{ userData.firstName }} {{ userData.lastName }}
196f4eb8f   Digvijay Singh   tooltip added
357
                <a href="javasript:void(0);" class="tags no-cursor">{{ userData.role }}</a>
5684145ce   Digvijay Singh   reset password,ot...
358
              </h1>
298fff252   Digvijay Singh   new design added
359
360
              <ul class="joined-info">
                <li>
196f4eb8f   Digvijay Singh   tooltip added
361
                  <a href="javascript:void(0);" v-if="userData.designation.length == 0 && userData.organisation.length == 0" @click="addProfileDialog"
c65b51996   Digvijay Singh   new ui changes
362
363
                    >Add your work</a
                  >
196f4eb8f   Digvijay Singh   tooltip added
364
365
366
367
368
369
370
371
372
                  <a href="javascript:void(0);" v-if="userData.designation.length != 0" 
                    >{{userData.designation}}</a
                  >
                  <a href="javascript:void(0);" v-if="userData.designation.length != 0 && userData.organisation.length != 0" 
                    >at</a
                  >
                  <a href="javascript:void(0);" v-if="userData.organisation.length != 0" 
                    >{{userData.organisation}}</a
                  >
298fff252   Digvijay Singh   new design added
373
374
                  <img src="../assets/images/u-info-icon.png" /> <span></span>
                </li>
5684145ce   Digvijay Singh   reset password,ot...
375
                <li>
196f4eb8f   Digvijay Singh   tooltip added
376
                  <a href="javasript:void(0);" content="Karma Points" v-tippy> {{ userData.karmaPoints }} Karma</a> <span></span>
5684145ce   Digvijay Singh   reset password,ot...
377
378
                </li>
                <li>
d0186c77a   Digvijay Singh   changes in ui
379
                  <a href="javasript:void(0);"
196f4eb8f   Digvijay Singh   tooltip added
380
                    class="no-cursor">Joined on
5684145ce   Digvijay Singh   reset password,ot...
381
382
383
                    {{ moment(userData.createdAt).format("MMM YYYY") }}</a
                  >
                </li>
298fff252   Digvijay Singh   new design added
384
              </ul>
5684145ce   Digvijay Singh   reset password,ot...
385
              <p>{{ userData.bio }}</p>
298fff252   Digvijay Singh   new design added
386
387
388
389
            </div>
          </div>
          <!-- user profile -->
          <div class="col-sm-4 col-md-12 col-lg-4 col-xl-4">
5684145ce   Digvijay Singh   reset password,ot...
390
            <div class="list-style-group" v-if="userData.awards">
298fff252   Digvijay Singh   new design added
391
392
393
              <p>Awards</p>
              <ul class="list-style">
                <li>
c65b51996   Digvijay Singh   new ui changes
394
395
396
                  <a href="javascript:void(0);"
                    ><img src="../assets/images/icon-1.png"
                  /></a>
298fff252   Digvijay Singh   new design added
397
398
399
400
401
                </li>
              </ul>
            </div>
            <!-- list style -->
          </div>
f06677bfc   Digvijay Singh   profile screen added
402
        </div>
298fff252   Digvijay Singh   new design added
403
404
405
406
        <div class="clearfix"></div>
        <div class="row top-brd profile-tab-spc-top">
          <div class="col-sm-8 col-md-8 col-lg-8 col-xl-8">
            <ul class="profile-tab">
5684145ce   Digvijay Singh   reset password,ot...
407
408
              <li class="active c-0">
                <a href="javascript:void(0);" @click="caseDialog"
c65b51996   Digvijay Singh   new ui changes
409
                  >Case-studies({{ caseStudies.length }})</a
5684145ce   Digvijay Singh   reset password,ot...
410
411
412
413
                >
              </li>
              <li class="rp-all">
                <a href="javascript:void(0);" @click="repliesDialog"
c65b51996   Digvijay Singh   new ui changes
414
                  >Comments/Replies(0)</a
5684145ce   Digvijay Singh   reset password,ot...
415
416
                >
              </li>
298fff252   Digvijay Singh   new design added
417
418
419
420
421
422
            </ul>
          </div>
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <ul class="social-connects">
              <li><span>Follow</span></li>
              <li>
c65b51996   Digvijay Singh   new ui changes
423
424
425
426
                <a
                  href="javascript:void(0);"
                  @click="addProfileDialog"
                  class="active"
298fff252   Digvijay Singh   new design added
427
428
429
430
431
432
433
434
435
436
437
                  ><img src="../assets/images/plus.png"
                /></a>
                <span class="connect-social-channel"
                  >Connect your social channels</span
                >
              </li>
            </ul>
          </div>
        </div>
        <!-- tab style -->
        <div class="profile-data-wrp">
24ced0ae7   Gurvinder Singh   new changes files
438
          <div class="container-fluid data-wrp" id="case-study-0">
c65b51996   Digvijay Singh   new ui changes
439
            <div class="row" v-if="caseStudies.length == 0">
d0186c77a   Digvijay Singh   changes in ui
440
               <div class="col-6 col-lg-6">
7832f2f48   Digvijay Singh   randmise avatar
441
442
                 <div class="full-w-height-profile ex-light seats_bg" >
                     <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>
d0186c77a   Digvijay Singh   changes in ui
443
444
445
446
447
448
449
    <p>Explore the spotlights others has put together</p>
                   </div><!-- full width -->
               </div><!-- col 6 -->
                    <div class="col-6 col-lg-6">
                 <div class="full-w-height-profile ex-light spotlight_bg">
                   <img src="../assets/images/add-role.svg" class="add-role" />
                   <div class="clearfix"></div><!-- clearfix -->
7832f2f48   Digvijay Singh   randmise avatar
450
                     <a href="javasript:void(0);" class="profile-md-bt center-and-spc" @click="openUrl('https://www.productgrowth.org/spotlight#typeform-spotlight')">Publish Spotlight</a>
d0186c77a   Digvijay Singh   changes in ui
451
452
453
454
    <p>Share your own insights through Spotlight</p>
                   </div><!-- full width -->
               </div><!-- col 6 -->
           
298fff252   Digvijay Singh   new design added
455
            </div>
c65b51996   Digvijay Singh   new ui changes
456
457
458
459
460
461
462
463
464
465
466
467
  
            <div class="profile-data-wrp" v-if="caseStudies.length != 0">
              <div class="container-fluid data-wrp">
                <div class="row">
                  <div class="" v-for="(study, i) in caseStudies" :key="i">
                    <div class="card-warpper" @click="openStudy(study)">
                      <div class="company-detail">
                        <div class="c-logo">
                          <!-- <img src="../assets/images/image 46.png" /> -->
                          <img :src="study.intro.logoURL" />
                        </div>
                        <div class="c-tag">
d0186c77a   Digvijay Singh   changes in ui
468
469
470
471
                          <img src="../assets/images/retake-blue.svg" v-if="study.intro.type == 'Retake'"/>
                          <img src="../assets/images/behind-blue.svg" v-if="study.intro.type == 'Behind-the-scenes'"/>
                          <img src="../assets/images/critique-blue.svg" v-if="study.intro.type == 'Critique'"/>
                          <img src="../assets/images/juxtapose-blue.svg" v-if="study.intro.type == 'Juxtapose'"/>
c65b51996   Digvijay Singh   new ui changes
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
                        </div>
                      </div>
                      <!-- company detail-->
                      <h1>{{ study.intro.name }}</h1>
                      <div class="u-detail">
                        <img src="../assets/images/user-2.png" />
                        <h2 v-for="(name, j) in study.intro.authors" :key="j">
                          {{ name }}
                        </h2>
                      </div>
                      <!-- user detail -->
                      <p>
                        <span v-for="(area, j) in study.focusAreas" :key="j">
                          {{ area }}
                        </span>
                      </p>
d0186c77a   Digvijay Singh   changes in ui
488
                      <ul class="tags-list" >
c65b51996   Digvijay Singh   new ui changes
489
                        <li v-for="(tags, j) in study.insightTags" :key="j">
d0186c77a   Digvijay Singh   changes in ui
490
491
492
493
494
                          <a href="javasript:void(0);" class="insight-design" v-if="tags == 'Design'" >Design</a>
                          <a href="javasript:void(0);" class="insight-product" v-if="tags == 'Product'">Product</a>
                          <a href="javasript:void(0);" class="insight-marketing" v-if="tags == 'Marketing'">Marketing</a>
                          <a href="javasript:void(0);" class="insight-pricing" v-if="tags == 'Pricing'">Pricing</a>
                          <a href="javasript:void(0);" class="insight-psychology" v-if="tags == 'Psychology'">Psychology</a>
c65b51996   Digvijay Singh   new ui changes
495
                        </li>
d0186c77a   Digvijay Singh   changes in ui
496
497
                        <!-- <li><a href="javasript:void(0);" class="rose-bud">Marketing</a></li>
                        <li><a href="javasript:void(0);" class="pattens-blue">Product</a></li> -->
c65b51996   Digvijay Singh   new ui changes
498
499
500
501
502
503
504
505
506
507
508
                      </ul>
                      <div class="clearfix"></div>
                    </div>
                    <!-- card wrpper -->
                    <!-- card wrpper -->
                  </div>
                  <!-- all card wrpper -->
                </div>
              </div>
            </div>
            <!-- data wrp -->
5684145ce   Digvijay Singh   reset password,ot...
509
510
511
512
513
514
515
516
517
518
          </div>
          <!-- case study 0 -->
          <div
            class="container-fluid data-wrp"
            id="all-replies"
            style="display: none"
          >
            <div class="row">
              <div class="replies col-md-12">
                <div class="replies-wrp">
c65b51996   Digvijay Singh   new ui changes
519
                  <!-- <h1>PhonePe vs GooglePay <span>Critique</span></h1>
5684145ce   Digvijay Singh   reset password,ot...
520
                  <ul class="joined-info">
d0186c77a   Digvijay Singh   changes in ui
521
                    <li><a href="javasript:void(0);">37D</a> <span></span></li>
5684145ce   Digvijay Singh   reset password,ot...
522
                    <li><img src="../assets/images/heart.png" /></li>
d0186c77a   Digvijay Singh   changes in ui
523
                    <li><a href="javasript:void(0);"> 4</a></li>
5684145ce   Digvijay Singh   reset password,ot...
524
525
526
                    <li class="comment-spc">
                      <img src="../assets/images/comment.svg" />
                    </li>
d0186c77a   Digvijay Singh   changes in ui
527
                    <li><a href="javasript:void(0);"> 6</a></li>
5684145ce   Digvijay Singh   reset password,ot...
528
529
530
531
532
533
                  </ul>
                  <p>
                    I wonder what the difference between “<strong>
                      Assistant</strong
                    >” and “<strong>Pickup and Drop</strong>” are. If they are the
                    same, there are two “call to actions” for the same workflow
c65b51996   Digvijay Singh   new ui changes
534
                  </p> -->
5684145ce   Digvijay Singh   reset password,ot...
535
536
537
538
539
540
541
                </div>
                <!-- replies wrapper -->
              </div>
              <!-- all card wrpper -->
            </div>
          </div>
          <!-- all Relpies -->
298fff252   Digvijay Singh   new design added
542
543
        </div>
        <!-- data wrp -->
f06677bfc   Digvijay Singh   profile screen added
544
545
546
547
548
549
        <!-- body wrapper -->
      </div>
    </main>
  </template>
  
  <script>
f06677bfc   Digvijay Singh   profile screen added
550
551
552
  import Vue from "vue";
  import router from "../router";
  import $ from "jquery";
5684145ce   Digvijay Singh   reset password,ot...
553
  import axios from "axios";
f06677bfc   Digvijay Singh   profile screen added
554
555
556
557
558
559
560
  
  export default {
    name: "Profile",
  
    data() {
      return {
        loggedinFlag: false,
298fff252   Digvijay Singh   new design added
561
        usertoken: null,
5684145ce   Digvijay Singh   reset password,ot...
562
        userData: {},
c65b51996   Digvijay Singh   new ui changes
563
        caseStudies: [],
5684145ce   Digvijay Singh   reset password,ot...
564
565
        interestName: null,
        oldId: null,
c65b51996   Digvijay Singh   new ui changes
566
567
        socialLink: null,
        currentSocialLinkName: null,
f06677bfc   Digvijay Singh   profile screen added
568
569
      };
    },
298fff252   Digvijay Singh   new design added
570
    mounted() {
5684145ce   Digvijay Singh   reset password,ot...
571
572
573
574
      this.userData = {};
      this.socialLink = [];
      this.userData.interests = [];
      this.userData.socialMediaProfiles = {};
196f4eb8f   Digvijay Singh   tooltip added
575
576
      this.userData.designation = ""; 
      this.userData.organisation = "";
5684145ce   Digvijay Singh   reset password,ot...
577
578
      this.userData.socialMediaProfiles.facebook = null;
      this.userData.socialMediaProfiles.linkedin = null;
298fff252   Digvijay Singh   new design added
579
580
581
582
583
      var userdata = localStorage.getItem("spotlight_usertoken");
      if (userdata) {
        userdata = JSON.parse(userdata);
        this.usertoken = userdata.token;
        this.getProfile();
c65b51996   Digvijay Singh   new ui changes
584
        this.getCaseStudies();
298fff252   Digvijay Singh   new design added
585
      }
298fff252   Digvijay Singh   new design added
586
    },
f06677bfc   Digvijay Singh   profile screen added
587
    methods: {
298fff252   Digvijay Singh   new design added
588
      goToSignUp() {
f06677bfc   Digvijay Singh   profile screen added
589
590
591
592
593
        this.$router.push("/signup");
      },
      goToReset() {
        this.$router.push("/reset");
      },
5684145ce   Digvijay Singh   reset password,ot...
594
595
596
      logout() {
        this.$router.push("/");
      },
c65b51996   Digvijay Singh   new ui changes
597
598
      addSocialLink(obj) {
        this.socialLink.push();
5684145ce   Digvijay Singh   reset password,ot...
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
      },
      addInterest() {
        console.log(this.userData.interests.length, "called", this.interestName);
        if (this.userData.interests.length <= 2) {
          this.userData.interests.push(this.interestName);
          this.interestName = null;
        } else {
          this.$toaster.info("Only 3 interest are allowed");
        }
      },
      removeInterest(i) {
        this.userData.interests.splice(i, 1);
      },
      assignClass() {
        var element = document.getElementById(this.userData.bgColor);
        element.classList.add("active");
c65b51996   Digvijay Singh   new ui changes
615
        var cols = document.getElementsByClassName("common_color");
5684145ce   Digvijay Singh   reset password,ot...
616
617
618
        for (var i = 0; i < cols.length; i++) {
          cols[i].style.backgroundColor = this.userData.bgColor;
        }
5684145ce   Digvijay Singh   reset password,ot...
619
620
      },
      changeColor(clr) {
c65b51996   Digvijay Singh   new ui changes
621
        console.log(this.oldId, "clr", clr);
5684145ce   Digvijay Singh   reset password,ot...
622
623
624
625
626
627
628
        var element = document.getElementById(clr);
        element.classList.add("active");
        var removeelement = document.getElementById(this.oldId);
        removeelement.classList.remove("active");
        this.oldId = clr;
        var cols = document.getElementsByClassName("common_color");
        for (var i = 0; i < cols.length; i++) {
c65b51996   Digvijay Singh   new ui changes
629
          cols[i].style.backgroundColor = clr;
5684145ce   Digvijay Singh   reset password,ot...
630
631
        }
        this.userData.bgColor = clr;
5684145ce   Digvijay Singh   reset password,ot...
632
      },
298fff252   Digvijay Singh   new design added
633
634
      getProfile() {
        axios
5684145ce   Digvijay Singh   reset password,ot...
635
636
637
638
639
640
641
          .get("/profile", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            this.userData = response.data.data;
c65b51996   Digvijay Singh   new ui changes
642
            if (!this.userData.socialMediaProfiles) {
052b5bc33   Digvijay Singh   close dialog
643
644
              this.userData.socialMediaProfiles = {};
            }
c65b51996   Digvijay Singh   new ui changes
645
646
            this.oldId = this.userData.bgColor;
            console.log(this.oldId, "this.userData.", this.userData.bgColor);
5684145ce   Digvijay Singh   reset password,ot...
647
648
649
650
651
  
            this.assignClass();
            console.log(response.data.data);
          })
          .catch((error) => console.log(error));
298fff252   Digvijay Singh   new design added
652
      },
7832f2f48   Digvijay Singh   randmise avatar
653
654
655
656
657
658
659
660
661
662
663
664
665
      getRandomAvatar() {
        axios
          .get("/randomAvatar", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
           this.userData.profilePic = response.data.imageURL;
            console.log(response.data.imageURL);
          })
          .catch((error) => console.log(error));
      },
c65b51996   Digvijay Singh   new ui changes
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
      getCaseStudies() {
        axios
          .get("/caseStudy/all", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            console.log(response.data.data.caseStudies);
            this.caseStudies = response.data.data.caseStudies;
          })
          .catch((error) => console.log(error));
      },
      openStudy(payload) {
        console.log("payload-", payload);
        payload.intro.date = payload.createdAt;
196f4eb8f   Digvijay Singh   tooltip added
682
        payload.intro.focusPoint = payload.createdAt;
c65b51996   Digvijay Singh   new ui changes
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
        axios
          .get("/caseStudy/slides?caseStudyId=" + payload._id, {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            this.createSlide(payload, response.data.data);
          })
          .catch((error) => console.log(error));
      },
  
      createSlide(payload, slides) {
        var finalSlides = [];
        slides.forEach((slides_) => {
          var url = this.assignRoutes(slides_.templateId);
          var obj = {
            forward: true,
            backward: true,
            ur: url,
            slideId: slides_._id,
            caseStudyId: slides_.caseStudyId,
            payload: {
              metaData: slides_.metaData,
              comments: slides_.comments,
d0186c77a   Digvijay Singh   changes in ui
708
              insight: slides_.insight?slides_.insight:null,
c65b51996   Digvijay Singh   new ui changes
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
            },
          };
          // slides_
          finalSlides.push(obj);
        });
        console.log("payload", payload);
        // add first slide at begining
        finalSlides.unshift({
          forward: true,
          backward: false,
          ur: "EpisodeIntro",
          slideId: "INTRO_oqkdMOVDrwRptsdWJ6Ye",
          caseStudyId: payload._id,
          payload: {
            metaData: payload.intro,
            comments: [],
          },
        });
        finalSlides.push({
          forward: true,
          backward: false,
          ur: "Outro",
          slideId: "OUTRO_oqkdMOVDrwRptsdWJ6Ye",
          caseStudyId: payload._id,
          payload: {
            metaData: payload.outro,
            comments: [],
          },
        });
  
        console.log(finalSlides);
        localStorage.setItem('spotlight_slide'+payload._id, JSON.stringify(finalSlides))
        this.$router.push({
          name: "EpisodeIntro",
          params: {
            caseStudyId: finalSlides[0].caseStudyId,
            slideId: finalSlides[0].slideId,
          },
        });
      },
      assignRoutes(tempId) {
        // /episode-intro
        // /outro
        var routes = [
          {
            url: "AuthorIntro",
            tempId: "T1_RoeMG8130Xko1DvhC3Ou",
          },
          {
            url: "NoScreenshotSingleAuthor",
            tempId: "T2_ROsUOEy3vxsRAiQ72XdI",
          },
          {
            url: "SingleMobileScreenInsightTwo",
            tempId: "T3_cqNIf7tuqL4jyON63dA7",
          },
d0186c77a   Digvijay Singh   changes in ui
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
          {
            url: "TwoScreenWithoutInsight",
            tempId: "T4_4QC8W7kIYnJtZ26Jt0Go",
          },
          {
            url: "noscreenshotSingleautho",
            tempId: "T5_za3c3sYgx7bVvtKz5r0e",
          },
          {
            url: "SingleMobileScreenInsightOne",
            tempId: "T6_za3c3sYgx7bVvtKz5sgf",
          },
          {
            url: "TwoScreenWithInsight",
            tempId: "T7_za3c3sYgx7bVvtKzasdf",
          },
c65b51996   Digvijay Singh   new ui changes
781
782
783
784
        ];
        var i = routes.findIndex((routes_) => routes_.tempId == tempId);
        return routes[i].url;
      },
5684145ce   Digvijay Singh   reset password,ot...
785
      saveProfile() {
298fff252   Digvijay Singh   new design added
786
        var obj = {};
5684145ce   Digvijay Singh   reset password,ot...
787
788
        this.userData.name =
          this.userData.firstName + " " + this.userData.lastName;
298fff252   Digvijay Singh   new design added
789
        obj = Object.assign(obj, this.userData);
5684145ce   Digvijay Singh   reset password,ot...
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
        // if(!obj.socialMediaProfiles){
        //   obj.socialMediaProfiles = {};
        // }
        delete obj.createdAt;
        delete obj.email;
        delete obj.role;
        delete obj.verified;
        delete obj.updatedAt;
        delete obj.__v;
        delete obj._id;
        delete obj.karmaPoints;
        delete obj.awards;
        delete obj.socialLogin;
        axios
          .put("/profile", obj, {
298fff252   Digvijay Singh   new design added
805
806
807
808
809
810
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            // this.userData = response.data.data;
c65b51996   Digvijay Singh   new ui changes
811
            this.$toaster.success("Profile Updated");
196f4eb8f   Digvijay Singh   tooltip added
812
            this.closeDialog();
298fff252   Digvijay Singh   new design added
813
814
            console.log(response.data.data);
          })
5684145ce   Digvijay Singh   reset password,ot...
815
816
817
818
819
          .catch((error) => {
            if (error.response) {
              this.$toaster.error(error.response.data.message);
            }
          });
298fff252   Digvijay Singh   new design added
820
      },
921970bb2   Gurvinder Singh   new files
821
      addProfileDialog() {
298fff252   Digvijay Singh   new design added
822
        $(".inner-wrp").addClass("body-blur");
5684145ce   Digvijay Singh   reset password,ot...
823
        $("#add-social-links").hide();
921970bb2   Gurvinder Singh   new files
824
        $(".popup-wrp, #add-profile").show();
298fff252   Digvijay Singh   new design added
825
      },
921970bb2   Gurvinder Singh   new files
826
      nextProfileDialog() {
5684145ce   Digvijay Singh   reset password,ot...
827
828
829
830
831
832
833
        $("#add-profile").hide();
        $("#add-social-links").show();
        this.saveProfile();
      },
      closeDialog() {
        $(".popup-wrp").hide();
        $(".inner-wrp").removeClass("body-blur");
196f4eb8f   Digvijay Singh   tooltip added
834
        // this.saveProfile();
298fff252   Digvijay Singh   new design added
835
      },
1620582c6   Digvijay Singh   close dialog
836
837
838
839
      hideDialog() {
        $(".popup-wrp").hide();
        $(".inner-wrp").removeClass("body-blur");
      },
5684145ce   Digvijay Singh   reset password,ot...
840
841
842
843
844
845
846
847
848
849
850
851
852
      ///
      caseDialog() {
        $(".rp-all").removeClass("active");
        $(".c-0").addClass("active");
        $("#all-replies").hide();
        $("#case-study-0").show();
      },
      repliesDialog() {
        $(".c-0").removeClass("active");
        $(".rp-all").addClass("active");
        $("#case-study-0").hide();
        $("#all-replies").show();
      },
24ced0ae7   Gurvinder Singh   new changes files
853

5684145ce   Digvijay Singh   reset password,ot...
854
855
856
      userprofileshowDialog() {
        $("#userprofileshow").toggle();
      },
7832f2f48   Digvijay Singh   randmise avatar
857
858
859
      openUrl(url){
        window.open(url);
      },
f06677bfc   Digvijay Singh   profile screen added
860
861
862
    },
  };
  </script>
196f4eb8f   Digvijay Singh   tooltip added
863
864
865
866
867
  <style>
  .no-cursor{
    cursor: default !important;
  }
  </style>