Blame view

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

d0186c77a   Digvijay Singh   changes in ui
213
                    <!-- comments footer -->
c65b51996   Digvijay Singh   new ui changes
214
215
216
217
                  </li>
                </ul>
              </div>
              <!-- bounce board body -->
d0186c77a   Digvijay Singh   changes in ui
218
219
              <div class="comments-footer" v-if="parentInput">
                <textarea v-model="comment"></textarea>
c65b51996   Digvijay Singh   new ui changes
220
                <div class="comments-footer-wrp">
d0186c77a   Digvijay Singh   changes in ui
221
                  <a
1f12ffc55   Digvijay Singh   issues fixation
222
                    href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
223
224
                    class="add_comments_chat"
                    @click="createComment"
c65b51996   Digvijay Singh   new ui changes
225
226
227
228
229
230
231
232
233
                    ><img src="../assets/images/add-comment.svg" /> Comment</a
                  >
                </div>
              </div>
              <!-- comments footer -->
            </div>
          </div>
          <!-- bounceboard wrp -->
          <!-- chat box -->
c65b51996   Digvijay Singh   new ui changes
234
          <div class="single-mobileInsight">
5c9c1581c   Digvijay Singh   new ui changes
235
            <div class="m-screen-hidden"> 
2b91d45ce   Digvijay Singh   new ui fixes
236
            <div class="top-area-blank"></div>
c65b51996   Digvijay Singh   new ui changes
237
            <!-- <img src="../assets/images/slide.png" class="slide-img" /> -->
d0186c77a   Digvijay Singh   changes in ui
238
239
            <img
              :src="currentSlideData.payload.metaData.mobileImage"
5c9c1581c   Digvijay Singh   new ui changes
240
              class="m-screen insight-two-img"
d0186c77a   Digvijay Singh   changes in ui
241
            />
5c9c1581c   Digvijay Singh   new ui changes
242
            </div>
c65b51996   Digvijay Singh   new ui changes
243
244
            <div class="single-left-Insight-comments">
              <div class="author-thoughts">
d0186c77a   Digvijay Singh   changes in ui
245
                <img src="../assets/images/thoughts-upper.svg" class="upper-th" />
c65b51996   Digvijay Singh   new ui changes
246
                <img
d0186c77a   Digvijay Singh   changes in ui
247
248
249
250
251
                  :src="currentSlideData.payload.metaData.authorImage"
                  class="dynamic-thoughts"
                />
              </div>
              <!-- user thoughts -->
145dd9bde   Digvijay Singh   ui fixes
252
              <div class="single-author-li-comments" v-if="commentExistCheck(0)">
c65b51996   Digvijay Singh   new ui changes
253
254
255
256
257
258
259
260
                <div class="a-intro-comments custom-c-style">
                  <!-- <p>
                    I wonder what the difference between “
                    <strong>Dunzo Assistant </strong>” and “<strong
                      >Pickup and Drop </strong
                    >” are. If they are the same, there are two “call to actions”
                    for the same workflow
                  </p> -->
2b91d45ce   Digvijay Singh   new ui fixes
261
                  <p>{{ commentList[0].comment }}</p>
c65b51996   Digvijay Singh   new ui changes
262
                  <ul class="rly-comment-set">
145dd9bde   Digvijay Singh   ui fixes
263
                    <!-- like/dislike -->
2b91d45ce   Digvijay Singh   new ui fixes
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
                    <li>
                      <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
280
                    </li>
2b91d45ce   Digvijay Singh   new ui fixes
281
                    <!-- like/dislike ends -->
c65b51996   Digvijay Singh   new ui changes
282
283
                    <li>
                      <img src="../assets/images/rply.svg" />
2b91d45ce   Digvijay Singh   new ui fixes
284
285
286
                      <a href="javascript:void(0);" @click="reply_cht_box(0)"
                        >Reply</a
                      >
c65b51996   Digvijay Singh   new ui changes
287
288
289
290
291
292
                    </li>
                  </ul>
                </div>
                <!-- comments box -->
              </div>
              <!-- single author comments -->
145dd9bde   Digvijay Singh   ui fixes
293
              <div class="single-author-li-comments" v-if="commentExistCheck(1)">
c65b51996   Digvijay Singh   new ui changes
294
295
                <div class="a-intro-comments custom-c-style">
                  <p>
145dd9bde   Digvijay Singh   ui fixes
296
                    {{ commentList[1].comment }}
c65b51996   Digvijay Singh   new ui changes
297
298
                  </p>
                  <ul class="rly-comment-set">
2b91d45ce   Digvijay Singh   new ui fixes
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
                    <!-- like/dislike -->
                    <li>
                      <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
316
                    </li>
2b91d45ce   Digvijay Singh   new ui fixes
317
                    <!-- like/dislike ends -->
c65b51996   Digvijay Singh   new ui changes
318
319
                    <li>
                      <img src="../assets/images/rply.svg" />
2b91d45ce   Digvijay Singh   new ui fixes
320
321
322
                      <a href="javascript:void(0);" @click="reply_cht_box(1)"
                        >Reply</a
                      >
c65b51996   Digvijay Singh   new ui changes
323
324
325
326
327
328
329
330
                    </li>
                  </ul>
                </div>
                <!-- comments box -->
              </div>
              <!-- single author comments -->
            </div>
            <!-- single mobile Left insight  -->
2b91d45ce   Digvijay Singh   new ui fixes
331
332
333
334
            <div
              class="c-product-insight-wrp two-screen-spc-top"
              v-if="commentExistCheck(2)"
            >
d0186c77a   Digvijay Singh   changes in ui
335
336
              <div class="single-author-li-comments">
                <div class="a-intro-comments">
c65b51996   Digvijay Singh   new ui changes
337
                  <p>
145dd9bde   Digvijay Singh   ui fixes
338
                    {{ commentList[2].comment }}
c65b51996   Digvijay Singh   new ui changes
339
340
                  </p>
                  <ul class="rly-comment-set">
2b91d45ce   Digvijay Singh   new ui fixes
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
                    <!-- like/dislike -->
                    <li>
                      <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
358
                    </li>
2b91d45ce   Digvijay Singh   new ui fixes
359
                    <!-- like/dislike ends -->
c65b51996   Digvijay Singh   new ui changes
360
361
                    <li>
                      <img src="../assets/images/rply.svg" />
2b91d45ce   Digvijay Singh   new ui fixes
362
363
364
                      <a href="javascript:void(0);" @click="reply_cht_box(2)"
                        >Reply</a
                      >
c65b51996   Digvijay Singh   new ui changes
365
366
367
368
369
                    </li>
                  </ul>
                </div>
                <!-- comments box -->
              </div>
145dd9bde   Digvijay Singh   ui fixes
370
              <div class="single-author-li-comments" v-if="commentExistCheck(3)">
c65b51996   Digvijay Singh   new ui changes
371
372
                <div class="a-intro-comments">
                  <p>
145dd9bde   Digvijay Singh   ui fixes
373
                    {{ commentList[3].comment }}
c65b51996   Digvijay Singh   new ui changes
374
375
                  </p>
                  <ul class="rly-comment-set">
2b91d45ce   Digvijay Singh   new ui fixes
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
                    <!-- like/dislike -->
                    <li>
                      <img
                        src="../assets/images/heart.svg"
                        v-if="commentList[3].like == false"
                        @click="likeComment(true, commentList[3]._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
393
                    </li>
2b91d45ce   Digvijay Singh   new ui fixes
394
                    <!-- like/dislike ends -->
c65b51996   Digvijay Singh   new ui changes
395
396
                    <li>
                      <img src="../assets/images/rply.svg" />
2b91d45ce   Digvijay Singh   new ui fixes
397
398
399
                      <a href="javascript:void(0);" @click="reply_cht_box(3)"
                        >Reply</a
                      >
c65b51996   Digvijay Singh   new ui changes
400
401
402
403
404
405
406
407
408
                    </li>
                  </ul>
                </div>
                <!-- comments box -->
              </div>
              <!-- single author comments -->
            </div>
            <!-- single mobile Right insight  -->
          </div>
2b91d45ce   Digvijay Singh   new ui fixes
409
          <!-- single author comments -->
d0186c77a   Digvijay Singh   changes in ui
410
          <div class="footer-nav">
c65b51996   Digvijay Singh   new ui changes
411
412
413
414
            <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
415
416
417
418
419
420
                    <div
                      class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 bord-r"
                    >
                      <div class="ft-comments-group testi-photos-ct">
                        <div class="c-with-photos">
                          <span class="count-comments"
2b91d45ce   Digvijay Singh   new ui fixes
421
422
                            >{{ getLastcomment("count", commentList) }}+
                            Comments</span
d0186c77a   Digvijay Singh   changes in ui
423
424
                          ><!-- count commets -->
                          <ul class="comments-photos">
2b91d45ce   Digvijay Singh   new ui fixes
425
                            <!-- <li><img src="../assets/images/c-photo-1.png" /></li>
d0186c77a   Digvijay Singh   changes in ui
426
                            <li><img src="../assets/images/c-photo-2.png" /></li>
2b91d45ce   Digvijay Singh   new ui fixes
427
                            <li><img src="../assets/images/c-photo-3.png" /></li> -->
d0186c77a   Digvijay Singh   changes in ui
428
429
                          </ul>
                          <!-- comment photos -->
c65b51996   Digvijay Singh   new ui changes
430
                        </div>
d0186c77a   Digvijay Singh   changes in ui
431
432
                        <div class="comments-detail all-c-space">
                          <span
2b91d45ce   Digvijay Singh   new ui fixes
433
                            >{{ getLastcomment("name", commentList) }}
d0186c77a   Digvijay Singh   changes in ui
434
435
436
437
438
439
440
                            <a href="javascript:void(0);" @click="open_ct_box"
                              >View All</a
                            ></span
                          >
                          <p>
                            <!-- I wonder what the difference between “Dunzo Assistant”
                            and “Pickup and Drop... -->
2b91d45ce   Digvijay Singh   new ui fixes
441
                            {{ getLastcomment("msg", commentList) }}
d0186c77a   Digvijay Singh   changes in ui
442
443
444
                          </p>
                        </div>
                        <!-- comments detail -->
c65b51996   Digvijay Singh   new ui changes
445
446
447
448
449
450
451
452
453
454
                      </div>
                      <!-- comments Group -->
                    </div>
                  </div>
                </div>
                <div class="col-4 col-sm-4 col-md-4 col-lg-4 c_hide">
                  <div class="comment-frm no-c-frm">
                    <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
455
456
457
                          <input
                            type="text"
                            class="form-control"
145dd9bde   Digvijay Singh   ui fixes
458
                            placeholder="Something on your mind?"
d0186c77a   Digvijay Singh   changes in ui
459
460
                            id="open_ct_box"
                            v-model="comment"
c65b51996   Digvijay Singh   new ui changes
461
462
463
464
                          />
                        </div>
                      </div>
                      <div class="col-2 col-sm-4 col-md-4 col-lg-4 col-xl-2">
d0186c77a   Digvijay Singh   changes in ui
465
466
467
468
                        <a
                          href="javascript:void(0);"
                          @click="createComment"
                          class="add-comment"
c65b51996   Digvijay Singh   new ui changes
469
470
471
472
473
474
475
476
                          ><img src="../assets/images/add-comment.svg" />
                          Comment</a
                        >
                      </div>
                    </div>
                    <!-- comment from -->
                  </div>
                </div>
d0186c77a   Digvijay Singh   changes in ui
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
                <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
493
494
495
496
497
498
499
500
501
502
503
504
              </div>
            </div>
            <!-- footer top -->
            <div class="footer-bottom">
              <ul>
                <li class="active"></li>
                <li></li>
              </ul>
            </div>
            <!-- footer top -->
          </div>
          <!-- footer -->
c65b51996   Digvijay Singh   new ui changes
505
506
507
508
509
510
511
512
513
514
        </div>
        <!-- body wrapper -->
      </div>
      <!-- main wrapper -->
    </main>
  </template>
  
  <script>
  import Vue from "vue";
  import router from "../router";
d0186c77a   Digvijay Singh   changes in ui
515
  import axios from "axios";
2b91d45ce   Digvijay Singh   new ui fixes
516
517
  import moment from "moment";
  import Header from "./Header";
c65b51996   Digvijay Singh   new ui changes
518
519
  
  export default {
2b91d45ce   Digvijay Singh   new ui fixes
520
521
522
    components: {
      Header: Header,
    },
c65b51996   Digvijay Singh   new ui changes
523
    name: "SingleMobileScreenInsightTwo",
c65b51996   Digvijay Singh   new ui changes
524
525
526
527
528
    data() {
      return {
        allSlide: [],
        currentSlideIndex: null,
        currentSlideData: null,
d0186c77a   Digvijay Singh   changes in ui
529
530
531
532
533
        //
        usertoken: null,
        commentList: [],
        comment: null,
        parentInput: true,
c65b51996   Digvijay Singh   new ui changes
534
535
536
537
538
539
      };
    },
    mounted() {
      var allSlideData = localStorage.getItem(
        "spotlight_slide" + this.$route.params.caseStudyId
      );
145dd9bde   Digvijay Singh   ui fixes
540
      var userdata = localStorage.getItem("spotlight_usertoken");
6b14d08e4   Digvijay Singh   case studies
541
       if (allSlideData) {
c65b51996   Digvijay Singh   new ui changes
542
543
        this.allSlide = JSON.parse(allSlideData);
        this.getCurrentSlideData();
6b14d08e4   Digvijay Singh   case studies
544
545
      }else{
        this.$router.push("/login");
c65b51996   Digvijay Singh   new ui changes
546
      }
d0186c77a   Digvijay Singh   changes in ui
547
548
549
550
551
      if (userdata) {
        userdata = JSON.parse(userdata);
        this.usertoken = userdata.token;
        this.getComment();
      }
c65b51996   Digvijay Singh   new ui changes
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
    },
    methods: {
      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,
          },
        });
      },
d0186c77a   Digvijay Singh   changes in ui
582
583
584
585
586
587
      createComment() {
        console.log("===", this.comment);
        var obj = {
          caseStudyId: this.currentSlideData.caseStudyId,
          slideId: this.currentSlideData.slideId,
          comment: this.comment,
d0186c77a   Digvijay Singh   changes in ui
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
        };
        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);
            }
          });
      },
2b91d45ce   Digvijay Singh   new ui fixes
606
607
608
      
      createChildComment(cmnt) {
        console.log(cmnt, "===", this.comment);
d0186c77a   Digvijay Singh   changes in ui
609
610
611
612
613
        var obj = {
          caseStudyId: this.currentSlideData.caseStudyId,
          slideId: this.currentSlideData.slideId,
          comment: this.comment,
          parentId: cmnt._id,
d0186c77a   Digvijay Singh   changes in ui
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
        };
        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 = [];
2b91d45ce   Digvijay Singh   new ui fixes
646
647
            var keys = Object.keys(response.data.data);
            response.data.data;
d0186c77a   Digvijay Singh   changes in ui
648
            keys.forEach((key_) => {
2b91d45ce   Digvijay Singh   new ui fixes
649
              comments.push(response.data.data[key_]);
d0186c77a   Digvijay Singh   changes in ui
650
            });
2b91d45ce   Digvijay Singh   new ui fixes
651
            comments.forEach((coment_) => {
d0186c77a   Digvijay Singh   changes in ui
652
653
              coment_.childInput = false;
            });
2b91d45ce   Digvijay Singh   new ui fixes
654
            console.log("comments", comments);
d0186c77a   Digvijay Singh   changes in ui
655
656
657
658
            this.commentList = comments;
          })
          .catch((error) => console.log(error));
      },
2b91d45ce   Digvijay Singh   new ui fixes
659
660
661
662
      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");
145dd9bde   Digvijay Singh   ui fixes
663
        var date = null;
2b91d45ce   Digvijay Singh   new ui fixes
664
665
666
667
668
669
        if (result == 0) {
          date = "Today";
        } else {
          date = result + " days ago";
        }
        return date;
d0186c77a   Digvijay Singh   changes in ui
670
      },
c65b51996   Digvijay Singh   new ui changes
671
      goToLogin() {
56f4b7548   Digvijay Singh   landing page url ...
672
        this.$router.push("/login");
c65b51996   Digvijay Singh   new ui changes
673
674
      },
      goToSignUp() {
56f4b7548   Digvijay Singh   landing page url ...
675
        this.$router.push("/");
c65b51996   Digvijay Singh   new ui changes
676
677
678
679
680
681
682
683
684
685
686
      },
      chtbox_close() {
        $("#cht_box_close").removeClass("cht_close");
        $("#open_ct_box, .c_hide").show();
        $(".footer-top").addClass("white-bg");
      },
      open_ct_box() {
        $("#cht_box_close").addClass("cht_close");
        $("#open_ct_box, .c_hide").hide();
        $(".footer-top").removeClass("white-bg");
      },
d0186c77a   Digvijay Singh   changes in ui
687
688
689
      eachRply(cmnt) {
        cmnt.childInput = true;
        this.parentInput = false;
2b91d45ce   Digvijay Singh   new ui fixes
690
691
692
693
        this.comment = null;
         setTimeout(() => {
          document.getElementById("childInput").focus();
        }, 100);
d0186c77a   Digvijay Singh   changes in ui
694
695
696
697
      },
      discardRply(cmnt) {
        cmnt.childInput = false;
        this.parentInput = true;
2b91d45ce   Digvijay Singh   new ui fixes
698
        this.comment = null;
d0186c77a   Digvijay Singh   changes in ui
699
      },
2b91d45ce   Digvijay Singh   new ui fixes
700
701
702
      reply_cht_box(i) {
        console.log(this.commentList, "cmnt");
        $("#cht_box_close").addClass("cht_close");
145dd9bde   Digvijay Singh   ui fixes
703
704
705
706
        $("#open_ct_box, .c_hide").hide();
        $(".footer-top").removeClass("white-bg");
        this.commentList[i].childInput = true;
        this.parentInput = false;
2b91d45ce   Digvijay Singh   new ui fixes
707
708
709
710
        this.comment = null;
        setTimeout(() => {
          document.getElementById("childInput").focus();
        }, 100);
145dd9bde   Digvijay Singh   ui fixes
711
      },
2b91d45ce   Digvijay Singh   new ui fixes
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
      likeComment(status, id) {
        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) {
145dd9bde   Digvijay Singh   ui fixes
735
736
737
        var finalComment = null;
        var totalMessage = 0;
        var name = null;
2b91d45ce   Digvijay Singh   new ui fixes
738
739
        commentArray.forEach((comment_) => {
          if (comment_.comment != null) {
145dd9bde   Digvijay Singh   ui fixes
740
741
            name = comment_.user.name;
            finalComment = comment_.comment;
2b91d45ce   Digvijay Singh   new ui fixes
742
            totalMessage++;
145dd9bde   Digvijay Singh   ui fixes
743
          }
145dd9bde   Digvijay Singh   ui fixes
744
        });
2b91d45ce   Digvijay Singh   new ui fixes
745
746
747
748
749
        if (flag == "count") {
          return (totalMessage = totalMessage == 1 ? 1 : totalMessage - 1);
        } else if (flag == "name") {
          return (name = name);
        } else {
145dd9bde   Digvijay Singh   ui fixes
750
751
752
          return finalComment;
        }
      },
2b91d45ce   Digvijay Singh   new ui fixes
753
754
      commentExistCheck(i) {
        console.log(this.commentList[i].comment);
145dd9bde   Digvijay Singh   ui fixes
755
        var returnValue = false;
2b91d45ce   Digvijay Singh   new ui fixes
756
        if (this.commentList[i].comment) {
145dd9bde   Digvijay Singh   ui fixes
757
758
759
          returnValue = true;
        }
        return returnValue;
2b91d45ce   Digvijay Singh   new ui fixes
760
      },
c65b51996   Digvijay Singh   new ui changes
761
762
    },
  };
d0186c77a   Digvijay Singh   changes in ui
763
  //
c65b51996   Digvijay Singh   new ui changes
764
  </script>