Blame view

src/components/Profile.vue 36.2 KB
f06677bfc   Digvijay Singh   profile screen added
1
2
  <template>
    <main class="landing-page">
0e3c6b828   Neeraj Sharma   add create study ...
3
      <!-- profile -->
4490fe7f6   Digvijay Singh   base url changed
4
5
      <div class="popup-wrp" style="display: none">
        <div class="overlay" @click="hideDialog"></div>
0e3c6b828   Neeraj Sharma   add create study ...
6
7
8
9
10
        <div
          class="popup-set"
          id="add-profile"
          style="display: none; width: 700px"
        >
4490fe7f6   Digvijay Singh   base url changed
11
12
13
14
15
          <!-- header -->
          <div class="popup-body">
            <form class="popup-forms">
              <div class="row">
                <!-- input -->
0e3c6b828   Neeraj Sharma   add create study ...
16
                <img :src="templateImage" />
4490fe7f6   Digvijay Singh   base url changed
17
                <!-- input -->
0e3c6b828   Neeraj Sharma   add create study ...
18

4490fe7f6   Digvijay Singh   base url changed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
                <!-- input -->
  
                <!-- input -->
                <!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
                  <div class="form-group floating-label">
                    <select class="form-group">
                      <option @click="addSocialLink">Add another</option>
                    </select>
                    <span class="select-arrow"
                      ><img src="../assets/images/chevron-down.svg"
                    /></span>
                  </div>
                </div> -->
                <!-- input -->
              </div>
4490fe7f6   Digvijay Singh   base url changed
34
35
36
37
38
39
40
            </form>
          </div>
          <div class="clearfix"></div>
        </div>
        <!-- add profile -->
      </div>
      <!-- profile -->
298fff252   Digvijay Singh   new design added
41
      <!-- profile -->
0ad3ed4de   Digvijay Singh   adin panel changes
42
      <div class="container-fluid inner-wrp" style="background: transparent">
f06677bfc   Digvijay Singh   profile screen added
43
        <nav class="navbar navbar-expand-sm spotLight-nav">
298fff252   Digvijay Singh   new design added
44
45
46
47
48
49
50
51
52
53
54
55
          <a class="navbar-brand" href="#"
            ><img src="../assets/images/logo.png"
          /></a>
          <button
            class="navbar-toggler"
            type="button"
            data-toggle="collapse"
            data-target="#navbarsExample03"
            aria-controls="navbarsExample03"
            aria-expanded="false"
            aria-label="Toggle navigation"
          >
f06677bfc   Digvijay Singh   profile screen added
56
57
58
59
            <span class="navbar-toggler-icon"></span>
            <span class="navbar-toggler-icon"></span>
            <span class="navbar-toggler-icon"></span>
          </button>
298fff252   Digvijay Singh   new design added
60

f06677bfc   Digvijay Singh   profile screen added
61
62
63
          <div class="collapse navbar-collapse" id="navbarsExample03">
            <ul class="navbar-nav mr-auto">
              <li class="nav-item active">
0e3c6b828   Neeraj Sharma   add create study ...
64
65
66
67
68
69
                <a
                  class="nav-link"
                  style="cursor: pointer"
                  @click="listPage('/casestudy')"
                  >Case Study List</a
                >
640c12320   Digvijay Singh   update module added
70
71
              </li>
              <li class="nav-item active">
0e3c6b828   Neeraj Sharma   add create study ...
72
73
74
75
76
77
                <a
                  class="nav-link"
                  style="cursor: pointer"
                  @click="listPage('/insight')"
                  >Create Insight</a
                >
f06677bfc   Digvijay Singh   profile screen added
78
79
80
              </li>
            </ul>
          </div>
0ad3ed4de   Digvijay Singh   adin panel changes
81
82
          <div class="">
            <a href="javascript:void(0);" @click="logout">Log Out </a>
f06677bfc   Digvijay Singh   profile screen added
83
          </div>
298fff252   Digvijay Singh   new design added
84
85
86
        </nav>
        <!-- menu wrapper -->
        <div class="row profile-tab-spc-top">
0ad3ed4de   Digvijay Singh   adin panel changes
87
88
89
90
91
92
93
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="user-profile">
              <div class="form-group floating-label">
                <select
                  class="form-control"
                  v-model="userData"
                  v-on:change="selectUser(userData)"
640c12320   Digvijay Singh   update module added
94
                  :disabled="editMode"
0ad3ed4de   Digvijay Singh   adin panel changes
95
96
97
98
99
100
101
                >
                  <option value="null">Select User</option>
                  <option v-for="(user, i) in userList" :key="i" :value="i">
                    {{ user.name }} ({{ user.email }})
                  </option>
                </select>
              </div>
5684145ce   Digvijay Singh   reset password,ot...
102
            </div>
0ad3ed4de   Digvijay Singh   adin panel changes
103
104
          </div>
        </div>
5684145ce   Digvijay Singh   reset password,ot...
105

0ad3ed4de   Digvijay Singh   adin panel changes
106
107
108
109
110
111
112
113
114
        <div class="row">
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <ul class="navbar-nav mr-auto">
              <li class="nav-item active">
                <h5 class="nav-link">Intro Screen Record</h5>
              </li>
            </ul>
          </div>
        </div>
522f093f0   Digvijay Singh   outro module added
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
  
        <div class="row">
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname">Select Intro Screen</label>
              <select
                class="form-control"
                v-model="caseStudy.caseStudyDetails.intro.templateId"
                @change="changeIntroScreen()"
              >
                <option value="intro-1">Intro Screen 1</option>
                <option value="intro-2">Intro Screen 2</option>
              </select>
            </div>
          </div>
        </div>
0ad3ed4de   Digvijay Singh   adin panel changes
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
        <!-- 1st row -->
        <div class="row">
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname">Case Study Name</label>
              <input
                type="text"
                class="form-control"
                value=""
                placeholder=" "
                v-model="caseStudy.caseStudyDetails.intro.name"
              />
            </div>
          </div>
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname">App Name</label>
              <input
                type="text"
                class="form-control"
                value=""
                placeholder=" "
                v-model="caseStudy.caseStudyDetails.intro.app"
              />
            </div>
          </div>
08becbb24   Digvijay Singh   new fiwld added
157
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4" v-if="caseStudy.caseStudyDetails.intro.templateId == 'intro-2'">
0e3c6b828   Neeraj Sharma   add create study ...
158
           <div class="form-group floating-label">
08becbb24   Digvijay Singh   new fiwld added
159
              <label for="lname" class="lname">Designation</label>
0ad3ed4de   Digvijay Singh   adin panel changes
160
161
162
163
164
              <input
                type="text"
                class="form-control"
                value=""
                placeholder=" "
08becbb24   Digvijay Singh   new fiwld added
165
                v-model="caseStudy.caseStudyDetails.intro.designation"
0ad3ed4de   Digvijay Singh   adin panel changes
166
              />
0e3c6b828   Neeraj Sharma   add create study ...
167
            </div>
08becbb24   Digvijay Singh   new fiwld added
168
          </div>
0e3c6b828   Neeraj Sharma   add create study ...
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
  
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname"> App logo</label>
              <img
                v-if="caseStudy.caseStudyDetails.intro.logoURL"
                style="width: 40px; height: 40px"
                :src="caseStudy.caseStudyDetails.intro.logoURL"
              />
              <input
                @change="createImage('logo')"
                type="file"
                name="photso"
                id="logo"
                accept="image/*"
              />
            </div>
0ad3ed4de   Digvijay Singh   adin panel changes
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
          </div>
        </div>
        <!-- 1st row end -->
  
        <!-- 2nd row -->
        <div class="row">
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname">Case Study Type</label>
              <select
                class="form-control"
                v-model="caseStudy.caseStudyDetails.intro.type"
              >
                <option value="null">Select Case Type</option>
                <option value="Retake">Retake</option>
                <option value="Behind-the-scenes">Behind-the-scenes</option>
                <option value="Critique">Critique</option>
                <option value="Juxtapose">Juxtapose</option>
              </select>
            </div>
          </div>
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname">Platform</label>
0e3c6b828   Neeraj Sharma   add create study ...
210
              <!-- <input
0ad3ed4de   Digvijay Singh   adin panel changes
211
212
213
214
215
                type="text"
                class="form-control"
                value=""
                placeholder=" "
                v-model="caseStudy.caseStudyDetails.intro.platForm"
0e3c6b828   Neeraj Sharma   add create study ...
216
217
218
219
220
221
222
223
224
225
226
              /> -->
              <select
                class="form-control"
                v-model="selectPlatform"
                @change="addInsight('platform')"
              >
                <option value="null">Select Insight Tag</option>
                <option value="Ios">Ios</option>
                <option value="Web">Web</option>
                <option value="Android">Android</option>
              </select>
0ad3ed4de   Digvijay Singh   adin panel changes
227
228
            </div>
          </div>
0ad3ed4de   Digvijay Singh   adin panel changes
229
230
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
0e3c6b828   Neeraj Sharma   add create study ...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
              <label for="lname" class="lname"></label>
              <label for="lname" class="lname"></label>
              <ul class="interests">
                <!-- v-for="(interest, i) in caseStudy.caseStudyDetails
                          .insightTags"
                        :key="i" -->
  
                <li v-if="caseStudy.caseStudyDetails.intro.platForm">
                  <span>{{ caseStudy.caseStudyDetails.intro.platForm }}</span>
                  <a
                    href="javascript:void(0);"
                    @click="removeInsight(0, 'platform')"
                    class="cat-minus"
                    ><img src="../assets/images/minus.svg"
                  /></a>
                </li>
              </ul>
0ad3ed4de   Digvijay Singh   adin panel changes
248
249
250
251
            </div>
          </div>
        </div>
        <!-- 2nd row -->
0e3c6b828   Neeraj Sharma   add create study ...
252
        <!-- 3rd row -->`
0ad3ed4de   Digvijay Singh   adin panel changes
253
254
255
256
257
        <div class="row">
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname"></label>
              <ul class="interests">
5684145ce   Digvijay Singh   reset password,ot...
258
                <li>
0ad3ed4de   Digvijay Singh   adin panel changes
259
260
261
262
                  <input
                    class=""
                    placeholder="Add Focus Areas"
                    v-model="focusName"
0e3c6b828   Neeraj Sharma   add create study ...
263
                    v-on:keyup.enter="addInsight('focus')"
0ad3ed4de   Digvijay Singh   adin panel changes
264
265
266
267
                  />
                  <a href="javascript:void(0);" @click="addInsight('focus')"
                    ><img src="../assets/images/plus-circle.svg"
                  /></a>
5684145ce   Digvijay Singh   reset password,ot...
268
                </li>
0ad3ed4de   Digvijay Singh   adin panel changes
269
270
271
272
273
274
275
276
277
278
279
280
  
                <li
                  v-for="(interest, i) in caseStudy.caseStudyDetails.focusAreas"
                  :key="i"
                >
                  <span>{{ interest }}</span>
                  <a
                    href="javascript:void(0);"
                    @click="removeInsight(i, 'focus')"
                    class="cat-minus"
                    ><img src="../assets/images/minus.svg"
                  /></a>
5684145ce   Digvijay Singh   reset password,ot...
281
                </li>
298fff252   Digvijay Singh   new design added
282
              </ul>
298fff252   Digvijay Singh   new design added
283
284
            </div>
          </div>
0ad3ed4de   Digvijay Singh   adin panel changes
285
286
287
  
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
640c12320   Digvijay Singh   update module added
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
              <label for="lname" class="lname">Select Insight Tags</label>
              <select
                class="form-control"
                v-model="insightName"
                @change="addInsight('insight')"
              >
                <option value="null">Select Insight Tag</option>
                <option value="Design">Design</option>
                <option value="Product">Product</option>
                <option value="Marketing">Marketing</option>
                <option value="Pricing">Pricing</option>
                <option value="Psychology">Psychology</option>
              </select>
            </div>
          </div>
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
0ad3ed4de   Digvijay Singh   adin panel changes
305
306
              <label for="lname" class="lname"></label>
              <ul class="interests">
0ad3ed4de   Digvijay Singh   adin panel changes
307
308
309
310
311
312
313
314
315
316
317
                <li
                  v-for="(interest, i) in caseStudy.caseStudyDetails.insightTags"
                  :key="i"
                >
                  <span>{{ interest }}</span>
                  <a
                    href="javascript:void(0);"
                    @click="removeInsight(i, 'insight')"
                    class="cat-minus"
                    ><img src="../assets/images/minus.svg"
                  /></a>
298fff252   Digvijay Singh   new design added
318
319
320
                </li>
              </ul>
            </div>
298fff252   Digvijay Singh   new design added
321
          </div>
f06677bfc   Digvijay Singh   profile screen added
322
        </div>
0ad3ed4de   Digvijay Singh   adin panel changes
323
324
325
326
327
328
329
330
        <!-- 3rd row end -->
  
        <!-- outdor -->
        <div class="row profile-tab-spc-top">
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <ul class="navbar-nav mr-auto">
              <li class="nav-item active">
                <h5 class="nav-link">Outro Screen Record</h5>
5684145ce   Digvijay Singh   reset password,ot...
331
              </li>
298fff252   Digvijay Singh   new design added
332
333
            </ul>
          </div>
0ad3ed4de   Digvijay Singh   adin panel changes
334
        </div>
522f093f0   Digvijay Singh   outro module added
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
         <div class="row">
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname">Select Outro Screen</label>
              <select
                class="form-control"
                v-model="caseStudy.caseStudyDetails.outro.templateId"
              
              >
                <option value="outro-1">Outro Screen 1</option>
                <option value="outro-2">Outro Screen 2</option>
              </select>
            </div>
          </div>
        </div>
0ad3ed4de   Digvijay Singh   adin panel changes
350
351
        <!-- 1st row -->
        <div class="row">
298fff252   Digvijay Singh   new design added
352
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
0ad3ed4de   Digvijay Singh   adin panel changes
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
            <div class="form-group floating-label">
              <label for="lname" class="lname">Designer Name</label>
              <input
                type="text"
                class="form-control"
                value=""
                placeholder=" "
                v-model="caseStudy.caseStudyDetails.outro.designer"
              />
            </div>
          </div>
  
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname">Illustrations Name</label>
              <input
                type="text"
                class="form-control"
                value=""
                placeholder=" "
                v-model="caseStudy.caseStudyDetails.outro.illustrations"
              />
            </div>
          </div>
  
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname"> Author Image</label>
0e3c6b828   Neeraj Sharma   add create study ...
381
382
383
384
385
              <img
                v-if="caseStudy.caseStudyDetails.outro.authorImage[0]"
                style="width: 40px; height: 40px"
                :src="caseStudy.caseStudyDetails.outro.authorImage[0]"
              />
0ad3ed4de   Digvijay Singh   adin panel changes
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
              <input
                @change="createImage('outdor')"
                type="file"
                name="photos"
                id="outdor"
                accept="image/*"
              />
            </div>
          </div>
        </div>
        <!-- 1st row -->
        <!-- outdoor ends -->
  
        <!-- outdor -->
        <div class="row profile-tab-spc-top">
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <ul class="navbar-nav mr-auto">
              <li class="nav-item active">
                <h5 class="nav-link">Add SLides</h5>
298fff252   Digvijay Singh   new design added
405
406
407
408
              </li>
            </ul>
          </div>
        </div>
0ad3ed4de   Digvijay Singh   adin panel changes
409

0ad3ed4de   Digvijay Singh   adin panel changes
410
411
412
413
414
415
416
417
418
419
420
        <!-- case study  slides-->
        <div
          class="row profile-tab-spc-top"
          v-for="(slide, i) in caseStudy.slides"
          :key="i"
        >
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <ul class="navbar-nav mr-auto">
              <li class="nav-item active">
                <p class="nav-link">
                  <b>Screen {{ i + 1 }}</b>
5684145ce   Digvijay Singh   reset password,ot...
421
                  <a
0ad3ed4de   Digvijay Singh   adin panel changes
422
423
                    style="cursor: pointer; color: red; font-size: 0.8rem"
                    @click="removeSlide(i)"
298fff252   Digvijay Singh   new design added
424
                  >
0ad3ed4de   Digvijay Singh   adin panel changes
425
                    Remove</a
298fff252   Digvijay Singh   new design added
426
                  >
4490fe7f6   Digvijay Singh   base url changed
427
428
429
430
431
432
                  <a
                    style="cursor: pointer; color: blue; font-size: 0.8rem"
                    @click="addProfileDialog(slide)"
                  >
                    View</a
                  >
0ad3ed4de   Digvijay Singh   adin panel changes
433
434
                </p>
              </li>
0e3c6b828   Neeraj Sharma   add create study ...
435
              <li class="nav-item active" v-if="slide.insight">
3986e5ad7   Digvijay Singh   new changes in ad...
436
                <div class="form-group floating-label">
0e3c6b828   Neeraj Sharma   add create study ...
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
                  <label for="lname" class="lname">Insight</label>
                  <select
                    class="form-control"
                    v-model="insightId"
                    v-on:change="insightSelected(slide)"
                  >
                    <option value="null">Select Insight</option>
                    <option
                      v-for="(insight, i) in insightList"
                      :key="i"
                      :value="insight._id"
                    >
                      {{ insight.title }}
                    </option>
                  </select>
                </div>
3986e5ad7   Digvijay Singh   new changes in ad...
453
              </li>
0ad3ed4de   Digvijay Singh   adin panel changes
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
            </ul>
          </div>
  
          <div class="row">
            <div
              class="col-sm-4 col-md-4 col-lg-4 col-xl-4"
              v-for="(field, j) in slide.metaData.fields"
              :key="j"
            >
              <div
                class="form-group floating-label"
                v-if="field.fieldType == 'text'"
              >
                <label for="lname" class="lname">{{ field.displayName }}</label>
                <input
                  type="text"
9f4ec7a18   Digvijay Singh   url changed
470
471
472
473
474
475
476
477
478
479
480
481
482
                  class="form-control"
                  value=""
                  placeholder=" "
                  v-model="field.fieldValue"
                />
              </div>
              <div
                class="form-group floating-label"
                v-if="field.fieldType == 'Number'"
              >
                <label for="lname" class="lname">{{ field.displayName }}</label>
                <input
                  type="text"
0ad3ed4de   Digvijay Singh   adin panel changes
483
484
485
486
487
488
489
490
491
492
493
494
                  class="form-control"
                  value=""
                  placeholder=" "
                  v-model="field.fieldValue"
                />
              </div>
  
              <div
                class="form-group floating-label"
                v-if="field.fieldType == 'image'"
              >
                <label for="lname" class="lname"> {{ field.displayName }}</label>
0e3c6b828   Neeraj Sharma   add create study ...
495
496
497
498
499
                <img
                  v-if="field.fieldValue"
                  style="width: 40px; height: 40px"
                  :src="field.fieldValue"
                />
0ad3ed4de   Digvijay Singh   adin panel changes
500
501
502
503
504
505
506
                <input
                  @change="fieldcreateImage(i, j)"
                  type="file"
                  name="photo"
                  :id="i + '' + j"
                  accept="image/*"
                />
298fff252   Digvijay Singh   new design added
507
508
              </div>
            </div>
5684145ce   Digvijay Singh   reset password,ot...
509
          </div>
0ad3ed4de   Digvijay Singh   adin panel changes
510
511
512
  
          <div class="row">
            <div
522f093f0   Digvijay Singh   outro module added
513
              
0ad3ed4de   Digvijay Singh   adin panel changes
514
515
516
517
518
519
520
521
522
523
524
              v-for="(cum, j) in slide.metaData.comments"
              :key="j"
            >
              <div class="form-group floating-label">
                <label for="lname" class="lname">Comment Box {{ j + 1 }}</label>
                <input
                  type="text"
                  class="form-control"
                  value=""
                  placeholder=" "
                  v-model="cum.comment"
0e3c6b828   Neeraj Sharma   add create study ...
525
                  v-on:blur="updateComment(cum)"
0ad3ed4de   Digvijay Singh   adin panel changes
526
                />
5684145ce   Digvijay Singh   reset password,ot...
527
              </div>
5684145ce   Digvijay Singh   reset password,ot...
528
529
            </div>
          </div>
298fff252   Digvijay Singh   new design added
530
        </div>
0ad3ed4de   Digvijay Singh   adin panel changes
531

4490fe7f6   Digvijay Singh   base url changed
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
        <!-- 1st row -->
        <div class="row">
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-group floating-label">
              <label for="lname" class="lname">Slides Name</label>
              <select
                class="form-control"
                v-model="slideId"
                v-on:change="slideSelected(slideId)"
              >
                <option value="null">Select Slide</option>
                <option v-for="(template, i) in templateList" :key="i" :value="i">
                  {{ template.name }}
                </option>
              </select>
            </div>
          </div>
        </div>
        <!-- 1st row -->
0ad3ed4de   Digvijay Singh   adin panel changes
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
        <!-- 1st row end -->
        <!-- case study ends -->
        <div class="clearfix"></div>
  
        <!-- users land image -->
        <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
          <div class="form-layout signup-frm-spc">
            <form>
              <a
                href="javascript:void(0);"
                class="btn btn-lg sb-button"
                type="submit"
                @click="submit"
              >
                <img src="../assets/images/key.svg" /> submit
              </a>
            </form>
          </div>
        </div>
298fff252   Digvijay Singh   new design added
570
        <!-- data wrp -->
f06677bfc   Digvijay Singh   profile screen added
571
572
573
574
575
576
        <!-- body wrapper -->
      </div>
    </main>
  </template>
  
  <script>
f06677bfc   Digvijay Singh   profile screen added
577
578
579
  import Vue from "vue";
  import router from "../router";
  import $ from "jquery";
5684145ce   Digvijay Singh   reset password,ot...
580
  import axios from "axios";
f06677bfc   Digvijay Singh   profile screen added
581
582
583
584
585
586
  
  export default {
    name: "Profile",
  
    data() {
      return {
0e3c6b828   Neeraj Sharma   add create study ...
587
        object: null,
f06677bfc   Digvijay Singh   profile screen added
588
        loggedinFlag: false,
0e3c6b828   Neeraj Sharma   add create study ...
589
        templateImage: null,
640c12320   Digvijay Singh   update module added
590
591
        caseId: null,
        editMode: false,
0ad3ed4de   Digvijay Singh   adin panel changes
592
        userData: null,
298fff252   Digvijay Singh   new design added
593
        usertoken: null,
0ad3ed4de   Digvijay Singh   adin panel changes
594
595
596
597
598
        insightName: null,
        focusName: null,
        slideId: null,
        userList: [],
        templateList: [],
3986e5ad7   Digvijay Singh   new changes in ad...
599
        insightList: [],
0e3c6b828   Neeraj Sharma   add create study ...
600
        insightId: null,
0ad3ed4de   Digvijay Singh   adin panel changes
601
602
603
604
605
606
607
608
        caseStudy: {
          caseStudyDetails: {
            userId: [],
            intro: {
              name: null,
              logoURL: null,
              app: null,
              type: null,
0ad3ed4de   Digvijay Singh   adin panel changes
609
610
              readTime: null,
              platForm: null,
08becbb24   Digvijay Singh   new fiwld added
611
              designation: null,
522f093f0   Digvijay Singh   outro module added
612
              templateId: "intro-1",
0ad3ed4de   Digvijay Singh   adin panel changes
613
614
615
616
617
618
              authors: [],
            },
            outro: {
              authorImage: [],
              authors: [],
              designer: null,
522f093f0   Digvijay Singh   outro module added
619
              templateId: "outro-1",
0ad3ed4de   Digvijay Singh   adin panel changes
620
621
622
623
624
625
626
              illustrations: null,
            },
            insightTags: [],
            focusAreas: [],
          },
          slides: [],
        },
0e3c6b828   Neeraj Sharma   add create study ...
627
        selectPlatform: "",
f06677bfc   Digvijay Singh   profile screen added
628
629
      };
    },
298fff252   Digvijay Singh   new design added
630
    mounted() {
640c12320   Digvijay Singh   update module added
631
632
633
634
635
636
637
      if (this.$route.fullPath.split("?").length == 2) {
        this.editMode = true;
        this.caseId = this.$route.fullPath.split("?")[1];
        var introData = localStorage.getItem("spotlight_caseStudy" + this.caseId);
        if (introData) {
          introData = JSON.parse(introData);
          console.log("introData", introData);
0e3c6b828   Neeraj Sharma   add create study ...
638
          if (introData.intro.focus) {
8530576f3   Digvijay Singh   ui fixes
639
640
            delete introData.intro.focus;
          }
640c12320   Digvijay Singh   update module added
641
642
643
644
645
          this.caseStudy.caseStudyDetails.intro = introData.intro;
          this.caseStudy.caseStudyDetails.userId = introData.userId;
          this.caseStudy.caseStudyDetails.outro = introData.outro;
          this.caseStudy.caseStudyDetails.insightTags = introData.insightTags;
          this.caseStudy.caseStudyDetails.focusAreas = introData.focusAreas;
0e3c6b828   Neeraj Sharma   add create study ...
646
647
          this.selectPlatform = introData.intro.platForm;
          console.log("this.selectPlatform", this.selectPlatform);
640c12320   Digvijay Singh   update module added
648
649
        }
      }
298fff252   Digvijay Singh   new design added
650
651
652
653
      var userdata = localStorage.getItem("spotlight_usertoken");
      if (userdata) {
        userdata = JSON.parse(userdata);
        this.usertoken = userdata.token;
0ad3ed4de   Digvijay Singh   adin panel changes
654
655
        this.getUserList();
        this.getTemplateList();
3986e5ad7   Digvijay Singh   new changes in ad...
656
        this.getInsightList();
298fff252   Digvijay Singh   new design added
657
      }
298fff252   Digvijay Singh   new design added
658
    },
f06677bfc   Digvijay Singh   profile screen added
659
    methods: {
bd940371b   Digvijay Singh   update ui code
660
     
522f093f0   Digvijay Singh   outro module added
661
662
663
      changeIntroScreen(){
  
      },
0ad3ed4de   Digvijay Singh   adin panel changes
664
665
666
667
668
669
      selectUser(i) {
        this.userList[i];
        this.caseStudy.caseStudyDetails.intro.authors.push(this.userList[i].name);
        this.caseStudy.caseStudyDetails.outro.authors.push(this.userList[i].name);
        this.caseStudy.caseStudyDetails.userId.push(this.userList[i]._id);
        console.log("-", this.caseStudy);
f06677bfc   Digvijay Singh   profile screen added
670
      },
0ad3ed4de   Digvijay Singh   adin panel changes
671

5684145ce   Digvijay Singh   reset password,ot...
672
673
674
      logout() {
        this.$router.push("/");
      },
0ad3ed4de   Digvijay Singh   adin panel changes
675
676
677
678
679
680
681
      addInsight(type) {
        if (type == "focus") {
          this.caseStudy.caseStudyDetails.focusAreas.push(this.focusName);
          this.focusName = null;
        } else if (type == "insight") {
          this.caseStudy.caseStudyDetails.insightTags.push(this.insightName);
          this.insightName = null;
0e3c6b828   Neeraj Sharma   add create study ...
682
683
684
        } else if (type == "platform") {
          this.caseStudy.caseStudyDetails.intro.platForm = this.selectPlatform;
          // this.selectPlatform = null;
0ad3ed4de   Digvijay Singh   adin panel changes
685
        }
5684145ce   Digvijay Singh   reset password,ot...
686
      },
0ad3ed4de   Digvijay Singh   adin panel changes
687
688
689
690
691
      removeInsight(i, type) {
        if (type == "focus") {
          this.caseStudy.caseStudyDetails.focusAreas.splice(i, 1);
        } else if (type == "insight") {
          this.caseStudy.caseStudyDetails.insightTags.splice(i, 1);
0e3c6b828   Neeraj Sharma   add create study ...
692
693
694
        } else if (type == "platform") {
          this.caseStudy.caseStudyDetails.intro.platForm = "";
          this.selectPlatform = null;
5684145ce   Digvijay Singh   reset password,ot...
695
696
        }
      },
0ad3ed4de   Digvijay Singh   adin panel changes
697
698
699
  
      async slideSelected(i) {
        console.log("id is", this.templateList[i]);
0f877e866   Digvijay Singh   issues fixation
700
        this.object = JSON.parse(JSON.stringify(this.templateList[i]));
0e3c6b828   Neeraj Sharma   add create study ...
701

0f877e866   Digvijay Singh   issues fixation
702
703
        // var keys = Object.keys(this.templateList[i]);
        // keys.forEach(element => {
0e3c6b828   Neeraj Sharma   add create study ...
704
        //   obj[element] = this.templateList[i][element];
0f877e866   Digvijay Singh   issues fixation
705
        // });
0e3c6b828   Neeraj Sharma   add create study ...
706
        console.log("obj", this.object);
0ad3ed4de   Digvijay Singh   adin panel changes
707
708
709
        // slideMetadata = await this.getMeatda(this.templateList[i]._id);
        this.slideId = null;
        // this.templateList[i].metaData = slideMetadata.metaData;
0e3c6b828   Neeraj Sharma   add create study ...
710
711
712
713
714
715
716
        this.caseStudy.slides.push(this.object);
        this.templateList[i].metaData.fields.forEach((fields_) => {
          fields_.fieldValue == null;
        });
        if (this.templateList[i].metaData.comments) {
          this.templateList[i].metaData.comments.forEach((coments_) => {
            coments_.comment == null;
0f877e866   Digvijay Singh   issues fixation
717
          });
0e3c6b828   Neeraj Sharma   add create study ...
718
        }
0ad3ed4de   Digvijay Singh   adin panel changes
719
        console.log("this.caseStudy.slides", this.caseStudy.slides);
5684145ce   Digvijay Singh   reset password,ot...
720
      },
3986e5ad7   Digvijay Singh   new changes in ad...
721
      async insightSelected(data) {
3986e5ad7   Digvijay Singh   new changes in ad...
722
        // this.caseStudy.slides.push(this.templateList[i]);
0e3c6b828   Neeraj Sharma   add create study ...
723
724
  
        console.log("data", data);
3986e5ad7   Digvijay Singh   new changes in ad...
725
        data.insightId = this.insightId;
37f413ce8   Neeraj Sharma   fixed select slid...
726
        // this.insightId = null;
3986e5ad7   Digvijay Singh   new changes in ad...
727
      },
0ad3ed4de   Digvijay Singh   adin panel changes
728
729
730
  
      removeSlide(i) {
        this.caseStudy.slides.splice(i, 1);
5684145ce   Digvijay Singh   reset password,ot...
731
      },
5684145ce   Digvijay Singh   reset password,ot...
732

0ad3ed4de   Digvijay Singh   adin panel changes
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
      createImage(type) {
        var that = this;
        console.log(document.getElementById(type));
        var file = document.getElementById(type).files[0];
        console.log("file", file);
        var reader = new FileReader();
        reader.onload = function (e) {
          console.log("e.target.result  ", e.target.result);
          that.uploadImage(type, e.target.result);
        };
        reader.onerror = function (error) {
          alert(error);
        };
        if (file) {
          reader.readAsDataURL(file);
        }
5684145ce   Digvijay Singh   reset password,ot...
749
      },
0ad3ed4de   Digvijay Singh   adin panel changes
750
751
752
753
754
      uploadImage(type, base64) {
        console.log("type", type);
        var obj = {
          image: base64,
        };
298fff252   Digvijay Singh   new design added
755
        axios
0ad3ed4de   Digvijay Singh   adin panel changes
756
          .post("/superAdmin/uploadImage", obj, {
5684145ce   Digvijay Singh   reset password,ot...
757
758
759
760
761
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
0ad3ed4de   Digvijay Singh   adin panel changes
762
            if (type == "logo") {
0e3c6b828   Neeraj Sharma   add create study ...
763
764
765
766
767
768
              setTimeout(
                () =>
                  (this.caseStudy.caseStudyDetails.intro.logoURL =
                    response.data.data),
                99
              );
0ad3ed4de   Digvijay Singh   adin panel changes
769
770
            } else if (type == "outdor") {
              this.caseStudy.caseStudyDetails.outro.authorImage = [];
0e3c6b828   Neeraj Sharma   add create study ...
771
772
773
774
775
776
777
              setTimeout(
                () =>
                  this.caseStudy.caseStudyDetails.outro.authorImage.push(
                    response.data.data
                  ),
                99
              );
052b5bc33   Digvijay Singh   close dialog
778
            }
5684145ce   Digvijay Singh   reset password,ot...
779

5684145ce   Digvijay Singh   reset password,ot...
780
            console.log(response.data.data);
0ad3ed4de   Digvijay Singh   adin panel changes
781
            console.log(this.caseStudy);
5684145ce   Digvijay Singh   reset password,ot...
782
          })
0ad3ed4de   Digvijay Singh   adin panel changes
783
784
785
786
787
          .catch((error) => {
            if (error.response) {
              this.$toaster.error(error.response.data.message);
            }
          });
298fff252   Digvijay Singh   new design added
788
      },
0ad3ed4de   Digvijay Singh   adin panel changes
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
  
      fieldcreateImage(i, j) {
        console.log("i", i);
        console.log("j", j);
        var that = this;
        var id = i + "" + j;
        console.log(document.getElementById(id));
        var file = document.getElementById(id).files[0];
        // var file = document.querySelector("input[type=file]").files[0];
        console.log("file", file);
        var reader = new FileReader();
        reader.onload = function (e) {
          // console.log("e.target.result  ",e.target.result  )
          that.fielduploadImage(i, j, e.target.result);
        };
        reader.onerror = function (error) {
          alert(error);
        };
        if (file) {
          reader.readAsDataURL(file);
        }
      },
      fielduploadImage(i, j, base64) {
        var obj = {
          image: base64,
        };
5684145ce   Digvijay Singh   reset password,ot...
815
        axios
0ad3ed4de   Digvijay Singh   adin panel changes
816
          .post("/superAdmin/uploadImage", obj, {
298fff252   Digvijay Singh   new design added
817
818
819
820
821
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
0e3c6b828   Neeraj Sharma   add create study ...
822
823
824
825
826
827
            setTimeout(
              () =>
                (this.caseStudy.slides[i].metaData.fields[j].fieldValue =
                  response.data.data),
              10
            );
74dbc1d9f   Digvijay Singh   image added
828

298fff252   Digvijay Singh   new design added
829
            console.log(response.data.data);
0ad3ed4de   Digvijay Singh   adin panel changes
830
            console.log(this.caseStudy);
298fff252   Digvijay Singh   new design added
831
          })
5684145ce   Digvijay Singh   reset password,ot...
832
833
834
835
836
          .catch((error) => {
            if (error.response) {
              this.$toaster.error(error.response.data.message);
            }
          });
298fff252   Digvijay Singh   new design added
837
      },
0ad3ed4de   Digvijay Singh   adin panel changes
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
  
      getUserList() {
        axios
          .get("/superAdmin/users", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            response.data.data.forEach((element) => {
              if (element.name) {
                this.userList.push(element);
              }
            });
            console.log("response", this.userList);
          })
          .catch((error) => console.log(error));
298fff252   Digvijay Singh   new design added
855
      },
0ad3ed4de   Digvijay Singh   adin panel changes
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
  
      getTemplateList() {
        axios
          .get("/superAdmin/templates", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            response.data.data.forEach((temp) => {
              if (
                temp._id != "INTRO_oqkdMOVDrwRptsdWJ6Ye" &&
                temp._id != "OUTRO_oqkdMOVDrwRptsdWJ6Ye"
              ) {
                if (temp.bounceBoard) {
                  for (var i = 0; i < temp.commentBox; i++) {
                    temp.metaData.comments.push({
                      userId: null,
                      slideId: null,
                      caseStudyId: null,
                      comment: null,
                    });
                  }
                }
                this.templateList.push(temp);
              }
            });
640c12320   Digvijay Singh   update module added
883
884
885
            if (this.editMode) {
              this.getSLideData();
            }
0ad3ed4de   Digvijay Singh   adin panel changes
886
887
888
            console.log("templates", this.templateList);
          })
          .catch((error) => console.log(error));
1620582c6   Digvijay Singh   close dialog
889
      },
3986e5ad7   Digvijay Singh   new changes in ad...
890
891
892
893
894
895
896
897
898
      getInsightList() {
        axios
          .get("/superAdmin/insight", {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            this.insightList = response.data.data;
0e3c6b828   Neeraj Sharma   add create study ...
899

3986e5ad7   Digvijay Singh   new changes in ad...
900
901
902
903
            console.log("insight", response.data.data);
          })
          .catch((error) => console.log(error));
      },
0ad3ed4de   Digvijay Singh   adin panel changes
904

640c12320   Digvijay Singh   update module added
905
906
907
908
909
910
911
912
913
      getSLideData() {
        axios
          .get("/superAdmin/caseStudySlides?caseStudyId=" + this.caseId, {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            var finalArray = [];
51ce61cc2   Digvijay Singh   insight issue
914
            console.log("1");
640c12320   Digvijay Singh   update module added
915
            response.data.data.forEach((template_) => {
0e3c6b828   Neeraj Sharma   add create study ...
916
              console.log("template_", template_);
640c12320   Digvijay Singh   update module added
917
918
919
920
921
922
923
924
              var keys = [];
              var i = this.templateList.findIndex(
                (temp_) => temp_._id == template_.templateId
              );
              var obj = {
                _id: this.templateList[i]._id,
                bounceBoard: this.templateList[i].bounceBoard,
                insight: this.templateList[i].insight,
0e3c6b828   Neeraj Sharma   add create study ...
925
                slideId: template_._id,
640c12320   Digvijay Singh   update module added
926
927
928
929
930
931
                // commentBox: this.templateList[i].commentBox,
                metaData: {
                  fields: [],
                  comments: [],
                },
              };
522f093f0   Digvijay Singh   outro module added
932
              console.log("2");
51ce61cc2   Digvijay Singh   insight issue
933

640c12320   Digvijay Singh   update module added
934
935
              if (this.templateList[i].bounceBoard) {
                obj.commentBox = this.templateList[i].commentBox;
0f877e866   Digvijay Singh   issues fixation
936
                obj.metaData.comments = template_.comments;
640c12320   Digvijay Singh   update module added
937
              }
3986e5ad7   Digvijay Singh   new changes in ad...
938
939
940
              if (this.templateList[i].insight) {
                obj.insightId = template_.insightId;
              }
640c12320   Digvijay Singh   update module added
941
              var fieldArray = [];
522f093f0   Digvijay Singh   outro module added
942
              console.log("3");
51ce61cc2   Digvijay Singh   insight issue
943

640c12320   Digvijay Singh   update module added
944
945
946
947
948
949
950
951
952
              this.templateList[i].metaData.fields.forEach((element) => {
                var fieldobj = {
                  fieldName: element.fieldName,
                  displayName: element.displayName,
                  fieldValue: template_.metaData[element.fieldName],
                  fieldType: element.fieldType,
                };
                obj.metaData.fields.push(fieldobj);
              });
522f093f0   Digvijay Singh   outro module added
953
              console.log("4");
51ce61cc2   Digvijay Singh   insight issue
954

640c12320   Digvijay Singh   update module added
955
              finalArray.push(obj);
522f093f0   Digvijay Singh   outro module added
956
              if (template_.insight) {
51ce61cc2   Digvijay Singh   insight issue
957
958
                this.insightId = template_.insight._id;
              }
640c12320   Digvijay Singh   update module added
959
            });
51ce61cc2   Digvijay Singh   insight issue
960
            console.log("5");
640c12320   Digvijay Singh   update module added
961
962
963
964
965
966
            this.caseStudy.slides = finalArray;
            console.log("----", finalArray);
            console.log(this.templateList, "getSLideData==>");
          })
          .catch((error) => console.log(error));
      },
0ad3ed4de   Digvijay Singh   adin panel changes
967
968
969
970
971
      submit() {
        const latest = Object.create(this.caseStudy);
  
        var slidArray = [];
        latest.slides.forEach((slides) => {
640c12320   Digvijay Singh   update module added
972
          console.log("slides", slides);
0ad3ed4de   Digvijay Singh   adin panel changes
973
974
975
976
          var slideData = {};
          slideData.templateId = slides._id;
          slideData.bounceBoard = slides.bounceBoard;
          slideData.insight = slides.insight;
0e3c6b828   Neeraj Sharma   add create study ...
977
          if (slides.slideId) {
3986e5ad7   Digvijay Singh   new changes in ad...
978
            slideData.slideId = slides.slideId;
3986e5ad7   Digvijay Singh   new changes in ad...
979
          }
0e3c6b828   Neeraj Sharma   add create study ...
980
          if (slides.insightId) {
3986e5ad7   Digvijay Singh   new changes in ad...
981
            slideData.insightId = slides.insightId;
3986e5ad7   Digvijay Singh   new changes in ad...
982
          }
640c12320   Digvijay Singh   update module added
983
984
985
986
          if (slides.metaData.comments && slides.metaData.comments.length > 0) {
            slideData.comments = slides.metaData.comments;
            // this.getSLideData();
          }
0ad3ed4de   Digvijay Singh   adin panel changes
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
          // var comments = [];
          // if (slides.bounceBoard) {
          //   slides.metaData.comments.forEach((element) => {
          //     comments.push(element.comment);
          //   });
          //   slideData.comments = comments;
          // }
  
          slides.metaData.fields.forEach((fields_) => {
            slideData[fields_.fieldName] = fields_.fieldValue;
          });
          slidArray.push(slideData);
          // delete slides.metaData.fields;
        });
  
        console.log("slideData", slidArray);
640c12320   Digvijay Singh   update module added
1003
1004
        if (this.editMode) {
          this.updateProfile(slidArray);
0e3c6b828   Neeraj Sharma   add create study ...
1005
        } else {
640c12320   Digvijay Singh   update module added
1006
1007
          this.saveProfile(slidArray);
        }
5684145ce   Digvijay Singh   reset password,ot...
1008
      },
0e3c6b828   Neeraj Sharma   add create study ...
1009
1010
      updateComment(cmnt) {
        if (!cmnt._id) {
0f877e866   Digvijay Singh   issues fixation
1011
1012
          return;
        }
0e3c6b828   Neeraj Sharma   add create study ...
1013
        console.log("cmnts", cmnt);
0f877e866   Digvijay Singh   issues fixation
1014
        var obj = {
0e3c6b828   Neeraj Sharma   add create study ...
1015
1016
1017
          slideId: cmnt.slideId,
          commentId: cmnt._id,
          comment: cmnt.comment,
0f877e866   Digvijay Singh   issues fixation
1018
1019
1020
1021
1022
1023
1024
1025
        };
        axios
          .put("/superAdmin/comment", obj, {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
0f877e866   Digvijay Singh   issues fixation
1026
1027
            console.log(response);
          })
0e3c6b828   Neeraj Sharma   add create study ...
1028
          .catch((error) => {});
0f877e866   Digvijay Singh   issues fixation
1029
      },
0ad3ed4de   Digvijay Singh   adin panel changes
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
  
      saveProfile(slides) {
        var obj = {};
        obj.caseStudyDetails = this.caseStudy.caseStudyDetails;
        obj.caseStudyDetails.intro.readTime = Math.round(
          slides.length / 3
        ).toString();
        obj.slides = slides;
        axios
          .post("/superAdmin/caseStudy", obj, {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            // this.userData = response.data.data;
            this.$toaster.success("Case Study Created");
0e3c6b828   Neeraj Sharma   add create study ...
1047
            this.$router.go(this.$router.currentRoute);
0ad3ed4de   Digvijay Singh   adin panel changes
1048
1049
1050
1051
1052
1053
1054
1055
  
            console.log(response);
          })
          .catch((error) => {
            if (error.response) {
              this.$toaster.error(error.response.data.message);
            }
          });
5684145ce   Digvijay Singh   reset password,ot...
1056
      },
0e3c6b828   Neeraj Sharma   add create study ...
1057

640c12320   Digvijay Singh   update module added
1058
1059
      updateProfile(slides) {
        var obj = {};
0e3c6b828   Neeraj Sharma   add create study ...
1060
1061
        (obj.caseStudyId = this.caseId),
          (obj.caseStudyDetails = this.caseStudy.caseStudyDetails);
640c12320   Digvijay Singh   update module added
1062
1063
1064
1065
        obj.caseStudyDetails.intro.readTime = Math.round(
          slides.length / 3
        ).toString();
        obj.slides = slides;
0e3c6b828   Neeraj Sharma   add create study ...
1066
        delete obj.caseStudyDetails.intro.focus;
640c12320   Digvijay Singh   update module added
1067
1068
1069
1070
1071
1072
1073
1074
1075
        axios
          .put("/superAdmin/caseStudy", obj, {
            headers: {
              Authorization: "Bearer " + this.usertoken,
            },
          })
          .then((response) => {
            // this.userData = response.data.data;
            this.$toaster.success("Case Study Updated");
0e3c6b828   Neeraj Sharma   add create study ...
1076
            this.$router.go(this.$router.currentRoute);
640c12320   Digvijay Singh   update module added
1077
1078
1079
1080
1081
1082
1083
1084
1085
  
            console.log(response);
          })
          .catch((error) => {
            if (error.response) {
              this.$toaster.error(error.response.data.message);
            }
          });
      },
0e3c6b828   Neeraj Sharma   add create study ...
1086
1087
      listPage(url) {
        this.$router.push(url);
640c12320   Digvijay Singh   update module added
1088
      },
24ced0ae7   Gurvinder Singh   new changes files
1089

4490fe7f6   Digvijay Singh   base url changed
1090
      addProfileDialog(slide) {
0e3c6b828   Neeraj Sharma   add create study ...
1091
        console.log("slide", slide);
4490fe7f6   Digvijay Singh   base url changed
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
        this.templateImage = slide.templateImage;
        $(".inner-wrp").addClass("body-blur");
        $("#add-social-links").hide();
        $(".popup-wrp, #add-profile").show();
      },
  
      closeDialog() {
        this.templateImage = null;
        $(".popup-wrp").hide();
        $(".inner-wrp").removeClass("body-blur");
        // this.saveProfile();
      },
      hideDialog() {
        this.templateImage = null;
        $(".popup-wrp").hide();
        $(".inner-wrp").removeClass("body-blur");
      },
0ad3ed4de   Digvijay Singh   adin panel changes
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
      async getMeatda(tempId) {
        var obj = [
          {
            tempId: "T1_RoeMG8130Xko1DvhC3Ou",
            metaData: {
              fields: [
                {
                  fieldName: "authorImage",
                  displayName: "Author Image",
                  fieldValue: null,
                  fieldType: "image",
                },
                {
                  fieldName: "mobileImage",
                  displayName: "Mobile Image",
                  fieldValue: null,
                  fieldType: "image",
                },
                {
                  fieldName: "textBox",
                  displayName: "Text Box",
                  fieldValue: null,
                  fieldType: "text",
                },
              ],
            },
          },
          {
            tempId: "T2_ROsUOEy3vxsRAiQ72XdI",
            metaData: {
              fields: [
                {
                  fieldName: "authorImage",
                  displayName: "Author Image",
                  fieldValue: null,
                  fieldType: "image",
                },
              ],
              comments: [{ comment: null }, { comment: null }, { comment: null }],
            },
          },
          {
            tempId: "T3_cqNIf7tuqL4jyON63dA7",
            metaData: {
              fields: [
                {
                  fieldName: "authorImage",
                  displayName: "Author Image",
                  fieldValue: null,
                  fieldType: "image",
                },
                {
                  fieldName: "mobileImage",
                  displayName: "Mobile Image",
                  fieldValue: null,
                  fieldType: "image",
                },
              ],
              comments: [
                { comment: null },
                { comment: null },
                { comment: null },
                { comment: null },
              ],
            },
          },
        ];
        var i = obj.findIndex((obj_) => obj_.tempId == tempId);
        return obj[i];
5684145ce   Digvijay Singh   reset password,ot...
1178
      },
f06677bfc   Digvijay Singh   profile screen added
1179
1180
1181
    },
  };
  </script>