Commit 1571e40b5746fce8516c96b96e4560b78e9ce1e9
1 parent
7adc8fc47a
Exists in
master
and in
3 other branches
gallery and social medial all task complete
Showing
6 changed files
with
63 additions
and
63 deletions
Show diff stats
src/components/pageHeader/AppToolbar.vue
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | :key="index" |
37 | 37 | > |
38 | 38 | <v-list-tile-action v-if="item.icon"> |
39 | - <v-icon>{{ item.icon }}</v-icon> | |
39 | + <v-icon class="iconSize">{{ item.icon }}</v-icon> | |
40 | 40 | </v-list-tile-action> |
41 | 41 | <v-list-tile-content> |
42 | 42 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
... | ... | @@ -49,19 +49,13 @@ |
49 | 49 | <script> |
50 | 50 | import Util from "@/util"; |
51 | 51 | export default { |
52 | - // props: { | |
53 | - // search: { | |
54 | - // type: String, | |
55 | - // required: true | |
56 | - // } | |
57 | - // }, | |
58 | 52 | name: "app-toolbar", |
59 | 53 | data: () => ({ |
60 | 54 | userName: "", |
61 | 55 | search: "", |
62 | 56 | items: [ |
63 | 57 | { |
64 | - // icon: 'account_circle', | |
58 | + icon: 'account_circle', | |
65 | 59 | href: "/changepassword", |
66 | 60 | title: "Change Password", |
67 | 61 | click: e => { |
... | ... | @@ -77,7 +71,7 @@ export default { |
77 | 71 | // } |
78 | 72 | // }, |
79 | 73 | { |
80 | - // icon: 'fullscreen_exit', | |
74 | + icon: 'lock', | |
81 | 75 | href: "#", |
82 | 76 | title: "Logout", |
83 | 77 | click: e => { | ... | ... |
src/pages/Authentication/Login.vue
... | ... | @@ -106,12 +106,6 @@ export default { |
106 | 106 | email: "", |
107 | 107 | rules: { |
108 | 108 | required: value => !!value || "password is Required." |
109 | - // min: v => | |
110 | - // (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test( | |
111 | - // v | |
112 | - // ) && | |
113 | - // v.length >= 6) || | |
114 | - // "Min 4 characters upper case lower case symbol required" | |
115 | 109 | } |
116 | 110 | }; |
117 | 111 | }, |
... | ... | @@ -135,6 +129,7 @@ export default { |
135 | 129 | if (error) { |
136 | 130 | this.text = "Server appears to be offline"; |
137 | 131 | this.snackbar = true; |
132 | + this.loading = false; | |
138 | 133 | } |
139 | 134 | if (error.response.data.message) { |
140 | 135 | this.text = error.response.data.message; | ... | ... |
src/pages/Class/addclass.vue
... | ... | @@ -121,7 +121,7 @@ |
121 | 121 | :search="search" |
122 | 122 | > |
123 | 123 | <template slot="items" slot-scope="props"> |
124 | - <td>{{ props.index}}</td> | |
124 | + <td>{{ props.index }}</td> | |
125 | 125 | <td class="text-xs-center">{{ props.item.classNum}}</td> |
126 | 126 | <td class="text-xs-center"> |
127 | 127 | <span> |
... | ... | @@ -267,7 +267,6 @@ export default { |
267 | 267 | .then(response => { |
268 | 268 | this.desserts = response.data.data; |
269 | 269 | this.showLoader = false; |
270 | - // console.log("getClassList=====>", response); | |
271 | 270 | }) |
272 | 271 | .catch(err => { |
273 | 272 | console.log("err====>", err); |
... | ... | @@ -371,7 +370,6 @@ export default { |
371 | 370 | http() |
372 | 371 | .put("/updateClass", editClass) |
373 | 372 | .then(response => { |
374 | - console.log("editClass", editClass); | |
375 | 373 | if ((this.snackbar = true)) { |
376 | 374 | this.text = "Successfully Edit Existing Class"; |
377 | 375 | } | ... | ... |
src/pages/Gallery/gallery.vue
... | ... | @@ -129,7 +129,7 @@ |
129 | 129 | <v-select |
130 | 130 | :items="addclass" |
131 | 131 | label="Select Class" |
132 | - v-model="editItem.classNum" | |
132 | + v-model="editedItem.classNum" | |
133 | 133 | item-text="classNum" |
134 | 134 | item-value="_id" |
135 | 135 | name="Select Class" |
... | ... | @@ -213,7 +213,7 @@ |
213 | 213 | |
214 | 214 | <!-- ****** PROFILE VIEW Gallery ****** --> |
215 | 215 | |
216 | - <v-dialog v-model="dialog1" max-width="800px"> | |
216 | + <v-dialog v-model="dialog1" max-width="940px"> | |
217 | 217 | <v-card> |
218 | 218 | <v-toolbar color="grey lighten-2" flat> |
219 | 219 | <v-spacer></v-spacer> |
... | ... | @@ -267,10 +267,10 @@ |
267 | 267 | </h5> |
268 | 268 | </v-flex> |
269 | 269 | <v-flex sm6 xs8> |
270 | - <h5 class="my-1"> | |
271 | - <span | |
272 | - v-for="youTubeLinkUrl in editedItem.youTubeLinkUrl " | |
273 | - >{{ youTubeLinkUrl }}</span> | |
270 | + <h5 class="my-1 ml-3"> | |
271 | + <ul v-for="youTubeLinkUrl in editedItem.youTubeLinkUrl"> | |
272 | + <li>{{ youTubeLinkUrl.youTubeLink }}</li> | |
273 | + </ul> | |
274 | 274 | </h5> |
275 | 275 | </v-flex> |
276 | 276 | </v-layout> |
... | ... | @@ -298,7 +298,7 @@ |
298 | 298 | :search="search" |
299 | 299 | > |
300 | 300 | <template slot="items" slot-scope="props"> |
301 | - <td class="text-xs-center">{{ props.index}}</td> | |
301 | + <td class="text-xs-center">{{ props.index }}</td> | |
302 | 302 | <td id="td" class="text-xs-center"> |
303 | 303 | <span v-for="(image,_id) in props.item.imageUrl" class="pa-2"> |
304 | 304 | <img :src="image.imageLink" alt="newsImage" width="100" height="70" /> |
... | ... | @@ -533,7 +533,6 @@ export default { |
533 | 533 | editImageName: "", |
534 | 534 | editFiles: [], |
535 | 535 | files: [], |
536 | - addclass: [], | |
537 | 536 | token: "", |
538 | 537 | titleRules: [v => !!v || " Tilte is required"], |
539 | 538 | descriptionRules: [v => !!v || " Description is required"], |
... | ... | @@ -542,7 +541,7 @@ export default { |
542 | 541 | align: "justify-center", |
543 | 542 | text: "No", |
544 | 543 | sortable: false, |
545 | - value: "No" | |
544 | + value: "index" | |
546 | 545 | }, |
547 | 546 | { text: "Image", vaue: "image", sortable: false, align: "center" }, |
548 | 547 | { text: "Title", value: "title", sortable: false, align: "center" }, |
... | ... | @@ -556,7 +555,8 @@ export default { |
556 | 555 | ], |
557 | 556 | desserts: [], |
558 | 557 | editedIndex: -1, |
559 | - editedItem: {} | |
558 | + editedItem: {}, | |
559 | + index: "" | |
560 | 560 | }), |
561 | 561 | methods: { |
562 | 562 | pickFile() { |
... | ... | @@ -648,7 +648,7 @@ export default { |
648 | 648 | this.desserts = response.data.data; |
649 | 649 | this.showLoader = false; |
650 | 650 | }) |
651 | - .catch(err => { | |
651 | + .catch(error => { | |
652 | 652 | // console.log("err====>", err); |
653 | 653 | this.showLoader = false; |
654 | 654 | if (error.response.status === 401) { |
... | ... | @@ -662,19 +662,6 @@ export default { |
662 | 662 | this.files = []; |
663 | 663 | this.editedIndex = this.desserts.indexOf(item); |
664 | 664 | this.editedItem = Object.assign({}, item); |
665 | - console.log("this.editedItem", this.editedItem); | |
666 | - // for (let i = 0; i < this.editedItem.youTubeLinkUrl.length; i++) { | |
667 | - // console.log( | |
668 | - // "this.editedItem.youTubeLinkUrl[i]", | |
669 | - // this.editedItem.youTubeLinkUrl[i] | |
670 | - // ); | |
671 | - // this.updates = this.editedItem.youTubeLinkUrl[i]; | |
672 | - // console.log("this.updates.linkUrl", this.updates); | |
673 | - // } | |
674 | - // this.updates[i].push(this.editedItem.youTubeLinkUrl); | |
675 | - // console.log("updates", this.updates[i]); | |
676 | - // console.log("updates", this.updates[i].youTubeLinkUrl); | |
677 | - // } | |
678 | 665 | this.dialog = true; |
679 | 666 | }, |
680 | 667 | profile(item) { |
... | ... | @@ -771,6 +758,7 @@ export default { |
771 | 758 | this.snackbar = true; |
772 | 759 | this.text = response.data.message; |
773 | 760 | this.clear(); |
761 | + this.files = ""; | |
774 | 762 | }) |
775 | 763 | .catch(error => { |
776 | 764 | if ((this.snackbar = true)) { |
... | ... | @@ -784,31 +772,49 @@ export default { |
784 | 772 | }, |
785 | 773 | save() { |
786 | 774 | this.editedItem.gelleryId = this.editedItem._id; |
775 | + var linkUrl = []; | |
787 | 776 | for (let i = 0; i < this.updates.length; i++) { |
788 | - this.editedItem.youTubeLinkUrl.push(this.updates[i].value); | |
777 | + linkUrl.push(this.updates[i].youTubeLink); | |
789 | 778 | } |
790 | - if (this.files) { | |
779 | + if (this.editFiles) { | |
791 | 780 | var ary = []; |
792 | 781 | var imageData = []; |
793 | - ary = this.files; | |
782 | + ary = this.editFiles; | |
794 | 783 | for (let i = 0; i < ary.length; i++) { |
795 | 784 | const [baseUrl, imageUrl] = ary[i].split(/,/); |
796 | 785 | imageData.push(imageUrl); |
797 | - this.editedItem.upload = imageData; | |
786 | + this.editedItem.editFiles = imageData; | |
798 | 787 | } |
799 | 788 | } |
800 | - console.log("this.editedItem", this.editedItem); | |
801 | - // http() | |
802 | - // .put("/updateGellery", this.editedItem) | |
803 | - // .then(response => { | |
804 | - // this.getGalleryList(); | |
805 | - // this.close(); | |
806 | - // this.snackbar = true; | |
807 | - // this.text = response.data.message; | |
808 | - // }) | |
809 | - // .catch(error => { | |
810 | - // console.log(error); | |
811 | - // }); | |
789 | + if (linkUrl != "") { | |
790 | + var updateData = { | |
791 | + galleryId: this.editedItem._id, | |
792 | + description: this.editedItem.description, | |
793 | + classId: this.editedItem.classNum, | |
794 | + uploadImage: this.editedItem.editFiles, | |
795 | + title: this.editedItem.title, | |
796 | + updateYouTubeLinkUrl: linkUrl | |
797 | + }; | |
798 | + } else if (linkUrl == "") { | |
799 | + var updateData = { | |
800 | + galleryId: this.editedItem._id, | |
801 | + description: this.editedItem.description, | |
802 | + classId: this.editedItem.classNum, | |
803 | + uploadImage: this.editedItem.editFiles, | |
804 | + title: this.editedItem.title | |
805 | + }; | |
806 | + } | |
807 | + http() | |
808 | + .put("/updateGallery", updateData) | |
809 | + .then(response => { | |
810 | + this.getGalleryList(); | |
811 | + this.close(); | |
812 | + this.snackbar = true; | |
813 | + this.text = response.data.message; | |
814 | + }) | |
815 | + .catch(error => { | |
816 | + console.log(error); | |
817 | + }); | |
812 | 818 | }, |
813 | 819 | getAllClasses() { |
814 | 820 | http() |
... | ... | @@ -836,10 +842,9 @@ export default { |
836 | 842 | this.updates.splice(index, 1); |
837 | 843 | if (index === 0) this.update(); |
838 | 844 | }, |
839 | - deleteUrl: function(index,youTubelinkId,id) { | |
845 | + deleteUrl: function(index, youTubelinkId, id) { | |
840 | 846 | this.editedItem.youTubeLinkUrl.splice(index, 1); |
841 | 847 | if (index === 0) this.update(); |
842 | - console.log("imageId", youTubelinkId, "id", id); | |
843 | 848 | let deleteYouTubeUrl = { |
844 | 849 | galleryId: id, |
845 | 850 | youTubeId: youTubelinkId |
... | ... | @@ -861,6 +866,7 @@ export default { |
861 | 866 | this.token = this.$store.state.token; |
862 | 867 | this.getAllClasses(); |
863 | 868 | this.getGalleryList(); |
869 | + // console.log("index",index); | |
864 | 870 | }, |
865 | 871 | created() { |
866 | 872 | this.$root.$on("app:search", search => { | ... | ... |
src/pages/socialMedia/socialMedia.vue
... | ... | @@ -415,9 +415,13 @@ export default { |
415 | 415 | this.desserts = response.data.data; |
416 | 416 | this.showLoader = false; |
417 | 417 | }) |
418 | - .catch(err => { | |
418 | + .catch(error => { | |
419 | 419 | this.showLoader = false; |
420 | - // this.$router.replace({ path: "/" }); | |
420 | + if (error.response.status === 401) { | |
421 | + this.$router.replace({ path: "/" }); | |
422 | + this.$store.dispatch("setToken", null); | |
423 | + this.$store.dispatch("Id", null); | |
424 | + } | |
421 | 425 | }); |
422 | 426 | }, |
423 | 427 | editItem(item) { |
... | ... | @@ -524,7 +528,6 @@ export default { |
524 | 528 | }; |
525 | 529 | </script> |
526 | 530 | <style scoped> |
527 | - | |
528 | 531 | #tabeleData { |
529 | 532 | border: 1px solid #dddddd; |
530 | 533 | text-align: left; | ... | ... |
static/css/custom.css