Blame view

src/components/noscreenshotSingleautho.vue 24.2 KB
d0186c77a   Digvijay Singh   changes in ui
1
2
3
  <template>
    <main class="landing-page">
      <div class="container-fluid episode-intro">
2b91d45ce   Digvijay Singh   new ui fixes
4
          <Header></Header>
d0186c77a   Digvijay Singh   changes in ui
5
6
7
        <!-- menu wrapper -->
        <div class="intro-startup">
  
2b91d45ce   Digvijay Singh   new ui fixes
8
        <!-- chat box -->
d0186c77a   Digvijay Singh   changes in ui
9
10
11
12
13
14
15
          <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
16
               <!-- <span class="sort-by">SORT BY</span>
d0186c77a   Digvijay Singh   changes in ui
17
18
19
20
21
22
23
24
25
26
27
                  <div class="btn-group">
                    <button
                      type="button"
                      class="bc-sort-list dropdown-toggle"
                      data-toggle="dropdown"
                      aria-haspopup="true"
                      aria-expanded="false"
                    >
                      BEST
                    </button>
                    <div class="dropdown-menu short_by">
1f12ffc55   Digvijay Singh   issues fixation
28
                      <a class="dropdown-item" href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
29
30
                        >BEST 1</a
                      >
1f12ffc55   Digvijay Singh   issues fixation
31
                      <a class="dropdown-item" href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
32
33
                        >BEST 2</a
                      >
1f12ffc55   Digvijay Singh   issues fixation
34
                      <a class="dropdown-item" href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
35
36
37
                        >BEST 3</a
                      >
                    </div>
5c9c1581c   Digvijay Singh   new ui changes
38
                  </div> -->
d0186c77a   Digvijay Singh   changes in ui
39
                  <a
1f12ffc55   Digvijay Singh   issues fixation
40
                    href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
41
42
43
44
45
46
47
48
49
                    @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">
d0186c77a   Digvijay Singh   changes in ui
50
51
52
53
54
                <!-- all user comments -->
                <ul class="bounced-user-comments">
                  <li class="bc_border" v-for="(cmnt, j) in commentList" :key="j">
                    <div class="bc_brd_l"></div>
                    <!-- border -->
2b91d45ce   Digvijay Singh   new ui fixes
55
                    <div class="parent-full-width" v-if="cmnt.comment">
d0186c77a   Digvijay Singh   changes in ui
56
57
58
59
60
61
62
63
64
65
66
                      <div class="full-width">
                        <div class="b-user-head">
                          <img :src="cmnt.user.profilePic" />
                          <span class="head-content">{{ cmnt.user.name }} </span>
                          <ul>
                            <li>
                              <span></span
                              ><img src="../assets/images/u-info-icon.png" />{{
                                cmnt.user.karmaPoints
                              }}pts
                            </li>
2b91d45ce   Digvijay Singh   new ui fixes
67
68
69
                            <li>
                              <span></span>{{ dateGenerator(cmnt.createdAt) }}
                            </li>
d0186c77a   Digvijay Singh   changes in ui
70
71
72
73
74
75
76
77
78
                          </ul>
                        </div>
                        <!-- header -->
                        <p>
                          {{ cmnt.comment }}
                        </p>
                        <div class="joined_wrapper">
                          <ul class="joined-info info_bc_spc">
                            <li>
2b91d45ce   Digvijay Singh   new ui fixes
79
80
81
82
83
84
85
86
87
88
89
90
91
92
                              <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
93
                              <a href="javasript:void(0);">
2b91d45ce   Digvijay Singh   new ui fixes
94
95
                                {{ cmnt.likes.length }}</a
                              >
d0186c77a   Digvijay Singh   changes in ui
96
                            </li>
d0186c77a   Digvijay Singh   changes in ui
97
98
99
                            <li class="comment-spc">
                              <img src="../assets/images/purple-comment.png" />
                            </li>
2b91d45ce   Digvijay Singh   new ui fixes
100
                            <li>
1f12ffc55   Digvijay Singh   issues fixation
101
                              <a href="javasript:void(0);">
2b91d45ce   Digvijay Singh   new ui fixes
102
103
104
                                {{ cmnt.children.length }}</a
                              >
                            </li>
d0186c77a   Digvijay Singh   changes in ui
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
                          </ul>
                          <div class="add_rply" v-if="!cmnt.childInput">
                            <input
                              type="text"
                              @click="eachRply(cmnt)"
                              class="add_Rply_C"
                              placeholder="Add your reply"
                            />
                          </div>
                          <!-- rly form -->
                        </div>
                        <!-- joined wrapper -->
                      </div>
                      <!-- full width -->
                    </div>
                    <div class="comments-footer each-ft" v-if="cmnt.childInput">
2b91d45ce   Digvijay Singh   new ui fixes
121
                      <textarea v-model="comment" id="childInput"></textarea>
d0186c77a   Digvijay Singh   changes in ui
122
123
124
                      <div class="comments-footer-wrp">
                        <a
                          @click="createChildComment(cmnt)"
1f12ffc55   Digvijay Singh   issues fixation
125
                          href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
126
127
128
                          class="add_comments_chat reply-Wdth"
                          >Reply</a
                        >
2b91d45ce   Digvijay Singh   new ui fixes
129
                        <a
1f12ffc55   Digvijay Singh   issues fixation
130
                          href="javasript:void(0);"
2b91d45ce   Digvijay Singh   new ui fixes
131
132
133
                          class="discard_bt"
                          @click="discardRply(cmnt)"
                          ><img src="../assets/images/discard.svg"
d0186c77a   Digvijay Singh   changes in ui
134
135
136
137
                        /></a>
                      </div>
                    </div>
                    <!-- parent -->
2b91d45ce   Digvijay Singh   new ui fixes
138
139
140
141
142
                    <div
                      class="child-full-width"
                      v-for="(childCmnt, i) in cmnt.children"
                      :key="i"
                    >
d0186c77a   Digvijay Singh   changes in ui
143
144
145
                      <div class="full-width">
                        <div class="b-user-head">
                          <img :src="childCmnt.user.profilePic" />
2b91d45ce   Digvijay Singh   new ui fixes
146
147
148
                          <span class="head-content"
                            >{{ childCmnt.user.name }}
                          </span>
d0186c77a   Digvijay Singh   changes in ui
149
150
151
                          <ul>
                            <li>
                              <span></span
2b91d45ce   Digvijay Singh   new ui fixes
152
153
154
155
156
157
158
                              ><img src="../assets/images/u-info-icon.png" />{{
                                childCmnt.user.karmaPoints
                              }}pts
                            </li>
                            <li>
                              <span></span
                              >{{ dateGenerator(childCmnt.createdAt) }}
d0186c77a   Digvijay Singh   changes in ui
159
                            </li>
d0186c77a   Digvijay Singh   changes in ui
160
161
162
                          </ul>
                        </div>
                        <p>
2b91d45ce   Digvijay Singh   new ui fixes
163
                          {{ childCmnt.comment }}
d0186c77a   Digvijay Singh   changes in ui
164
165
166
167
                        </p>
                        <div class="joined_wrapper">
                          <ul class="joined-info info_bc_spc">
                            <li>
2b91d45ce   Digvijay Singh   new ui fixes
168
169
170
171
172
173
174
175
176
177
178
179
180
181
                              <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
182
                              <a href="javasript:void(0);">
2b91d45ce   Digvijay Singh   new ui fixes
183
184
                                {{ childCmnt.likes.length }}</a
                              >
d0186c77a   Digvijay Singh   changes in ui
185
                            </li>
d0186c77a   Digvijay Singh   changes in ui
186
                          </ul>
d0186c77a   Digvijay Singh   changes in ui
187
188
189
190
                        </div>
                      </div>
                    </div>
                    <!-- eree -->
2b91d45ce   Digvijay Singh   new ui fixes
191
  
d0186c77a   Digvijay Singh   changes in ui
192
193
194
195
196
197
198
199
200
                    <!-- comments footer -->
                  </li>
                </ul>
              </div>
              <!-- bounce board body -->
              <div class="comments-footer" v-if="parentInput">
                <textarea v-model="comment"></textarea>
                <div class="comments-footer-wrp">
                  <a
1f12ffc55   Digvijay Singh   issues fixation
201
                    href="javasript:void(0);"
d0186c77a   Digvijay Singh   changes in ui
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
                    class="add_comments_chat"
                    @click="createComment"
                    ><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)">
d0186c77a   Digvijay Singh   changes in ui
218
                <div class="a-intro-comments right-corner">
2b91d45ce   Digvijay Singh   new ui fixes
219
220
                   <p>
                    {{commentList[0].comment}}
d0186c77a   Digvijay Singh   changes in ui
221
222
                  </p>
                  <ul class="rly-comment-set">
2b91d45ce   Digvijay Singh   new ui fixes
223
                    <!-- like/dislike -->
d0186c77a   Digvijay Singh   changes in ui
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>
d0186c77a   Digvijay Singh   changes in ui
240
                    </li>
2b91d45ce   Digvijay Singh   new ui fixes
241
                    <!-- like/dislike ends -->
d0186c77a   Digvijay Singh   changes in ui
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
                      >
d0186c77a   Digvijay Singh   changes in ui
247
248
249
                    </li>
                  </ul>
                </div>
2b91d45ce   Digvijay Singh   new ui fixes
250
251
252
               
              </div> <!-- comments box -->
                   <div class="single-author-li-comments" v-if="commentExistCheck(1)">
d0186c77a   Digvijay Singh   changes in ui
253
                <div class="a-intro-comments right-corner">
2b91d45ce   Digvijay Singh   new ui fixes
254
255
                   <p>
                    {{commentList[1].comment}}
d0186c77a   Digvijay Singh   changes in ui
256
257
                  </p>
                  <ul class="rly-comment-set">
2b91d45ce   Digvijay Singh   new ui fixes
258
                    <!-- like/dislike -->
d0186c77a   Digvijay Singh   changes in ui
259
                    <li>
2b91d45ce   Digvijay Singh   new ui fixes
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
                      <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>
d0186c77a   Digvijay Singh   changes in ui
275
                    </li>
2b91d45ce   Digvijay Singh   new ui fixes
276
                    <!-- like/dislike ends -->
d0186c77a   Digvijay Singh   changes in ui
277
278
                    <li>
                      <img src="../assets/images/rply.svg" />
2b91d45ce   Digvijay Singh   new ui fixes
279
280
281
                      <a href="javascript:void(0);" @click="reply_cht_box(1)"
                        >Reply</a
                      >
d0186c77a   Digvijay Singh   changes in ui
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
                    </li>
                  </ul>
                </div>
               
              </div> <!-- comments box -->
            </div>
            <img
              class="s-user-comments m-0"
              :src="currentSlideData.payload.metaData.authorImage"
            />
            <div class="comments-a-wrp ct-width">           
              <div class="single-author-li-comments ">
              <div class="a-intro-comments custom-selected-style custom-selected-style-2">
            
                <div class="top-wrp">
2b91d45ce   Digvijay Singh   new ui fixes
297
                {{currentSlideData.payload.insight.tag}}  Insight <a @click="open(currentSlideData.payload.insight.furtherReading[0])" href="javascript:void(0);"><img src="../assets/images/link-red.svg" /></a>
d0186c77a   Digvijay Singh   changes in ui
298
299
300
301
302
                </div>
                <div class="top-head">{{currentSlideData.payload.insight.title}}</div>
                 <p>{{currentSlideData.payload.insight.description}}
  </p>
  <div class="footer">
56f4b7548   Digvijay Singh   landing page url ...
303
    <a href="javascript:void(0);" class="cit-16">{{currentSlideData.payload.insight.citations.length}} Citations</a>
5c9c1581c   Digvijay Singh   new ui changes
304
    <!-- <a href="javascript:void(0);" class="ft-share"><img src="../assets/images/reply-red.svg" /> Share from library</a> --> 
d0186c77a   Digvijay Singh   changes in ui
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
    </div><!-- footer -->
              
                  </div><!-- comments box -->
              </div><!-- single author comments -->
              <!-- single author comments -->
          
            </div>
          </div>
          <!-- single author comments -->
          <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">
                    <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
325
326
                            >{{ getLastcomment("count", commentList) }}+
                            Comments</span
d0186c77a   Digvijay Singh   changes in ui
327
328
                          ><!-- count commets -->
                          <ul class="comments-photos">
2b91d45ce   Digvijay Singh   new ui fixes
329
330
331
                            <!-- <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> -->
d0186c77a   Digvijay Singh   changes in ui
332
333
334
335
336
                          </ul>
                          <!-- comment photos -->
                        </div>
                        <div class="comments-detail all-c-space">
                          <span
2b91d45ce   Digvijay Singh   new ui fixes
337
                            >{{ getLastcomment("name", commentList) }}
d0186c77a   Digvijay Singh   changes in ui
338
339
340
341
342
343
344
                            <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
345
                            {{ getLastcomment("msg", commentList) }}
d0186c77a   Digvijay Singh   changes in ui
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
                          </p>
                        </div>
                        <!-- comments detail -->
                      </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">
                          <input
                            type="text"
                            class="form-control"
145dd9bde   Digvijay Singh   ui fixes
362
                            placeholder="Something on your mind?"
d0186c77a   Digvijay Singh   changes in ui
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
                            id="open_ct_box"
                            v-model="comment"
                          />
                        </div>
                      </div>
                      <div class="col-2 col-sm-4 col-md-4 col-lg-4 col-xl-2">
                        <a
                          href="javascript:void(0);"
                          @click="createComment"
                          class="add-comment"
                          ><img src="../assets/images/add-comment.svg" />
                          Comment</a
                        >
                      </div>
                    </div>
                    <!-- comment from -->
                  </div>
                </div>
                <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 -->
              </div>
            </div>
            <!-- footer top -->
            <div class="footer-bottom">
              <ul>
                <li class="active"></li>
                <li></li>
              </ul>
            </div>
            <!-- footer top -->
          </div>
          <!-- footer -->
        </div>
        <!-- body wrapper -->
      </div>
      <!-- main wrapper -->
    </main>
  </template>
  
  <script>
  import Vue from "vue";
  import router from "../router";
  import axios from "axios";
  import moment from 'moment';
2b91d45ce   Digvijay Singh   new ui fixes
421
422
  import Header from "./Header";
  
d0186c77a   Digvijay Singh   changes in ui
423
  export default {
2b91d45ce   Digvijay Singh   new ui fixes
424
425
426
    components: {
      Header: Header,
    },
d0186c77a   Digvijay Singh   changes in ui
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
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
    name: "noscreenshotSingleautho",
  data() {
      return {
        allSlide: [],
        currentSlideIndex: null,
        currentSlideData: null,
        //
        usertoken: null,
        commentList: [],
        comment: null,
        parentInput: true,
      };
    },
    mounted() {
      var allSlideData = localStorage.getItem(
        "spotlight_slide" + this.$route.params.caseStudyId
      );
      if (allSlideData) {
        this.allSlide = JSON.parse(allSlideData);
        this.getCurrentSlideData();
      }
      var userdata = localStorage.getItem("spotlight_usertoken");
      if (userdata) {
        userdata = JSON.parse(userdata);
        this.usertoken = userdata.token;
        this.getComment();
      }
    },
    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,
          },
        });
      },
       createComment() {
        console.log("===", this.comment);
        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);
            }
          });
      },
    createChildComment(cmnt) {
        console.log(cmnt,"===", this.comment);
        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;
      },
      goToLogin() {
56f4b7548   Digvijay Singh   landing page url ...
569
        this.$router.push("/login");
d0186c77a   Digvijay Singh   changes in ui
570
571
      },
      goToSignUp() {
56f4b7548   Digvijay Singh   landing page url ...
572
        this.$router.push("/");
d0186c77a   Digvijay Singh   changes in ui
573
      },
2b91d45ce   Digvijay Singh   new ui fixes
574
575
576
      open(url){
        window.open(url);
      },
d0186c77a   Digvijay Singh   changes in ui
577
578
579
580
581
582
583
584
585
586
587
588
589
      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");
      },
      eachRply(cmnt) {
        cmnt.childInput = true;
        this.parentInput = false;
2b91d45ce   Digvijay Singh   new ui fixes
590
591
592
593
        this.comment = null;
         setTimeout(() => {
          document.getElementById("childInput").focus();
        }, 100);
d0186c77a   Digvijay Singh   changes in ui
594
595
596
597
      },
      discardRply(cmnt) {
        cmnt.childInput = false;
        this.parentInput = true;
2b91d45ce   Digvijay Singh   new ui fixes
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
657
658
659
        this.comment = null;
      },
      reply_cht_box(i) {
        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);
      },
      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) {
        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;
d0186c77a   Digvijay Singh   changes in ui
660
661
662
663
664
      },
    },
  };
  //
  </script>