Blame view

src/pages/Notification/notification.vue 15.3 KB
55f72b7d7   Neeraj Sharma   add new page are ...
1
  <template>
68d742034   Neeraj Sharma   implement new des...
2
3
    <v-container fluid class="body-color">
      <!-- ****** EDITS  NOTIFICATION DETAILS ****** -->
db965de89   Amber Dev   added dialog pers...
4
      <v-dialog v-model="editNotificationDialog" max-width="500px" persistent>
68d742034   Neeraj Sharma   implement new des...
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
        <v-flex xs12 sm12>
          <v-card flat class="card-style pa-3" dark>
            <v-layout>
              <v-flex xs12>
                <label class="title text-xs-center">Edit Notification</label>
                <v-icon size="24" class="right" @click="editNotificationDialog = false">cancel</v-icon>
              </v-flex>
            </v-layout>
            <v-flex xs12 sm12>
              <v-layout>
                <v-flex xs4 class="pt-4 subheading">
                  <label class="right">Title:</label>
                </v-flex>
                <v-flex xs8 sm8 class="ml-3">
                  <v-text-field
                    v-model="editedItem.title"
                    placeholder="fill your Title"
                    name="name"
                    type="text"
                  ></v-text-field>
                </v-flex>
              </v-layout>
            </v-flex>
            <v-flex xs12 sm12>
              <v-layout>
                <v-flex xs4 class="pt-4 subheading">
                  <label class="right">Description:</label>
                </v-flex>
                <v-flex xs8 sm8 class="ml-3">
                  <v-text-field
                    placeholder="fill your Description"
                    v-model="editedItem.description"
                    type="text"
                  ></v-text-field>
                </v-flex>
              </v-layout>
            </v-flex>
            <v-layout>
              <v-flex xs12>
                <v-card-actions>
                  <v-spacer></v-spacer>
                  <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn>
                  <v-spacer></v-spacer>
                </v-card-actions>
              </v-flex>
            </v-layout>
          </v-card>
        </v-flex>
      </v-dialog>
55f72b7d7   Neeraj Sharma   add new page are ...
54

68d742034   Neeraj Sharma   implement new des...
55
      <!-- ****** PROFILE VIEW NOTIFICATION DEATILS ******  -->
55f72b7d7   Neeraj Sharma   add new page are ...
56

db965de89   Amber Dev   added dialog pers...
57
      <v-dialog v-model="profileNotificationDialog" max-width="400px" persistent>
68d742034   Neeraj Sharma   implement new des...
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
        <v-card flat class="card-style pa-3" dark>
          <v-layout>
            <v-flex xs12>
              <label class="title text-xs-center">View Notification</label>
              <v-icon size="24" class="right" @click="profileNotificationDialog = false">cancel</v-icon>
            </v-flex>
          </v-layout>
          <v-card-text>
            <v-container grid-list-md>
              <v-layout wrap>
                <v-flex xs12>
                  <v-layout>
                    <v-flex xs4 sm6>
                      <h5 class="right my-1">
                        <b>Title:</b>
                      </h5>
                    </v-flex>
                    <v-flex sm6 xs8>
                      <h5 class="my-1">{{ editedItem.title }}</h5>
                    </v-flex>
                  </v-layout>
                </v-flex>
                <v-layout>
                  <v-flex xs4 sm6>
                    <h5 class="right my-1">
                      <b>Description:</b>
                    </h5>
                  </v-flex>
                  <v-flex sm6 xs8>
                    <h5 class="my-1">{{ editedItem.description }}</h5>
                  </v-flex>
                </v-layout>
              </v-layout>
            </v-container>
          </v-card-text>
        </v-card>
      </v-dialog>
      <!-- ****** NOTIFICATION TABLE ****** -->
      <v-toolbar color="transparent" flat>
        <v-btn
          fab
          dark
          class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only"
          small
          @click="addNotificationDialog = true"
        >
          <v-icon dark>add</v-icon>
        </v-btn>
        <v-btn
          round
          class="open-dialog-button hidden-sm-only hidden-xs-only"
          dark
          @click="addNotificationDialog = true"
        >
          <v-icon class="white--text pr-1" size="20">add</v-icon>Add Notification
        </v-btn>
        <v-spacer></v-spacer>
        <v-card-title class="body-1" v-show="show">
          <v-btn icon large flat @click="displaySearch">
            <v-avatar size="27">
aa310d61a   Shikha Mishra   added functionali...
118
              <img src="/static/icon/search.png" alt="icon" />
68d742034   Neeraj Sharma   implement new des...
119
120
121
            </v-avatar>
          </v-btn>
        </v-card-title>
8e8d14254   Shikha Mishra   Cleared data whil...
122
        <v-flex xs8 sm8 md3 lg2 v-if="showSearch">
68d742034   Neeraj Sharma   implement new des...
123
          <v-layout>
8e8d14254   Shikha Mishra   Cleared data whil...
124
125
126
127
128
129
130
            <v-text-field
              autofocus
              v-model="search"
              label="Search"
              prepend-inner-icon="search"
              color="primary"
            ></v-text-field>
68d742034   Neeraj Sharma   implement new des...
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
            <v-icon @click="closeSearch" color="error">close</v-icon>
          </v-layout>
        </v-flex>
      </v-toolbar>
      <v-data-table
        :headers="headers"
        :items="notifications"
        :pagination.sync="pagination"
        :search="search"
      >
        <template slot="items" slot-scope="props">
          <tr class="tr">
            <td class="td td-row">{{ props.index + 1}}</td>
            <td class="td td-row text-xs-center">{{ props.item.title}}</td>
            <td class="td td-row text-xs-center">{{ props.item.description}}</td>
            <td class="td td-row text-xs-center">
              <span>
                <v-tooltip top>
                  <img
                    slot="activator"
                    style="cursor:pointer; width:25px; height:25px; "
                    class="mr-3"
                    @click="profile(props.item)"
aa310d61a   Shikha Mishra   added functionali...
154
                    src="/static/icon/view.png"
68d742034   Neeraj Sharma   implement new des...
155
156
157
158
159
160
161
162
163
                  />
                  <span>View</span>
                </v-tooltip>
                <v-tooltip top>
                  <img
                    slot="activator"
                    style="cursor:pointer; width:20px; height:18px; "
                    class="mr-3"
                    @click="editItem(props.item)"
aa310d61a   Shikha Mishra   added functionali...
164
                    src="/static/icon/edit.png"
68d742034   Neeraj Sharma   implement new des...
165
166
167
168
169
170
171
172
173
                  />
                  <span>Edit</span>
                </v-tooltip>
                <v-tooltip top>
                  <img
                    slot="activator"
                    style="cursor:pointer; width:20px; height:20px; "
                    class="mr-3"
                    @click="deleteItem(props.item)"
aa310d61a   Shikha Mishra   added functionali...
174
                    src="/static/icon/delete.png"
68d742034   Neeraj Sharma   implement new des...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
                  />
                  <span>Delete</span>
                </v-tooltip>
              </span>
            </td>
          </tr>
        </template>
        <v-alert
          slot="no-results"
          :value="true"
          color="error"
          icon="warning"
        >Your search for "{{ search }}" found no results.</v-alert>
      </v-data-table>
  
      <!-- ****** ADD MULTIPLE NOTIFICATION ****** -->
db965de89   Amber Dev   added dialog pers...
191
      <v-dialog v-model="addNotificationDialog" max-width="480px" v-if="addNotificationDialog" persistent>
68d742034   Neeraj Sharma   implement new des...
192
193
194
195
        <v-card flat class="card-style pa-2" dark>
          <v-layout>
            <v-flex xs12>
              <label class="title text-xs-center">Add Notification</label>
8e8d14254   Shikha Mishra   Cleared data whil...
196
              <v-icon size="24" class="right" @click="closeAddNotificationModel">cancel</v-icon>
68d742034   Neeraj Sharma   implement new des...
197
198
199
200
201
202
            </v-flex>
          </v-layout>
          <v-form ref="form" v-model="valid" lazy-validation>
            <v-container fluid fill-height>
              <v-layout align-center wrap>
                <v-flex xs12>
f4df757fe   Neeraj Sharma   responsive vie in...
203
204
205
                  <v-layout>
                    <v-flex xs4 class="pt-4 subheading">
                      <label class="right">Title:</label>
a17c68a03   Neeraj Sharma   implement two rou...
206
                    </v-flex>
68d742034   Neeraj Sharma   implement new des...
207
                    <v-flex xs8 sm8 class="ml-3">
f4df757fe   Neeraj Sharma   responsive vie in...
208
                      <v-text-field
68d742034   Neeraj Sharma   implement new des...
209
                        v-model="addNotification.title"
f4df757fe   Neeraj Sharma   responsive vie in...
210
                        placeholder="fill your Title"
f4df757fe   Neeraj Sharma   responsive vie in...
211
                        type="text"
68d742034   Neeraj Sharma   implement new des...
212
213
                        :rules="titleRules"
                        required
f4df757fe   Neeraj Sharma   responsive vie in...
214
                      ></v-text-field>
a17c68a03   Neeraj Sharma   implement two rou...
215
                    </v-flex>
f4df757fe   Neeraj Sharma   responsive vie in...
216
217
                  </v-layout>
                </v-flex>
68d742034   Neeraj Sharma   implement new des...
218
                <v-flex xs12>
f4df757fe   Neeraj Sharma   responsive vie in...
219
220
221
222
                  <v-layout>
                    <v-flex xs4 class="pt-4 subheading">
                      <label class="right">Description:</label>
                    </v-flex>
68d742034   Neeraj Sharma   implement new des...
223
                    <v-flex xs8 sm8 class="ml-3">
f4df757fe   Neeraj Sharma   responsive vie in...
224
225
                      <v-text-field
                        placeholder="fill your Description"
68d742034   Neeraj Sharma   implement new des...
226
227
                        :rules="descriptionRules"
                        v-model="addNotification.description"
f4df757fe   Neeraj Sharma   responsive vie in...
228
                        type="text"
68d742034   Neeraj Sharma   implement new des...
229
                        required
f4df757fe   Neeraj Sharma   responsive vie in...
230
231
232
233
234
                      ></v-text-field>
                    </v-flex>
                  </v-layout>
                </v-flex>
                <v-layout>
68d742034   Neeraj Sharma   implement new des...
235
236
237
238
239
240
241
242
243
                  <v-flex xs12 sm12>
                    <v-layout class="hidden-xs-only hidden-sm-only right">
                      <v-btn @click="clear" round class="clear-button" dark>Clear</v-btn>
                      <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn>
                    </v-layout>
                    <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only">
                      <v-spacer></v-spacer>
                      <v-btn @click="clear" round class="clear-button" dark>Clear</v-btn>
                      <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn>
f4df757fe   Neeraj Sharma   responsive vie in...
244
                      <v-spacer></v-spacer>
f4df757fe   Neeraj Sharma   responsive vie in...
245
246
247
                    </v-card-actions>
                  </v-flex>
                </v-layout>
68d742034   Neeraj Sharma   implement new des...
248
249
250
251
252
253
254
255
256
257
258
259
260
              </v-layout>
            </v-container>
          </v-form>
        </v-card>
      </v-dialog>
      <v-snackbar
        :timeout="timeout"
        :top="y === 'top'"
        :right="x === 'right'"
        :vertical="mode === 'vertical'"
        v-model="snackbar"
        :color="color"
      >{{ text }}</v-snackbar>
55f72b7d7   Neeraj Sharma   add new page are ...
261
262
263
      <div class="loader" v-if="showLoader">
        <v-progress-circular indeterminate color="white"></v-progress-circular>
      </div>
68d742034   Neeraj Sharma   implement new des...
264
    </v-container>
55f72b7d7   Neeraj Sharma   add new page are ...
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
  </template>
  
  <script>
  import http from "@/Services/http.js";
  import Util from "@/util";
  
  export default {
    data: () => ({
      snackbar: false,
      y: "top",
      x: "right",
      mode: "",
      timeout: 3000,
      text: "",
      loading: false,
68d742034   Neeraj Sharma   implement new des...
280
      editLoading: false,
55f72b7d7   Neeraj Sharma   add new page are ...
281
282
      date: null,
      search: "",
68d742034   Neeraj Sharma   implement new des...
283
284
285
      color: "",
      show: true,
      showSearch: false,
a17c68a03   Neeraj Sharma   implement two rou...
286
      showLoader: false,
68d742034   Neeraj Sharma   implement new des...
287
288
      profileNotificationDialog: false,
      editNotificationDialog: false,
55f72b7d7   Neeraj Sharma   add new page are ...
289
      valid: true,
68d742034   Neeraj Sharma   implement new des...
290
      addNotificationDialog: false,
55f72b7d7   Neeraj Sharma   add new page are ...
291
      pagination: {
8e8d14254   Shikha Mishra   Cleared data whil...
292
        rowsPerPage: 10,
55f72b7d7   Neeraj Sharma   add new page are ...
293
294
295
296
297
      },
      imageData: {},
      imageName: "",
      imageUrl: "",
      imageFile: "",
8e8d14254   Shikha Mishra   Cleared data whil...
298
299
      titleRules: [(v) => !!v || " Tilte is required"],
      descriptionRules: [(v) => !!v || " Description is required"],
55f72b7d7   Neeraj Sharma   add new page are ...
300
301
302
      headers: [
        {
          text: "No",
68d742034   Neeraj Sharma   implement new des...
303
          align: "",
55f72b7d7   Neeraj Sharma   add new page are ...
304
          sortable: false,
8e8d14254   Shikha Mishra   Cleared data whil...
305
          value: "No",
55f72b7d7   Neeraj Sharma   add new page are ...
306
307
        },
        { text: "Title", value: "title", sortable: false, align: "center" },
a17c68a03   Neeraj Sharma   implement two rou...
308
309
310
311
        {
          text: "Description",
          value: "description",
          sortable: false,
8e8d14254   Shikha Mishra   Cleared data whil...
312
          align: "center",
a17c68a03   Neeraj Sharma   implement two rou...
313
        },
8e8d14254   Shikha Mishra   Cleared data whil...
314
        { text: "Action", value: "", sortable: false, align: "center" },
55f72b7d7   Neeraj Sharma   add new page are ...
315
      ],
68d742034   Neeraj Sharma   implement new des...
316
      notifications: [],
55f72b7d7   Neeraj Sharma   add new page are ...
317
      editedIndex: -1,
a17c68a03   Neeraj Sharma   implement two rou...
318
319
      addNotification: {
        title: "",
8e8d14254   Shikha Mishra   Cleared data whil...
320
        description: "",
55f72b7d7   Neeraj Sharma   add new page are ...
321
322
      },
      editedItem: {
a17c68a03   Neeraj Sharma   implement two rou...
323
        title: "",
8e8d14254   Shikha Mishra   Cleared data whil...
324
325
        description: "",
      },
55f72b7d7   Neeraj Sharma   add new page are ...
326
    }),
8e8d14254   Shikha Mishra   Cleared data whil...
327
328
329
330
331
332
333
    watch: {
      addNotificationDialog: function (val) {
        if (!val) {
          this.addNotification = [];
        }
      },
    },
55f72b7d7   Neeraj Sharma   add new page are ...
334
335
336
337
338
339
    methods: {
      pickFile() {
        this.$refs.image.click();
      },
  
      onFilePicked(e) {
55f72b7d7   Neeraj Sharma   add new page are ...
340
341
342
343
344
345
346
347
348
349
350
351
352
        const files = e.target.files;
        this.imageData.upload = e.target.files[0];
        if (files[0] !== undefined) {
          this.imageName = files[0].name;
          if (this.imageName.lastIndexOf(".") <= 0) {
            return;
          }
          const fr = new FileReader();
          fr.readAsDataURL(files[0]);
          fr.addEventListener("load", () => {
            this.imageUrl = fr.result;
            this.imageFile = files[0]; // this is an image file that can be sent to server...
            this.imageData.imageUrl = URL.createObjectURL(this.imageFile);
55f72b7d7   Neeraj Sharma   add new page are ...
353
354
355
356
357
358
359
          });
        } else {
          this.imageName = "";
          this.imageFile = "";
          this.imageUrl = "";
        }
      },
a17c68a03   Neeraj Sharma   implement two rou...
360
      getNotifications() {
55f72b7d7   Neeraj Sharma   add new page are ...
361
362
363
364
        this.showLoader = true;
        var token = this.$store.state.token;
        http()
          .get("/getNotificationsList", {
8e8d14254   Shikha Mishra   Cleared data whil...
365
            headers: { Authorization: "Bearer " + token },
55f72b7d7   Neeraj Sharma   add new page are ...
366
          })
8e8d14254   Shikha Mishra   Cleared data whil...
367
          .then((response) => {
68d742034   Neeraj Sharma   implement new des...
368
            this.notifications = response.data.data;
55f72b7d7   Neeraj Sharma   add new page are ...
369
            this.showLoader = false;
55f72b7d7   Neeraj Sharma   add new page are ...
370
          })
8e8d14254   Shikha Mishra   Cleared data whil...
371
          .catch((error) => {
55f72b7d7   Neeraj Sharma   add new page are ...
372
            this.showLoader = false;
a17c68a03   Neeraj Sharma   implement two rou...
373
374
375
376
377
            if (error.response.status === 401) {
              this.$router.replace({ path: "/" });
              this.$store.dispatch("setToken", null);
              this.$store.dispatch("Id", null);
            }
55f72b7d7   Neeraj Sharma   add new page are ...
378
379
380
          });
      },
      editItem(item) {
68d742034   Neeraj Sharma   implement new des...
381
        this.editedIndex = this.notifications.indexOf(item);
55f72b7d7   Neeraj Sharma   add new page are ...
382
        this.editedItem = Object.assign({}, item);
68d742034   Neeraj Sharma   implement new des...
383
        this.editNotificationDialog = true;
55f72b7d7   Neeraj Sharma   add new page are ...
384
385
      },
      profile(item) {
68d742034   Neeraj Sharma   implement new des...
386
        this.editedIndex = this.notifications.indexOf(item);
55f72b7d7   Neeraj Sharma   add new page are ...
387
        this.editedItem = Object.assign({}, item);
68d742034   Neeraj Sharma   implement new des...
388
        this.profileNotificationDialog = true;
55f72b7d7   Neeraj Sharma   add new page are ...
389
390
391
392
      },
  
      deleteItem(item) {
        let deleteNotification = {
8e8d14254   Shikha Mishra   Cleared data whil...
393
          notificationId: item._id,
55f72b7d7   Neeraj Sharma   add new page are ...
394
395
396
397
398
        };
        http()
          .delete(
            "/deleteNotification",
            confirm("Are you sure you want to delete this?") && {
8e8d14254   Shikha Mishra   Cleared data whil...
399
              params: deleteNotification,
55f72b7d7   Neeraj Sharma   add new page are ...
400
401
            }
          )
8e8d14254   Shikha Mishra   Cleared data whil...
402
          .then((response) => {
68d742034   Neeraj Sharma   implement new des...
403
404
405
            this.snackbar = true;
            this.text = response.data.message;
            this.color = "green";
a17c68a03   Neeraj Sharma   implement two rou...
406
            this.getNotifications();
55f72b7d7   Neeraj Sharma   add new page are ...
407
          })
8e8d14254   Shikha Mishra   Cleared data whil...
408
          .catch((error) => {
68d742034   Neeraj Sharma   implement new des...
409
410
411
            this.snackbar = true;
            this.text = error.response.data.message;
            this.color = "error";
55f72b7d7   Neeraj Sharma   add new page are ...
412
413
          });
      },
55f72b7d7   Neeraj Sharma   add new page are ...
414
      close() {
68d742034   Neeraj Sharma   implement new des...
415
        this.editNotificationDialog = false;
55f72b7d7   Neeraj Sharma   add new page are ...
416
      },
68d742034   Neeraj Sharma   implement new des...
417
418
      closeNotificationDialog() {
        this.profileNotificationDialog = false;
55f72b7d7   Neeraj Sharma   add new page are ...
419
      },
8e8d14254   Shikha Mishra   Cleared data whil...
420
421
422
423
      closeAddNotificationModel() {
        this.addNotificationDialog = false;
        this.addNotification = [];
      },
55f72b7d7   Neeraj Sharma   add new page are ...
424
425
426
427
      submit() {
        if (this.$refs.form.validate()) {
          let imageData = new FormData();
          imageData.append("upload", this.imageFile);
55f72b7d7   Neeraj Sharma   add new page are ...
428
429
          let create = {
            title: this.addNotification.title,
8e8d14254   Shikha Mishra   Cleared data whil...
430
            description: this.addNotification.description,
55f72b7d7   Neeraj Sharma   add new page are ...
431
          };
5f1d4b444   Neeraj Sharma   fix design and fi...
432
          this.loading = true;
55f72b7d7   Neeraj Sharma   add new page are ...
433
434
          http()
            .post("/createNotification", create)
8e8d14254   Shikha Mishra   Cleared data whil...
435
            .then((response) => {
68d742034   Neeraj Sharma   implement new des...
436
437
438
              this.snackbar = true;
              this.text = response.data.message;
              this.color = "green";
55f72b7d7   Neeraj Sharma   add new page are ...
439
              this.getNotifications();
5d5315b0f   Shikha Mishra   close add-notific...
440
              this.addNotificationDialog = false;
55f72b7d7   Neeraj Sharma   add new page are ...
441
              this.clear();
5f1d4b444   Neeraj Sharma   fix design and fi...
442
              this.loading = false;
55f72b7d7   Neeraj Sharma   add new page are ...
443
            })
8e8d14254   Shikha Mishra   Cleared data whil...
444
            .catch((error) => {
68d742034   Neeraj Sharma   implement new des...
445
446
447
              this.snackbar = true;
              this.text = error.response.data.message;
              this.color = "error";
5f1d4b444   Neeraj Sharma   fix design and fi...
448
              this.loading = false;
55f72b7d7   Neeraj Sharma   add new page are ...
449
450
451
            });
        }
      },
55f72b7d7   Neeraj Sharma   add new page are ...
452
453
454
455
      clear() {
        this.$refs.form.reset();
      },
      save() {
a17c68a03   Neeraj Sharma   implement two rou...
456
457
        let imageData = new FormData();
        imageData.append("upload", this.imageFile);
55f72b7d7   Neeraj Sharma   add new page are ...
458
        let editNotification = {
a17c68a03   Neeraj Sharma   implement two rou...
459
460
          notificationId: this.editedItem._id,
          title: this.editedItem.title,
8e8d14254   Shikha Mishra   Cleared data whil...
461
          description: this.editedItem.description,
55f72b7d7   Neeraj Sharma   add new page are ...
462
        };
68d742034   Neeraj Sharma   implement new des...
463
        this.editLoading = true;
55f72b7d7   Neeraj Sharma   add new page are ...
464
465
        http()
          .put("/updateNotification", editNotification)
8e8d14254   Shikha Mishra   Cleared data whil...
466
          .then((response) => {
68d742034   Neeraj Sharma   implement new des...
467
468
469
            this.snackbar = true;
            this.text = response.data.message;
            this.color = "green";
55f72b7d7   Neeraj Sharma   add new page are ...
470
            this.getNotifications();
68d742034   Neeraj Sharma   implement new des...
471
472
            this.close();
            this.editLoading = false;
55f72b7d7   Neeraj Sharma   add new page are ...
473
          })
8e8d14254   Shikha Mishra   Cleared data whil...
474
          .catch((error) => {
68d742034   Neeraj Sharma   implement new des...
475
476
477
478
            this.editLoading = false;
            this.snackbar = true;
            this.color = "error";
            this.text = error.response.data.message;
55f72b7d7   Neeraj Sharma   add new page are ...
479
          });
68d742034   Neeraj Sharma   implement new des...
480
481
482
483
484
485
486
487
      },
      displaySearch() {
        (this.show = false), (this.showSearch = true);
      },
      closeSearch() {
        this.showSearch = false;
        this.show = true;
        this.search = "";
8e8d14254   Shikha Mishra   Cleared data whil...
488
      },
55f72b7d7   Neeraj Sharma   add new page are ...
489
490
491
    },
    mounted() {
      this.getNotifications();
8e8d14254   Shikha Mishra   Cleared data whil...
492
    },
55f72b7d7   Neeraj Sharma   add new page are ...
493
  };
68d742034   Neeraj Sharma   implement new des...
494
  </script>