Blame view

src/pages/NoticeBoard/noticeBoard.vue 18.9 KB
beb598536   Neeraj Sharma   design and functi...
1
2
  <template>
    <v-app id="pages-dasboard">
687e0b929   Neeraj Sharma   add user,attenden...
3
      <v-tabs grow slider-color="gray">
beb598536   Neeraj Sharma   design and functi...
4
5
6
7
8
9
        <v-tab
          ripple
          @click="activeTab('existing')"
          v-bind:class="{ active: isActive }"
          id="tab"
          class="subheading"
46db0a3b5   Neeraj Sharma   add sunbject and ...
10
        >Existing Notice Board</v-tab>
beb598536   Neeraj Sharma   design and functi...
11
12
13
14
15
16
17
        <v-tab
          ripple
          @click="activeTab('new')"
          v-bind:class="{ active: newActive }"
          id="tab1"
          User
          class="subheading"
46db0a3b5   Neeraj Sharma   add sunbject and ...
18
        >Add New Notice Board</v-tab>
beb598536   Neeraj Sharma   design and functi...
19

46db0a3b5   Neeraj Sharma   add sunbject and ...
20
        <!-- ****** EDITS  Notice Board ****** -->
beb598536   Neeraj Sharma   design and functi...
21
22
23
24
25
26
27
28
29
30
  
        <v-tab-item>
          <v-snackbar
            :timeout="timeout"
            :top="y === 'top'"
            :right="x === 'right'"
            :vertical="mode === 'vertical'"
            v-model="snackbar"
            color="success"
          >{{ text }}</v-snackbar>
756b14fe2   Neeraj Sharma   uploadi image by ...
31
32
33
          <v-dialog v-model="dialog" max-width="640px" scrollable>
            <v-card style="height: 540px;">
              <v-toolbar color="grey lighten-2" flat>
beb598536   Neeraj Sharma   design and functi...
34
                <v-spacer></v-spacer>
46db0a3b5   Neeraj Sharma   add sunbject and ...
35
                <v-toolbar-title>
756b14fe2   Neeraj Sharma   uploadi image by ...
36
                  <h3>Edit Notice Board</h3>
46db0a3b5   Neeraj Sharma   add sunbject and ...
37
                </v-toolbar-title>
beb598536   Neeraj Sharma   design and functi...
38
39
                <v-spacer></v-spacer>
              </v-toolbar>
756b14fe2   Neeraj Sharma   uploadi image by ...
40
              <v-card-text>
beb598536   Neeraj Sharma   design and functi...
41
42
43
44
45
                <v-form ref="form">
                  <v-container fluid>
                    <v-layout>
                      <v-flex
                        xs12
756b14fe2   Neeraj Sharma   uploadi image by ...
46
                        class="text-xs-center text-sm-center text-md-center text-lg-center"
beb598536   Neeraj Sharma   design and functi...
47
                      >
756b14fe2   Neeraj Sharma   uploadi image by ...
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
                        <img
                          src="/static/icon/user.png"
                          v-if="!editedItem.eventImageUrl && !imageUrl"
                          width="150px"
                        />
                        <img
                          :src="editedItem.eventImageUrl"
                          height="150"
                          v-else-if="editedItem.eventImageUrl && !imageUrl"
                          width="180px"
                        />
                        <img
                          v-if="imageUrl"
                          :src="imageUrl"
                          height="150"
                          style="border-radius:50%; width:200px"
                        />
2d0fc1144   Neeraj Sharma   upload dynamic im...
65
                        <input
beb598536   Neeraj Sharma   design and functi...
66
67
68
69
70
                          type="file"
                          style="display: none"
                          ref="image"
                          accept="image/*"
                          @change="onFilePicked"
2d0fc1144   Neeraj Sharma   upload dynamic im...
71
                        />
beb598536   Neeraj Sharma   design and functi...
72
73
74
                      </v-flex>
                    </v-layout>
                    <v-layout>
756b14fe2   Neeraj Sharma   uploadi image by ...
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
                      <v-flex xs12>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
                            <label class="right">Title:</label>
                          </v-flex>
                          <v-flex xs6 class="ml-3">
                            <v-text-field
                              v-model="editedItem.title"
                              placeholder="fill your Title"
                              name="name"
                              type="text"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
                      </v-flex>
                      <v-flex xs12>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
                            <label class="right">Description:</label>
                          </v-flex>
                          <v-flex xs6 class="ml-3">
                            <v-text-field
                              placeholder="fill your Description"
                              v-model="editedItem.description"
                              type="text"
                              name="email"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
                      </v-flex>
                      <v-flex xs12>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
aa8fc5033   Neeraj Sharma   implenment all pa...
110
111
                             <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
                            <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label>
756b14fe2   Neeraj Sharma   uploadi image by ...
112
113
114
115
116
117
118
119
120
121
122
                          </v-flex>
                          <v-flex xs6 class="ml-3">
                            <v-text-field
                              label="Select Image"
                              @click="pickFile"
                              v-model="imageName"
                              append-icon="attach_file"
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
                      </v-flex>
beb598536   Neeraj Sharma   design and functi...
123
124
125
126
127
128
129
130
131
132
                      <v-flex xs12 sm9 offset-sm2>
                        <v-card-actions>
                          <v-btn round dark @click.native="close">Cancel</v-btn>
                          <v-spacer></v-spacer>
                          <v-btn round dark @click="save">Save</v-btn>
                        </v-card-actions>
                      </v-flex>
                    </v-layout>
                  </v-container>
                </v-form>
756b14fe2   Neeraj Sharma   uploadi image by ...
133
134
              </v-card-text>
            </v-card>
beb598536   Neeraj Sharma   design and functi...
135
          </v-dialog>
46db0a3b5   Neeraj Sharma   add sunbject and ...
136
          <!-- ****** VIEW PROFIL NOTICE BOARD ******  -->
beb598536   Neeraj Sharma   design and functi...
137

2d0fc1144   Neeraj Sharma   upload dynamic im...
138
          <v-dialog v-model="dialog1" max-width="640px" scrollable>
ceb43037a   Neeraj Sharma   fix bugs
139
            <v-card style="height: 380px;">
2d0fc1144   Neeraj Sharma   upload dynamic im...
140
141
142
143
144
145
146
147
              <v-toolbar color="grey lighten-2" flat>
                <v-spacer></v-spacer>
                <v-toolbar-title>
                  <h3>Notice Board</h3>
                </v-toolbar-title>
                <v-spacer></v-spacer>
                <v-icon @click="close1">close</v-icon>
              </v-toolbar>
beb598536   Neeraj Sharma   design and functi...
148
              <v-card-text>
2d0fc1144   Neeraj Sharma   upload dynamic im...
149
                <v-flex align-center justify-center layout text-xs-center class="mt-3">
756b14fe2   Neeraj Sharma   uploadi image by ...
150
151
152
153
154
155
                  <img src="/static/icon/user.png" v-if="!editedItem.eventImageUrl" width="130px" />
                  <img
                    :src="editedItem.eventImageUrl"
                    v-else-if="editedItem.eventImageUrl"
                    width="200px"
                  />
2d0fc1144   Neeraj Sharma   upload dynamic im...
156
                </v-flex>
beb598536   Neeraj Sharma   design and functi...
157
158
159
                <v-container grid-list-md>
                  <v-layout wrap>
                    <v-flex>
beb598536   Neeraj Sharma   design and functi...
160
161
                      <v-layout>
                        <v-flex xs5 sm6>
ceb43037a   Neeraj Sharma   fix bugs
162
                          <h5 class="right my-1"><b>Title:</b></h5>
beb598536   Neeraj Sharma   design and functi...
163
164
165
166
167
168
169
                        </v-flex>
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.title }}</h5>
                        </v-flex>
                      </v-layout>
                      <v-layout>
                        <v-flex xs5 sm6>
ceb43037a   Neeraj Sharma   fix bugs
170
                          <h5 class="right my-1"><b>Description:</b></h5>
beb598536   Neeraj Sharma   design and functi...
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
                        </v-flex>
                        <v-flex sm6 xs8>
                          <h5 class="my-1">{{ editedItem.description }}</h5>
                        </v-flex>
                      </v-layout>
                    </v-flex>
                  </v-layout>
                </v-container>
              </v-card-text>
            </v-card>
          </v-dialog>
  
          <v-snackbar
            :timeout="timeout"
            :top="y === 'top'"
            :right="x === 'right'"
            :vertical="mode === 'vertical'"
            v-model="snackbar"
            color="success"
          >{{ text }}</v-snackbar>
46db0a3b5   Neeraj Sharma   add sunbject and ...
191
          <!-- ****** EXISTING-USERS Notice Board TABLE ****** -->
2b0e316ee   Neeraj Sharma   upload mytiple im...
192

beb598536   Neeraj Sharma   design and functi...
193
194
195
196
197
198
199
          <v-data-table
            :headers="headers"
            :items="desserts"
            :pagination.sync="pagination"
            :search="search"
          >
            <template slot="items" slot-scope="props">
687e0b929   Neeraj Sharma   add user,attenden...
200
              <td id="td" class="text-xs-center">{{ props.index  + 1}}</td>
beb598536   Neeraj Sharma   design and functi...
201
202
203
204
205
206
207
208
209
210
              <td id="td" class="text-xs-center">{{ props.item.title}}</td>
              <td id="td" class="text-xs-center">{{ props.item.description}}</td>
  
              <td class="text-xs-center">
                <span>
                  <img
                    style="cursor:pointer; width:25px; height:18px; "
                    class="mr-5"
                    @click="profile(props.item)"
                    src="/static/icon/eye1.png"
46db0a3b5   Neeraj Sharma   add sunbject and ...
211
                  />
beb598536   Neeraj Sharma   design and functi...
212
213
214
215
216
                  <img
                    style="cursor:pointer; width:20px; height:18px; "
                    class="mr-5"
                    @click="editItem(props.item)"
                    src="/static/icon/edit1.png"
46db0a3b5   Neeraj Sharma   add sunbject and ...
217
                  />
beb598536   Neeraj Sharma   design and functi...
218
                  <img
b39d2afd2   Neeraj Sharma   responsive dashboard
219
                    style="cursor:pointer;width:20px; height:20px; "
beb598536   Neeraj Sharma   design and functi...
220
221
222
                    class="mr-5"
                    @click="deleteItem(props.item)"
                    src="/static/icon/delete1.png"
46db0a3b5   Neeraj Sharma   add sunbject and ...
223
                  />
beb598536   Neeraj Sharma   design and functi...
224
225
226
227
228
229
230
231
232
233
234
                </span>
              </td>
            </template>
            <v-alert
              slot="no-results"
              :value="true"
              color="error"
              icon="warning"
            >Your search for "{{ search }}" found no results.</v-alert>
          </v-data-table>
        </v-tab-item>
46db0a3b5   Neeraj Sharma   add sunbject and ...
235
        <!-- ****** ADD MULTIPLE Notice Board ****** -->
beb598536   Neeraj Sharma   design and functi...
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
  
        <v-tab-item>
          <v-container>
            <v-snackbar
              :timeout="timeout"
              :top="y === 'top'"
              :right="x === 'right'"
              :vertical="mode === 'vertical'"
              v-model="snackbar"
              color="success"
            >{{ text }}</v-snackbar>
            <v-flex xs12 sm8 offset-sm2 class="top">
              <v-card flat>
                <v-container fluid fill-height>
                  <v-layout align-center>
                    <v-flex xs12>
                      <v-form ref="form" v-model="valid" lazy-validation>
                        <v-layout>
                          <v-flex
                            xs12
                            class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4"
                          >
                            <v-avatar size="100px">
46db0a3b5   Neeraj Sharma   add sunbject and ...
259
                              <img src="/static/icon/user.png" v-if="!imageUrl" />
beb598536   Neeraj Sharma   design and functi...
260
                            </v-avatar>
2d0fc1144   Neeraj Sharma   upload dynamic im...
261
                            <input
beb598536   Neeraj Sharma   design and functi...
262
263
264
265
266
                              type="file"
                              style="display: none"
                              ref="image"
                              accept="image/*"
                              @change="onFilePicked"
46db0a3b5   Neeraj Sharma   add sunbject and ...
267
                            />
beb598536   Neeraj Sharma   design and functi...
268
                            <img
2b0e316ee   Neeraj Sharma   upload mytiple im...
269
                              :src="imageUrl"
beb598536   Neeraj Sharma   design and functi...
270
271
272
                              height="150"
                              v-if="imageUrl"
                              style="border-radius:50%; width:200px"
2d0fc1144   Neeraj Sharma   upload dynamic im...
273
                            />
beb598536   Neeraj Sharma   design and functi...
274
275
276
277
278
279
280
281
                          </v-flex>
                        </v-layout>
                        <v-layout>
                          <v-flex xs4 class="pt-4 subheading">
                            <label class="right">Title:</label>
                          </v-flex>
                          <v-flex xs6 class="ml-3">
                            <v-text-field
46db0a3b5   Neeraj Sharma   add sunbject and ...
282
                              v-model="addNoticeBoard.title"
beb598536   Neeraj Sharma   design and functi...
283
284
285
286
287
288
289
290
                              placeholder="fill your Title"
                              name="name"
                              type="text"
                              :rules="titleRules"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
46db0a3b5   Neeraj Sharma   add sunbject and ...
291
                        <v-layout>
beb598536   Neeraj Sharma   design and functi...
292
293
294
295
296
                          <v-flex xs4 class="pt-4 subheading">
                            <label class="right">Description:</label>
                          </v-flex>
                          <v-flex xs6 class="ml-3">
                            <v-text-field
46db0a3b5   Neeraj Sharma   add sunbject and ...
297
                              v-model="addNoticeBoard.description"
beb598536   Neeraj Sharma   design and functi...
298
299
300
301
302
303
304
305
                              placeholder="fill your Description"
                              name="name"
                              type="text"
                              :rules="descriptionRules"
                              required
                            ></v-text-field>
                          </v-flex>
                        </v-layout>
2d0fc1144   Neeraj Sharma   upload dynamic im...
306
                        <v-layout>
2b0e316ee   Neeraj Sharma   upload mytiple im...
307
                          <v-flex xs4 class="pt-4 subheading">
aa8fc5033   Neeraj Sharma   implenment all pa...
308
309
                            <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
                            <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label>
2b0e316ee   Neeraj Sharma   upload mytiple im...
310
311
312
313
314
315
316
317
318
                          </v-flex>
                          <v-flex xs6 class="ml-3">
                            <v-text-field
                              label="Select Image"
                              @click="pickFile"
                              v-model="imageName"
                              append-icon="attach_file"
                            ></v-text-field>
                          </v-flex>
2d0fc1144   Neeraj Sharma   upload dynamic im...
319
                        </v-layout>
2b0e316ee   Neeraj Sharma   upload mytiple im...
320
                        <v-layout>
beb598536   Neeraj Sharma   design and functi...
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
                          <v-flex xs12 sm9 offset-sm2>
                            <v-card-actions>
                              <v-btn @click="clear" round dark>clear</v-btn>
                              <v-spacer></v-spacer>
                              <v-btn @click="submit" round dark :loading="loading">Add</v-btn>
                            </v-card-actions>
                          </v-flex>
                        </v-layout>
                      </v-form>
                    </v-flex>
                  </v-layout>
                </v-container>
              </v-card>
            </v-flex>
          </v-container>
        </v-tab-item>
      </v-tabs>
36fc987df   Neeraj Sharma   add loader in all...
338
339
340
      <div class="loader" v-if="showLoader">
        <v-progress-circular indeterminate color="white"></v-progress-circular>
      </div>
beb598536   Neeraj Sharma   design and functi...
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
    </v-app>
  </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: "",
fc82ac667   Neeraj Sharma   fix design and re...
356
      showLoader: false,
beb598536   Neeraj Sharma   design and functi...
357
358
359
      loading: false,
      date: null,
      search: "",
beb598536   Neeraj Sharma   design and functi...
360
361
362
363
364
365
366
367
368
369
      dialog: false,
      dialog1: false,
      valid: true,
      isActive: true,
      newActive: false,
      addclass: [],
      addSection: [],
      gender: ["Male", "Female"],
      AddUsercredentials: {},
      pagination: {
2b0e316ee   Neeraj Sharma   upload mytiple im...
370
        rowsPerPage: 19
beb598536   Neeraj Sharma   design and functi...
371
      },
beb598536   Neeraj Sharma   design and functi...
372
373
374
      imageName: "",
      imageUrl: "",
      imageFile: "",
46db0a3b5   Neeraj Sharma   add sunbject and ...
375
      upload: "",
beb598536   Neeraj Sharma   design and functi...
376
377
378
379
380
381
382
383
384
385
      titleRules: [v => !!v || " Title is required"],
      descriptionRules: [v => !!v || " Description is required"],
      headers: [
        {
          text: "No",
          align: "center",
          sortable: false,
          value: "No"
        },
        { text: "Title", value: "title", sortable: false, align: "center" },
fc82ac667   Neeraj Sharma   fix design and re...
386
387
388
389
390
391
        {
          text: "Description",
          value: "description",
          sortable: false,
          align: "center"
        },
beb598536   Neeraj Sharma   design and functi...
392
393
394
395
        { text: "Action", value: "", sortable: false, align: "center" }
      ],
      desserts: [],
      editedIndex: -1,
46db0a3b5   Neeraj Sharma   add sunbject and ...
396
      addNoticeBoard: {},
beb598536   Neeraj Sharma   design and functi...
397
398
399
400
401
402
403
      editedItem: {
        title: "",
        description: ""
      },
      defaultItem: {
        title: "",
        description: ""
a17c68a03   Neeraj Sharma   implement two rou...
404
      }
beb598536   Neeraj Sharma   design and functi...
405
    }),
beb598536   Neeraj Sharma   design and functi...
406
407
408
409
    methods: {
      pickFile() {
        this.$refs.image.click();
      },
2d0fc1144   Neeraj Sharma   upload dynamic im...
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
      onFilePicked(e) {
        // console.log(e)
        const files = e.target.files;
        this.upload = e.target.files[0];
        console.log("thisupload==>", this.upload);
        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...
2d0fc1144   Neeraj Sharma   upload dynamic im...
425
426
427
428
429
430
431
          });
        } else {
          this.imageName = "";
          this.imageFile = "";
          this.imageUrl = "";
        }
      },
46db0a3b5   Neeraj Sharma   add sunbject and ...
432
      getNoticeDataList() {
36fc987df   Neeraj Sharma   add loader in all...
433
        this.showLoader = true;
beb598536   Neeraj Sharma   design and functi...
434
435
436
437
438
439
440
        var token = this.$store.state.token;
        http()
          .get("/getEventsList", {
            headers: { Authorization: "Bearer " + token }
          })
          .then(response => {
            this.desserts = response.data.data;
36fc987df   Neeraj Sharma   add loader in all...
441
            this.showLoader = false;
beb598536   Neeraj Sharma   design and functi...
442
443
          })
          .catch(err => {
36fc987df   Neeraj Sharma   add loader in all...
444
            this.showLoader = false;
a17c68a03   Neeraj Sharma   implement two rou...
445
446
447
448
449
            if (error.response.status === 401) {
              this.$router.replace({ path: "/" });
              this.$store.dispatch("setToken", null);
              this.$store.dispatch("Id", null);
            }
beb598536   Neeraj Sharma   design and functi...
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
          });
      },
      editItem(item) {
        this.editedIndex = this.desserts.indexOf(item);
        this.editedItem = Object.assign({}, item);
        this.dialog = true;
      },
      profile(item) {
        this.editedIndex = this.desserts.indexOf(item);
        this.editedItem = Object.assign({}, item);
        this.dialog1 = true;
      },
      deleteItem(item) {
        let deleteEvent = {
          eventId: item._id
        };
        http()
          .delete(
            "/deleteEvent",
            confirm("Are you sure you want to delete this?") && {
              params: deleteEvent
            }
          )
          .then(response => {
            // console.log("deleteUers",deleteEvent)
            if ((this.snackbar = true)) {
46db0a3b5   Neeraj Sharma   add sunbject and ...
476
              this.text = "Successfully delete Existing Notice Data";
beb598536   Neeraj Sharma   design and functi...
477
            }
2d0fc1144   Neeraj Sharma   upload dynamic im...
478
            this.getNoticeDataList();
beb598536   Neeraj Sharma   design and functi...
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
          })
          .catch(error => {
            // console.log(error);
          });
      },
      activeTab(type) {
        switch (type) {
          case "existing":
            this.newActive = false;
            this.isActive = true;
            break;
  
          default:
            this.newActive = true;
            this.isActive = false;
            break;
        }
      },
      close() {
        this.dialog = false;
        setTimeout(() => {
          this.editedItem = Object.assign({}, this.defaultItem);
          this.editedIndex = -1;
        }, 300);
      },
      close1() {
        this.dialog1 = false;
      },
      submit() {
        if (this.$refs.form.validate()) {
2d0fc1144   Neeraj Sharma   upload dynamic im...
509
510
511
512
513
          if (this.imageUrl) {
            var str = this.imageUrl;
            const [baseUrl, imageUrl] = str.split(/,/);
            this.addNoticeBoard.upload = imageUrl;
          }
beb598536   Neeraj Sharma   design and functi...
514
          http()
46db0a3b5   Neeraj Sharma   add sunbject and ...
515
            .post("/createEvent", this.addNoticeBoard)
beb598536   Neeraj Sharma   design and functi...
516
            .then(response => {
beb598536   Neeraj Sharma   design and functi...
517
              if ((this.snackbar = true)) {
46db0a3b5   Neeraj Sharma   add sunbject and ...
518
                this.text = "New Notice Data added successfully";
beb598536   Neeraj Sharma   design and functi...
519
              }
2d0fc1144   Neeraj Sharma   upload dynamic im...
520
              this.getNoticeDataList();
beb598536   Neeraj Sharma   design and functi...
521
522
523
524
525
526
527
528
529
530
              this.clear();
            })
            .catch(error => {
              // console.log(error);
              if ((this.snackbar = true)) {
                this.text = error.response.data.message;
              }
            });
        }
      },
beb598536   Neeraj Sharma   design and functi...
531
532
533
534
      clear() {
        this.$refs.form.reset();
      },
      save() {
2d0fc1144   Neeraj Sharma   upload dynamic im...
535
        let editNoticeBoard = {
beb598536   Neeraj Sharma   design and functi...
536
537
          eventId: this.editedItem._id,
          title: this.editedItem.title,
2d0fc1144   Neeraj Sharma   upload dynamic im...
538
          description: this.editedItem.description
beb598536   Neeraj Sharma   design and functi...
539
        };
2d0fc1144   Neeraj Sharma   upload dynamic im...
540
541
542
543
544
        if (this.imageUrl) {
          var str = this.imageUrl;
          const [baseUrl, imageUrl] = str.split(/,/);
          editNoticeBoard.upload = imageUrl;
        }
beb598536   Neeraj Sharma   design and functi...
545
        http()
2d0fc1144   Neeraj Sharma   upload dynamic im...
546
          .put("/updateEvent", editNoticeBoard)
beb598536   Neeraj Sharma   design and functi...
547
          .then(response => {
beb598536   Neeraj Sharma   design and functi...
548
            if ((this.snackbar = true)) {
46db0a3b5   Neeraj Sharma   add sunbject and ...
549
              this.text = "Successfully Edit Existing Notice Data";
beb598536   Neeraj Sharma   design and functi...
550
            }
2d0fc1144   Neeraj Sharma   upload dynamic im...
551
            this.getNoticeDataList();
a17c68a03   Neeraj Sharma   implement two rou...
552
            this.close();
beb598536   Neeraj Sharma   design and functi...
553
554
555
556
          })
          .catch(error => {
            // console.log(error);
          });
beb598536   Neeraj Sharma   design and functi...
557
558
559
      }
    },
    mounted() {
46db0a3b5   Neeraj Sharma   add sunbject and ...
560
      this.getNoticeDataList();
beb598536   Neeraj Sharma   design and functi...
561
    },
a17c68a03   Neeraj Sharma   implement two rou...
562
563
564
565
566
567
568
569
    created() {
      this.$root.$on("app:search", search => {
        this.search = search;
      });
    },
    beforeDestroy() {
      // dont forget to remove the listener
      this.$root.$off("app:search");
beb598536   Neeraj Sharma   design and functi...
570
571
572
573
    }
  };
  </script>
  <style scoped>
beb598536   Neeraj Sharma   design and functi...
574
  .active {
687e0b929   Neeraj Sharma   add user,attenden...
575
    background-color: gray;
beb598536   Neeraj Sharma   design and functi...
576
577
578
579
580
    color: white !important;
  }
  .activebtn {
    color: black !important;
  }
beb598536   Neeraj Sharma   design and functi...
581
  </style>