Blame view

src/components/Profile.vue 41.9 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>
1f12ffc55   Digvijay Singh   issues fixation
14
                <a href="javasript:void(0);"
1c575dae0   Digvijay Singh   new changes ui
15
                  ><img src="../assets/images/upload-cloud.svg" /><span
2991bacc1   Digvijay Singh   ui flow change
16
17
18
                    >Upload Avatar</span
                  ></a
                >
298fff252   Digvijay Singh   new design added
19
20
              </li>
              <li>
1f12ffc55   Digvijay Singh   issues fixation
21
                <a href="javasript:void(0);" @click="getRandomAvatar()"
4234f1fc0   Digvijay Singh   profile module added
22
                  ><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"
4234f1fc0   Digvijay Singh   profile module 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
                <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>
145dd9bde   Digvijay Singh   ui fixes
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
  
                <div
                  class="row"
                  style="width: 100%"
                  v-for="(social, i) in selectedSocialLink"
                  :key="i"
                >
                  <div class="position-left col-sm-4 col-md-4 col-lg-4 col-xl-4">
                    <div class="form-group floating-label">
                      <select class="form-group">
                        <option value="Linkedin">{{ social.displayName }}</option>
                      </select>
                      <span class="select-arrow"
                        ><img src="../assets/images/chevron-down.svg"
                      /></span>
                    </div>
5684145ce   Digvijay Singh   reset password,ot...
240
                  </div>
145dd9bde   Digvijay Singh   ui fixes
241
242
243
244
245
246
247
248
249
250
251
252
                  <!-- input -->
                  <div class="padding-right col-sm-7 col-md-7 col-lg-7 col-xl-7">
                    <div class="form-group floating-label">
                      <input
                        type="text"
                        class="form-control"
                        value=""
                        placeholder="Paste your profile URL here"
                        id=""
                        v-model="social.fieldValue"
                      />
                    </div>
5684145ce   Digvijay Singh   reset password,ot...
253
                  </div>
145dd9bde   Digvijay Singh   ui fixes
254
255
256
257
258
259
260
261
262
263
264
                  <div class="col-sm-1 col-md-1 col-lg-1 col-xl-1">
                    <ul class="interests">
                      <li>
                        <a
                          @click="removeSocialLink(i)"
                          href="javascript:void(0);"
                          class="cat-minus"
                          ><img src="../assets/images/minus.svg"
                        /></a>
                      </li>
                    </ul>
5684145ce   Digvijay Singh   reset password,ot...
265
266
267
                  </div>
                </div>
                <!-- input -->
c65b51996   Digvijay Singh   new ui changes
268

5684145ce   Digvijay Singh   reset password,ot...
269
                <!-- input -->
145dd9bde   Digvijay Singh   ui fixes
270
                <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
5684145ce   Digvijay Singh   reset password,ot...
271
                  <div class="form-group floating-label">
145dd9bde   Digvijay Singh   ui fixes
272
273
274
275
276
277
278
279
280
281
282
283
284
                    <select
                      class="form-group"
                      v-model="currentLink"
                      v-on:change="addSocialLink(currentLink)"
                    >
                      <option value="null">Add another</option>
                      <option
                        v-for="(social, i) in socialLink"
                        :key="i"
                        :value="social.fieldName"
                      >
                        {{ social.displayName }}
                      </option>
5684145ce   Digvijay Singh   reset password,ot...
285
286
287
288
289
                    </select>
                    <span class="select-arrow"
                      ><img src="../assets/images/chevron-down.svg"
                    /></span>
                  </div>
145dd9bde   Digvijay Singh   ui fixes
290
                </div>
5684145ce   Digvijay Singh   reset password,ot...
291
                <!-- input -->
24ced0ae7   Gurvinder Singh   new changes files
292
              </div>
196f4eb8f   Digvijay Singh   tooltip added
293
              <a href="javascript:void(0);" @click="saveProfile" class="next-bt"
5684145ce   Digvijay Singh   reset password,ot...
294
295
                >Save</a
              >
24ced0ae7   Gurvinder Singh   new changes files
296
297
298
            </form>
          </div>
          <div class="clearfix"></div>
5684145ce   Digvijay Singh   reset password,ot...
299
300
        </div>
        <!-- add profile -->
298fff252   Digvijay Singh   new design added
301
302
303
      </div>
      <!-- profile -->
      <div class="container-fluid inner-wrp">
f06677bfc   Digvijay Singh   profile screen added
304
        <nav class="navbar navbar-expand-sm spotLight-nav">
1f12ffc55   Digvijay Singh   issues fixation
305
          <a class="navbar-brand" href="javasript:void(0);"
298fff252   Digvijay Singh   new design added
306
307
308
309
310
311
312
313
314
315
316
            ><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
317
318
319
320
            <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
321

f06677bfc   Digvijay Singh   profile screen added
322
323
324
          <div class="collapse navbar-collapse" id="navbarsExample03">
            <ul class="navbar-nav mr-auto">
              <li class="nav-item active">
1f12ffc55   Digvijay Singh   issues fixation
325
                <a class="nav-link" href="javasript:void(0);">About</a>
f06677bfc   Digvijay Singh   profile screen added
326
327
              </li>
              <li class="nav-item">
1f12ffc55   Digvijay Singh   issues fixation
328
                <a class="nav-link" href="javasript:void(0);">Masterclass</a>
f06677bfc   Digvijay Singh   profile screen added
329
330
              </li>
              <li class="nav-item">
1f12ffc55   Digvijay Singh   issues fixation
331
                <a class="nav-link" href="javasript:void(0);">Stories</a>
f06677bfc   Digvijay Singh   profile screen added
332
333
              </li>
              <li class="nav-item">
1f12ffc55   Digvijay Singh   issues fixation
334
                <a class="nav-link" href="javasript:void(0);">Library</a>
f06677bfc   Digvijay Singh   profile screen added
335
336
337
              </li>
            </ul>
          </div>
4234f1fc0   Digvijay Singh   profile module added
338
          <a
145dd9bde   Digvijay Singh   ui fixes
339
            v-if="this.userData.firstLogin"
1f12ffc55   Digvijay Singh   issues fixation
340
            href="javasript:void(0);"
4234f1fc0   Digvijay Singh   profile module added
341
342
343
344
            @click="addProfileDialog"
            class="update_profile"
            ><span></span> Update Profile</a
          >
d0186c77a   Digvijay Singh   changes in ui
345
          <div class="">
4234f1fc0   Digvijay Singh   profile module added
346
347
348
349
350
351
            <a
              href="javascript:void(0);"
              class="user-profile-photo common_color"
              @click="userprofileshowDialog"
              ><img :src="userData.profilePic"
            /></a>
5684145ce   Digvijay Singh   reset password,ot...
352
            <div class="sub-menu-user" id="userprofileshow" style="display: none">
24ced0ae7   Gurvinder Singh   new changes files
353
              <ul>
2991bacc1   Digvijay Singh   ui flow change
354
                <li v-if="this.sameUser">
c65b51996   Digvijay Singh   new ui changes
355
356
357
358
                  <a href="javascript:void(0);" @click="addProfileDialog"
                    >Edit Profile</a
                  >
                </li>
5684145ce   Digvijay Singh   reset password,ot...
359
                <li><a href="javascript:void(0);" @click="logout">Log Out</a></li>
24ced0ae7   Gurvinder Singh   new changes files
360
361
              </ul>
            </div>
f06677bfc   Digvijay Singh   profile screen added
362
          </div>
298fff252   Digvijay Singh   new design added
363
        </nav>
2b91d45ce   Digvijay Singh   new ui fixes
364
365
  
        <!-- <Header></Header> -->
298fff252   Digvijay Singh   new design added
366
367
368
        <!-- 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...
369
            <div class="inner-profile-ps common_color">
7832f2f48   Digvijay Singh   randmise avatar
370
              <img :src="userData.profilePic" class="" />
5684145ce   Digvijay Singh   reset password,ot...
371
372
            </div>
            <!-- user profile -->
298fff252   Digvijay Singh   new design added
373
            <div class="user-profile">
5684145ce   Digvijay Singh   reset password,ot...
374
375
              <h1>
                {{ userData.firstName }} {{ userData.lastName }}
4234f1fc0   Digvijay Singh   profile module added
376
                <span
1f12ffc55   Digvijay Singh   issues fixation
377
                  href="javasript:void(0);"
4234f1fc0   Digvijay Singh   profile module added
378
379
380
                  class="tags no-cursor no-underline"
                  >{{ userData.role }}</span
                >
5684145ce   Digvijay Singh   reset password,ot...
381
              </h1>
298fff252   Digvijay Singh   new design added
382
383
              <ul class="joined-info">
                <li>
2991bacc1   Digvijay Singh   ui flow change
384
385
386
387
388
389
390
391
                  <span v-if="this.sameUser">
                    <a
                      href="javascript:void(0);"
                      v-if="!userData.designation && !userData.organisation"
                      @click="addProfileDialog"
                      >Add your work</a
                    >
                  </span>
4234f1fc0   Digvijay Singh   profile module added
392
393
394
                  <a
                    class="no-cursor no-underline"
                    href="javascript:void(0);"
09892a73f   Digvijay Singh   issue on profile ...
395
                    v-if="userData.designation"
4234f1fc0   Digvijay Singh   profile module added
396
                    >{{ userData.designation }}</a
196f4eb8f   Digvijay Singh   tooltip added
397
                  >
4234f1fc0   Digvijay Singh   profile module added
398
399
400
                  <a
                    class="no-cursor no-underline"
                    href="javascript:void(0);"
145dd9bde   Digvijay Singh   ui fixes
401
                    v-if="userData.designation && userData.organisation"
196f4eb8f   Digvijay Singh   tooltip added
402
403
                    >at</a
                  >
4234f1fc0   Digvijay Singh   profile module added
404
405
406
                  <a
                    class="no-cursor no-underline"
                    href="javascript:void(0);"
09892a73f   Digvijay Singh   issue on profile ...
407
                    v-if="userData.organisation"
4234f1fc0   Digvijay Singh   profile module added
408
                    >{{ userData.organisation }}</a
196f4eb8f   Digvijay Singh   tooltip added
409
                  >
298fff252   Digvijay Singh   new design added
410
411
                  <img src="../assets/images/u-info-icon.png" /> <span></span>
                </li>
5684145ce   Digvijay Singh   reset password,ot...
412
                <li>
1f12ffc55   Digvijay Singh   issues fixation
413
                  <a href="javasript:void(0);" content="Karma Points" v-tippy>
4234f1fc0   Digvijay Singh   profile module added
414
415
416
                    {{ userData.karmaPoints }} Karma</a
                  >
                  <span></span>
5684145ce   Digvijay Singh   reset password,ot...
417
418
                </li>
                <li>
1f12ffc55   Digvijay Singh   issues fixation
419
                  <a href="javasript:void(0);" class="no-cursor no-underline"
4234f1fc0   Digvijay Singh   profile module added
420
                    >Joined on
5684145ce   Digvijay Singh   reset password,ot...
421
422
423
                    {{ moment(userData.createdAt).format("MMM YYYY") }}</a
                  >
                </li>
298fff252   Digvijay Singh   new design added
424
              </ul>
5684145ce   Digvijay Singh   reset password,ot...
425
              <p>{{ userData.bio }}</p>
2991bacc1   Digvijay Singh   ui flow change
426
427
428
429
430
              <div class="talk-to-me-about" v-if="userData.interests.length != 0">
                <span>Talk to me about</span>
                <strong>{{ createString(userData.interests) }}</strong>
              </div>
              <!-- talk to me about -->
298fff252   Digvijay Singh   new design added
431
432
433
434
            </div>
          </div>
          <!-- user profile -->
          <div class="col-sm-4 col-md-12 col-lg-4 col-xl-4">
145dd9bde   Digvijay Singh   ui fixes
435
            <div class="list-style-group" v-if="userData.awards.views != null">
298fff252   Digvijay Singh   new design added
436
437
438
              <p>Awards</p>
              <ul class="list-style">
                <li>
c65b51996   Digvijay Singh   new ui changes
439
440
441
                  <a href="javascript:void(0);"
                    ><img src="../assets/images/icon-1.png"
                  /></a>
298fff252   Digvijay Singh   new design added
442
443
444
445
446
                </li>
              </ul>
            </div>
            <!-- list style -->
          </div>
f06677bfc   Digvijay Singh   profile screen added
447
        </div>
298fff252   Digvijay Singh   new design added
448
449
        <div class="clearfix"></div>
        <div class="row top-brd profile-tab-spc-top">
145dd9bde   Digvijay Singh   ui fixes
450
          <div class="col-sm-7 col-md-7 col-lg-7 col-xl-7">
298fff252   Digvijay Singh   new design added
451
            <ul class="profile-tab">
5684145ce   Digvijay Singh   reset password,ot...
452
453
              <li class="active c-0">
                <a href="javascript:void(0);" @click="caseDialog"
c65b51996   Digvijay Singh   new ui changes
454
                  >Case-studies({{ caseStudies.length }})</a
5684145ce   Digvijay Singh   reset password,ot...
455
456
457
458
                >
              </li>
              <li class="rp-all">
                <a href="javascript:void(0);" @click="repliesDialog"
2991bacc1   Digvijay Singh   ui flow change
459
                  >Comments/Replies({{ this.userComments.length }})</a
5684145ce   Digvijay Singh   reset password,ot...
460
461
                >
              </li>
298fff252   Digvijay Singh   new design added
462
463
            </ul>
          </div>
2b91d45ce   Digvijay Singh   new ui fixes
464
          <div class="col-sm-5 col-md-5 col-lg-5 col-xl-5 social-link-right">
145dd9bde   Digvijay Singh   ui fixes
465
            <ul class="social-connects" v-if="selectedSocialLink.length > 0">
298fff252   Digvijay Singh   new design added
466
              <li><span>Follow</span></li>
145dd9bde   Digvijay Singh   ui fixes
467
              <li v-for="(social, i) in selectedSocialLink" :key="i">
c65b51996   Digvijay Singh   new ui changes
468
469
                <a
                  href="javascript:void(0);"
145dd9bde   Digvijay Singh   ui fixes
470
471
472
473
474
475
                  @click="openUrl(social.fieldValue)"
                  class="cursor-pointer"
                  ><img :src="social.image"
                /></a>
              </li>
            </ul>
2b91d45ce   Digvijay Singh   new ui fixes
476
            <ul class="social-connects" v-if="selectedSocialLink.length == 0">
2991bacc1   Digvijay Singh   ui flow change
477
              <li v-if="this.sameUser">
2b91d45ce   Digvijay Singh   new ui fixes
478
                <a
145dd9bde   Digvijay Singh   ui fixes
479
                  href="javascript:void(0);"
c65b51996   Digvijay Singh   new ui changes
480
                  @click="addProfileDialog"
145dd9bde   Digvijay Singh   ui fixes
481
                  class="active cursor-pointer"
298fff252   Digvijay Singh   new design added
482
483
484
485
486
487
488
489
490
491
492
                  ><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
493
          <div class="container-fluid data-wrp" id="case-study-0">
c65b51996   Digvijay Singh   new ui changes
494
            <div class="row" v-if="caseStudies.length == 0">
4234f1fc0   Digvijay Singh   profile module added
495
496
497
              <div class="col-6 col-lg-6">
                <div class="full-w-height-profile ex-light seats_bg">
                  <a
1f12ffc55   Digvijay Singh   issues fixation
498
                    href="javasript:void(0);"
4234f1fc0   Digvijay Singh   profile module added
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
                    class="profile-md-bt center-and-spc bt-spc-top"
                    @click="openUrl('https://www.productgrowth.org/spotlight')"
                    >Explore Spotlights</a
                  >
                  <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 -->
                  <a
1f12ffc55   Digvijay Singh   issues fixation
514
                    href="javasript:void(0);"
4234f1fc0   Digvijay Singh   profile module added
515
516
517
518
519
520
521
522
523
524
525
526
527
                    class="profile-md-bt center-and-spc"
                    @click="
                      openUrl(
                        'https://www.productgrowth.org/spotlight#typeform-spotlight'
                      )
                    "
                    >Publish Spotlight</a
                  >
                  <p>Share your own insights through Spotlight</p>
                </div>
                <!-- full width -->
              </div>
              <!-- col 6 -->
298fff252   Digvijay Singh   new design added
528
            </div>
c65b51996   Digvijay Singh   new ui changes
529
530
531
532
533
534
535
536
537
538
539
540
  
            <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">
4234f1fc0   Digvijay Singh   profile module added
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
                          <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
557
558
                        </div>
                      </div>
2991bacc1   Digvijay Singh   ui flow change
559

c65b51996   Digvijay Singh   new ui changes
560
561
                      <!-- company detail-->
                      <h1>{{ study.intro.name }}</h1>
2991bacc1   Digvijay Singh   ui flow change
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
                      <div class="user-views">
                        <ul>
                          <li>
                            <img src="../assets/images/eye-1.svg" class="spctp" />
                            {{ study.views }} Views
                          </li>
                          <li>
                            <img src="../assets/images/star-1.svg" />
                            {{ study.avgRating }}
                            <span v-if="!study.avgRating">0</span> Rating
                          </li>
                          <li>
                            <img src="../assets/images/calendar-1.svg" />
                            {{ moment(study.createdAt).format("DD MMM YYYY") }}
                          </li>
                        </ul>
                      </div>
                      <!-- user views -->
c65b51996   Digvijay Singh   new ui changes
580
581
582
583
584
585
586
587
588
589
590
591
                      <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>
4234f1fc0   Digvijay Singh   profile module added
592
                      <ul class="tags-list">
c65b51996   Digvijay Singh   new ui changes
593
                        <li v-for="(tags, j) in study.insightTags" :key="j">
4234f1fc0   Digvijay Singh   profile module added
594
                          <a
1f12ffc55   Digvijay Singh   issues fixation
595
                            href="javasript:void(0);"
4234f1fc0   Digvijay Singh   profile module added
596
597
598
599
600
                            class="insight-design"
                            v-if="tags == 'Design'"
                            >Design</a
                          >
                          <a
1f12ffc55   Digvijay Singh   issues fixation
601
                            href="javasript:void(0);"
4234f1fc0   Digvijay Singh   profile module added
602
603
604
605
606
                            class="insight-product"
                            v-if="tags == 'Product'"
                            >Product</a
                          >
                          <a
1f12ffc55   Digvijay Singh   issues fixation
607
                            href="javasript:void(0);"
4234f1fc0   Digvijay Singh   profile module added
608
609
610
611
612
                            class="insight-marketing"
                            v-if="tags == 'Marketing'"
                            >Marketing</a
                          >
                          <a
1f12ffc55   Digvijay Singh   issues fixation
613
                            href="javasript:void(0);"
4234f1fc0   Digvijay Singh   profile module added
614
615
616
617
618
                            class="insight-pricing"
                            v-if="tags == 'Pricing'"
                            >Pricing</a
                          >
                          <a
1f12ffc55   Digvijay Singh   issues fixation
619
                            href="javasript:void(0);"
4234f1fc0   Digvijay Singh   profile module added
620
621
622
623
                            class="insight-psychology"
                            v-if="tags == 'Psychology'"
                            >Psychology</a
                          >
c65b51996   Digvijay Singh   new ui changes
624
                        </li>
1f12ffc55   Digvijay Singh   issues fixation
625
626
                        <!-- <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
627
628
                      </ul>
                      <div class="clearfix"></div>
5c9c1581c   Digvijay Singh   new ui changes
629
630
631
632
                      <a href="#" class="action-set">
                        <img src="../assets/images/arrow-right-action.svg" />
                      </a>
                      <div class="read-time">
2991bacc1   Digvijay Singh   ui flow change
633
634
635
636
637
638
                        <a href="#"
                          ><img src="../assets/images/clock.svg" />
                          {{ study.intro.readTime }} Min Read</a
                        >
                      </div>
                      <!-- read time -->
c65b51996   Digvijay Singh   new ui changes
639
640
641
642
643
644
645
646
647
                    </div>
                    <!-- card wrpper -->
                    <!-- card wrpper -->
                  </div>
                  <!-- all card wrpper -->
                </div>
              </div>
            </div>
            <!-- data wrp -->
5684145ce   Digvijay Singh   reset password,ot...
648
649
650
651
652
653
654
655
          </div>
          <!-- case study 0 -->
          <div
            class="container-fluid data-wrp"
            id="all-replies"
            style="display: none"
          >
            <div class="row">
2991bacc1   Digvijay Singh   ui flow change
656
657
658
659
660
661
662
663
664
665
              <div class="replies col-md-12">
                <div
                  class="replies-wrp"
                  v-for="(comments, j) in userComments"
                  :key="j"
                >
                  <h1>
                    {{ comments.casestudy.intro.name }}
                    <span>{{ comments.casestudy.intro.type }} </span>
                  </h1>
5684145ce   Digvijay Singh   reset password,ot...
666
                  <ul class="joined-info">
2991bacc1   Digvijay Singh   ui flow change
667
668
669
670
671
672
                    <li>
                      <a href="javasript:void(0);"
                        >{{ dateGenerator(comments.createdAt) }} D</a
                      >
                      <span></span>
                    </li>
5684145ce   Digvijay Singh   reset password,ot...
673
                    <li><img src="../assets/images/heart.png" /></li>
2991bacc1   Digvijay Singh   ui flow change
674
675
676
                    <li>
                      <a href="javasript:void(0);"> {{ comments.likes }}</a>
                    </li>
5684145ce   Digvijay Singh   reset password,ot...
677
678
679
                    <li class="comment-spc">
                      <img src="../assets/images/comment.svg" />
                    </li>
2991bacc1   Digvijay Singh   ui flow change
680
681
682
                    <li>
                      <a href="javasript:void(0);"> {{ comments.replies }}</a>
                    </li>
5684145ce   Digvijay Singh   reset password,ot...
683
684
                  </ul>
                  <p>
2991bacc1   Digvijay Singh   ui flow change
685
                    {{ comments.comment }}
f2328546d   Digvijay Singh   new changes
686
                    <!-- I wonder what the difference between “<strong>
5684145ce   Digvijay Singh   reset password,ot...
687
688
                      Assistant</strong
                    >” and “<strong>Pickup and Drop</strong>” are. If they are the
f2328546d   Digvijay Singh   new changes
689
690
                    same, there are two “call to actions” for the same workflow -->
                  </p>
5684145ce   Digvijay Singh   reset password,ot...
691
692
693
694
695
696
697
                </div>
                <!-- replies wrapper -->
              </div>
              <!-- all card wrpper -->
            </div>
          </div>
          <!-- all Relpies -->
298fff252   Digvijay Singh   new design added
698
699
        </div>
        <!-- data wrp -->
f06677bfc   Digvijay Singh   profile screen added
700
701
702
703
704
705
        <!-- body wrapper -->
      </div>
    </main>
  </template>
  
  <script>
f06677bfc   Digvijay Singh   profile screen added
706
707
708
  import Vue from "vue";
  import router from "../router";
  import $ from "jquery";
5684145ce   Digvijay Singh   reset password,ot...
709
  import axios from "axios";
2b91d45ce   Digvijay Singh   new ui fixes
710
  import Header from "./Header";
2991bacc1   Digvijay Singh   ui flow change
711
  import moment from "moment";
f2328546d   Digvijay Singh   new changes
712

f06677bfc   Digvijay Singh   profile screen added
713
714
  export default {
    name: "Profile",
2b91d45ce   Digvijay Singh   new ui fixes
715
716
717
    components: {
      Header: Header,
    },
4234f1fc0   Digvijay Singh   profile module added
718
719
720
    data: () => ({
      loggedinFlag: false,
      usertoken: null,
145dd9bde   Digvijay Singh   ui fixes
721
      currentLink: null,
4234f1fc0   Digvijay Singh   profile module added
722
      userData: {
145dd9bde   Digvijay Singh   ui fixes
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
        socialMediaProfiles: {
          facebook: null,
          linkedin: null,
          medium: null,
          twitter: null,
          behance: null,
          dribble: null,
          github: null,
          stackoverflow: null,
          instagram: null,
        },
        awards: {
          views: null,
          likes: null,
          comments: null,
        },
        verified: true,
        phoneNo: null,
        bio: null,
        designation: null,
        organisation: null,
4234f1fc0   Digvijay Singh   profile module added
744
745
746
747
        bgColor: null,
        interests: [],
        karmaPoints: null,
        socialLogin: null,
145dd9bde   Digvijay Singh   ui fixes
748
        firstLogin: null,
4234f1fc0   Digvijay Singh   profile module added
749
750
751
752
753
754
755
        notification: null,
        profilePic: null,
        role: null,
        name: null,
        email: null,
        firstName: null,
        lastName: null,
4234f1fc0   Digvijay Singh   profile module added
756
757
758
759
      },
      caseStudies: [],
      interestName: null,
      oldId: null,
4234f1fc0   Digvijay Singh   profile module added
760
761
762
      currentSocialLinkName: null,
      showCompany: false,
      showDesignation: false,
2991bacc1   Digvijay Singh   ui flow change
763
      sameUser: false,
145dd9bde   Digvijay Singh   ui fixes
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
      socialLink: [
        {
          displayName: "Facebook",
          fieldName: "facebook",
          fieldValue: null,
          image: require(`../assets/images/facebook.png`),
        },
        {
          displayName: "Linkedin",
          fieldName: "linkedin",
          fieldValue: null,
          image: require(`../assets/images/linkedin.png`),
        },
        {
          displayName: "Medium",
          fieldName: "medium",
          fieldValue: null,
          image: require(`../assets/images/medium.png`),
        },
        {
          displayName: "Twitter",
          fieldName: "twitter",
          fieldValue: null,
          image: require(`../assets/images/twitter.png`),
        },
        {
          displayName: "Behance",
          fieldName: "behance",
          fieldValue: null,
          image: require(`../assets/images/behance.png`),
        },
        {
          displayName: "Dribble",
          fieldName: "dribble",
          fieldValue: null,
2b91d45ce   Digvijay Singh   new ui fixes
799
          image: require(`../assets/images/dribbble.png`),
145dd9bde   Digvijay Singh   ui fixes
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
        },
        {
          displayName: "Github",
          fieldName: "github",
          fieldValue: null,
          image: require(`../assets/images/github.png`),
        },
        {
          displayName: "Stackoverflow",
          fieldName: "stackoverflow",
          fieldValue: null,
          image: require(`../assets/images/stack overflow.png`),
        },
        {
          displayName: "Instagram",
          fieldName: "instagram",
          fieldValue: null,
2b91d45ce   Digvijay Singh   new ui fixes
817
          image: require(`../assets/images/instagram.png`),
145dd9bde   Digvijay Singh   ui fixes
818
819
820
        },
      ],
      selectedSocialLink: [],
2991bacc1   Digvijay Singh   ui flow change
821
      userComments: [],
4234f1fc0   Digvijay Singh   profile module added
822
    }),
838025940   Digvijay Singh   object assign issue
823

298fff252   Digvijay Singh   new design added
824
    mounted() {
5684145ce   Digvijay Singh   reset password,ot...
825
      this.userData = {};
145dd9bde   Digvijay Singh   ui fixes
826
      // this.socialLink = [];
5684145ce   Digvijay Singh   reset password,ot...
827
      this.userData.interests = [];
298fff252   Digvijay Singh   new design added
828
      var userdata = localStorage.getItem("spotlight_usertoken");
2991bacc1   Digvijay Singh   ui flow change
829
830
831
832
833
834
      var userId = localStorage.getItem("spotlight_id");
      if (userId) {
        if (this.$route.params.id == userId) {
          this.sameUser = true;
        }
      }
298fff252   Digvijay Singh   new design added
835
836
837
      if (userdata) {
        userdata = JSON.parse(userdata);
        this.usertoken = userdata.token;
2991bacc1   Digvijay Singh   ui flow change
838
839
840
841
842
843
844
845
846
847
848
        // this.getProfile();
        if (this.sameUser) {
          this.getProfileById();
          this.getUserComments();
          this.getCaseStudies();
        }
      }
      if (!this.sameUser) {
        this.getProfileById();
        this.getCaseStudieById();
        this.getUserCommentsById();
298fff252   Digvijay Singh   new design added
849
      }
298fff252   Digvijay Singh   new design added
850
    },
f06677bfc   Digvijay Singh   profile screen added
851
    methods: {
298fff252   Digvijay Singh   new design added
852
      goToSignUp() {
56f4b7548   Digvijay Singh   landing page url ...
853
        this.$router.push("/");
f06677bfc   Digvijay Singh   profile screen added
854
855
856
857
      },
      goToReset() {
        this.$router.push("/reset");
      },
5684145ce   Digvijay Singh   reset password,ot...
858
      logout() {
f2328546d   Digvijay Singh   new changes
859
        localStorage.removeItem("spotlight_usertoken");
2991bacc1   Digvijay Singh   ui flow change
860
        localStorage.removeItem("spotlight_id");
f2328546d   Digvijay Singh   new changes
861
        localStorage.removeItem("spotlight_email");
56f4b7548   Digvijay Singh   landing page url ...
862
        this.$router.push("/login");
5684145ce   Digvijay Singh   reset password,ot...
863
      },
2991bacc1   Digvijay Singh   ui flow change
864
865
866
867
868
      dateGenerator(curreDate) {
        var todayDate = moment(new Date(), "DD.MM.YYYY");
        var endDate = moment(new Date(curreDate), "DD.MM.YYYY");
        var result = todayDate.diff(endDate, "days");
        return result;
f2328546d   Digvijay Singh   new changes
869
      },
145dd9bde   Digvijay Singh   ui fixes
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
      prefillSocialLink(links) {
        var keys = [];
        keys = Object.keys(links);
        keys.forEach((link_) => {
          console.log(link_, ":", links[link_]);
          if (links[link_] != null) {
            var i = this.socialLink.findIndex(
              (links_) => links_.fieldName == link_
            );
            if (i != -1) {
              this.selectedSocialLink.push({
                displayName: this.socialLink[i].displayName,
                fieldName: this.socialLink[i].fieldName,
                image: this.socialLink[i].image,
                fieldValue: links[link_],
              });
            }
          }
        });
        console.log("links-- are--", links);
      },
      addSocialLink(id) {
        this.currentLink = null;
        var i = this.selectedSocialLink.findIndex(
          (link_) => link_.fieldName == id
        );
        var j = this.socialLink.findIndex((links_) => links_.fieldName == id);
        if (i == -1) {
          this.selectedSocialLink.push({
            displayName: this.socialLink[j].displayName,
            fieldName: this.socialLink[j].fieldName,
2b91d45ce   Digvijay Singh   new ui fixes
901
            image: this.socialLink[j].image,
145dd9bde   Digvijay Singh   ui fixes
902
903
904
905
906
907
908
909
910
911
            fieldValue: null,
          });
        } else {
          this.$toaster.info(this.socialLink[j].displayName + " Already Exist");
        }
      },
      removeSocialLink(i) {
        var name = this.selectedSocialLink[i].fieldName;
        this.userData.socialMediaProfiles[name] = null;
        this.selectedSocialLink.splice(i, 1);
5684145ce   Digvijay Singh   reset password,ot...
912
      },
2b91d45ce   Digvijay Singh   new ui fixes
913

5684145ce   Digvijay Singh   reset password,ot...
914
915
916
917
918
919
920
921
922
923
      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) {
145dd9bde   Digvijay Singh   ui fixes
924
        console.log("i", i);
5684145ce   Digvijay Singh   reset password,ot...
925
        this.userData.interests.splice(i, 1);
145dd9bde   Digvijay Singh   ui fixes
926
        console.log(" this.userData", this.userData.interests);
5684145ce   Digvijay Singh   reset password,ot...
927
928
929
930
      },
      assignClass() {
        var element = document.getElementById(this.userData.bgColor);
        element.classList.add("active");
c65b51996   Digvijay Singh   new ui changes
931
        var cols = document.getElementsByClassName("common_color");
5684145ce   Digvijay Singh   reset password,ot...
932
933
934
        for (var i = 0; i < cols.length; i++) {
          cols[i].style.backgroundColor = this.userData.bgColor;
        }
5684145ce   Digvijay Singh   reset password,ot...
935
      },
2991bacc1   Digvijay Singh   ui flow change
936
      createString(list) {
5c9c1581c   Digvijay Singh   new ui changes
937
        var name = "";
2991bacc1   Digvijay Singh   ui flow change
938
939
        list.forEach((element) => {
          name = name + "," + element;
5c9c1581c   Digvijay Singh   new ui changes
940
        });
2991bacc1   Digvijay Singh   ui flow change
941
942
        console.log("name is", name);
        return name.substring(1);
5c9c1581c   Digvijay Singh   new ui changes
943
      },
5684145ce   Digvijay Singh   reset password,ot...
944
      changeColor(clr) {
c65b51996   Digvijay Singh   new ui changes
945
        console.log(this.oldId, "clr", clr);
5684145ce   Digvijay Singh   reset password,ot...
946
947
948
949
950
951
952
        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
953
          cols[i].style.backgroundColor = clr;
5684145ce   Digvijay Singh   reset password,ot...
954
955
        }
        this.userData.bgColor = clr;
5684145ce   Digvijay Singh   reset password,ot...
956
      },
2991bacc1   Digvijay Singh   ui flow change
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
  
      getProfileById() {
        axios
          .get("/userProfile?userId=" + this.$route.params.id, {})
          .then((response) => {
            if (!response.data.data.socialMediaProfiles) {
              this.userData.socialMediaProfiles = {};
            }
            this.userData = response.data.data;
  
            // this.userData = response.data.data;
            this.oldId = this.userData.bgColor;
            console.log(this.oldId, "this.userData.", this.userData);
            console.log("this.userData.firstLogin ", this.userData.firstLogin);
            this.prefillSocialLink(this.userData.socialMediaProfiles);
            if (this.userData.firstLogin == true) {
              this.addProfileDialog();
            }
            this.assignClass();
            console.log(response.data.data);
          })
          .catch((error) => console.log(error));
      },
298fff252   Digvijay Singh   new design added
980
981
      getProfile() {
        axios
5684145ce   Digvijay Singh   reset password,ot...
982
983
984
985
986
987
          .get("/profile", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
838025940   Digvijay Singh   object assign issue
988
            if (!response.data.data.socialMediaProfiles) {
4234f1fc0   Digvijay Singh   profile module added
989
              this.userData.socialMediaProfiles = {};
838025940   Digvijay Singh   object assign issue
990
            }
09892a73f   Digvijay Singh   issue on profile ...
991
            this.userData = response.data.data;
4234f1fc0   Digvijay Singh   profile module added
992

3930b53f6   Digvijay Singh   object assign issue
993
            // this.userData = response.data.data;
c65b51996   Digvijay Singh   new ui changes
994
            this.oldId = this.userData.bgColor;
3930b53f6   Digvijay Singh   object assign issue
995
            console.log(this.oldId, "this.userData.", this.userData);
145dd9bde   Digvijay Singh   ui fixes
996
997
            console.log("this.userData.firstLogin ", this.userData.firstLogin);
            this.prefillSocialLink(this.userData.socialMediaProfiles);
4234f1fc0   Digvijay Singh   profile module added
998
999
1000
            if (this.userData.firstLogin == true) {
              this.addProfileDialog();
            }
5684145ce   Digvijay Singh   reset password,ot...
1001
1002
1003
1004
            this.assignClass();
            console.log(response.data.data);
          })
          .catch((error) => console.log(error));
298fff252   Digvijay Singh   new design added
1005
      },
7832f2f48   Digvijay Singh   randmise avatar
1006
1007
1008
1009
1010
1011
1012
1013
      getRandomAvatar() {
        axios
          .get("/randomAvatar", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
4234f1fc0   Digvijay Singh   profile module added
1014
            this.userData.profilePic = response.data.imageURL;
7832f2f48   Digvijay Singh   randmise avatar
1015
1016
1017
1018
            console.log(response.data.imageURL);
          })
          .catch((error) => console.log(error));
      },
2991bacc1   Digvijay Singh   ui flow change
1019
1020
1021
1022
1023
1024
1025
1026
1027
      getUserCommentsById() {
        axios
          .get("/userProfile/comments?userId=" + this.$route.params.id, {})
          .then((response) => {
            this.userComments = response.data.data;
            console.log(response.data);
          })
          .catch((error) => console.log(error));
      },
f2328546d   Digvijay Singh   new changes
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
      getUserComments() {
        axios
          .get("/profile/comments", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            this.userComments = response.data.data;
            console.log(response.data);
          })
          .catch((error) => console.log(error));
      },
2991bacc1   Digvijay Singh   ui flow change
1041
1042
1043
1044
1045
1046
1047
1048
1049
      getCaseStudieById() {
        axios
          .get("/profile/caseStudy?userId=" + this.$route.params.id)
          .then((response) => {
            console.log("----", response.data.data.caseStudies);
            this.caseStudies = response.data.data.caseStudies;
          })
          .catch((error) => console.log(error));
      },
c65b51996   Digvijay Singh   new ui changes
1050
1051
1052
1053
1054
1055
1056
1057
      getCaseStudies() {
        axios
          .get("/caseStudy/all", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
2991bacc1   Digvijay Singh   ui flow change
1058
            console.log("----", response.data.data.caseStudies);
c65b51996   Digvijay Singh   new ui changes
1059
1060
1061
1062
1063
1064
1065
            this.caseStudies = response.data.data.caseStudies;
          })
          .catch((error) => console.log(error));
      },
      openStudy(payload) {
        console.log("payload-", payload);
        payload.intro.date = payload.createdAt;
09892a73f   Digvijay Singh   issue on profile ...
1066
        payload.intro.focusPoint = payload.focusAreas;
c65b51996   Digvijay Singh   new ui changes
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
        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,
4234f1fc0   Digvijay Singh   profile module added
1092
              insight: slides_.insight ? slides_.insight : null,
c65b51996   Digvijay Singh   new ui changes
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
            },
          };
          // 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);
145dd9bde   Digvijay Singh   ui fixes
1124
        console.log("payload", payload);
4234f1fc0   Digvijay Singh   profile module added
1125
1126
1127
1128
        localStorage.setItem(
          "spotlight_slide" + payload._id,
          JSON.stringify(finalSlides)
        );
c65b51996   Digvijay Singh   new ui changes
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
        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
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
          {
            url: "TwoScreenWithoutInsight",
            tempId: "T4_4QC8W7kIYnJtZ26Jt0Go",
          },
          {
            url: "noscreenshotSingleautho",
            tempId: "T5_za3c3sYgx7bVvtKz5r0e",
          },
          {
            url: "SingleMobileScreenInsightOne",
            tempId: "T6_za3c3sYgx7bVvtKz5sgf",
          },
          {
            url: "TwoScreenWithInsight",
            tempId: "T7_za3c3sYgx7bVvtKzasdf",
          },
9dc773b1b   Digvijay Singh   new page added
1169
1170
1171
1172
1173
1174
1175
1176
          {
            url: "AuthorReadingNow",
            tempId: "T8_zb4d4fYgx7bVvtKzasdf",
          },
          {
            url: "AuthorReadingBreak",
            tempId: "T9_zb3e4fYgy7dVvfKdasdf",
          },
c65b51996   Digvijay Singh   new ui changes
1177
1178
1179
1180
        ];
        var i = routes.findIndex((routes_) => routes_.tempId == tempId);
        return routes[i].url;
      },
5684145ce   Digvijay Singh   reset password,ot...
1181
      saveProfile() {
298fff252   Digvijay Singh   new design added
1182
        var obj = {};
4234f1fc0   Digvijay Singh   profile module added
1183
1184
1185
        if (this.userData.firstLogin == true) {
          this.userData.firstLogin = false;
        }
5684145ce   Digvijay Singh   reset password,ot...
1186
1187
        this.userData.name =
          this.userData.firstName + " " + this.userData.lastName;
298fff252   Digvijay Singh   new design added
1188
        obj = Object.assign(obj, this.userData);
5684145ce   Digvijay Singh   reset password,ot...
1189
1190
1191
        // if(!obj.socialMediaProfiles){
        //   obj.socialMediaProfiles = {};
        // }
145dd9bde   Digvijay Singh   ui fixes
1192
1193
1194
1195
        this.selectedSocialLink.forEach((element) => {
          var key = element.fieldName;
          obj.socialMediaProfiles[key] = element.fieldValue;
        });
5684145ce   Digvijay Singh   reset password,ot...
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
        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;
09892a73f   Digvijay Singh   issue on profile ...
1206
        delete obj.phoneNo;
5684145ce   Digvijay Singh   reset password,ot...
1207
1208
        axios
          .put("/profile", obj, {
298fff252   Digvijay Singh   new design added
1209
1210
1211
1212
1213
1214
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            // this.userData = response.data.data;
c65b51996   Digvijay Singh   new ui changes
1215
            this.$toaster.success("Profile Updated");
196f4eb8f   Digvijay Singh   tooltip added
1216
            this.closeDialog();
298fff252   Digvijay Singh   new design added
1217
1218
            console.log(response.data.data);
          })
5684145ce   Digvijay Singh   reset password,ot...
1219
1220
1221
1222
1223
          .catch((error) => {
            if (error.response) {
              this.$toaster.error(error.response.data.message);
            }
          });
298fff252   Digvijay Singh   new design added
1224
      },
921970bb2   Gurvinder Singh   new files
1225
      addProfileDialog() {
298fff252   Digvijay Singh   new design added
1226
        $(".inner-wrp").addClass("body-blur");
5684145ce   Digvijay Singh   reset password,ot...
1227
        $("#add-social-links").hide();
921970bb2   Gurvinder Singh   new files
1228
        $(".popup-wrp, #add-profile").show();
298fff252   Digvijay Singh   new design added
1229
      },
921970bb2   Gurvinder Singh   new files
1230
      nextProfileDialog() {
5684145ce   Digvijay Singh   reset password,ot...
1231
1232
1233
1234
1235
1236
1237
        $("#add-profile").hide();
        $("#add-social-links").show();
        this.saveProfile();
      },
      closeDialog() {
        $(".popup-wrp").hide();
        $(".inner-wrp").removeClass("body-blur");
196f4eb8f   Digvijay Singh   tooltip added
1238
        // this.saveProfile();
298fff252   Digvijay Singh   new design added
1239
      },
1620582c6   Digvijay Singh   close dialog
1240
1241
1242
1243
      hideDialog() {
        $(".popup-wrp").hide();
        $(".inner-wrp").removeClass("body-blur");
      },
5684145ce   Digvijay Singh   reset password,ot...
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
      ///
      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
1257

5684145ce   Digvijay Singh   reset password,ot...
1258
1259
1260
      userprofileshowDialog() {
        $("#userprofileshow").toggle();
      },
4234f1fc0   Digvijay Singh   profile module added
1261
      openUrl(url) {
7832f2f48   Digvijay Singh   randmise avatar
1262
1263
        window.open(url);
      },
f06677bfc   Digvijay Singh   profile screen added
1264
1265
1266
    },
  };
  </script>
196f4eb8f   Digvijay Singh   tooltip added
1267
  <style>
4234f1fc0   Digvijay Singh   profile module added
1268
  .no-cursor {
196f4eb8f   Digvijay Singh   tooltip added
1269
1270
    cursor: default !important;
  }
4234f1fc0   Digvijay Singh   profile module added
1271
  .no-underline {
56f4b7548   Digvijay Singh   landing page url ...
1272
1273
    text-decoration: none !important;
  }
145dd9bde   Digvijay Singh   ui fixes
1274
1275
1276
1277
1278
1279
  .position-left {
    left: 15px !important;
  }
  .padding-right {
    padding-right: 0px !important;
  }
2b91d45ce   Digvijay Singh   new ui fixes
1280
1281
1282
1283
1284
1285
  
  .social-link-right {
    display: flex;
    flex-flow: column wrap;
    align-content: flex-end;
  }
196f4eb8f   Digvijay Singh   tooltip added
1286
  </style>