Blame view

src/components/NoScreenshotSingleAuthor.vue 29.8 KB
de0f96bc5   Gurvinder Singh   new files
1
2
  <template>
    <main class="landing-page">
de0f96bc5   Gurvinder Singh   new files
3
      <div class="container-fluid episode-intro">
2b91d45ce   Digvijay Singh   new ui fixes
4
            <Header></Header>
de0f96bc5   Gurvinder Singh   new files
5
        <!-- menu wrapper -->
c65b51996   Digvijay Singh   new ui changes
6
        <div class="intro-startup">
2b91d45ce   Digvijay Singh   new ui fixes
7
  <!-- chat box -->
c65b51996   Digvijay Singh   new ui changes
8
9
10
11
12
13
14
          <div class="bounce-board-wrp" id="cht_box_close">
            <div class="inner-wrp-bc">
              <div class="bc-top-head">
                <span class="bc-head">
                  <img src="../assets/images/bounce-icon.svg" /> Bounce Board
                </span>
                <div class="action-sort">
5c9c1581c   Digvijay Singh   new ui changes
15
               <!-- <span class="sort-by">SORT BY</span>
c65b51996   Digvijay Singh   new ui changes
16
17
18
19
                  <div class="btn-group">
                    <button
                      type="button"
                      class="bc-sort-list dropdown-toggle"
c65b51996   Digvijay Singh   new ui changes
20
21
22
23
24
25
26
                      data-toggle="dropdown"
                      aria-haspopup="true"
                      aria-expanded="false"
                    >
                      BEST
                    </button>
                    <div class="dropdown-menu short_by">
1f12ffc55   Digvijay Singh   issues fixation
27
                      <a class="dropdown-item" href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
28
29
                        >BEST 1</a
                      >
1f12ffc55   Digvijay Singh   issues fixation
30
                      <a class="dropdown-item" href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
31
32
                        >BEST 2</a
                      >
1f12ffc55   Digvijay Singh   issues fixation
33
                      <a class="dropdown-item" href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
34
35
                        >BEST 3</a
                      >
c65b51996   Digvijay Singh   new ui changes
36
                    </div>
5c9c1581c   Digvijay Singh   new ui changes
37
                  </div> -->
c65b51996   Digvijay Singh   new ui changes
38
                  <a
1f12ffc55   Digvijay Singh   issues fixation
39
                    href="javasript:void(0);"
c65b51996   Digvijay Singh   new ui changes
40
41
42
43
44
45
46
47
48
                    @click="chtbox_close"
                    class="close_chat_bx"
                    ><img src="../assets/images/close.png" alt="close" /></a
                  ><!-- close -->
                </div>
                <!-- action sort -->
              </div>
              <!-- top head -->
              <div class="bounce-board-body">
c65b51996   Digvijay Singh   new ui changes
49
50
                <!-- all user comments -->
                <ul class="bounced-user-comments">
d0186c77a   Digvijay Singh   changes in ui
51
                  <li class="bc_border" v-for="(cmnt, j) in commentList" :key="j">
c65b51996   Digvijay Singh   new ui changes
52
53
                    <div class="bc_brd_l"></div>
                    <!-- border -->
2b91d45ce   Digvijay Singh   new ui fixes
54
                    <div class="parent-full-width" v-if="cmnt.comment">
c65b51996   Digvijay Singh   new ui changes
55
56
                      <div class="full-width">
                        <div class="b-user-head">
d0186c77a   Digvijay Singh   changes in ui
57
58
                          <img :src="cmnt.user.profilePic" />
                          <span class="head-content">{{ cmnt.user.name }} </span>
c65b51996   Digvijay Singh   new ui changes
59
60
61
                          <ul>
                            <li>
                              <span></span
d0186c77a   Digvijay Singh   changes in ui
62
63
64
                              ><img src="../assets/images/u-info-icon.png" />{{
                                cmnt.user.karmaPoints
                              }}pts
c65b51996   Digvijay Singh   new ui changes
65
                            </li>
2b91d45ce   Digvijay Singh   new ui fixes
66
67
68
                            <li>
                              <span></span>{{ dateGenerator(cmnt.createdAt) }}
                            </li>
c65b51996   Digvijay Singh   new ui changes
69
70
71
72
                          </ul>
                        </div>
                        <!-- header -->
                        <p>
d0186c77a   Digvijay Singh   changes in ui
73
                          {{ cmnt.comment }}
c65b51996   Digvijay Singh   new ui changes
74
75
76
77
                        </p>
                        <div class="joined_wrapper">
                          <ul class="joined-info info_bc_spc">
                            <li>
2b91d45ce   Digvijay Singh   new ui fixes
78
79
80
81
82
83
84
85
86
87
88
89
90
91
                              <img
                                src="../assets/images/heart.svg"
                                v-if="cmnt.like == false"
                                @click="likeComment(true, cmnt._id)"
                                class="cursor-pointer"
                              />
                              <img
                                src="../assets/images/purple-heart.png"
                                v-if="cmnt.like == true"
                                @click="likeComment(false, cmnt._id)"
                                class="cursor-pointer"
                              />
                            </li>
                            <li>
1f12ffc55   Digvijay Singh   issues fixation
92
                              <a href="javasript:void(0);">
2b91d45ce   Digvijay Singh   new ui fixes
93
94
                                {{ cmnt.likes.length }}</a
                              >
c65b51996   Digvijay Singh   new ui changes
95
                            </li>
c65b51996   Digvijay Singh   new ui changes
96
97
98
                            <li class="comment-spc">
                              <img src="../assets/images/purple-comment.png" />
                            </li>
2b91d45ce   Digvijay Singh   new ui fixes
99
                            <li>
1f12ffc55   Digvijay Singh   issues fixation
100
                              <a href="javasript:void(0);">
2b91d45ce   Digvijay Singh   new ui fixes
101
102
103
                                {{ cmnt.children.length }}</a
                              >
                            </li>
c65b51996   Digvijay Singh   new ui changes
104
                          </ul>
d0186c77a   Digvijay Singh   changes in ui
105
106
107
108
109
110
111
                          <div class="add_rply" v-if="!cmnt.childInput">
                            <input
                              type="text"
                              @click="eachRply(cmnt)"
                              class="add_Rply_C"
                              placeholder="Add your reply"
                            />
c65b51996   Digvijay Singh   new ui changes
112
113
                          </div>
                          <!-- rly form -->
c65b51996   Digvijay Singh   new ui changes
114
115
116
117
118
                        </div>
                        <!-- joined wrapper -->
                      </div>
                      <!-- full width -->
                    </div>
d0186c77a   Digvijay Singh   changes in ui
119
                    <div class="comments-footer each-ft" v-if="cmnt.childInput">
2b91d45ce   Digvijay Singh   new ui fixes
120
                      <textarea v-model="comment" id="childInput"></textarea>
d0186c77a   Digvijay Singh   changes in ui
121
122
123
                      <div class="comments-footer-wrp">
                        <a
                          @click="createChildComment(cmnt)"
1f12ffc55   Digvijay Singh   issues fixation
124
                          href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
125
126
127
                          class="add_comments_chat reply-Wdth"
                          >Reply</a
                        >
2b91d45ce   Digvijay Singh   new ui fixes
128
                        <a
1f12ffc55   Digvijay Singh   issues fixation
129
                          href="javasript:void(0);"
2b91d45ce   Digvijay Singh   new ui fixes
130
131
132
                          class="discard_bt"
                          @click="discardRply(cmnt)"
                          ><img src="../assets/images/discard.svg"
d0186c77a   Digvijay Singh   changes in ui
133
134
135
                        /></a>
                      </div>
                    </div>
c65b51996   Digvijay Singh   new ui changes
136
                    <!-- parent -->
2b91d45ce   Digvijay Singh   new ui fixes
137
138
139
140
141
                    <div
                      class="child-full-width"
                      v-for="(childCmnt, i) in cmnt.children"
                      :key="i"
                    >
c65b51996   Digvijay Singh   new ui changes
142
143
                      <div class="full-width">
                        <div class="b-user-head">
d0186c77a   Digvijay Singh   changes in ui
144
                          <img :src="childCmnt.user.profilePic" />
2b91d45ce   Digvijay Singh   new ui fixes
145
146
147
                          <span class="head-content"
                            >{{ childCmnt.user.name }}
                          </span>
c65b51996   Digvijay Singh   new ui changes
148
149
150
                          <ul>
                            <li>
                              <span></span
2b91d45ce   Digvijay Singh   new ui fixes
151
152
153
154
155
156
157
                              ><img src="../assets/images/u-info-icon.png" />{{
                                childCmnt.user.karmaPoints
                              }}pts
                            </li>
                            <li>
                              <span></span
                              >{{ dateGenerator(childCmnt.createdAt) }}
c65b51996   Digvijay Singh   new ui changes
158
                            </li>
c65b51996   Digvijay Singh   new ui changes
159
160
161
                          </ul>
                        </div>
                        <p>
2b91d45ce   Digvijay Singh   new ui fixes
162
                          {{ childCmnt.comment }}
c65b51996   Digvijay Singh   new ui changes
163
164
165
166
                        </p>
                        <div class="joined_wrapper">
                          <ul class="joined-info info_bc_spc">
                            <li>
2b91d45ce   Digvijay Singh   new ui fixes
167
168
169
170
171
172
173
174
175
176
177
178
179
180
                              <img
                                src="../assets/images/heart.svg"
                                v-if="childCmnt.like == false"
                                @click="likeComment(true, childCmnt._id)"
                                class="cursor-pointer"
                              />
                              <img
                                src="../assets/images/purple-heart.png"
                                v-if="childCmnt.like == true"
                                @click="likeComment(false, childCmnt._id)"
                                class="cursor-pointer"
                              />
                            </li>
                            <li>
1f12ffc55   Digvijay Singh   issues fixation
181
                              <a href="javasript:void(0);">
2b91d45ce   Digvijay Singh   new ui fixes
182
183
                                {{ childCmnt.likes.length }}</a
                              >
c65b51996   Digvijay Singh   new ui changes
184
                            </li>
c65b51996   Digvijay Singh   new ui changes
185
                          </ul>
c65b51996   Digvijay Singh   new ui changes
186
187
                        </div>
                      </div>
d0186c77a   Digvijay Singh   changes in ui
188
189
                    </div>
                    <!-- eree -->
2b91d45ce   Digvijay Singh   new ui fixes
190

d0186c77a   Digvijay Singh   changes in ui
191
                    <!-- comments footer -->
c65b51996   Digvijay Singh   new ui changes
192
193
194
195
                  </li>
                </ul>
              </div>
              <!-- bounce board body -->
d0186c77a   Digvijay Singh   changes in ui
196
197
              <div class="comments-footer" v-if="parentInput">
                <textarea v-model="comment"></textarea>
c65b51996   Digvijay Singh   new ui changes
198
                <div class="comments-footer-wrp">
d0186c77a   Digvijay Singh   changes in ui
199
                  <a
1f12ffc55   Digvijay Singh   issues fixation
200
                    href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
201
202
                    class="add_comments_chat"
                    @click="createComment"
c65b51996   Digvijay Singh   new ui changes
203
204
205
206
207
208
209
210
211
212
213
214
215
216
                    ><img src="../assets/images/add-comment.svg" /> Comment</a
                  >
                </div>
              </div>
              <!-- comments footer -->
            </div>
          </div>
          <!-- bounceboard wrp -->
          <!-- chat box -->
  
  
          <div class="single-author-comments">
            <!-- <img class="s-user-comments" src="../assets/images/u-info.png" /> -->
            <div class="ct-l-400">
2b91d45ce   Digvijay Singh   new ui fixes
217
                   <div class="single-author-li-comments" v-if="commentExistCheck(0)">
c65b51996   Digvijay Singh   new ui changes
218
219
                <div class="a-intro-comments right-corner">
                  <p>
2b91d45ce   Digvijay Singh   new ui fixes
220
                    {{commentList[0].comment}}
c65b51996   Digvijay Singh   new ui changes
221
222
                  </p>
                  <ul class="rly-comment-set">
2b91d45ce   Digvijay Singh   new ui fixes
223
                    <!-- like/dislike -->
c65b51996   Digvijay Singh   new ui changes
224
                    <li>
2b91d45ce   Digvijay Singh   new ui fixes
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
                      <img
                        src="../assets/images/heart.svg"
                        v-if="commentList[0].like == false"
                        @click="likeComment(true, commentList[0]._id)"
                        class="cursor-pointer"
                      />
                      <img
                        src="../assets/images/purple-heart.png"
                        v-if="commentList[0].like == true"
                        @click="likeComment(false, commentList[0]._id)"
                        class="cursor-pointer"
                      />
                      <a href="javascript:void(0);">{{
                        commentList[0].likes.length
                      }}</a>
c65b51996   Digvijay Singh   new ui changes
240
                    </li>
2b91d45ce   Digvijay Singh   new ui fixes
241
                    <!-- like/dislike ends -->
c65b51996   Digvijay Singh   new ui changes
242
243
                    <li>
                      <img src="../assets/images/rply.svg" />
2b91d45ce   Digvijay Singh   new ui fixes
244
245
246
                      <a href="javascript:void(0);" @click="reply_cht_box(0)"
                        >Reply</a
                      >
c65b51996   Digvijay Singh   new ui changes
247
248
249
250
251
252
253
254
255
256
257
                    </li>
                  </ul>
                </div>
                <!-- comments box -->
              </div>
            </div>
            <img
              class="s-user-comments m-0"
              :src="currentSlideData.payload.metaData.authorImage"
            />
            <div class="comments-a-wrp ct-width">           
2b91d45ce   Digvijay Singh   new ui fixes
258
              <div class="single-author-li-comments" v-if="commentExistCheck(1)">
c65b51996   Digvijay Singh   new ui changes
259
260
                <div class="a-intro-comments">
                  <p>
2b91d45ce   Digvijay Singh   new ui fixes
261
                    {{commentList[1].comment}}
c65b51996   Digvijay Singh   new ui changes
262
263
                  </p>
                  <ul class="rly-comment-set">
2b91d45ce   Digvijay Singh   new ui fixes
264
                    <!-- like/dislike -->
c65b51996   Digvijay Singh   new ui changes
265
                    <li>
2b91d45ce   Digvijay Singh   new ui fixes
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
                      <img
                        src="../assets/images/heart.svg"
                        v-if="commentList[1].like == false"
                        @click="likeComment(true, commentList[1]._id)"
                        class="cursor-pointer"
                      />
                      <img
                        src="../assets/images/purple-heart.png"
                        v-if="commentList[1].like == true"
                        @click="likeComment(false, commentList[1]._id)"
                        class="cursor-pointer"
                      />
                      <a href="javascript:void(0);">{{
                        commentList[1].likes.length
                      }}</a>
c65b51996   Digvijay Singh   new ui changes
281
                    </li>
2b91d45ce   Digvijay Singh   new ui fixes
282
                    <!-- like/dislike ends -->
c65b51996   Digvijay Singh   new ui changes
283
284
                    <li>
                      <img src="../assets/images/rply.svg" />
2b91d45ce   Digvijay Singh   new ui fixes
285
286
287
                      <a href="javascript:void(0);" @click="reply_cht_box(1)"
                        >Reply</a
                      >
c65b51996   Digvijay Singh   new ui changes
288
289
290
291
292
293
                    </li>
                  </ul>
                </div>
                <!-- comments box -->
              </div>
              <!-- single author comments -->
2b91d45ce   Digvijay Singh   new ui fixes
294
              <div class="single-author-li-comments"  v-if="commentExistCheck(2)"> 
c65b51996   Digvijay Singh   new ui changes
295
296
                <div class="a-intro-comments">
                  <p>
2b91d45ce   Digvijay Singh   new ui fixes
297
                    {{commentList[2].comment}}
c65b51996   Digvijay Singh   new ui changes
298
299
                  </p>
                  <ul class="rly-comment-set">
2b91d45ce   Digvijay Singh   new ui fixes
300
                    <!-- like/dislike -->
c65b51996   Digvijay Singh   new ui changes
301
                    <li>
2b91d45ce   Digvijay Singh   new ui fixes
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
                      <img
                        src="../assets/images/heart.svg"
                        v-if="commentList[2].like == false"
                        @click="likeComment(true, commentList[2]._id)"
                        class="cursor-pointer"
                      />
                      <img
                        src="../assets/images/purple-heart.png"
                        v-if="commentList[2].like == true"
                        @click="likeComment(false, commentList[2]._id)"
                        class="cursor-pointer"
                      />
                      <a href="javascript:void(0);">{{
                        commentList[2].likes.length
                      }}</a>
c65b51996   Digvijay Singh   new ui changes
317
                    </li>
2b91d45ce   Digvijay Singh   new ui fixes
318
                    <!-- like/dislike ends -->
c65b51996   Digvijay Singh   new ui changes
319
320
                    <li>
                      <img src="../assets/images/rply.svg" />
2b91d45ce   Digvijay Singh   new ui fixes
321
322
323
                      <a href="javascript:void(0);" @click="reply_cht_box(2)"
                        >Reply</a
                      >
c65b51996   Digvijay Singh   new ui changes
324
325
326
327
328
                    </li>
                  </ul>
                </div>
                <!-- comments box -->
              </div>
2b91d45ce   Digvijay Singh   new ui fixes
329
330
              <!-- coment box 3 -->
              <!-- <div class="single-author-li-comments" v-if="commentExistCheck(3)">
c65b51996   Digvijay Singh   new ui changes
331
332
                <div class="a-intro-comments">
                  <p>
2b91d45ce   Digvijay Singh   new ui fixes
333
                    {{commentList[3].comment}}
c65b51996   Digvijay Singh   new ui changes
334
                  </p>
2b91d45ce   Digvijay Singh   new ui fixes
335
                 <ul class="rly-comment-set">
c65b51996   Digvijay Singh   new ui changes
336
                    <li>
2b91d45ce   Digvijay Singh   new ui fixes
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
                      <img
                        src="../assets/images/heart.svg"
                        v-if="commentList[3].like == false"
                        @click="likeComment(true, commentList[2]._id)"
                        class="cursor-pointer"
                      />
                      <img
                        src="../assets/images/purple-heart.png"
                        v-if="commentList[3].like == true"
                        @click="likeComment(false, commentList[3]._id)"
                        class="cursor-pointer"
                      />
                      <a href="javascript:void(0);">{{
                        commentList[3].likes.length
                      }}</a>
c65b51996   Digvijay Singh   new ui changes
352
353
354
                    </li>
                    <li>
                      <img src="../assets/images/rply.svg" />
2b91d45ce   Digvijay Singh   new ui fixes
355
356
357
                      <a href="javascript:void(0);" @click="reply_cht_box(3)"
                        >Reply</a
                      >
c65b51996   Digvijay Singh   new ui changes
358
359
360
                    </li>
                  </ul>
                </div>
2b91d45ce   Digvijay Singh   new ui fixes
361
362
              </div> -->
                    <!-- coment box 3 -->
c65b51996   Digvijay Singh   new ui changes
363
364
              <!-- single author comments -->
              <!-- <div class="a-intro-comments custom-selected-author-style">
de0f96bc5   Gurvinder Singh   new files
365
366
                <img src="../assets/images/org-rect.svg" class="rect" />
                <div class="top-wrp">
56f4b7548   Digvijay Singh   landing page url ...
367
               Product Insight <a href="javascript:void(0);"><img src="../assets/images/org-link.svg" /></a>
de0f96bc5   Gurvinder Singh   new files
368
369
370
371
372
                </div>
                <div class="top-head">Automate your customer support for better engagement</div>
                 <p>Only 9% of consumers believe it’s acceptable to wait up to one minute to speak with an agent. Automated service is a critical step in giving customers a platform to become self-sufficient. </p>
  
              
c65b51996   Digvijay Singh   new ui changes
373
374
                  </div> -->
              <!-- comments box -->
de0f96bc5   Gurvinder Singh   new files
375
            </div>
c65b51996   Digvijay Singh   new ui changes
376
          </div>
d0186c77a   Digvijay Singh   changes in ui
377
       <!-- single author comments -->
c65b51996   Digvijay Singh   new ui changes
378
379
380
381
382
          <div class="footer-nav">
            <div class="footer-top white-bg">
              <div class="row">
                <div class="col-6 col-sm-6 col-md-6 col-lg-6 c_hide">
                  <div class="row h-100p">
d0186c77a   Digvijay Singh   changes in ui
383
384
385
                    <div
                      class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 bord-r"
                    >
c65b51996   Digvijay Singh   new ui changes
386
387
                      <div class="ft-comments-group testi-photos-ct">
                        <div class="c-with-photos">
d0186c77a   Digvijay Singh   changes in ui
388
                          <span class="count-comments"
2b91d45ce   Digvijay Singh   new ui fixes
389
390
                            >{{ getLastcomment("count", commentList) }}+
                            Comments</span
c65b51996   Digvijay Singh   new ui changes
391
392
                          ><!-- count commets -->
                          <ul class="comments-photos">
5c9c1581c   Digvijay Singh   new ui changes
393
394
395
                             <!-- <li><img src="../assets/images/c-photo-1.png" /></li> 
                            <li><img src="../assets/images/c-photo-2.png" /></li> 
                             <li><img src="../assets/images/c-photo-3.png" /></li>  -->
c65b51996   Digvijay Singh   new ui changes
396
397
398
399
                          </ul>
                          <!-- comment photos -->
                        </div>
                        <div class="comments-detail all-c-space">
d0186c77a   Digvijay Singh   changes in ui
400
                          <span
2b91d45ce   Digvijay Singh   new ui fixes
401
                            >{{ getLastcomment("name", commentList) }}
d0186c77a   Digvijay Singh   changes in ui
402
403
404
405
                            <a href="javascript:void(0);" @click="open_ct_box"
                              >View All</a
                            ></span
                          >
c65b51996   Digvijay Singh   new ui changes
406
407
408
                          <p>
                            <!-- I wonder what the difference between “Dunzo Assistant”
                            and “Pickup and Drop... -->
2b91d45ce   Digvijay Singh   new ui fixes
409
                            {{ getLastcomment("msg", commentList) }}
c65b51996   Digvijay Singh   new ui changes
410
411
412
413
414
                          </p>
                        </div>
                        <!-- comments detail -->
                      </div>
                      <!-- comments Group -->
de0f96bc5   Gurvinder Singh   new files
415
                    </div>
c65b51996   Digvijay Singh   new ui changes
416
                  </div>
de0f96bc5   Gurvinder Singh   new files
417
                </div>
c65b51996   Digvijay Singh   new ui changes
418
                <div class="col-4 col-sm-4 col-md-4 col-lg-4 c_hide">
d0186c77a   Digvijay Singh   changes in ui
419
                  <div class="comment-frm no-c-frm">
c65b51996   Digvijay Singh   new ui changes
420
421
422
                    <div class="row">
                      <div class="col-8 col-sm-8 col-md-8 col-lg-10 col-xl-10">
                        <div class="form-group frm-wdth addfrm-spc">
c65b51996   Digvijay Singh   new ui changes
423
424
425
                          <input
                            type="text"
                            class="form-control"
145dd9bde   Digvijay Singh   ui fixes
426
                            placeholder="Something on your mind?"
d0186c77a   Digvijay Singh   changes in ui
427
428
                            id="open_ct_box"
                            v-model="comment"
c65b51996   Digvijay Singh   new ui changes
429
430
431
432
                          />
                        </div>
                      </div>
                      <div class="col-2 col-sm-4 col-md-4 col-lg-4 col-xl-2">
d0186c77a   Digvijay Singh   changes in ui
433
434
435
436
                        <a
                          href="javascript:void(0);"
                          @click="createComment"
                          class="add-comment"
c65b51996   Digvijay Singh   new ui changes
437
438
439
440
441
442
443
444
                          ><img src="../assets/images/add-comment.svg" />
                          Comment</a
                        >
                      </div>
                    </div>
                    <!-- comment from -->
                  </div>
                </div>
d0186c77a   Digvijay Singh   changes in ui
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
                <div class="col-2 col-sm-2 col-md-2 col-lg-2 col-xl-2">
                  <ul class="top-intro-bt">
                    <li>
                      <a href="javascript:void(0);" @click="goBack"
                        ><img src="../assets/images/skip-prev.svg" /> Prev</a
                      >
                    </li>
                    <li>
                      <a href="javascript:void(0);" @click="goNext"
                        ><img src="../assets/images/skip-next.svg" /> Skip to next
                        slide</a
                      >
                    </li>
                  </ul>
                </div>
                <!-- buttons list -->
c65b51996   Digvijay Singh   new ui changes
461
462
463
464
465
466
467
468
469
470
471
472
473
              </div>
            </div>
            <!-- footer top -->
            <div class="footer-bottom">
              <ul>
                <li class="active"></li>
                <li></li>
              </ul>
            </div>
            <!-- footer top -->
          </div>
          <!-- footer -->
        </div>
de0f96bc5   Gurvinder Singh   new files
474
475
476
477
478
479
480
481
482
        <!-- body wrapper -->
      </div>
      <!-- main wrapper -->
    </main>
  </template>
  
  <script>
  import Vue from "vue";
  import router from "../router";
d0186c77a   Digvijay Singh   changes in ui
483
484
  import axios from "axios";
  import moment from 'moment';
2b91d45ce   Digvijay Singh   new ui fixes
485
  import Header from "./Header";
de0f96bc5   Gurvinder Singh   new files
486
487
  
  export default {
2b91d45ce   Digvijay Singh   new ui fixes
488
489
490
    components: {
      Header: Header,
    },
d0186c77a   Digvijay Singh   changes in ui
491
    name: "noscreenshotSingleautho",
de0f96bc5   Gurvinder Singh   new files
492
493
  
    data() {
c65b51996   Digvijay Singh   new ui changes
494
495
496
497
      return {
        allSlide: [],
        currentSlideIndex: null,
        currentSlideData: null,
d0186c77a   Digvijay Singh   changes in ui
498
499
500
501
502
        //
        usertoken: null,
        commentList: [],
        comment: null,
        parentInput:true,
c65b51996   Digvijay Singh   new ui changes
503
504
505
506
507
508
      };
    },
    mounted() {
      var allSlideData = localStorage.getItem(
        "spotlight_slide" + this.$route.params.caseStudyId
      );
6b14d08e4   Digvijay Singh   case studies
509
       if (allSlideData) {
c65b51996   Digvijay Singh   new ui changes
510
511
        this.allSlide = JSON.parse(allSlideData);
        this.getCurrentSlideData();
49055248c   Digvijay Singh   offline synching
512
513
514
515
516
517
518
519
520
521
522
         }else{
        this.getCurrentSlideData();
  
      }
      var userdata = localStorage.getItem("spotlight_usertoken");
      if (userdata) {
        userdata = JSON.parse(userdata);
        this.usertoken = userdata.token;
        this.getComment();
       }else{
        this.getComment();
c65b51996   Digvijay Singh   new ui changes
523
      }
de0f96bc5   Gurvinder Singh   new files
524
    },
de0f96bc5   Gurvinder Singh   new files
525
    methods: {
49055248c   Digvijay Singh   offline synching
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
  
      generatecaseStudies(){
        axios
          .get("/caseStudy?caseStudyId="+this.$route.params.caseStudyId, {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
           
            console.log('response',response.data.data);
            this.openStudy(response.data.data);
          })
          .catch((error) => console.log(error));
      },
  
  
  
    openStudy(payload) {
        console.log("payload-", payload);
        payload.intro.date = payload.createdAt;
        payload.intro.focusPoint = payload.focusAreas;
        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,
              insight: slides_.insight ? slides_.insight : null,
            },
          };
          // 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);
        console.log("payload", payload);
        localStorage.setItem(
          "spotlight_slide" + payload._id,
          JSON.stringify(finalSlides)
        );
         this.allSlide = finalSlides;
        this.getCurrentSlideData();
      },
      assignRoutes(tempId) {
        // /episode-intro
        // /outro
        var routes = [
          {
            url: "AuthorIntro",
            tempId: "T1_RoeMG8130Xko1DvhC3Ou",
          },
          {
            url: "NoScreenshotSingleAuthor",
            tempId: "T2_ROsUOEy3vxsRAiQ72XdI",
          },
          {
            url: "SingleMobileScreenInsightTwo",
            tempId: "T3_cqNIf7tuqL4jyON63dA7",
          },
          {
            url: "TwoScreenWithoutInsight",
            tempId: "T4_4QC8W7kIYnJtZ26Jt0Go",
          },
          {
            url: "noscreenshotSingleautho",
            tempId: "T5_za3c3sYgx7bVvtKz5r0e",
          },
          {
            url: "SingleMobileScreenInsightOne",
            tempId: "T6_za3c3sYgx7bVvtKz5sgf",
          },
          {
            url: "TwoScreenWithInsight",
            tempId: "T7_za3c3sYgx7bVvtKzasdf",
          },
          {
            url: "AuthorReadingNow",
            tempId: "T8_zb4d4fYgx7bVvtKzasdf",
          },
          {
            url: "AuthorReadingBreak",
            tempId: "T9_zb3e4fYgy7dVvfKdasdf",
          },
        ];
        var i = routes.findIndex((routes_) => routes_.tempId == tempId);
        return routes[i].url;
      },
c65b51996   Digvijay Singh   new ui changes
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
      getCurrentSlideData() {
        var i = this.allSlide.findIndex(
          (slide_) => slide_.slideId == this.$route.params.slideId
        );
        this.currentSlideIndex = i;
        this.currentSlideData = this.allSlide[i];
        console.log("currentSlideData", this.currentSlideData);
      },
      goNext() {
        this.currentSlideIndex++;
        this.$router.push({
          name: this.allSlide[this.currentSlideIndex].ur,
          params: {
            caseStudyId: this.allSlide[this.currentSlideIndex].caseStudyId,
            slideId: this.allSlide[this.currentSlideIndex].slideId,
          },
        });
      },
      goBack() {
        this.currentSlideIndex--;
        this.$router.push({
          name: this.allSlide[this.currentSlideIndex].ur,
          params: {
            caseStudyId: this.allSlide[this.currentSlideIndex].caseStudyId,
            slideId: this.allSlide[this.currentSlideIndex].slideId,
          },
        });
      },
13fc2e78d   Digvijay Singh   change in layout
685
   createComment() {
d0186c77a   Digvijay Singh   changes in ui
686
        console.log("===", this.comment);
13fc2e78d   Digvijay Singh   change in layout
687
688
689
          if(!this.usertoken){
          this.goToLogin();
        }    
d0186c77a   Digvijay Singh   changes in ui
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
        var obj = {
          caseStudyId: this.currentSlideData.caseStudyId,
          slideId: this.currentSlideData.slideId,
          comment: this.comment,
         
        };
        axios
          .post("/bounceBoard/comment", obj, {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            this.comment = null;
            this.getComment();
            console.log(response);
          })
          .catch((error) => {
            if (error.response) {
              this.$toaster.error(error.response.data.message);
            }
          });
      },
13fc2e78d   Digvijay Singh   change in layout
713
714
715
716
     createChildComment(cmnt) {
        if(!this.usertoken){
          this.goToLogin();
        }       console.log(cmnt,"===", this.comment);
d0186c77a   Digvijay Singh   changes in ui
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
765
766
767
768
769
770
771
772
773
        var obj = {
          caseStudyId: this.currentSlideData.caseStudyId,
          slideId: this.currentSlideData.slideId,
          comment: this.comment,
          parentId: cmnt._id,
         
        };
        axios
          .post("/bounceBoard/comment", obj, {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            this.comment = null;
            this.discardRply(cmnt);
            this.getComment();
            console.log(response);
          })
          .catch((error) => {
            if (error.response) {
              this.$toaster.error(error.response.data.message);
            }
          });
      },
      getComment() {
        axios
          .get(
            `/bounceBoard/comments?slideId=${this.currentSlideData.slideId}&caseStudyId=${this.currentSlideData.caseStudyId}`,
            {
              headers: {
                Authorization: "Bearer " + this.usertoken,
              },
            }
          )
          .then((response) => {
            console.log(response.data);
            var comments = [];
           var keys = Object.keys(response.data.data)
            response.data.data
            keys.forEach((key_) => {
              comments.push(response.data.data[key_])
            });
            comments.forEach((coment_)=>{
              coment_.childInput = false;
            });
            console.log("comments",comments)
            this.commentList = comments;
          })
          .catch((error) => console.log(error));
      },
      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;
      },
de0f96bc5   Gurvinder Singh   new files
774
      goToLogin() {
56f4b7548   Digvijay Singh   landing page url ...
775
        this.$router.push("/login");
49055248c   Digvijay Singh   offline synching
776
        localStorage.setItem('previous_url_spotlight',JSON.stringify(this.currentSlideData));
de0f96bc5   Gurvinder Singh   new files
777
778
      },
      goToSignUp() {
56f4b7548   Digvijay Singh   landing page url ...
779
        this.$router.push("/");
de0f96bc5   Gurvinder Singh   new files
780
      },
2b91d45ce   Digvijay Singh   new ui fixes
781
       chtbox_close() {
d0186c77a   Digvijay Singh   changes in ui
782
783
784
785
        $("#cht_box_close").removeClass("cht_close");
        $("#open_ct_box, .c_hide").show();
        $(".footer-top").addClass("white-bg");
      },
13fc2e78d   Digvijay Singh   change in layout
786
787
        open_ct_box() {
      
d0186c77a   Digvijay Singh   changes in ui
788
789
790
791
792
793
794
        $("#cht_box_close").addClass("cht_close");
        $("#open_ct_box, .c_hide").hide();
        $(".footer-top").removeClass("white-bg");
      },
      eachRply(cmnt) {
        cmnt.childInput = true;
        this.parentInput = false;
2b91d45ce   Digvijay Singh   new ui fixes
795
796
797
798
        this.comment = null;
         setTimeout(() => {
          document.getElementById("childInput").focus();
        }, 100);
d0186c77a   Digvijay Singh   changes in ui
799
800
801
802
      },
      discardRply(cmnt) {
        cmnt.childInput = false;
        this.parentInput = true;
2b91d45ce   Digvijay Singh   new ui fixes
803
804
        this.comment = null;
      },
49055248c   Digvijay Singh   offline synching
805
806
807
808
       reply_cht_box(i) {
          if(!this.usertoken){
          this.goToLogin();
        }
2b91d45ce   Digvijay Singh   new ui fixes
809
810
811
812
813
814
815
816
817
818
819
        console.log(this.commentList, "cmnt");
        $("#cht_box_close").addClass("cht_close");
        $("#open_ct_box, .c_hide").hide();
        $(".footer-top").removeClass("white-bg");
        this.commentList[i].childInput = true;
        this.parentInput = false;
        this.comment = null;
        setTimeout(() => {
          document.getElementById("childInput").focus();
        }, 100);
      },
49055248c   Digvijay Singh   offline synching
820
821
822
823
       likeComment(status, id) {
        if(!this.usertoken){
          this.goToLogin();
        }
2b91d45ce   Digvijay Singh   new ui fixes
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
        console.log("===", this.comment);
        var obj = {
          commentId: id,
          like: status,
        };
        axios
          .post("/bounceBoard/like", obj, {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            this.getComment();
            console.log(response);
          })
          .catch((error) => {
            if (error.response) {
              this.$toaster.error(error.response.data.message);
            }
          });
      },
      getLastcomment(flag, commentArray) {
        var finalComment = null;
        var totalMessage = 0;
        var name = null;
        commentArray.forEach((comment_) => {
          if (comment_.comment != null) {
            name = comment_.user.name;
            finalComment = comment_.comment;
            totalMessage++;
          }
        });
        if (flag == "count") {
          return (totalMessage = totalMessage == 1 ? 1 : totalMessage - 1);
        } else if (flag =="name") {
          return (name = name);
        } else {
          return finalComment;
        }
      },
      commentExistCheck(i) {
        console.log(this.commentList[i].comment);
        var returnValue = false;
        if (this.commentList[i].comment) {
          returnValue = true;
        }
        return returnValue;
c65b51996   Digvijay Singh   new ui changes
871
      },
de0f96bc5   Gurvinder Singh   new files
872
873
    },
  };
c65b51996   Digvijay Singh   new ui changes
874
  //
de0f96bc5   Gurvinder Singh   new files
875
  </script>