Compare View
Commits (7)
-
…cher and parent viewable while viweing teacher's and parent's detail, Show file name and make that file downloadable in notice board screen, Show school logo while printing student report, Student report data was not showing at some times issue solved and Hide meet link from teacher dashboard
-
…n edit student profile in library member screen
Showing
72 changed files
Show diff stats
src/Services/ApiCalls.js
1 | 1 | import http from "@/Services/http.js"; |
2 | 2 | import Rules from "@/pages/Common/rules.js" |
3 | 3 | export default { |
4 | - mixins: [Rules], | |
5 | - data() { | |
6 | - return { | |
4 | + mixins: [Rules], | |
5 | + data() { | |
6 | + return { | |
7 | 7 | |
8 | - // LOADER | |
9 | - showLoader: false, | |
10 | - loading: false, | |
11 | - // SNACKBAR | |
12 | - snackbar: false, | |
13 | - snackbarColor: '', | |
14 | - text: '', | |
15 | - timeout: 4000, | |
16 | - y: "top", | |
17 | - x: "right", | |
18 | - mode: "", | |
8 | + // LOADER | |
9 | + showLoader: false, | |
10 | + loading: false, | |
11 | + // SNACKBAR | |
12 | + snackbar: false, | |
13 | + snackbarColor: '', | |
14 | + text: '', | |
15 | + timeout: 4000, | |
16 | + y: "top", | |
17 | + x: "right", | |
18 | + mode: "", | |
19 | 19 | |
20 | - // PAGINATION | |
21 | - size: 10, | |
22 | - elements: "", | |
23 | - pageCount: "", | |
24 | - pageNumber: 0 | |
20 | + // PAGINATION | |
21 | + size: 10, | |
22 | + elements: "", | |
23 | + pageCount: "", | |
24 | + pageNumber: 0 | |
25 | 25 | |
26 | - } | |
27 | - }, | |
28 | - methods: { | |
29 | - // SNACKBAR | |
30 | - seeSnackbar(message, color) { | |
31 | - this.text = message; | |
32 | - this.showLoader = false; | |
33 | - this.snackbarColor = color; | |
34 | - this.snackbar = true; | |
35 | - }, | |
26 | + } | |
27 | + }, | |
28 | + methods: { | |
29 | + // SNACKBAR | |
30 | + seeSnackbar(message, color) { | |
31 | + this.text = message; | |
32 | + this.showLoader = false; | |
33 | + this.snackbarColor = color; | |
34 | + this.snackbar = true; | |
35 | + }, | |
36 | 36 | |
37 | - // SET PAGINATION | |
38 | - setPagination(response) { | |
39 | - this.elements = response.data.totalElements; | |
40 | - var l = this.elements; | |
41 | - var s = this.size; | |
42 | - var floor = (l / s); | |
43 | - this.pageCount = Math.floor(floor); | |
44 | - if (this.pageCount == floor) { | |
45 | - this.pageCount -= 1 | |
46 | - } | |
47 | - this.showLoader = false; | |
48 | - this.loading = false; | |
49 | - }, | |
37 | + // SET PAGINATION | |
38 | + setPagination(response) { | |
39 | + this.elements = response.data.totalElements; | |
40 | + var l = this.elements; | |
41 | + var s = this.size; | |
42 | + var floor = (l / s); | |
43 | + this.pageCount = Math.floor(floor); | |
44 | + if (this.pageCount == floor) { | |
45 | + this.pageCount -= 1 | |
46 | + } | |
47 | + this.showLoader = false; | |
48 | + this.loading = false; | |
49 | + }, | |
50 | 50 | |
51 | - generateError(error) { | |
52 | - var customError | |
53 | - const errorNo = error.response.status | |
54 | - // console.log("satus code errorNo", errorNo) | |
55 | - switch (errorNo) { | |
56 | - case 400: | |
57 | - let er = error | |
58 | - if (er.response.data.error) { | |
59 | - customError = error.response.data.error | |
60 | - } | |
61 | - if (er.response.data.errorMessage) { | |
62 | - customError = error.response.data.errorMessage | |
63 | - } | |
64 | - if (er.response.data.message) { | |
65 | - customError = error.response.data.message | |
66 | - } | |
67 | - return customError | |
68 | - break; | |
69 | - case 401: | |
70 | - customError = "Session expired" | |
71 | - return customError | |
72 | - break; | |
73 | - case 404: | |
74 | - customError = error.response.data.errorMessage | |
75 | - return customError | |
76 | - break; | |
77 | - case 409: | |
78 | - customError = error.response.data.errorMessage | |
79 | - return customError | |
80 | - break; | |
81 | - case 500: | |
82 | - customError = error.response.data.message | |
83 | - return customError | |
84 | - break; | |
85 | - default: | |
86 | - customError = "unknown error" | |
87 | - return customError | |
88 | - } | |
51 | + generateError(error) { | |
52 | + var customError | |
53 | + const errorNo = error.response.status | |
54 | + // console.log("satus code errorNo", errorNo) | |
55 | + switch (errorNo) { | |
56 | + case 400: | |
57 | + let er = error | |
58 | + if (er.response.data.error) { | |
59 | + customError = error.response.data.error | |
60 | + } | |
61 | + if (er.response.data.errorMessage) { | |
62 | + customError = error.response.data.errorMessage | |
63 | + } | |
64 | + if (er.response.data.message) { | |
65 | + customError = error.response.data.message | |
66 | + } | |
67 | + return customError | |
68 | + break; | |
69 | + case 401: | |
70 | + customError = "Session expired" | |
71 | + return customError | |
72 | + break; | |
73 | + case 404: | |
74 | + customError = error.response.data.errorMessage | |
75 | + return customError | |
76 | + break; | |
77 | + case 409: | |
78 | + customError = error.response.data.errorMessage | |
79 | + return customError | |
80 | + break; | |
81 | + case 500: | |
82 | + customError = error.response.data.message | |
83 | + return customError | |
84 | + break; | |
85 | + default: | |
86 | + customError = "unknown error" | |
87 | + return customError | |
88 | + } | |
89 | 89 | |
90 | - }, | |
90 | + }, | |
91 | 91 | |
92 | - // GET | |
93 | - getMethod(url, params) { | |
94 | - this.showLoader = true | |
95 | - return http() | |
96 | - .get(url, { | |
97 | - params: params, | |
92 | + // GET | |
93 | + getMethod(url, params) { | |
94 | + this.showLoader = true | |
95 | + return http() | |
96 | + .get(url, { | |
97 | + params: params, | |
98 | 98 | |
99 | - headers: { | |
100 | - // headers: { Authorization: "Bearer " + this.token } | |
101 | - } | |
102 | - }) | |
103 | - .then(response => { | |
104 | - this.showLoader = false | |
105 | - return response | |
106 | - }) | |
107 | - .catch(error => { | |
108 | - this.showLoader = false | |
109 | - // console.log("error in getMethod = ", error.response) | |
110 | - const message = this.generateError(error) | |
111 | - if (message == "Session expired") { | |
112 | - // this.$store.dispatch("setToken", null); | |
113 | - // this.$router.push({ | |
114 | - // name: 'Login' | |
115 | - // }); | |
116 | - } else { | |
117 | - throw new Error(message); | |
118 | - } | |
99 | + headers: { | |
100 | + // headers: { Authorization: "Bearer " + this.token } | |
101 | + } | |
102 | + }) | |
103 | + .then(response => { | |
104 | + this.showLoader = false | |
105 | + return response | |
106 | + }) | |
107 | + .catch(error => { | |
108 | + this.showLoader = false | |
109 | + // console.log("error in getMethod = ", error.response) | |
110 | + const message = this.generateError(error) | |
111 | + if (message == "Session expired") { | |
112 | + // this.$store.dispatch("setToken", null); | |
113 | + // this.$router.push({ | |
114 | + // name: 'Login' | |
115 | + // }); | |
116 | + } else { | |
117 | + throw new Error(message); | |
118 | + } | |
119 | 119 | |
120 | - }); | |
121 | - }, | |
120 | + }); | |
121 | + }, | |
122 | 122 | |
123 | - // POST | |
124 | - postMethod(url, payload) { | |
125 | - this.showLoader = true | |
126 | - return http() | |
127 | - .post(url, payload, { | |
128 | - // headers: { Authorization: "Bearer " + this.token } | |
129 | - }) | |
130 | - .then(response => { | |
131 | - this.showLoader = false | |
132 | - return response | |
133 | - }) | |
134 | - .catch(error => { | |
135 | - this.showLoader = false | |
136 | - console.log("error in postMethod = ", error.response) | |
137 | - const message = this.generateError(error) | |
138 | - if (message == "Session expired") { | |
139 | - this.$store.dispatch("setToken", null); | |
140 | - this.$router.push({ | |
141 | - name: 'Login' | |
142 | - }); | |
143 | - } else { | |
144 | - throw new Error(message); | |
145 | - } | |
123 | + // POST | |
124 | + postMethod(url, payload) { | |
125 | + this.showLoader = true | |
126 | + return http() | |
127 | + .post(url, payload, { | |
128 | + // headers: { Authorization: "Bearer " + this.token } | |
129 | + }) | |
130 | + .then(response => { | |
131 | + this.showLoader = false | |
132 | + return response | |
133 | + }) | |
134 | + .catch(error => { | |
135 | + this.showLoader = false | |
136 | + // console.log("error in postMethod = ", error.response) | |
137 | + const message = this.generateError(error) | |
138 | + if (message == "Session expired") { | |
139 | + this.$store.dispatch("setToken", null); | |
140 | + this.$router.push({ | |
141 | + name: 'Login' | |
142 | + }); | |
143 | + } else { | |
144 | + throw new Error(message); | |
145 | + } | |
146 | 146 | |
147 | - }); | |
148 | - }, | |
147 | + }); | |
148 | + }, | |
149 | 149 | |
150 | - // PUT | |
151 | - putMethod(url, payload) { | |
152 | - return http() | |
153 | - .put(url, payload, { | |
154 | - // headers: { | |
155 | - // // Authorization: 'Bearer ' + this.token | |
156 | - // } | |
157 | - }) | |
158 | - .then(response => { | |
159 | - return response | |
160 | - }) | |
161 | - .catch(error => { | |
162 | - console.log("error in putMethod = ", error.response) | |
163 | - const message = this.generateError(error) | |
164 | - if (message == "Session expired") { | |
165 | - this.$store.dispatch("setToken", null); | |
166 | - this.$router.push({ | |
167 | - name: 'Login' | |
168 | - }); | |
169 | - } else { | |
170 | - throw new Error(message); | |
171 | - } | |
150 | + // PUT | |
151 | + putMethod(url, payload) { | |
152 | + return http() | |
153 | + .put(url, payload, { | |
154 | + // headers: { | |
155 | + // // Authorization: 'Bearer ' + this.token | |
156 | + // } | |
157 | + }) | |
158 | + .then(response => { | |
159 | + return response | |
160 | + }) | |
161 | + .catch(error => { | |
162 | + // console.log("error in putMethod = ", error.response) | |
163 | + const message = this.generateError(error) | |
164 | + if (message == "Session expired") { | |
165 | + this.$store.dispatch("setToken", null); | |
166 | + this.$router.push({ | |
167 | + name: 'Login' | |
168 | + }); | |
169 | + } else { | |
170 | + throw new Error(message); | |
171 | + } | |
172 | 172 | |
173 | - }) | |
174 | - } | |
173 | + }) | |
174 | + } | |
175 | 175 | |
176 | - }, | |
177 | - computed: { | |
178 | - displayedPageNumber() { | |
179 | - return this.pageNumber + 1; | |
180 | - }, | |
181 | - // managerIsADMIN_VIEW: { | |
182 | - // get() { | |
183 | - // if (this.$store.state.roleName == "ADMIN_VIEW") { | |
184 | - // return true; | |
185 | - // } else { | |
186 | - // return false | |
187 | - // } | |
188 | - // }, | |
189 | - // set(newValue) { | |
190 | - // this.managerIsADMIN_VIEW = newValue; | |
191 | - // } | |
176 | + }, | |
177 | + computed: { | |
178 | + displayedPageNumber() { | |
179 | + return this.pageNumber + 1; | |
180 | + }, | |
181 | + // managerIsADMIN_VIEW: { | |
182 | + // get() { | |
183 | + // if (this.$store.state.roleName == "ADMIN_VIEW") { | |
184 | + // return true; | |
185 | + // } else { | |
186 | + // return false | |
187 | + // } | |
188 | + // }, | |
189 | + // set(newValue) { | |
190 | + // this.managerIsADMIN_VIEW = newValue; | |
191 | + // } | |
192 | 192 | |
193 | - // } | |
194 | - }, | |
193 | + // } | |
194 | + }, | |
195 | 195 | } |
196 | 196 | \ No newline at end of file | ... | ... |
src/Services/GetApis.js
1 | 1 | import ApiCalls from "@/Services/ApiCalls.js"; |
2 | 2 | export default { |
3 | - mixins: [ApiCalls], | |
4 | - data() { | |
5 | - return { | |
6 | - // courseData: [], | |
7 | - | |
8 | - // dashboard.vue data properties | |
9 | - | |
10 | - | |
11 | - | |
12 | - } | |
13 | - }, | |
14 | - methods: { | |
15 | - /* getParticularCourseDetail */ | |
16 | - async getParticularCourseDetail(courseId) { | |
17 | - | |
18 | - try { | |
19 | - let response = await this.getMethod("/getParticularCourseDetail", { | |
20 | - courseId: courseId | |
21 | - }) | |
22 | - return response | |
23 | - } catch (error) { | |
24 | - console.log("error in getParticularCourseDetail - ", error.message) | |
25 | - } | |
26 | - }, | |
27 | - | |
28 | - /* getStudentCourses - to get courseData */ | |
29 | - async getStudentCourses(params) { | |
30 | - try { | |
31 | - let response = await this.getMethod("/getStudentCourses", { | |
32 | - classId: params.classId, | |
33 | - studentId: params.studentId | |
34 | - }) | |
35 | - this.courseData = response.data.data; | |
36 | - } catch (error) { | |
37 | - console.log("error in getStudentCourses - ", error.message) | |
38 | - } | |
39 | - }, | |
40 | - | |
41 | - /* getCourseDiscussionesList - used in courseDiscussionForum.vue */ | |
42 | - async getCourseDiscussionesList(params) { | |
43 | - try { | |
44 | - let response = await this.getMethod("/getCourseDiscussionesList", { | |
45 | - courseId: params.courseId, | |
46 | - classId: params.classId, | |
47 | - }) | |
48 | - this.courseDiscussionItems = response.data.data | |
49 | - // return response | |
50 | - console.log("response of getCourseDiscussionesList - ", response) | |
51 | - } catch (error) { | |
52 | - console.log("error in getCourseDiscussionesList - ", error.message) | |
53 | - } | |
54 | - }, | |
55 | - | |
56 | - | |
57 | - | |
58 | - | |
59 | - | |
60 | - | |
61 | - | |
62 | - /***************************************************************************************************************************** */ | |
63 | - | |
64 | - // APIS USED IN dashboard.vue | |
65 | - /* studentMeetingEvents required in dashboard to display list of latest events */ | |
66 | - async studentMeetingEvents(params) { | |
67 | - try { | |
68 | - let response = await this.getMethod("/studentMeetingEvents", { | |
69 | - studentId: params.studentId | |
70 | - }) | |
71 | - console.log("response of studentMeetingEvents - ", response); | |
72 | - return response | |
73 | - } catch (error) { | |
74 | - console.log("error in studentMeetingEvents - ", error.message) | |
75 | - } | |
76 | - | |
77 | - }, | |
78 | - | |
79 | - async getParticularMeetingEvent(params) { | |
80 | - try { | |
81 | - let response = await this.getMethod("/getParticularMeetingEvent", { | |
82 | - meetingEventId: params.meetingEventId | |
83 | - }) | |
84 | - // this.particularEvent.push = response.data.data | |
85 | - return response | |
86 | - } catch (error) { | |
87 | - console.log("Error in getParticularMeetingEvent - ", error.message) | |
88 | - } | |
89 | - }, | |
90 | - | |
91 | - async getParticularSchoolEvent(params) { | |
92 | - try { | |
93 | - let response = await this.getMethod("/getParticularSchoolEvent", { | |
94 | - schoolEventId: params.schoolEventId | |
95 | - }) | |
96 | - // this.particularEvent = response.data.data | |
97 | - return response | |
98 | - } catch (error) { | |
99 | - console.log("Error in getParticularMeetingEvent - ", error.message) | |
100 | - } | |
101 | - }, | |
102 | - | |
103 | - async getSchoolEventsList(params) { | |
104 | - try { | |
105 | - let response = await this.getMethod("/getSchoolEventsList") | |
106 | - this.schoolEvents = response.data.data; | |
107 | - console.log("school events - ", this.schoolEvents) | |
108 | - return response | |
109 | - } catch (error) { | |
110 | - console.log("Error in getParticularMeetingEvent - ", error.message) | |
111 | - } | |
112 | - | |
113 | - }, | |
114 | - | |
115 | - | |
116 | - /************************************************************************************************************************ */ | |
117 | - | |
118 | - /* APIS USED IN LiveOnlineClass.vue */ | |
119 | - async getLiveClassesesList(params) { | |
120 | - try { | |
121 | - let response = await this.getMethod("/getLiveClassesesList", { | |
122 | - classId: params.classId, | |
123 | - courseId: params.courseId, | |
124 | - chapterId: params.chapterId, | |
125 | - }) | |
126 | - return response | |
127 | - } catch (error) { | |
128 | - console.log(" error in getLiveClassesesList - ", error.message) | |
129 | - } | |
130 | - }, | |
131 | - | |
132 | - | |
133 | - | |
134 | - /*************************************************************************************************************************** */ | |
135 | - | |
136 | - | |
137 | - /* APIS USED IN announcement.vue */ | |
138 | - async getAnnoucementesList(params) { | |
139 | - try { | |
140 | - let response = await this.getMethod("/getAnnoucementesList", { | |
141 | - courseId: params.courseId | |
142 | - }) | |
143 | - return response; | |
144 | - } catch (error) { | |
145 | - console.log("Error in getAnnoucementesList - ", error.message) | |
146 | - } | |
147 | - }, | |
148 | - | |
149 | - /***********************************************************************************************/ | |
150 | - | |
151 | - /* APIS USED IN AssignTeachers.vue */ | |
152 | - async getCourseesList(params) { | |
153 | - try { | |
154 | - let response = await this.getMethod("/getCourseesList", { | |
155 | - classId: params.classId | |
156 | - }) | |
157 | - this.courseData = response.data.data; | |
158 | - return response; | |
159 | - } catch (error) { | |
160 | - console.log("Error in getAnnoucementesList - ", error.message) | |
161 | - } | |
162 | - }, | |
163 | - async getTeachersList(params) { | |
164 | - try { | |
165 | - let response = await this.getMethod("/getTeachersList") | |
166 | - this.teachersList = response.data.data; | |
167 | - console.log("teachers list - ", this.teachersList) | |
168 | - return response; | |
169 | - } catch (error) { | |
170 | - console.log("Error in getAnnoucementesList - ", error.message) | |
171 | - } | |
172 | - } | |
173 | - | |
174 | - | |
175 | - }, | |
3 | + mixins: [ApiCalls], | |
4 | + data() { | |
5 | + return { | |
6 | + // courseData: [], | |
7 | + | |
8 | + // dashboard.vue data properties | |
9 | + | |
10 | + | |
11 | + | |
12 | + } | |
13 | + }, | |
14 | + methods: { | |
15 | + /* getParticularCourseDetail */ | |
16 | + async getParticularCourseDetail(courseId) { | |
17 | + | |
18 | + try { | |
19 | + let response = await this.getMethod("/getParticularCourseDetail", { | |
20 | + courseId: courseId | |
21 | + }) | |
22 | + return response | |
23 | + } catch (error) { | |
24 | + // console.log("error in getParticularCourseDetail - ", error.message) | |
25 | + } | |
26 | + }, | |
27 | + | |
28 | + /* getStudentCourses - to get courseData */ | |
29 | + async getStudentCourses(params) { | |
30 | + try { | |
31 | + let response = await this.getMethod("/getStudentCourses", { | |
32 | + classId: params.classId, | |
33 | + studentId: params.studentId | |
34 | + }) | |
35 | + this.courseData = response.data.data; | |
36 | + } catch (error) { | |
37 | + // console.log("error in getStudentCourses - ", error.message) | |
38 | + } | |
39 | + }, | |
40 | + | |
41 | + /* getCourseDiscussionesList - used in courseDiscussionForum.vue */ | |
42 | + async getCourseDiscussionesList(params) { | |
43 | + try { | |
44 | + let response = await this.getMethod("/getCourseDiscussionesList", { | |
45 | + courseId: params.courseId, | |
46 | + classId: params.classId, | |
47 | + }) | |
48 | + this.courseDiscussionItems = response.data.data | |
49 | + // return response | |
50 | + // console.log("response of getCourseDiscussionesList - ", response) | |
51 | + } catch (error) { | |
52 | + // console.log("error in getCourseDiscussionesList - ", error.message) | |
53 | + } | |
54 | + }, | |
55 | + | |
56 | + | |
57 | + | |
58 | + | |
59 | + | |
60 | + | |
61 | + | |
62 | + /***************************************************************************************************************************** */ | |
63 | + | |
64 | + // APIS USED IN dashboard.vue | |
65 | + /* studentMeetingEvents required in dashboard to display list of latest events */ | |
66 | + async studentMeetingEvents(params) { | |
67 | + try { | |
68 | + let response = await this.getMethod("/studentMeetingEvents", { | |
69 | + studentId: params.studentId | |
70 | + }) | |
71 | + // console.log("response of studentMeetingEvents - ", response); | |
72 | + return response | |
73 | + } catch (error) { | |
74 | + // console.log("error in studentMeetingEvents - ", error.message) | |
75 | + } | |
76 | + | |
77 | + }, | |
78 | + | |
79 | + async getParticularMeetingEvent(params) { | |
80 | + try { | |
81 | + let response = await this.getMethod("/getParticularMeetingEvent", { | |
82 | + meetingEventId: params.meetingEventId | |
83 | + }) | |
84 | + // this.particularEvent.push = response.data.data | |
85 | + return response | |
86 | + } catch (error) { | |
87 | + // console.log("Error in getParticularMeetingEvent - ", error.message) | |
88 | + } | |
89 | + }, | |
90 | + | |
91 | + async getParticularSchoolEvent(params) { | |
92 | + try { | |
93 | + let response = await this.getMethod("/getParticularSchoolEvent", { | |
94 | + schoolEventId: params.schoolEventId | |
95 | + }) | |
96 | + // this.particularEvent = response.data.data | |
97 | + return response | |
98 | + } catch (error) { | |
99 | + // console.log("Error in getParticularMeetingEvent - ", error.message) | |
100 | + } | |
101 | + }, | |
102 | + | |
103 | + async getSchoolEventsList(params) { | |
104 | + try { | |
105 | + let response = await this.getMethod("/getSchoolEventsList") | |
106 | + this.schoolEvents = response.data.data; | |
107 | + // console.log("school events - ", this.schoolEvents) | |
108 | + return response | |
109 | + } catch (error) { | |
110 | + // console.log("Error in getParticularMeetingEvent - ", error.message) | |
111 | + } | |
112 | + | |
113 | + }, | |
114 | + | |
115 | + | |
116 | + /************************************************************************************************************************ */ | |
117 | + | |
118 | + /* APIS USED IN LiveOnlineClass.vue */ | |
119 | + async getLiveClassesesList(params) { | |
120 | + try { | |
121 | + let response = await this.getMethod("/getLiveClassesesList", { | |
122 | + classId: params.classId, | |
123 | + courseId: params.courseId, | |
124 | + chapterId: params.chapterId, | |
125 | + }) | |
126 | + return response | |
127 | + } catch (error) { | |
128 | + // console.log(" error in getLiveClassesesList - ", error.message) | |
129 | + } | |
130 | + }, | |
131 | + | |
132 | + | |
133 | + | |
134 | + /*************************************************************************************************************************** */ | |
135 | + | |
136 | + | |
137 | + /* APIS USED IN announcement.vue */ | |
138 | + async getAnnoucementesList(params) { | |
139 | + try { | |
140 | + let response = await this.getMethod("/getAnnoucementesList", { | |
141 | + courseId: params.courseId | |
142 | + }) | |
143 | + return response; | |
144 | + } catch (error) { | |
145 | + // console.log("Error in getAnnoucementesList - ", error.message) | |
146 | + } | |
147 | + }, | |
148 | + | |
149 | + /***********************************************************************************************/ | |
150 | + | |
151 | + /* APIS USED IN AssignTeachers.vue */ | |
152 | + async getCourseesList(params) { | |
153 | + try { | |
154 | + let response = await this.getMethod("/getCourseesList", { | |
155 | + classId: params.classId | |
156 | + }) | |
157 | + this.courseData = response.data.data; | |
158 | + return response; | |
159 | + } catch (error) { | |
160 | + // console.log("Error in getAnnoucementesList - ", error.message) | |
161 | + } | |
162 | + }, | |
163 | + async getTeachersList(params) { | |
164 | + try { | |
165 | + let response = await this.getMethod("/getTeachersList") | |
166 | + this.teachersList = response.data.data; | |
167 | + // console.log("teachers list - ", this.teachersList) | |
168 | + return response; | |
169 | + } catch (error) { | |
170 | + // console.log("Error in getAnnoucementesList - ", error.message) | |
171 | + } | |
172 | + } | |
173 | + | |
174 | + | |
175 | + }, | |
176 | 176 | } |
177 | 177 | \ No newline at end of file | ... | ... |
src/Services/PutApis.js
1 | 1 | import ApiCalls from "@/Services/ApiCalls.js"; |
2 | 2 | export default { |
3 | - mixins: [ApiCalls], | |
4 | - data() { | |
5 | - return { | |
3 | + mixins: [ApiCalls], | |
4 | + data() { | |
5 | + return { | |
6 | 6 | |
7 | - } | |
8 | - }, | |
9 | - methods: { | |
10 | - /************************************************************************************************************************ */ | |
7 | + } | |
8 | + }, | |
9 | + methods: { | |
10 | + /************************************************************************************************************************ */ | |
11 | 11 | |
12 | - /* APIS USED IN LiveOnlineClass.vue */ | |
13 | - async createLiveClasses(params) { | |
14 | - try { | |
15 | - let response = await this.getMethod("/createLiveClasses", { | |
16 | - classId: params.classId, | |
17 | - courseId: params.courseId, | |
18 | - chapterId: params.chapterId, | |
19 | - }) | |
20 | - return response | |
21 | - } catch (error) { | |
22 | - console.log(" error in getLiveClassesesList - ", error.message) | |
23 | - } | |
24 | - }, | |
12 | + /* APIS USED IN LiveOnlineClass.vue */ | |
13 | + async createLiveClasses(params) { | |
14 | + try { | |
15 | + let response = await this.getMethod("/createLiveClasses", { | |
16 | + classId: params.classId, | |
17 | + courseId: params.courseId, | |
18 | + chapterId: params.chapterId, | |
19 | + }) | |
20 | + return response | |
21 | + } catch (error) { | |
22 | + // console.log(" error in getLiveClassesesList - ", error.message) | |
23 | + } | |
24 | + }, | |
25 | 25 | |
26 | 26 | |
27 | 27 | |
28 | - /*************************************************************************************************************************** */ | |
28 | + /*************************************************************************************************************************** */ | |
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | - }, | |
32 | + }, | |
33 | 33 | } |
34 | 34 | \ No newline at end of file | ... | ... |
src/Services/http.js
... | ... | @@ -17,71 +17,69 @@ const baseURL = `${baseDomain}`; |
17 | 17 | // console.log("token",`${store.state.schoolToken}`); |
18 | 18 | |
19 | 19 | export default () => { |
20 | - // return axios.create({ | |
21 | - // // baseURL: 'http://192.168.2.221:3002/v1', | |
22 | - // baseURL, | |
23 | - // headers: { | |
24 | - // Authorization: `Bearer ${store.state.token}` | |
25 | - // } | |
26 | - // }) | |
27 | - let instance = axios.create({ | |
28 | - // LIVE | |
29 | - //baseURL: 'https://annadata.patanjaliayurved.org/api', | |
30 | - // DEVELOPMENT | |
31 | - baseURL: baseURL, | |
20 | + // return axios.create({ | |
21 | + // // baseURL: 'http://192.168.2.221:3002/v1', | |
22 | + // baseURL, | |
23 | + // headers: { | |
24 | + // Authorization: `Bearer ${store.state.token}` | |
25 | + // } | |
26 | + // }) | |
27 | + let instance = axios.create({ | |
28 | + // LIVE | |
29 | + //baseURL: 'https://annadata.patanjaliayurved.org/api', | |
30 | + // DEVELOPMENT | |
31 | + baseURL: baseURL, | |
32 | 32 | |
33 | - headers: { | |
34 | - Authorization: `Bearer ${store.state.token}`, | |
35 | - // Authorization: `Bearer sdfsdfsfsdf`, | |
36 | - // 'Access-Control-Allow-Origin': '*' | |
33 | + headers: { | |
34 | + Authorization: `Bearer ${store.state.token}`, | |
35 | + // Authorization: `Bearer sdfsdfsfsdf`, | |
36 | + // 'Access-Control-Allow-Origin': '*' | |
37 | 37 | |
38 | - } | |
39 | - }) | |
38 | + } | |
39 | + }) | |
40 | 40 | |
41 | - instance.interceptors.request.use((config) => { | |
42 | - // Do something before request is sent | |
41 | + instance.interceptors.request.use((config) => { | |
42 | + // Do something before request is sent | |
43 | 43 | |
44 | - return config | |
45 | - }, error => { | |
46 | - return Promise.reject(error) | |
47 | - }) | |
48 | - instance.interceptors.response.use((response) => { | |
49 | - // do something with the response data | |
44 | + return config | |
45 | + }, error => { | |
46 | + return Promise.reject(error) | |
47 | + }) | |
48 | + instance.interceptors.response.use((response) => { | |
49 | + // do something with the response data | |
50 | + return response; | |
51 | + }, error => { | |
52 | + // handle the response error | |
53 | + // console.log("error in interceptor - ", error.response.status) | |
54 | + var customError | |
55 | + const errorNo = error.response.status | |
50 | 56 | |
57 | + switch (errorNo) { | |
58 | + case 401: | |
59 | + customError = "Session expired" | |
60 | + vm1.$store.dispatch("RESET_STORE", { | |
61 | + token: null, | |
62 | + data: null, | |
63 | + isUserLoggedIn: false, | |
64 | + isSchoolLoggedIn: false, | |
65 | + id: null, | |
66 | + role: null, | |
67 | + // schoolId: null, | |
68 | + schoolToken: null, | |
69 | + schoolRole: null, | |
70 | + studentsData: [], | |
71 | + }); | |
72 | + window.getApp.$emit("APP_LOGOUT"); | |
73 | + // console.log("store is - ", vm1.$store.state) | |
74 | + vm1.$router.push({ name: "Login" }); | |
75 | + // vm1.$store.dispatch("Id", null); | |
51 | 76 | |
52 | - return response; | |
53 | - }, error => { | |
54 | - // handle the response error | |
55 | - console.log("error in interceptor - ", error.response.status) | |
56 | - var customError | |
57 | - const errorNo = error.response.status | |
77 | + break; | |
78 | + } | |
58 | 79 | |
59 | - switch (errorNo) { | |
60 | - case 401: | |
61 | - customError = "Session expired" | |
62 | - vm1.$store.dispatch("RESET_STORE", { | |
63 | - token: null, | |
64 | - data: null, | |
65 | - isUserLoggedIn: false, | |
66 | - isSchoolLoggedIn: false, | |
67 | - id: null, | |
68 | - role: null, | |
69 | - // schoolId: null, | |
70 | - schoolToken: null, | |
71 | - schoolRole: null, | |
72 | - studentsData: [], | |
73 | - }); | |
74 | - window.getApp.$emit("APP_LOGOUT"); | |
75 | - console.log("store is - ",vm1.$store.state) | |
76 | - vm1.$router.push({ name: "Login" }); | |
77 | - // vm1.$store.dispatch("Id", null); | |
80 | + return Promise.reject(error); | |
81 | + }) | |
82 | + // response parse | |
78 | 83 | |
79 | - break; | |
80 | - } | |
81 | - | |
82 | - return Promise.reject(error); | |
83 | - }) | |
84 | - // response parse | |
85 | - | |
86 | - return instance; | |
84 | + return instance; | |
87 | 85 | } |
88 | 86 | \ No newline at end of file | ... | ... |
src/api/menu.js
... | ... | @@ -19,7 +19,7 @@ const adminMenu = [ |
19 | 19 | icon: '/static/icon/attendence.png', |
20 | 20 | items: [ |
21 | 21 | { name: 'AssignTeachers', title: 'Assign Teachers', component: 'AssignTeachers', action: '', }, |
22 | - | |
22 | + | |
23 | 23 | ] |
24 | 24 | }, |
25 | 25 | { |
... | ... | @@ -395,11 +395,11 @@ const teacherMenu = [{ |
395 | 395 | |
396 | 396 | ] |
397 | 397 | }, |
398 | -{ | |
399 | - title: 'Meet', | |
400 | - name: 'Meet', | |
401 | - icon: '/static/icon/meet_icon_navigation.png', | |
402 | -} | |
398 | + // { | |
399 | + // title: 'Meet', | |
400 | + // name: 'Meet', | |
401 | + // icon: '/static/icon/meet_icon_navigation.png', | |
402 | + // } | |
403 | 403 | ]; |
404 | 404 | |
405 | 405 | const parentMenu = [{ |
... | ... | @@ -412,7 +412,7 @@ const parentMenu = [{ |
412 | 412 | name: 'Change Students', |
413 | 413 | Vicon: "face", |
414 | 414 | click: e => { |
415 | - console.log(e); | |
415 | + // console.log(e); | |
416 | 416 | } |
417 | 417 | }]; |
418 | 418 | // reorder menu | ... | ... |
src/components/pageHeader/AppToolbar.vue
... | ... | @@ -65,9 +65,9 @@ export default { |
65 | 65 | icon: "account_circle", |
66 | 66 | href: "/resetPassword", |
67 | 67 | title: "Change Password", |
68 | - click: e => { | |
69 | - console.log(e); | |
70 | - } | |
68 | + click: (e) => { | |
69 | + // console.log(e); | |
70 | + }, | |
71 | 71 | }, |
72 | 72 | // { |
73 | 73 | // icon: 'settings', |
... | ... | @@ -81,18 +81,18 @@ export default { |
81 | 81 | icon: "lock", |
82 | 82 | href: "#", |
83 | 83 | title: "Logout", |
84 | - click: e => { | |
84 | + click: (e) => { | |
85 | 85 | window.getApp.$emit("APP_LOGOUT"); |
86 | - } | |
87 | - } | |
86 | + }, | |
87 | + }, | |
88 | 88 | ], |
89 | 89 | adminRole: "", |
90 | - SchoolRole: "" | |
90 | + SchoolRole: "", | |
91 | 91 | }), |
92 | 92 | computed: { |
93 | 93 | toolbarColor() { |
94 | 94 | return this.$vuetify.options.extra.mainNav; |
95 | - } | |
95 | + }, | |
96 | 96 | }, |
97 | 97 | mounted() { |
98 | 98 | // this.getUserData(); |
... | ... | @@ -130,10 +130,10 @@ export default { |
130 | 130 | // Authorization: "Bearer " + this.$store.state.token |
131 | 131 | // } |
132 | 132 | }) |
133 | - .then(response => { | |
133 | + .then((response) => { | |
134 | 134 | this.userData = response.data.data; |
135 | 135 | }) |
136 | - .catch(error => { | |
136 | + .catch((error) => { | |
137 | 137 | // if (error.response.status === 401) { |
138 | 138 | // this.$router.replace({ path: "/" }); |
139 | 139 | // this.$store.dispatch("setToken", null); |
... | ... | @@ -142,7 +142,7 @@ export default { |
142 | 142 | }); |
143 | 143 | }, |
144 | 144 | goToSchool() { |
145 | - console.log("click"); | |
145 | + // console.log("click"); | |
146 | 146 | if (this.$store.state.role === "ADMIN") { |
147 | 147 | this.$store.dispatch("Role", null); |
148 | 148 | this.$store.dispatch("setToken", null); |
... | ... | @@ -151,8 +151,8 @@ export default { |
151 | 151 | location.reload(); |
152 | 152 | }, 1000); |
153 | 153 | } |
154 | - } | |
155 | - } | |
154 | + }, | |
155 | + }, | |
156 | 156 | }; |
157 | 157 | </script> |
158 | 158 | <style> | ... | ... |
src/pages/Academic/routine.vue
... | ... | @@ -681,8 +681,6 @@ export default { |
681 | 681 | }, |
682 | 682 | methods: { |
683 | 683 | editItem(item, routineData) { |
684 | - console.log("routineData", routineData); | |
685 | - console.log("item", item); | |
686 | 684 | this.editedIndex = this.routineList; |
687 | 685 | this.editedItem = Object.assign({}, item); |
688 | 686 | this.editedItem.lectureRoutineId = item._id; |
... | ... | @@ -746,7 +744,7 @@ export default { |
746 | 744 | // this.clear(); |
747 | 745 | this.snackbar = true; |
748 | 746 | this.color = "green"; |
749 | - console.log("===this.addRoutine===", this.addRoutine); | |
747 | + // console.log("===this.addRoutine===", this.addRoutine); | |
750 | 748 | http() |
751 | 749 | .get( |
752 | 750 | "/getRoutineList", |
... | ... | @@ -767,7 +765,10 @@ export default { |
767 | 765 | this.hideTable = false; |
768 | 766 | }) |
769 | 767 | .catch((err) => { |
770 | - console.log("err====>", err); | |
768 | + // console.log("err====>", err); | |
769 | + this.snackbar = true; | |
770 | + this.text = error.response.data.message; | |
771 | + this.color = "error"; | |
771 | 772 | }); |
772 | 773 | this.addRoutineDialog = false; |
773 | 774 | }) | ... | ... |
src/pages/Academic/subject.vue
... | ... | @@ -313,7 +313,7 @@ |
313 | 313 | <td class="text-xs-center td td-row">{{ props.item.finalMarks }}</td> |
314 | 314 | <td class="text-xs-center td td-row">{{ props.item.type }}</td> |
315 | 315 | |
316 | - <!-- <td class="text-xs-center td td-row"> | |
316 | + <td class="text-xs-center td td-row" v-if="role === 'ADMIN' "> | |
317 | 317 | <span> |
318 | 318 | <v-tooltip top> |
319 | 319 | <img |
... | ... | @@ -346,7 +346,7 @@ |
346 | 346 | <span>Delete</span> |
347 | 347 | </v-tooltip> |
348 | 348 | </span> |
349 | - </td>--> | |
349 | + </td> | |
350 | 350 | </tr> |
351 | 351 | </template> |
352 | 352 | <v-alert |
... | ... | @@ -615,7 +615,6 @@ export default { |
615 | 615 | sortable: false, |
616 | 616 | align: "center", |
617 | 617 | }, |
618 | - // { text: "Action", value: "", sortable: false, align: "center" } | |
619 | 618 | ], |
620 | 619 | subjectList: [], |
621 | 620 | classList: [], |
... | ... | @@ -637,6 +636,16 @@ export default { |
637 | 636 | }, |
638 | 637 | }, |
639 | 638 | methods: { |
639 | + addActionInHeaders() { | |
640 | + if (this.role === "ADMIN") { | |
641 | + this.headers.push({ | |
642 | + text: "Action", | |
643 | + value: "", | |
644 | + sortable: false, | |
645 | + align: "center", | |
646 | + }); | |
647 | + } | |
648 | + }, | |
640 | 649 | pickFile() { |
641 | 650 | this.$refs.image.click(); |
642 | 651 | }, |
... | ... | @@ -671,10 +680,10 @@ export default { |
671 | 680 | this.getClassSubject(this.addSubject.classId); |
672 | 681 | }) |
673 | 682 | .catch((error) => { |
674 | - // this.snackbar = true; | |
675 | - // this.text = error.response.data.message; | |
676 | - // this.color = "error"; | |
677 | - console.log("error", error); | |
683 | + this.snackbar = true; | |
684 | + this.text = error.response.data.message; | |
685 | + this.color = "error"; | |
686 | + // console.log("error", error); | |
678 | 687 | }); |
679 | 688 | }, |
680 | 689 | close() { |
... | ... | @@ -738,7 +747,7 @@ export default { |
738 | 747 | }, |
739 | 748 | getClassSubject(_id) { |
740 | 749 | this.showLoader = true; |
741 | - console.log("class", _id); | |
750 | + // console.log("class", _id); | |
742 | 751 | // this.classId = this.classId; |
743 | 752 | http() |
744 | 753 | .get( |
... | ... | @@ -808,6 +817,7 @@ export default { |
808 | 817 | this.getClass(); |
809 | 818 | this.getTeacherList(); |
810 | 819 | this.role = this.$store.state.role; |
820 | + this.addActionInHeaders(); | |
811 | 821 | }, |
812 | 822 | }; |
813 | 823 | </script> |
814 | 824 | \ No newline at end of file | ... | ... |
src/pages/Academic/syllabus.vue
src/pages/Account/editInvoice.vue
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | <v-select |
49 | 49 | :items="studentList" |
50 | 50 | v-model="editData.studentId" |
51 | - :label="editData.studentId.name" | |
51 | + :label="editData.studentId ? editData.studentId.name: '-'" | |
52 | 52 | item-text="name" |
53 | 53 | item-value="_id" |
54 | 54 | @change="getStudentId(editData.studentId)" |
... | ... | @@ -402,7 +402,7 @@ export default { |
402 | 402 | this.$emit("update-editInvoice"); |
403 | 403 | }) |
404 | 404 | .catch((error) => { |
405 | - console.log(error); | |
405 | + // console.log(error); | |
406 | 406 | this.snackbar = true; |
407 | 407 | this.text = error.response.data.message; |
408 | 408 | color: "red"; | ... | ... |
src/pages/Account/expense.vue
... | ... | @@ -605,7 +605,7 @@ export default { |
605 | 605 | // console.log(e) |
606 | 606 | const files = e.target.files; |
607 | 607 | this.upload = e.target.files[0]; |
608 | - console.log("imageData-upload========>", this.upload); | |
608 | + // console.log("imageData-upload========>", this.upload); | |
609 | 609 | if (files[0] !== undefined) { |
610 | 610 | this.imageName = files[0].name; |
611 | 611 | if (this.imageName.lastIndexOf(".") <= 0) { |
... | ... | @@ -618,7 +618,7 @@ export default { |
618 | 618 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
619 | 619 | // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
620 | 620 | // console.log("upload=======>", this.imageData.imageUrl); |
621 | - console.log("imageFile", this.imageUrl); | |
621 | + // console.log("imageFile", this.imageUrl); | |
622 | 622 | }); |
623 | 623 | } else { |
624 | 624 | this.imageName = ""; | ... | ... |
src/pages/Account/globalPayment.vue
... | ... | @@ -94,7 +94,10 @@ |
94 | 94 | style="margin: auto;display:block;margin-bottom:10px !important" |
95 | 95 | > |
96 | 96 | <img src="/static/icon/user.png" v-if="!invoiceData.studentId.profilePicUrl" /> |
97 | - <img :src="invoiceData.studentId.profilePicUrl" v-else-if="invoiceData.studentId.profilePicUrl" /> | |
97 | + <img | |
98 | + :src="invoiceData.studentId.profilePicUrl" | |
99 | + v-else-if="invoiceData.studentId.profilePicUrl" | |
100 | + /> | |
98 | 101 | </v-avatar> |
99 | 102 | </v-flex> |
100 | 103 | </v-layout> |
... | ... | @@ -173,7 +176,7 @@ |
173 | 176 | </v-flex> |
174 | 177 | </v-layout> |
175 | 178 | </v-flex> |
176 | - | |
179 | + | |
177 | 180 | <v-flex xs12> |
178 | 181 | <v-layout wrap> |
179 | 182 | <v-flex xs12 sm12 md12 v-show="showInvoiceTable"> |
... | ... | @@ -187,21 +190,15 @@ |
187 | 190 | <template slot="items" slot-scope="props"> |
188 | 191 | <tr class="tr" v-for="feetype in props.item.feeType"> |
189 | 192 | <td class="td td-row">{{ props.index + 1}}</td> |
190 | - <td | |
191 | - class="td td-row text-xs-center" | |
192 | - >{{ feetype.feeTypeName}}</td> | |
193 | - <td | |
194 | - class="td td-row text-xs-center" | |
195 | - >{{ feetype.amount }}</td> | |
193 | + <td class="td td-row text-xs-center">{{ feetype.feeTypeName}}</td> | |
194 | + <td class="td td-row text-xs-center">{{ feetype.amount }}</td> | |
196 | 195 | <td |
197 | 196 | class="td td-row text-xs-center" |
198 | 197 | >{{ props.item.totalSubTotal - props.item.totalPaidAmount }}</td> |
199 | - <td | |
200 | - class="td td-row text-xs-center" | |
201 | - >{{ feetype.paidAmount }}</td> | |
202 | - <td | |
203 | - class="td td-row text-xs-center" | |
204 | - ><input type="text" maxlength="20"></td> | |
198 | + <td class="td td-row text-xs-center">{{ feetype.paidAmount }}</td> | |
199 | + <td class="td td-row text-xs-center"> | |
200 | + <input type="text" maxlength="20" /> | |
201 | + </td> | |
205 | 202 | </tr> |
206 | 203 | </template> |
207 | 204 | <v-alert |
... | ... | @@ -247,90 +244,90 @@ export default { |
247 | 244 | totalPaidAmount: "", |
248 | 245 | subTotal: "", |
249 | 246 | feeTypeName: "", |
250 | - userData: {} | |
247 | + userData: {}, | |
251 | 248 | }, |
252 | 249 | feeTypeData: [], |
253 | 250 | selectStudents: {}, |
254 | 251 | addSection: [], |
255 | - classRules: [v => !!v || " Class Name is required"], | |
256 | - sectionRules: [v => !!v || " Section Name is required"], | |
257 | - studentRules: [v => !!v || "Student Name is required"], | |
252 | + classRules: [(v) => !!v || " Class Name is required"], | |
253 | + sectionRules: [(v) => !!v || " Section Name is required"], | |
254 | + studentRules: [(v) => !!v || "Student Name is required"], | |
258 | 255 | headers: [ |
259 | 256 | { |
260 | 257 | text: "Invoice Number", |
261 | 258 | align: "center", |
262 | 259 | sortable: false, |
263 | - value: "invoiceNumber" | |
260 | + value: "invoiceNumber", | |
264 | 261 | }, |
265 | 262 | { |
266 | 263 | text: "Total Pay", |
267 | 264 | value: "totalAmount", |
268 | 265 | sortable: false, |
269 | - align: "center" | |
266 | + align: "center", | |
270 | 267 | }, |
271 | 268 | { |
272 | 269 | text: "Weaver", |
273 | 270 | value: "totalDiscount", |
274 | 271 | sortable: false, |
275 | - align: "center" | |
272 | + align: "center", | |
276 | 273 | }, |
277 | 274 | { |
278 | 275 | text: " Total Collection", |
279 | 276 | value: "totalSubTotal", |
280 | 277 | sortable: false, |
281 | - align: "center" | |
278 | + align: "center", | |
282 | 279 | }, |
283 | 280 | { |
284 | 281 | text: "Clearance", |
285 | 282 | value: "paymentStatus", |
286 | 283 | sortable: false, |
287 | - align: "center" | |
284 | + align: "center", | |
288 | 285 | }, |
289 | 286 | { text: "Payment Date", value: "date", sortable: false, align: "center" }, |
290 | - { text: "Action", value: "", sortable: false, align: "center" } | |
287 | + { text: "Action", value: "", sortable: false, align: "center" }, | |
291 | 288 | ], |
292 | 289 | |
293 | 290 | header: [ |
294 | 291 | { |
295 | 292 | text: "#", |
296 | 293 | // align: "center", |
297 | - sortable: false | |
294 | + sortable: false, | |
298 | 295 | }, |
299 | 296 | { |
300 | 297 | text: "Fees Name", |
301 | 298 | align: "center", |
302 | 299 | sortable: false, |
303 | - value: "feeTypeName" | |
300 | + value: "feeTypeName", | |
304 | 301 | }, |
305 | 302 | { |
306 | 303 | text: "Fees Amount", |
307 | 304 | align: "center", |
308 | 305 | sortable: false, |
309 | - value: "amount" | |
306 | + value: "amount", | |
310 | 307 | }, |
311 | 308 | { |
312 | 309 | text: "Due", |
313 | 310 | align: "center", |
314 | - sortable: false | |
311 | + sortable: false, | |
315 | 312 | }, |
316 | 313 | { |
317 | 314 | text: "Paid Amount", |
318 | 315 | align: "center", |
319 | 316 | sortable: false, |
320 | - value: "paidAmount" | |
317 | + value: "paidAmount", | |
321 | 318 | }, |
322 | 319 | { |
323 | 320 | text: "Weaver", |
324 | 321 | align: "center", |
325 | 322 | sortable: false, |
326 | - value: "paidAmount" | |
327 | - } | |
323 | + value: "paidAmount", | |
324 | + }, | |
328 | 325 | ], |
329 | 326 | studentData: [], |
330 | - studentInvoiceData: [] | |
327 | + studentInvoiceData: [], | |
331 | 328 | }), |
332 | 329 | methods: { |
333 | - dates: function(date) { | |
330 | + dates: function (date) { | |
334 | 331 | return moment(date).format("MMMM DD, YYYY"); |
335 | 332 | }, |
336 | 333 | getSection() { |
... | ... | @@ -342,19 +339,19 @@ export default { |
342 | 339 | { |
343 | 340 | params: { |
344 | 341 | classId: this.selectStudents.selectClassId, |
345 | - schoolId: this.$store.state.schoolId | |
346 | - } | |
342 | + schoolId: this.$store.state.schoolId, | |
343 | + }, | |
347 | 344 | }, |
348 | 345 | { |
349 | - headers: { Authorization: "Bearer " + token } | |
346 | + headers: { Authorization: "Bearer " + token }, | |
350 | 347 | } |
351 | 348 | ) |
352 | - .then(response => { | |
349 | + .then((response) => { | |
353 | 350 | this.addSection = response.data.data; |
354 | 351 | this.showLoader = false; |
355 | 352 | // console.log("getSectionsList=====>", this.addSection); |
356 | 353 | }) |
357 | - .catch(error => { | |
354 | + .catch((error) => { | |
358 | 355 | this.showLoader = false; |
359 | 356 | // console.log("err====>", err); |
360 | 357 | // this.$router.replace({ path: '/' }); |
... | ... | @@ -367,15 +364,15 @@ export default { |
367 | 364 | params: { |
368 | 365 | classId: this.selectStudents.selectClassId, |
369 | 366 | sectionId: this.selectStudents.selectSection, |
370 | - schoolId: this.$store.state.schoolId | |
371 | - } | |
367 | + schoolId: this.$store.state.schoolId, | |
368 | + }, | |
372 | 369 | }) |
373 | - .then(response => { | |
370 | + .then((response) => { | |
374 | 371 | this.studentData = response.data.data; |
375 | 372 | this.showLoader = false; |
376 | 373 | }) |
377 | - .catch(err => { | |
378 | - console.log("err====>", err); | |
374 | + .catch((err) => { | |
375 | + // console.log("err====>", err); | |
379 | 376 | this.showLoader = false; |
380 | 377 | }); |
381 | 378 | }, |
... | ... | @@ -387,16 +384,16 @@ export default { |
387 | 384 | params: { |
388 | 385 | classId: this.selectStudents.selectClassId, |
389 | 386 | studentId: this.selectStudents.selectId, |
390 | - schoolId: this.$store.state.schoolId | |
391 | - } | |
387 | + schoolId: this.$store.state.schoolId, | |
388 | + }, | |
392 | 389 | }) |
393 | - .then(response => { | |
390 | + .then((response) => { | |
394 | 391 | this.studentInvoiceData = response.data.data; |
395 | 392 | // console.log("this.studentInvoiceData", this.studentInvoiceData); |
396 | 393 | this.showLoader = false; |
397 | 394 | }) |
398 | - .catch(err => { | |
399 | - console.log("err====>", err); | |
395 | + .catch((err) => { | |
396 | + // console.log("err====>", err); | |
400 | 397 | this.showLoader = false; |
401 | 398 | }); |
402 | 399 | }, |
... | ... | @@ -404,7 +401,7 @@ export default { |
404 | 401 | let feeType = { |
405 | 402 | subTotal: "", |
406 | 403 | subParticularTotal: "", |
407 | - paidAmount: "" | |
404 | + paidAmount: "", | |
408 | 405 | }; |
409 | 406 | // *********** SUBTOTAL *********** |
410 | 407 | feeType.subTotal = |
... | ... | @@ -414,21 +411,21 @@ export default { |
414 | 411 | feeType.paidAmount = |
415 | 412 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); |
416 | 413 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); |
417 | - } | |
414 | + }, | |
418 | 415 | }, |
419 | 416 | mounted() { |
420 | 417 | var token = this.$store.state.token; |
421 | 418 | http() |
422 | 419 | .get("/getClassesList", { |
423 | 420 | params: { |
424 | - schoolId: this.$store.state.schoolId | |
421 | + schoolId: this.$store.state.schoolId, | |
425 | 422 | }, |
426 | - headers: { Authorization: "Bearer " + token } | |
423 | + headers: { Authorization: "Bearer " + token }, | |
427 | 424 | }) |
428 | - .then(response => { | |
425 | + .then((response) => { | |
429 | 426 | this.addclass = response.data.data; |
430 | 427 | }) |
431 | - .catch(error => { | |
428 | + .catch((error) => { | |
432 | 429 | this.showLoader = false; |
433 | 430 | if (error.response.status === 401) { |
434 | 431 | this.$router.replace({ path: "/" }); |
... | ... | @@ -437,7 +434,7 @@ export default { |
437 | 434 | this.$store.dispatch("Role", null); |
438 | 435 | } |
439 | 436 | }); |
440 | - } | |
437 | + }, | |
441 | 438 | // created() { |
442 | 439 | // this.$root.$on("app:search", search => { |
443 | 440 | // this.search = search; | ... | ... |
src/pages/Account/income.vue
... | ... | @@ -575,7 +575,7 @@ export default { |
575 | 575 | // console.log(e) |
576 | 576 | const files = e.target.files; |
577 | 577 | this.upload = e.target.files[0]; |
578 | - console.log("imageData-upload========>", this.upload); | |
578 | + // console.log("imageData-upload========>", this.upload); | |
579 | 579 | if (files[0] !== undefined) { |
580 | 580 | this.imageName = files[0].name; |
581 | 581 | if (this.imageName.lastIndexOf(".") <= 0) { |
... | ... | @@ -588,7 +588,7 @@ export default { |
588 | 588 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
589 | 589 | // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
590 | 590 | // console.log("upload=======>", this.imageData.imageUrl); |
591 | - console.log("imageFile", this.imageUrl); | |
591 | + // console.log("imageFile", this.imageUrl); | |
592 | 592 | }); |
593 | 593 | } else { |
594 | 594 | this.imageName = ""; |
... | ... | @@ -655,7 +655,7 @@ export default { |
655 | 655 | this.getIncomeList(); |
656 | 656 | }) |
657 | 657 | .catch((error) => { |
658 | - console.log(error); | |
658 | + // console.log(error); | |
659 | 659 | }); |
660 | 660 | }, |
661 | 661 | close() { | ... | ... |
src/pages/Account/invoice.vue
... | ... | @@ -693,7 +693,6 @@ export default { |
693 | 693 | // console.log("item", item); |
694 | 694 | this.editedIndex = this.invoiceList.indexOf(item); |
695 | 695 | this.editedItem = Object.assign({}, item); |
696 | - console.log("editedItem", this.editedItem); | |
697 | 696 | this.dialog1 = true; |
698 | 697 | }, |
699 | 698 | editItem(item) { |
... | ... | @@ -895,7 +894,7 @@ export default { |
895 | 894 | this.feeTypeData.push({ feeTypeName: this.feeType.feeTypeName }); |
896 | 895 | }, |
897 | 896 | deleteSelectFee: function (index, feeTyp) { |
898 | - console.log("---index----", index); | |
897 | + // console.log("---index----", index); | |
899 | 898 | this.feeTypeData.splice(index, 1); |
900 | 899 | this.getAmmountDetails(feeTyp); |
901 | 900 | if (this.feeTypeData.length == 0) { |
... | ... | @@ -938,7 +937,7 @@ export default { |
938 | 937 | name: "Select All", |
939 | 938 | _id: "Select All", |
940 | 939 | }); |
941 | - console.log("=======studentist====", this.studentList); | |
940 | + // console.log("=======studentist====", this.studentList); | |
942 | 941 | this.showLoader = false; |
943 | 942 | }) |
944 | 943 | .catch((err) => { | ... | ... |
src/pages/Account/paymentHistory.vue
... | ... | @@ -65,7 +65,13 @@ |
65 | 65 | </v-card-title> |
66 | 66 | <v-flex xs8 sm8 md3 lg2 v-if="showSearch"> |
67 | 67 | <v-layout> |
68 | - <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | |
68 | + <v-text-field | |
69 | + autofocus | |
70 | + v-model="search" | |
71 | + label="Search" | |
72 | + prepend-inner-icon="search" | |
73 | + color="primary" | |
74 | + ></v-text-field> | |
69 | 75 | <v-icon @click="closeSearch" color="error">close</v-icon> |
70 | 76 | </v-layout> |
71 | 77 | </v-flex> |
... | ... | @@ -144,7 +150,7 @@ export default { |
144 | 150 | show: true, |
145 | 151 | showSearch: false, |
146 | 152 | pagination: { |
147 | - rowsPerPage: 10 | |
153 | + rowsPerPage: 10, | |
148 | 154 | }, |
149 | 155 | paymentMethod: ["Cash", "Cheque"], |
150 | 156 | headers: [ |
... | ... | @@ -152,40 +158,40 @@ export default { |
152 | 158 | text: "No", |
153 | 159 | align: "", |
154 | 160 | sortable: false, |
155 | - value: "No" | |
161 | + value: "No", | |
156 | 162 | }, |
157 | 163 | { |
158 | 164 | text: "Student", |
159 | 165 | value: "name", |
160 | 166 | sortable: false, |
161 | - align: "center" | |
167 | + align: "center", | |
162 | 168 | }, |
163 | 169 | { text: "Class", value: "class", sortable: false, align: "center" }, |
164 | 170 | { |
165 | 171 | text: "Fee Type", |
166 | 172 | value: "feeTypeName", |
167 | 173 | sortable: false, |
168 | - align: "center" | |
174 | + align: "center", | |
169 | 175 | }, |
170 | 176 | { |
171 | 177 | text: "Method", |
172 | 178 | value: "paymentMethod", |
173 | 179 | sortable: false, |
174 | - align: "center" | |
180 | + align: "center", | |
175 | 181 | }, |
176 | 182 | { |
177 | 183 | text: "Paid Amount", |
178 | 184 | value: "totalPaidAmount", |
179 | 185 | sortable: false, |
180 | - align: "center" | |
186 | + align: "center", | |
181 | 187 | }, |
182 | 188 | { |
183 | 189 | text: "Date", |
184 | 190 | value: "date", |
185 | 191 | sortable: false, |
186 | - align: "center" | |
192 | + align: "center", | |
187 | 193 | }, |
188 | - { text: "Action", value: "", sortable: false, align: "center" } | |
194 | + { text: "Action", value: "", sortable: false, align: "center" }, | |
189 | 195 | ], |
190 | 196 | paymentHistory: [], |
191 | 197 | addPaymentHistoryDialog: "", |
... | ... | @@ -197,7 +203,7 @@ export default { |
197 | 203 | timeout: 5000, |
198 | 204 | text: "", |
199 | 205 | color: "", |
200 | - snackbar: false | |
206 | + snackbar: false, | |
201 | 207 | }), |
202 | 208 | methods: { |
203 | 209 | editItem(item) { |
... | ... | @@ -209,7 +215,7 @@ export default { |
209 | 215 | deleteItem(item) { |
210 | 216 | let deleteGrade = { |
211 | 217 | invoiceId: item._id, |
212 | - feeTypeId: item.feeType._id | |
218 | + feeTypeId: item.feeType._id, | |
213 | 219 | }; |
214 | 220 | http() |
215 | 221 | .put( |
... | ... | @@ -217,26 +223,26 @@ export default { |
217 | 223 | confirm("Are you sure you want to delete this?") && deleteGrade, |
218 | 224 | { |
219 | 225 | headers: { |
220 | - Authorization: "Bearer " + this.token | |
221 | - } | |
226 | + Authorization: "Bearer " + this.token, | |
227 | + }, | |
222 | 228 | } |
223 | 229 | ) |
224 | - .then(response => { | |
230 | + .then((response) => { | |
225 | 231 | this.snackbar = true; |
226 | 232 | // this.text = "Successfully Delete Salary "; |
227 | 233 | this.text = response.data.message; |
228 | 234 | this.color = "green"; |
229 | 235 | this.getPaymentHistory(); |
230 | 236 | }) |
231 | - .catch(error => { | |
232 | - console.log("error", error); | |
237 | + .catch((error) => { | |
238 | + // console.log("error", error); | |
233 | 239 | this.snackbar = true; |
234 | 240 | this.text = error.response.data.message; |
235 | 241 | this.color = "red"; |
236 | 242 | }); |
237 | 243 | }, |
238 | 244 | |
239 | - dates: function(date) { | |
245 | + dates: function (date) { | |
240 | 246 | return moment(date).format("MMMM DD, YYYY"); |
241 | 247 | }, |
242 | 248 | getPaymentHistory() { |
... | ... | @@ -246,15 +252,15 @@ export default { |
246 | 252 | .get("/getPaymentHistory", { |
247 | 253 | params: { |
248 | 254 | paymentStatus: "FULLY_PAID", |
249 | - schoolId: this.$store.state.schoolId | |
255 | + schoolId: this.$store.state.schoolId, | |
250 | 256 | }, |
251 | - headers: { Authorization: "Bearer " + token } | |
257 | + headers: { Authorization: "Bearer " + token }, | |
252 | 258 | }) |
253 | - .then(response => { | |
259 | + .then((response) => { | |
254 | 260 | this.paymentHistory = response.data.data; |
255 | 261 | this.showLoader = false; |
256 | 262 | }) |
257 | - .catch(error => { | |
263 | + .catch((error) => { | |
258 | 264 | this.showLoader = false; |
259 | 265 | if (error.response.status === 401) { |
260 | 266 | this.$router.replace({ path: "/" }); |
... | ... | @@ -269,23 +275,23 @@ export default { |
269 | 275 | invoiceId: this.editedItem._id, |
270 | 276 | feeTypeId: this.editedItem.feeType._id, |
271 | 277 | paidAmount: this.editedItem.paidAmount, |
272 | - paymentMethod: this.editedItem.paymentMethod | |
278 | + paymentMethod: this.editedItem.paymentMethod, | |
273 | 279 | }; |
274 | 280 | http() |
275 | 281 | .put("/updateFeeType", updatePayment, { |
276 | 282 | headers: { |
277 | - Authorization: "Bearer " + this.token | |
278 | - } | |
283 | + Authorization: "Bearer " + this.token, | |
284 | + }, | |
279 | 285 | }) |
280 | - .then(response => { | |
286 | + .then((response) => { | |
281 | 287 | this.getPaymentHistory(); |
282 | 288 | this.snackbar = true; |
283 | 289 | this.text = response.data.message; |
284 | 290 | this.color = "green"; |
285 | 291 | this.editPaymentDialog = false; |
286 | 292 | }) |
287 | - .catch(error => { | |
288 | - console.log("error", error.response); | |
293 | + .catch((error) => { | |
294 | + // console.log("error", error.response); | |
289 | 295 | this.snackbar = true; |
290 | 296 | this.text = error.response.data.message; |
291 | 297 | this.color = "red"; |
... | ... | @@ -299,11 +305,11 @@ export default { |
299 | 305 | this.showSearch = false; |
300 | 306 | this.show = true; |
301 | 307 | this.search = ""; |
302 | - } | |
308 | + }, | |
303 | 309 | }, |
304 | 310 | mounted() { |
305 | 311 | this.token = this.$store.state.token; |
306 | 312 | this.getPaymentHistory(); |
307 | - } | |
313 | + }, | |
308 | 314 | }; |
309 | 315 | </script> |
310 | 316 | \ No newline at end of file | ... | ... |
src/pages/Account/paymentTemplate.vue
src/pages/Account/viewInvoice.vue
... | ... | @@ -318,25 +318,25 @@ export default { |
318 | 318 | discount: "", |
319 | 319 | totalPaidAmount: "", |
320 | 320 | subTotal: "", |
321 | - feeTypeName: "" | |
321 | + feeTypeName: "", | |
322 | 322 | }, |
323 | 323 | feeTypeData: [], |
324 | 324 | token: "", |
325 | 325 | invoiceParticularData: { |
326 | 326 | studentId: { |
327 | - name: "" | |
327 | + name: "", | |
328 | 328 | }, |
329 | 329 | classId: { |
330 | - classNum: "" | |
331 | - } | |
330 | + classNum: "", | |
331 | + }, | |
332 | 332 | }, |
333 | 333 | userData: { |
334 | - name: "" | |
335 | - } | |
334 | + name: "", | |
335 | + }, | |
336 | 336 | }), |
337 | 337 | |
338 | 338 | methods: { |
339 | - dates: function(date) { | |
339 | + dates: function (date) { | |
340 | 340 | return moment(date).format("MMMM DD, YYYY"); |
341 | 341 | }, |
342 | 342 | getInvoiceList() { |
... | ... | @@ -344,11 +344,11 @@ export default { |
344 | 344 | .get("/getParticularInvoice", { |
345 | 345 | params: { |
346 | 346 | invoiceId: this.$route.params.viewInvoiceId, |
347 | - schoolId: this.$store.state.schoolId | |
347 | + schoolId: this.$store.state.schoolId, | |
348 | 348 | }, |
349 | - headers: { Authorization: "Bearer " + this.token } | |
349 | + headers: { Authorization: "Bearer " + this.token }, | |
350 | 350 | }) |
351 | - .then(response => { | |
351 | + .then((response) => { | |
352 | 352 | this.invoiceParticularData = response.data.data; |
353 | 353 | this.invoiceData = this.invoiceParticularData; |
354 | 354 | this.invoiceData.date = this.invoiceParticularData.date.slice(0, 10); |
... | ... | @@ -359,7 +359,7 @@ export default { |
359 | 359 | (this.feeType.totalPaidAmount = response.data.data.totalPaidAmount); |
360 | 360 | this.showLoader = false; |
361 | 361 | }) |
362 | - .catch(error => { | |
362 | + .catch((error) => { | |
363 | 363 | this.showLoader = false; |
364 | 364 | if (error.response.status === 401) { |
365 | 365 | this.$router.replace({ path: "/" }); |
... | ... | @@ -373,12 +373,12 @@ export default { |
373 | 373 | http() |
374 | 374 | .get("/getFeesList", { |
375 | 375 | params: { schoolId: this.$store.state.schoolId }, |
376 | - headers: { Authorization: "Bearer " + this.token } | |
376 | + headers: { Authorization: "Bearer " + this.token }, | |
377 | 377 | }) |
378 | - .then(response => { | |
378 | + .then((response) => { | |
379 | 379 | this.feeTypes = response.data.data; |
380 | 380 | }) |
381 | - .catch(err => { | |
381 | + .catch((err) => { | |
382 | 382 | // console.log("err====>", err); |
383 | 383 | }); |
384 | 384 | }, |
... | ... | @@ -386,7 +386,7 @@ export default { |
386 | 386 | let feeType = { |
387 | 387 | subTotal: "", |
388 | 388 | subParticularTotal: "", |
389 | - paidAmount: "" | |
389 | + paidAmount: "", | |
390 | 390 | }; |
391 | 391 | // *********** SUBTOTAL *********** |
392 | 392 | feeType.subTotal = |
... | ... | @@ -404,17 +404,17 @@ export default { |
404 | 404 | getUserData() { |
405 | 405 | http() |
406 | 406 | .get("/getParticularUserDetail") |
407 | - .then(response => { | |
407 | + .then((response) => { | |
408 | 408 | this.userData = response.data.data; |
409 | 409 | }) |
410 | - .catch(error => { | |
410 | + .catch((error) => { | |
411 | 411 | if (error.response.status === 401) { |
412 | 412 | this.$router.replace({ path: "/" }); |
413 | 413 | this.$store.dispatch("setToken", null); |
414 | 414 | this.$store.dispatch("Id", null); |
415 | 415 | } |
416 | 416 | }); |
417 | - } | |
417 | + }, | |
418 | 418 | }, |
419 | 419 | mounted() { |
420 | 420 | this.token = this.$store.state.token; |
... | ... | @@ -423,14 +423,14 @@ export default { |
423 | 423 | this.getUserData(); |
424 | 424 | }, |
425 | 425 | created() { |
426 | - this.$root.$on("app:search", search => { | |
426 | + this.$root.$on("app:search", (search) => { | |
427 | 427 | this.search = search; |
428 | 428 | }); |
429 | 429 | }, |
430 | 430 | beforeDestroy() { |
431 | 431 | // dont forget to remove the listener |
432 | 432 | this.$root.$off("app:search"); |
433 | - } | |
433 | + }, | |
434 | 434 | }; |
435 | 435 | </script> |
436 | 436 | ... | ... |
src/pages/Administrator/bulkImport.vue
... | ... | @@ -307,7 +307,7 @@ export default { |
307 | 307 | convertFile(e) { |
308 | 308 | var form_data = new FormData(); |
309 | 309 | form_data.append("upload", e.target.files[0]); |
310 | - | |
310 | + | |
311 | 311 | this.teacherDetail = form_data; |
312 | 312 | |
313 | 313 | const input = document.getElementById("fileInput"); |
... | ... | @@ -341,13 +341,13 @@ export default { |
341 | 341 | parentFile(e) { |
342 | 342 | const input = document.getElementById("parentInput"); |
343 | 343 | this.parentFileName = input.files[0].name; |
344 | - console.log("this.parentFileName", this.parentFileName); | |
344 | + // console.log("this.parentFileName", this.parentFileName); | |
345 | 345 | var files = e.target.files, |
346 | 346 | f = files[0]; |
347 | 347 | var reader = new FileReader(); |
348 | 348 | let array = []; |
349 | 349 | let _this = this; |
350 | - reader.onload = function(e) { | |
350 | + reader.onload = function (e) { | |
351 | 351 | var data = new Uint8Array(e.target.result); |
352 | 352 | var workbook = XLSX.read(data, { type: "array" }); |
353 | 353 | let sheetName = workbook.SheetNames[0]; |
... | ... | @@ -361,13 +361,12 @@ export default { |
361 | 361 | userFile(e) { |
362 | 362 | var form_data = new FormData(); |
363 | 363 | form_data.append("upload", e.target.files[0]); |
364 | - | |
364 | + | |
365 | 365 | this.userDetail = form_data; |
366 | 366 | |
367 | 367 | const input = document.getElementById("userInput"); |
368 | 368 | this.userFileName = input.files[0].name; |
369 | 369 | |
370 | - | |
371 | 370 | // var files = e.target.files, |
372 | 371 | // f = files[0]; |
373 | 372 | // var reader = new FileReader(); |
... | ... | @@ -387,25 +386,23 @@ export default { |
387 | 386 | bookFile(e) { |
388 | 387 | const input = document.getElementById("bookInput"); |
389 | 388 | this.bookFileName = input.files[0].name; |
390 | - console.log("this.bookFileName", this.bookFileName); | |
389 | + // console.log("this.bookFileName", this.bookFileName); | |
391 | 390 | var files = e.target.files, |
392 | 391 | f = files[0]; |
393 | - console.log("this.bookFileName", files); | |
392 | + // console.log("this.bookFileName", files); | |
394 | 393 | var reader = new FileReader(); |
395 | - console.log("reader================", reader); | |
396 | 394 | let array = []; |
397 | 395 | let _this = this; |
398 | - reader.onload = function(e) { | |
399 | - console.log("data", e.target.result); | |
396 | + reader.onload = function (e) { | |
400 | 397 | var data = new Uint8Array(e.target.result); |
401 | - console.log("data", data); | |
398 | + // console.log("data", data); | |
402 | 399 | var workbook = XLSX.read(data, { type: "array" }); |
403 | 400 | let sheetName = workbook.SheetNames[0]; |
404 | 401 | // /* DO SOMETHING WITH workbook HERE */ |
405 | 402 | let worksheet = workbook.Sheets[sheetName]; |
406 | 403 | array = XLSX.utils.sheet_to_json(worksheet); |
407 | 404 | _this.bookFileJson = array; |
408 | - console.log("this.bookFileJson ", _this.bookFileJson); | |
405 | + // console.log("this.bookFileJson ", _this.bookFileJson); | |
409 | 406 | }; |
410 | 407 | reader.readAsArrayBuffer(f); |
411 | 408 | }, |
... | ... | @@ -433,7 +430,7 @@ export default { |
433 | 430 | studentFile(e) { |
434 | 431 | var form_data = new FormData(); |
435 | 432 | form_data.append("upload", e.target.files[0]); |
436 | - | |
433 | + | |
437 | 434 | this.fileData = form_data; |
438 | 435 | |
439 | 436 | const input = document.getElementById("studentInput"); |
... | ... | @@ -455,7 +452,7 @@ export default { |
455 | 452 | // }; |
456 | 453 | // reader.readAsArrayBuffer(f); |
457 | 454 | }, |
458 | - | |
455 | + | |
459 | 456 | // csvJSON(csv) { |
460 | 457 | // var lines = csv.split("\n"); |
461 | 458 | |
... | ... | @@ -478,15 +475,15 @@ export default { |
478 | 475 | teacherfile.teacherData = this.teacherFileJson; |
479 | 476 | http() |
480 | 477 | .post("/importTeacherData", this.teacherDetail, { |
481 | - headers: { Authorization: "Bearer " + this.token } | |
478 | + headers: { Authorization: "Bearer " + this.token }, | |
482 | 479 | }) |
483 | - .then(response => { | |
480 | + .then((response) => { | |
484 | 481 | this.snackbar = true; |
485 | 482 | this.text = response.data.message; |
486 | 483 | this.color = "green"; |
487 | 484 | this.loading = false; |
488 | 485 | }) |
489 | - .catch(error => { | |
486 | + .catch((error) => { | |
490 | 487 | this.snackbar = true; |
491 | 488 | this.text = error.response.data.message; |
492 | 489 | this.color = "red"; |
... | ... | @@ -499,15 +496,15 @@ export default { |
499 | 496 | parentfile.parentData = this.parentFileJson; |
500 | 497 | http() |
501 | 498 | .post("/importParentData", parentfile, { |
502 | - headers: { Authorization: "Bearer " + this.token } | |
499 | + headers: { Authorization: "Bearer " + this.token }, | |
503 | 500 | }) |
504 | - .then(response => { | |
501 | + .then((response) => { | |
505 | 502 | this.snackbar = true; |
506 | 503 | this.text = response.data.message; |
507 | 504 | this.color = "green"; |
508 | 505 | this.parentLoading = false; |
509 | 506 | }) |
510 | - .catch(error => { | |
507 | + .catch((error) => { | |
511 | 508 | this.snackbar = true; |
512 | 509 | this.text = error.response.data.message; |
513 | 510 | this.parentLoading = false; |
... | ... | @@ -520,15 +517,15 @@ export default { |
520 | 517 | userfile.userData = this.userFileJson; |
521 | 518 | http() |
522 | 519 | .post("/importUserData", this.userDetail, { |
523 | - headers: { Authorization: "Bearer " + this.token } | |
520 | + headers: { Authorization: "Bearer " + this.token }, | |
524 | 521 | }) |
525 | - .then(response => { | |
522 | + .then((response) => { | |
526 | 523 | this.snackbar = true; |
527 | 524 | this.text = response.data.message; |
528 | 525 | this.color = "green"; |
529 | 526 | this.userLoading = false; |
530 | 527 | }) |
531 | - .catch(error => { | |
528 | + .catch((error) => { | |
532 | 529 | this.snackbar = true; |
533 | 530 | this.text = error.response.data.message; |
534 | 531 | this.userLoading = false; |
... | ... | @@ -541,15 +538,15 @@ export default { |
541 | 538 | bookfile.bookData = this.bookFileJson; |
542 | 539 | http() |
543 | 540 | .post("/importBookData", bookfile, { |
544 | - headers: { Authorization: "Bearer " + this.token } | |
541 | + headers: { Authorization: "Bearer " + this.token }, | |
545 | 542 | }) |
546 | - .then(response => { | |
543 | + .then((response) => { | |
547 | 544 | this.snackbar = true; |
548 | 545 | this.text = response.data.message; |
549 | 546 | this.color = "green"; |
550 | 547 | this.BookLoading = false; |
551 | 548 | }) |
552 | - .catch(error => { | |
549 | + .catch((error) => { | |
553 | 550 | this.snackbar = true; |
554 | 551 | this.text = error.response.data.message; |
555 | 552 | this.color = "red"; |
... | ... | @@ -559,25 +556,25 @@ export default { |
559 | 556 | importStudent() { |
560 | 557 | this.studentLoading = true; |
561 | 558 | var studentfile = {}; |
562 | - console.log("this.studentFileJson", this.studentFileJson); | |
559 | + // console.log("this.studentFileJson", this.studentFileJson); | |
563 | 560 | studentfile.studentData = this.studentFileJson; |
564 | 561 | http() |
565 | 562 | .post("/importStudentData", this.fileData, { |
566 | - headers: { Authorization: "Bearer " + this.token } | |
563 | + headers: { Authorization: "Bearer " + this.token }, | |
567 | 564 | }) |
568 | - .then(response => { | |
565 | + .then((response) => { | |
569 | 566 | this.snackbar = true; |
570 | 567 | this.text = response.data.message; |
571 | 568 | this.color = "green"; |
572 | 569 | this.studentLoading = false; |
573 | 570 | }) |
574 | - .catch(error => { | |
571 | + .catch((error) => { | |
575 | 572 | this.snackbar = true; |
576 | 573 | this.text = error.response.data.message; |
577 | 574 | this.color = "red"; |
578 | 575 | this.studentLoading = false; |
579 | 576 | }); |
580 | - } | |
577 | + }, | |
581 | 578 | }, |
582 | 579 | mounted() { |
583 | 580 | this.token = this.$store.state.token; |
... | ... | @@ -601,7 +598,7 @@ export default { |
601 | 598 | /** BOOKS SAMPLE CSV */ |
602 | 599 | const getBookData = bookData(); |
603 | 600 | this.bookData = getBookData; |
604 | - } | |
601 | + }, | |
605 | 602 | }; |
606 | 603 | </script> |
607 | 604 | <style> | ... | ... |
src/pages/Administrator/role.vue
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | @click="addRoleDialog = true" |
54 | 54 | > |
55 | 55 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Role |
56 | - </v-btn> --> | |
56 | + </v-btn>--> | |
57 | 57 | <v-spacer></v-spacer> |
58 | 58 | <v-card-title class="body-1" v-show="show"> |
59 | 59 | <v-btn icon large flat @click="displaySearch"> |
... | ... | @@ -64,7 +64,13 @@ |
64 | 64 | </v-card-title> |
65 | 65 | <v-flex xs8 sm8 md3 lg2 v-if="showSearch"> |
66 | 66 | <v-layout> |
67 | - <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | |
67 | + <v-text-field | |
68 | + autofocus | |
69 | + v-model="search" | |
70 | + label="Search" | |
71 | + prepend-inner-icon="search" | |
72 | + color="primary" | |
73 | + ></v-text-field> | |
68 | 74 | <v-icon @click="closeSearch" color="error">close</v-icon> |
69 | 75 | </v-layout> |
70 | 76 | </v-flex> |
... | ... | @@ -101,7 +107,7 @@ |
101 | 107 | <span>Delete</span> |
102 | 108 | </v-tooltip> |
103 | 109 | </span> |
104 | - </td> --> | |
110 | + </td>--> | |
105 | 111 | </tr> |
106 | 112 | </template> |
107 | 113 | <v-alert |
... | ... | @@ -178,15 +184,15 @@ export default { |
178 | 184 | valid: true, |
179 | 185 | addRoleDialog: false, |
180 | 186 | pagination: { |
181 | - rowsPerPage: 10 | |
187 | + rowsPerPage: 10, | |
182 | 188 | }, |
183 | - roleRules: [v => !!v || "Role is required"], | |
189 | + roleRules: [(v) => !!v || "Role is required"], | |
184 | 190 | headers: [ |
185 | 191 | { |
186 | 192 | text: "No", |
187 | 193 | align: "", |
188 | 194 | sortable: false, |
189 | - value: "No" | |
195 | + value: "No", | |
190 | 196 | }, |
191 | 197 | { text: "Role", value: "role", sortable: false, align: "center" }, |
192 | 198 | // { text: "Action", value: "", sortable: false, align: "center" } |
... | ... | @@ -195,20 +201,20 @@ export default { |
195 | 201 | editedIndex: -1, |
196 | 202 | token: "", |
197 | 203 | addrole: {}, |
198 | - editedItem: {} | |
204 | + editedItem: {}, | |
199 | 205 | }), |
200 | 206 | methods: { |
201 | 207 | getRole() { |
202 | 208 | this.showLoader = true; |
203 | 209 | http() |
204 | 210 | .get("/getRolesList", { |
205 | - headers: { Authorization: "Bearer " + this.token } | |
211 | + headers: { Authorization: "Bearer " + this.token }, | |
206 | 212 | }) |
207 | - .then(response => { | |
213 | + .then((response) => { | |
208 | 214 | this.getRoles = response.data.data; |
209 | 215 | this.showLoader = false; |
210 | 216 | }) |
211 | - .catch(error => { | |
217 | + .catch((error) => { | |
212 | 218 | this.showLoader = false; |
213 | 219 | if (error.response.status === 401) { |
214 | 220 | this.$router.replace({ path: "/" }); |
... | ... | @@ -225,26 +231,29 @@ export default { |
225 | 231 | }, |
226 | 232 | deleteItem(item) { |
227 | 233 | let deleteRoleId = { |
228 | - roleId: item._id | |
234 | + roleId: item._id, | |
229 | 235 | }; |
230 | 236 | http() |
231 | 237 | .delete( |
232 | 238 | "/deleteRole", |
233 | 239 | confirm("Are you sure you want to delete this?") && { |
234 | - params: deleteRoleId | |
240 | + params: deleteRoleId, | |
235 | 241 | }, |
236 | 242 | { |
237 | 243 | headers: { |
238 | - Authorization: "Bearer " + this.token | |
239 | - } | |
244 | + Authorization: "Bearer " + this.token, | |
245 | + }, | |
240 | 246 | } |
241 | 247 | ) |
242 | - .then(response => { | |
248 | + .then((response) => { | |
243 | 249 | this.text = response.data.message; |
244 | 250 | this.getRole(); |
245 | 251 | }) |
246 | - .catch(error => { | |
247 | - console.log(error); | |
252 | + .catch((error) => { | |
253 | + // console.log(error); | |
254 | + this.snackbar = true; | |
255 | + this.color = "error"; | |
256 | + this.text = error.response.data.message; | |
248 | 257 | }); |
249 | 258 | }, |
250 | 259 | close() { |
... | ... | @@ -255,7 +264,7 @@ export default { |
255 | 264 | this.loading = true; |
256 | 265 | http() |
257 | 266 | .post("/createRole", this.addrole) |
258 | - .then(response => { | |
267 | + .then((response) => { | |
259 | 268 | this.snackbar = true; |
260 | 269 | this.addRoleDialog = false; |
261 | 270 | this.text = response.data.message; |
... | ... | @@ -263,7 +272,7 @@ export default { |
263 | 272 | this.clear(); |
264 | 273 | this.loading = false; |
265 | 274 | }) |
266 | - .catch(error => { | |
275 | + .catch((error) => { | |
267 | 276 | this.snackbar = true; |
268 | 277 | this.text = error.response.data.message; |
269 | 278 | this.loading = false; |
... | ... | @@ -278,16 +287,19 @@ export default { |
278 | 287 | http() |
279 | 288 | .put("/updateRole", this.editedItem, { |
280 | 289 | headers: { |
281 | - Authorization: "Bearer " + this.token | |
282 | - } | |
290 | + Authorization: "Bearer " + this.token, | |
291 | + }, | |
283 | 292 | }) |
284 | - .then(response => { | |
293 | + .then((response) => { | |
285 | 294 | this.text = "Successfully Edit Notification"; |
286 | 295 | this.getRole(); |
287 | 296 | this.close(); |
288 | 297 | }) |
289 | - .catch(error => { | |
290 | - console.log(error); | |
298 | + .catch((error) => { | |
299 | + // console.log(error); | |
300 | + this.snackbar = true; | |
301 | + this.color = "error"; | |
302 | + this.text = error.response.data.message; | |
291 | 303 | }); |
292 | 304 | }, |
293 | 305 | displaySearch() { |
... | ... | @@ -297,11 +309,11 @@ export default { |
297 | 309 | this.showSearch = false; |
298 | 310 | this.show = true; |
299 | 311 | this.search = ""; |
300 | - } | |
312 | + }, | |
301 | 313 | }, |
302 | 314 | mounted() { |
303 | 315 | this.token = this.$store.state.token; |
304 | 316 | this.getRole(); |
305 | - } | |
317 | + }, | |
306 | 318 | }; |
307 | 319 | </script> |
308 | 320 | \ No newline at end of file | ... | ... |
src/pages/Administrator/systemAdmin.vue
... | ... | @@ -353,7 +353,7 @@ |
353 | 353 | <v-toolbar color="grey lighten-2" flat> |
354 | 354 | <v-spacer></v-spacer> |
355 | 355 | <v-toolbar-title> |
356 | - <h3> System Admin</h3> | |
356 | + <h3>System Admin</h3> | |
357 | 357 | </v-toolbar-title> |
358 | 358 | <v-spacer></v-spacer> |
359 | 359 | <v-icon @click="close1">close</v-icon> |
... | ... | @@ -594,9 +594,7 @@ |
594 | 594 | <v-layout> |
595 | 595 | <v-flex xs4 class="pt-4 subheading"> |
596 | 596 | <label class="right hidden-sm-only hidden-xs-only">Name:</label> |
597 | - <label | |
598 | - class="right hidden-lg-only hidden-xl-only hidden-md-only" | |
599 | - >Name</label> | |
597 | + <label class="right hidden-lg-only hidden-xl-only hidden-md-only">Name</label> | |
600 | 598 | </v-flex> |
601 | 599 | <v-flex xs8 class="ml-3"> |
602 | 600 | <v-text-field |
... | ... | @@ -704,7 +702,9 @@ |
704 | 702 | <v-layout> |
705 | 703 | <v-flex xs4 class="pt-4 subheading"> |
706 | 704 | <label class="right hidden-xs-only hidden-sm-only">Religion:</label> |
707 | - <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Religion:</label> | |
705 | + <label | |
706 | + class="right hidden-lg-only hidden-md-only hidden-xl-only" | |
707 | + >Religion:</label> | |
708 | 708 | </v-flex> |
709 | 709 | <v-flex xs8 class="ml-3"> |
710 | 710 | <v-text-field |
... | ... | @@ -863,7 +863,7 @@ |
863 | 863 | ></v-textarea> |
864 | 864 | </v-flex> |
865 | 865 | </v-layout> |
866 | - </v-flex> --> | |
866 | + </v-flex>--> | |
867 | 867 | </v-layout> |
868 | 868 | <v-layout class="mx-2"> |
869 | 869 | <v-flex xs12 sm12 offset-sm1> |
... | ... | @@ -917,28 +917,28 @@ export default { |
917 | 917 | isActive: true, |
918 | 918 | newActive: false, |
919 | 919 | pagination: { |
920 | - rowsPerPage: 15 | |
920 | + rowsPerPage: 15, | |
921 | 921 | }, |
922 | 922 | imageData: {}, |
923 | 923 | imageName: "", |
924 | 924 | imageUrl: "", |
925 | 925 | imageFile: "", |
926 | - nameRules: [v => !!v || " Full Name is required"], | |
927 | - dateRules: [v => !!v || " DOB is required"], | |
928 | - cityRules: [v => !!v || " City Name is required"], | |
929 | - password: [v => !!v || " Password is required"], | |
930 | - religion: [v => !!v || "Religion Name is required"], | |
931 | - permanentAddress: [v => !!v || " Permanent Address is required"], | |
932 | - address: [v => !!v || "Address is required"], | |
933 | - mobileNoRules: [v => !!v || "Mobile Number is required"], | |
934 | - userNameRules: [v => !!v || "Username Name is required"], | |
935 | - joinDateRules: [v => !!v || " Join Date is required"], | |
926 | + nameRules: [(v) => !!v || " Full Name is required"], | |
927 | + dateRules: [(v) => !!v || " DOB is required"], | |
928 | + cityRules: [(v) => !!v || " City Name is required"], | |
929 | + password: [(v) => !!v || " Password is required"], | |
930 | + religion: [(v) => !!v || "Religion Name is required"], | |
931 | + permanentAddress: [(v) => !!v || " Permanent Address is required"], | |
932 | + address: [(v) => !!v || "Address is required"], | |
933 | + mobileNoRules: [(v) => !!v || "Mobile Number is required"], | |
934 | + userNameRules: [(v) => !!v || "Username Name is required"], | |
935 | + joinDateRules: [(v) => !!v || " Join Date is required"], | |
936 | 936 | errorMessages: "", |
937 | 937 | emailRules: [ |
938 | - v => !!v || "E-mail is required", | |
939 | - v => | |
938 | + (v) => !!v || "E-mail is required", | |
939 | + (v) => | |
940 | 940 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || |
941 | - "E-mail must be valid" | |
941 | + "E-mail must be valid", | |
942 | 942 | ], |
943 | 943 | countries: [], |
944 | 944 | headers: [ |
... | ... | @@ -946,13 +946,13 @@ export default { |
946 | 946 | text: "No", |
947 | 947 | align: "center", |
948 | 948 | sortable: false, |
949 | - value: "No" | |
949 | + value: "No", | |
950 | 950 | }, |
951 | 951 | { |
952 | 952 | text: "Profile Pic", |
953 | 953 | value: "profilePicUrl", |
954 | 954 | sortable: false, |
955 | - align: "center" | |
955 | + align: "center", | |
956 | 956 | }, |
957 | 957 | { text: "Name", value: "name", sortable: false, align: "center" }, |
958 | 958 | { text: "Email", value: "email", sortable: false, align: "center" }, |
... | ... | @@ -961,11 +961,11 @@ export default { |
961 | 961 | text: "Status", |
962 | 962 | value: "status", |
963 | 963 | sortable: false, |
964 | - align: "center" | |
964 | + align: "center", | |
965 | 965 | }, |
966 | - { text: "Action", value: "", sortable: false, align: "center" } | |
966 | + { text: "Action", value: "", sortable: false, align: "center" }, | |
967 | 967 | ], |
968 | - gender:['Male','Female'], | |
968 | + gender: ["Male", "Female"], | |
969 | 969 | desserts: [], |
970 | 970 | editedIndex: -1, |
971 | 971 | upload: "", |
... | ... | @@ -978,7 +978,7 @@ export default { |
978 | 978 | }, |
979 | 979 | menu1(val) { |
980 | 980 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); |
981 | - } | |
981 | + }, | |
982 | 982 | }, |
983 | 983 | methods: { |
984 | 984 | save(date) { |
... | ... | @@ -1010,7 +1010,7 @@ export default { |
1010 | 1010 | this.imageUrl = ""; |
1011 | 1011 | } |
1012 | 1012 | }, |
1013 | - dates: function(date) { | |
1013 | + dates: function (date) { | |
1014 | 1014 | return moment(date).format("MMMM DD, YYYY"); |
1015 | 1015 | }, |
1016 | 1016 | getSystemAdminList() { |
... | ... | @@ -1018,13 +1018,13 @@ export default { |
1018 | 1018 | var token = this.$store.state.token; |
1019 | 1019 | http() |
1020 | 1020 | .get("/getTeachersList", { |
1021 | - headers: { Authorization: "Bearer " + token } | |
1021 | + headers: { Authorization: "Bearer " + token }, | |
1022 | 1022 | }) |
1023 | - .then(response => { | |
1023 | + .then((response) => { | |
1024 | 1024 | this.desserts = response.data.data; |
1025 | 1025 | this.showLoader = false; |
1026 | 1026 | }) |
1027 | - .catch(error => { | |
1027 | + .catch((error) => { | |
1028 | 1028 | this.showLoader = false; |
1029 | 1029 | if (error.response.status === 401) { |
1030 | 1030 | this.$router.replace({ path: "/" }); |
... | ... | @@ -1057,23 +1057,26 @@ export default { |
1057 | 1057 | }, |
1058 | 1058 | deleteItem(item) { |
1059 | 1059 | let deleteTeachers = { |
1060 | - teacherId: item._id | |
1060 | + teacherId: item._id, | |
1061 | 1061 | }; |
1062 | 1062 | http() |
1063 | 1063 | .delete( |
1064 | 1064 | "/deleteTeacher", |
1065 | 1065 | confirm("Are you sure you want to delete this?") && { |
1066 | - params: deleteTeachers | |
1066 | + params: deleteTeachers, | |
1067 | 1067 | } |
1068 | 1068 | ) |
1069 | - .then(response => { | |
1069 | + .then((response) => { | |
1070 | 1070 | if ((this.snackbar = true)) { |
1071 | 1071 | this.text = "Successfully delete Existing Teacher"; |
1072 | 1072 | } |
1073 | 1073 | this.getSystemAdminList(); |
1074 | 1074 | }) |
1075 | - .catch(error => { | |
1076 | - console.log(error); | |
1075 | + .catch((error) => { | |
1076 | + // console.log(error); | |
1077 | + this.snackbar = true; | |
1078 | + this.color = "error"; | |
1079 | + this.text = error.response.data.message; | |
1077 | 1080 | }); |
1078 | 1081 | }, |
1079 | 1082 | activeTab(type) { |
... | ... | @@ -1102,18 +1105,18 @@ export default { |
1102 | 1105 | submit() { |
1103 | 1106 | if (this.$refs.form.validate()) { |
1104 | 1107 | let addTeacher = { |
1105 | - // name: this.addTeachers.name, | |
1106 | - // email: this.addTeachers.email, | |
1107 | - // role: this.addTeachers.role, | |
1108 | - // dob: this.addTeachers.date, | |
1109 | - // city: this.addTeachers.city, | |
1110 | - // pincode: this.addTeachers.pincode, | |
1111 | - // country: this.addTeachers.country, | |
1112 | - // permanentAddress: this.addTeachers.permanentAddress, | |
1113 | - // presentAddress: this.addTeachers.presentAddress, | |
1114 | - // mobileNo: this.addTeachers.mobileNo, | |
1115 | - // state: this.addTeachers.state, | |
1116 | - // joinDate: this.addTeachers.joinDate | |
1108 | + // name: this.addTeachers.name, | |
1109 | + // email: this.addTeachers.email, | |
1110 | + // role: this.addTeachers.role, | |
1111 | + // dob: this.addTeachers.date, | |
1112 | + // city: this.addTeachers.city, | |
1113 | + // pincode: this.addTeachers.pincode, | |
1114 | + // country: this.addTeachers.country, | |
1115 | + // permanentAddress: this.addTeachers.permanentAddress, | |
1116 | + // presentAddress: this.addTeachers.presentAddress, | |
1117 | + // mobileNo: this.addTeachers.mobileNo, | |
1118 | + // state: this.addTeachers.state, | |
1119 | + // joinDate: this.addTeachers.joinDate | |
1117 | 1120 | }; |
1118 | 1121 | if (this.imageUrl) { |
1119 | 1122 | var str = this.imageUrl; |
... | ... | @@ -1123,7 +1126,7 @@ export default { |
1123 | 1126 | this.loading = true; |
1124 | 1127 | http() |
1125 | 1128 | .post("/createTeacher", addTeacher) |
1126 | - .then(response => { | |
1129 | + .then((response) => { | |
1127 | 1130 | this.imageUrl = ""; |
1128 | 1131 | this.getTeacherList(); |
1129 | 1132 | this.snackbar = true; |
... | ... | @@ -1131,8 +1134,11 @@ export default { |
1131 | 1134 | this.clear(); |
1132 | 1135 | this.loading = false; |
1133 | 1136 | }) |
1134 | - .catch(error => { | |
1137 | + .catch((error) => { | |
1135 | 1138 | // console.log(error); |
1139 | + this.snackbar = true; | |
1140 | + this.color = "error"; | |
1141 | + this.text = error.response.data.message; | |
1136 | 1142 | if ((this.snackbar = true)) { |
1137 | 1143 | this.text = error.response.data.message; |
1138 | 1144 | } |
... | ... | @@ -1154,32 +1160,35 @@ export default { |
1154 | 1160 | } |
1155 | 1161 | http() |
1156 | 1162 | .put("/updateTeacher", editTeacher) |
1157 | - .then(response => { | |
1158 | - console.log("editTeacher", editTeacher); | |
1163 | + .then((response) => { | |
1164 | + // console.log("editTeacher", editTeacher); | |
1159 | 1165 | this.snackbar = true; |
1160 | 1166 | this.text = "Successfully Edit Existing Teacher"; |
1161 | 1167 | this.loading = false; |
1162 | 1168 | this.getTeacherList(); |
1163 | 1169 | this.close(); |
1164 | 1170 | }) |
1165 | - .catch(error => { | |
1166 | - console.log(error); | |
1171 | + .catch((error) => { | |
1172 | + // console.log(error); | |
1167 | 1173 | this.loading = false; |
1174 | + this.snackbar = true; | |
1175 | + this.color = "error"; | |
1176 | + this.text = error.response.data.message; | |
1168 | 1177 | }); |
1169 | - } | |
1178 | + }, | |
1170 | 1179 | }, |
1171 | 1180 | mounted() { |
1172 | 1181 | // this.getSystemAdminList(); |
1173 | 1182 | }, |
1174 | 1183 | created() { |
1175 | - this.$root.$on("app:search", search => { | |
1184 | + this.$root.$on("app:search", (search) => { | |
1176 | 1185 | this.search = search; |
1177 | 1186 | }); |
1178 | 1187 | }, |
1179 | 1188 | beforeDestroy() { |
1180 | 1189 | // dont forget to remove the listener |
1181 | 1190 | this.$root.$off("app:search"); |
1182 | - } | |
1191 | + }, | |
1183 | 1192 | }; |
1184 | 1193 | </script> |
1185 | 1194 | <style scoped> | ... | ... |
src/pages/Annoucement/annoucement.vue
... | ... | @@ -567,8 +567,11 @@ export default { |
567 | 567 | this.showLoader = false; |
568 | 568 | }) |
569 | 569 | .catch((err) => { |
570 | - console.log("err====>", err); | |
570 | + // console.log("err====>", err); | |
571 | 571 | this.showLoader = false; |
572 | + this.snackbar = true; | |
573 | + this.color = "error"; | |
574 | + this.text = error.response.data.message; | |
572 | 575 | }); |
573 | 576 | }, |
574 | 577 | getAnnoucementes() { |
... | ... | @@ -585,8 +588,11 @@ export default { |
585 | 588 | this.showLoader = false; |
586 | 589 | }) |
587 | 590 | .catch((err) => { |
588 | - console.log("err====>", err); | |
591 | + // console.log("err====>", err); | |
589 | 592 | this.showLoader = false; |
593 | + this.snackbar = true; | |
594 | + this.color = "error"; | |
595 | + this.text = error.response.data.message; | |
590 | 596 | }); |
591 | 597 | }, |
592 | 598 | // getSections(_id) { |
... | ... | @@ -641,7 +647,7 @@ export default { |
641 | 647 | } |
642 | 648 | }, |
643 | 649 | onEditFilePicked(e) { |
644 | - console.log(e); | |
650 | + // console.log(e); | |
645 | 651 | const files = e.target.files; |
646 | 652 | if (files[0] !== undefined) { |
647 | 653 | this.editImageName = files[0].name; | ... | ... |
src/pages/Annoucement/annoucementForum.vue
... | ... | @@ -172,10 +172,10 @@ export default { |
172 | 172 | showReplyBox: false, |
173 | 173 | replyDescription: "", |
174 | 174 | loginId: "", |
175 | - editedIndex: -1 | |
175 | + editedIndex: -1, | |
176 | 176 | }), |
177 | 177 | methods: { |
178 | - dates: function(date) { | |
178 | + dates: function (date) { | |
179 | 179 | return moment(date).format("MMMM DD, YYYY hh:mm A"); |
180 | 180 | }, |
181 | 181 | getDiscussionesThread() { |
... | ... | @@ -184,10 +184,10 @@ export default { |
184 | 184 | http() |
185 | 185 | .get("/getParticularAnnoucement", { |
186 | 186 | params: { |
187 | - annoucementId: this.$route.params.annoucementId | |
188 | - } | |
187 | + annoucementId: this.$route.params.annoucementId, | |
188 | + }, | |
189 | 189 | }) |
190 | - .then(response => { | |
190 | + .then((response) => { | |
191 | 191 | // console.log("response", response.data.data); |
192 | 192 | this.annoucementData = response.data.data; |
193 | 193 | // console.log("response", this.annoucementData); |
... | ... | @@ -210,9 +210,12 @@ export default { |
210 | 210 | this.showLoader = false; |
211 | 211 | this.showReplyBox = false; |
212 | 212 | }) |
213 | - .catch(error => { | |
214 | - console.log("err====>", error); | |
213 | + .catch((error) => { | |
214 | + // console.log("err====>", error); | |
215 | 215 | this.showLoader = false; |
216 | + this.snackbar = true; | |
217 | + this.color = "error"; | |
218 | + this.text = error.response.data.message; | |
216 | 219 | }); |
217 | 220 | }, |
218 | 221 | replyThreadDiscussion() { |
... | ... | @@ -220,16 +223,16 @@ export default { |
220 | 223 | var payloadData = { |
221 | 224 | annoucementId: this.$route.params.annoucementId, |
222 | 225 | teacherId: this.loginId, |
223 | - description: this.replyDescription | |
226 | + description: this.replyDescription, | |
224 | 227 | }; |
225 | 228 | http() |
226 | 229 | .put("/replyThread", payloadData) |
227 | - .then(response => { | |
230 | + .then((response) => { | |
228 | 231 | // console.log("response", response.data.data); |
229 | 232 | this.showLoader = false; |
230 | 233 | this.getDiscussionesThread(); |
231 | 234 | }) |
232 | - .catch(error => { | |
235 | + .catch((error) => { | |
233 | 236 | this.showLoader = false; |
234 | 237 | }); |
235 | 238 | }, |
... | ... | @@ -264,15 +267,15 @@ export default { |
264 | 267 | discussionThreadId: replyThread._id, |
265 | 268 | annoucementId: this.$route.params.annoucementId, |
266 | 269 | teacherId: this.loginId, |
267 | - description: replyThread.description | |
270 | + description: replyThread.description, | |
268 | 271 | }; |
269 | 272 | http() |
270 | 273 | .put("/updateThread", payloadData) |
271 | - .then(response => { | |
274 | + .then((response) => { | |
272 | 275 | this.showLoader = false; |
273 | 276 | this.getDiscussionesThread(); |
274 | 277 | }) |
275 | - .catch(error => { | |
278 | + .catch((error) => { | |
276 | 279 | this.showLoader = false; |
277 | 280 | }); |
278 | 281 | }, |
... | ... | @@ -280,21 +283,21 @@ export default { |
280 | 283 | this.showLoader = true; |
281 | 284 | var payloadData = { |
282 | 285 | discussionThreadId: id, |
283 | - annoucementId: this.$route.params.annoucementId | |
286 | + annoucementId: this.$route.params.annoucementId, | |
284 | 287 | }; |
285 | 288 | http() |
286 | 289 | .put( |
287 | 290 | "/deleteThread", |
288 | 291 | confirm("Are you sure you want to delete this?") && payloadData |
289 | 292 | ) |
290 | - .then(response => { | |
293 | + .then((response) => { | |
291 | 294 | this.showLoader = false; |
292 | 295 | this.getDiscussionesThread(); |
293 | 296 | }) |
294 | - .catch(error => { | |
297 | + .catch((error) => { | |
295 | 298 | this.showLoader = false; |
296 | 299 | }); |
297 | - } | |
300 | + }, | |
298 | 301 | }, |
299 | 302 | mounted() { |
300 | 303 | // this.getStudentList(); |
... | ... | @@ -302,7 +305,7 @@ export default { |
302 | 305 | this.role = this.$store.state.role; |
303 | 306 | this.loginId = this.$store.state.id; |
304 | 307 | this.getDiscussionesThread(); |
305 | - } | |
308 | + }, | |
306 | 309 | }; |
307 | 310 | </script> |
308 | 311 | ... | ... |
src/pages/AssignTeachers.vue
... | ... | @@ -372,8 +372,11 @@ export default { |
372 | 372 | this.getParticularCourse(message); |
373 | 373 | }) |
374 | 374 | .catch((error) => { |
375 | - console.log("err====>", error); | |
375 | + // console.log("err====>", error); | |
376 | 376 | this.showLoader = false; |
377 | + this.snackbar = true; | |
378 | + this.color = "error"; | |
379 | + this.text = error.response.data.message; | |
377 | 380 | }); |
378 | 381 | }, |
379 | 382 | getParticularCourse(message) { |
... | ... | @@ -410,6 +413,8 @@ export default { |
410 | 413 | }, |
411 | 414 | getCourses(classId) { |
412 | 415 | this.showLoader = true; |
416 | + this.teachersList = []; | |
417 | + this.getReport.courseId = ""; | |
413 | 418 | http() |
414 | 419 | .get("/getCourseesList", { |
415 | 420 | params: { |
... | ... | @@ -421,8 +426,11 @@ export default { |
421 | 426 | this.showLoader = false; |
422 | 427 | }) |
423 | 428 | .catch((err) => { |
424 | - console.log("err====>", err); | |
429 | + // console.log("err====>", err); | |
425 | 430 | this.showLoader = false; |
431 | + this.snackbar = true; | |
432 | + this.color = "error"; | |
433 | + this.text = error.response.data.message; | |
426 | 434 | }); |
427 | 435 | }, |
428 | 436 | // getSections(_id) { | ... | ... |
src/pages/Attendence/studentAttendence.vue
... | ... | @@ -122,7 +122,12 @@ |
122 | 122 | >Your search for "{{ search }}" found no results.</v-alert> |
123 | 123 | </v-data-table> |
124 | 124 | <!-- ****** Add Students Attendece****** --> |
125 | - <v-dialog v-model="addStudentAttendenceDialog" width="1600" v-if="addStudentAttendenceDialog" persistent> | |
125 | + <v-dialog | |
126 | + v-model="addStudentAttendenceDialog" | |
127 | + width="1600" | |
128 | + v-if="addStudentAttendenceDialog" | |
129 | + persistent | |
130 | + > | |
126 | 131 | <v-card flat class="pa-2"> |
127 | 132 | <v-layout> |
128 | 133 | <v-flex xs12> |
... | ... | @@ -382,6 +387,9 @@ export default { |
382 | 387 | .catch((error) => { |
383 | 388 | // console.log("err====>", err); |
384 | 389 | // this.$router.replace({ path: "/" }); |
390 | + this.snackbar = true; | |
391 | + this.color = "error"; | |
392 | + this.text = error.response.data.message; | |
385 | 393 | }); |
386 | 394 | }, |
387 | 395 | getSection(_id) { |
... | ... | @@ -400,6 +408,9 @@ export default { |
400 | 408 | }) |
401 | 409 | .catch((err) => { |
402 | 410 | this.showLoader = false; |
411 | + this.snackbar = true; | |
412 | + this.color = "error"; | |
413 | + this.text = error.response.data.message; | |
403 | 414 | // console.log("err====>", err); |
404 | 415 | }); |
405 | 416 | }, |
... | ... | @@ -422,8 +433,11 @@ export default { |
422 | 433 | } |
423 | 434 | }) |
424 | 435 | .catch((error) => { |
425 | - console.log("err====>", error); | |
436 | + // console.log("err====>", error); | |
426 | 437 | this.showLoader = false; |
438 | + this.snackbar = true; | |
439 | + this.color = "error"; | |
440 | + this.text = error.response.data.message; | |
427 | 441 | }); |
428 | 442 | }, |
429 | 443 | getStudentsDetail(_id) { |
... | ... | @@ -445,8 +459,11 @@ export default { |
445 | 459 | } |
446 | 460 | }) |
447 | 461 | .catch((error) => { |
448 | - console.log("err====>", error); | |
462 | + // console.log("err====>", error); | |
449 | 463 | this.showLoader = false; |
464 | + this.snackbar = true; | |
465 | + this.color = "error"; | |
466 | + this.text = error.response.data.message; | |
450 | 467 | }); |
451 | 468 | }, |
452 | 469 | update() { | ... | ... |
src/pages/Attendence/userAttendence.vue
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <v-card-actions> |
6 | 6 | <!-- <v-layout> |
7 | 7 | <h4 class="right mt-2 ml-2">User Attendence</h4> |
8 | - </v-layout> --> | |
8 | + </v-layout>--> | |
9 | 9 | <v-spacer></v-spacer> |
10 | 10 | </v-card-actions> |
11 | 11 | </v-card> |
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 | class="mr-5" |
48 | 48 | @click="deleteItem(props.item)" |
49 | 49 | src="/static/icon/delete1.png" |
50 | - /> --> | |
50 | + />--> | |
51 | 51 | </span> |
52 | 52 | </td> |
53 | 53 | </template> |
... | ... | @@ -73,20 +73,20 @@ export default { |
73 | 73 | showLoader: false, |
74 | 74 | search: "", |
75 | 75 | pagination: { |
76 | - rowsPerPage: 15 | |
76 | + rowsPerPage: 15, | |
77 | 77 | }, |
78 | 78 | headers: [ |
79 | 79 | { |
80 | 80 | text: "No", |
81 | 81 | align: "center", |
82 | 82 | sortable: false, |
83 | - value: "No" | |
83 | + value: "No", | |
84 | 84 | }, |
85 | 85 | { |
86 | 86 | text: "Profile Pic", |
87 | 87 | value: "profilePicUrl", |
88 | 88 | sortable: false, |
89 | - align: "center" | |
89 | + align: "center", | |
90 | 90 | }, |
91 | 91 | { text: "Name", value: "name", sortable: false, align: "center" }, |
92 | 92 | { text: "Email", value: "email", sortable: false, align: "center" }, |
... | ... | @@ -95,20 +95,20 @@ export default { |
95 | 95 | text: "Joining Date", |
96 | 96 | value: "joiningDate", |
97 | 97 | sortable: false, |
98 | - align: "center" | |
98 | + align: "center", | |
99 | 99 | }, |
100 | 100 | { |
101 | 101 | text: "Phone", |
102 | 102 | value: "phone", |
103 | 103 | sortable: false, |
104 | - align: "center" | |
104 | + align: "center", | |
105 | 105 | }, |
106 | - { text: "Action", value: "", sortable: false, align: "center" } | |
106 | + { text: "Action", value: "", sortable: false, align: "center" }, | |
107 | 107 | ], |
108 | - desserts: [] | |
108 | + desserts: [], | |
109 | 109 | }), |
110 | 110 | methods: { |
111 | - dates: function(date) { | |
111 | + dates: function (date) { | |
112 | 112 | return moment(date).format("MMMM DD, YYYY"); |
113 | 113 | }, |
114 | 114 | getUsersList() { |
... | ... | @@ -116,14 +116,14 @@ export default { |
116 | 116 | var token = this.$store.state.token; |
117 | 117 | http() |
118 | 118 | .get("/getUsersList", { |
119 | - headers: { Authorization: "Bearer " + token } | |
119 | + headers: { Authorization: "Bearer " + token }, | |
120 | 120 | }) |
121 | - .then(response => { | |
121 | + .then((response) => { | |
122 | 122 | this.desserts = response.data.data; |
123 | 123 | this.showLoader = false; |
124 | - console.log("UserList=====>", this.desserts); | |
124 | + // console.log("UserList=====>", this.desserts); | |
125 | 125 | }) |
126 | - .catch(error => { | |
126 | + .catch((error) => { | |
127 | 127 | this.showLoader = false; |
128 | 128 | if (error.response.status === 401) { |
129 | 129 | this.$router.replace({ path: "/" }); |
... | ... | @@ -137,14 +137,14 @@ export default { |
137 | 137 | var token = this.$store.state.token; |
138 | 138 | http() |
139 | 139 | .get("/getRolesList", { |
140 | - headers: { Authorization: "Bearer " + token } | |
140 | + headers: { Authorization: "Bearer " + token }, | |
141 | 141 | }) |
142 | - .then(response => { | |
142 | + .then((response) => { | |
143 | 143 | this.userRole = response.data.data; |
144 | 144 | this.showLoader = false; |
145 | 145 | // console.log("UserList=====>",this.desserts) |
146 | 146 | }) |
147 | - .catch(error => { | |
147 | + .catch((error) => { | |
148 | 148 | this.showLoader = false; |
149 | 149 | if (error.response.status === 401) { |
150 | 150 | this.$router.replace({ path: "/" }); |
... | ... | @@ -152,21 +152,21 @@ export default { |
152 | 152 | this.$store.dispatch("Id", null); |
153 | 153 | } |
154 | 154 | }); |
155 | - } | |
155 | + }, | |
156 | 156 | }, |
157 | 157 | mounted() { |
158 | 158 | this.getUsersList(); |
159 | 159 | this.getRole(); |
160 | 160 | }, |
161 | 161 | created() { |
162 | - this.$root.$on("app:search", search => { | |
162 | + this.$root.$on("app:search", (search) => { | |
163 | 163 | this.search = search; |
164 | 164 | }); |
165 | 165 | }, |
166 | 166 | beforeDestroy() { |
167 | 167 | // dont forget to remove the listener |
168 | 168 | this.$root.$off("app:search"); |
169 | - } | |
169 | + }, | |
170 | 170 | }; |
171 | 171 | </script> |
172 | 172 | <style scoped> | ... | ... |
src/pages/Attendence/viewStudentsAttendence.vue
... | ... | @@ -373,7 +373,10 @@ export default { |
373 | 373 | this.studentData = response.data.data; |
374 | 374 | }) |
375 | 375 | .catch(err => { |
376 | - console.log("err====>", err); | |
376 | + // console.log("err====>", err); | |
377 | + this.snackbar = true; | |
378 | + this.color = "error"; | |
379 | + this.text = error.response.data.message; | |
377 | 380 | // this.$router.replace({ path: '/' }); |
378 | 381 | }); |
379 | 382 | }, |
... | ... | @@ -412,7 +415,7 @@ export default { |
412 | 415 | .then(response => { |
413 | 416 | this.json_data = response.data.data; |
414 | 417 | this.dialogExport = false; |
415 | - console.log("hh",this.json_data) | |
418 | + // console.log("hh",this.json_data) | |
416 | 419 | var jsonObject = JSON.stringify(this.json_data); |
417 | 420 | |
418 | 421 | var csv = this.convertToCSV(jsonObject); |
... | ... | @@ -436,8 +439,11 @@ export default { |
436 | 439 | } |
437 | 440 | }) |
438 | 441 | .catch(err => { |
439 | - console.log("err====>", err); | |
440 | - // this.$router.replace({ path: '/' }); | |
442 | + // console.log("err====>", err); | |
443 | + // this.$router.replace({ path: '/' }); | |
444 | + this.snackbar = true; | |
445 | + this.color = "error"; | |
446 | + this.text = error.response.data.message; | |
441 | 447 | }); |
442 | 448 | }, |
443 | 449 | exportPdf(){ | ... | ... |
src/pages/Attendence/viewTeacherAttendence.vue
... | ... | @@ -423,7 +423,10 @@ convertToCSV(objArray) { |
423 | 423 | |
424 | 424 | }) |
425 | 425 | .catch(err => { |
426 | - console.log("err====>", err); | |
426 | + // console.log("err====>", err); | |
427 | + this.snackbar = true; | |
428 | + this.color = "error"; | |
429 | + this.text = error.response.data.message; | |
427 | 430 | // this.$router.replace({ path: '/' }); |
428 | 431 | }); |
429 | 432 | }, | ... | ... |
src/pages/Authentication/Login.vue
... | ... | @@ -169,7 +169,7 @@ export default { |
169 | 169 | .get("/parentStudentsList") |
170 | 170 | .then((response) => { |
171 | 171 | /* set disabled students values */ |
172 | - console.log("students - ", response.data.data.students); | |
172 | + // console.log("students - ", response.data.data.students); | |
173 | 173 | /* prepare an array of false status students */ |
174 | 174 | var indexStatusFalse = []; |
175 | 175 | for (var i = 0; i < response.data.data.students.length; i++) { |
... | ... | @@ -195,7 +195,7 @@ export default { |
195 | 195 | if (indexStatusFalse[0] > 0) { |
196 | 196 | this.selectedStudent = response.data.data.students[0]._id; |
197 | 197 | } |
198 | - console.log("indexStatusFalse - ", indexStatusFalse); | |
198 | + // console.log("indexStatusFalse - ", indexStatusFalse); | |
199 | 199 | /* if false student is the first one in the list then see if the next is also false */ |
200 | 200 | if (indexStatusFalse[0] == 0) { |
201 | 201 | if (indexStatusFalse.length > 1) { |
... | ... | @@ -214,7 +214,7 @@ export default { |
214 | 214 | counter = 1; |
215 | 215 | } |
216 | 216 | } |
217 | - console.log("counter - ", counter); | |
217 | + // console.log("counter - ", counter); | |
218 | 218 | if (counter == response.data.data.students.length) { |
219 | 219 | this.seeSnackbar( |
220 | 220 | "Your wards have been removed ", |
... | ... | @@ -241,8 +241,11 @@ export default { |
241 | 241 | this.showLoader = false; |
242 | 242 | }) |
243 | 243 | .catch((err) => { |
244 | - console.log("err====>", err); | |
244 | + // console.log("err====>", err); | |
245 | 245 | this.showLoader = false; |
246 | + this.snackbar = true; | |
247 | + this.color = "error"; | |
248 | + this.text = error.response.data.message; | |
246 | 249 | }); |
247 | 250 | } |
248 | 251 | }) | ... | ... |
src/pages/Authentication/changepassword.vue
... | ... | @@ -75,9 +75,9 @@ export default { |
75 | 75 | newPassword: "", |
76 | 76 | confirmPassword: "", |
77 | 77 | rules: { |
78 | - required: value => !!value || "This password field is Required." | |
78 | + required: (value) => !!value || "This password field is Required.", | |
79 | 79 | // min: v => (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 || 'Min 8 characters upper case lower case symbol required' |
80 | - } | |
80 | + }, | |
81 | 81 | }; |
82 | 82 | }, |
83 | 83 | methods: { |
... | ... | @@ -85,23 +85,23 @@ export default { |
85 | 85 | var token = this.$store.state.token; |
86 | 86 | var userdata = { |
87 | 87 | oldPassword: this.adminChangePasswordcredentials.oldPassword, |
88 | - newPassword: this.adminChangePasswordcredentials.newPassword | |
88 | + newPassword: this.adminChangePasswordcredentials.newPassword, | |
89 | 89 | }; |
90 | 90 | http() |
91 | 91 | .put("/schoolChangePassword", userdata, { |
92 | - headers: { Authorization: "Bearer " + token } | |
92 | + headers: { Authorization: "Bearer " + token }, | |
93 | 93 | }) |
94 | - .then(response => { | |
94 | + .then((response) => { | |
95 | 95 | this.loading = true; |
96 | 96 | if ((this.snackbar = true)) { |
97 | 97 | this.text = "Successfully changed password !!"; |
98 | - console.log("snackbar", response.data.message); | |
98 | + // console.log("snackbar", response.data.message); | |
99 | 99 | } |
100 | 100 | setTimeout(() => { |
101 | 101 | this.$router.push("/dashboard"); |
102 | 102 | }, 2000); |
103 | 103 | }) |
104 | - .catch(error => { | |
104 | + .catch((error) => { | |
105 | 105 | // console.log("err====>",err); |
106 | 106 | this.text = "User Not Found or Incorrect currentPassword"; |
107 | 107 | this.snackbar = true; |
... | ... | @@ -113,13 +113,13 @@ export default { |
113 | 113 | this.$store.dispatch("Role", null); |
114 | 114 | } |
115 | 115 | }); |
116 | - } | |
116 | + }, | |
117 | 117 | }, |
118 | 118 | computed: { |
119 | 119 | color() { |
120 | 120 | return this.loading ? "success" : "error"; |
121 | - } | |
122 | - } | |
121 | + }, | |
122 | + }, | |
123 | 123 | }; |
124 | 124 | </script> |
125 | 125 | <style scoped> | ... | ... |
src/pages/Authentication/forgetpassword.vue
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <v-app id="login"> |
3 | 3 | <v-toolbar dense flat class="transparent mb-4"> |
4 | 4 | <v-toolbar-items class="mx-auto"> |
5 | - <img src="/static/icon.png" height="50" width="140" alt="logo" style=" margin-top: 15%"> | |
5 | + <img src="/static/icon.png" height="50" width="140" alt="logo" style=" margin-top: 15%" /> | |
6 | 6 | </v-toolbar-items> |
7 | 7 | </v-toolbar> |
8 | 8 | <v-container fluid> |
... | ... | @@ -29,24 +29,32 @@ |
29 | 29 | </v-toolbar> |
30 | 30 | <v-card class="elevation-1 pa-1"> |
31 | 31 | <v-card-text> |
32 | - <h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID. </h5> | |
33 | - <h5 class="text-xs-center"> We'll send you a reset.</h5> | |
32 | + <h5 | |
33 | + class="text-xs-center" | |
34 | + >Not to Worry! Enter to your registered Email ID.</h5> | |
35 | + <h5 class="text-xs-center">We'll send you a reset.</h5> | |
34 | 36 | <v-flex lg6 sm6 xs10 offset-sm3 offset-xs1 offset-lg3> |
35 | - <v-form ref="form" v-model="valid" lazy-validation> | |
37 | + <v-form ref="form" v-model="valid" lazy-validation> | |
36 | 38 | <div class="custom-input-align"> |
37 | - <v-text-field | |
38 | - class="text-md-center" | |
39 | - :rules="emailRules" | |
40 | - v-model="forgetemail" | |
41 | - label="Enter Your email ID" | |
42 | - required></v-text-field> | |
39 | + <v-text-field | |
40 | + class="text-md-center" | |
41 | + :rules="emailRules" | |
42 | + v-model="forgetemail" | |
43 | + label="Enter Your email ID" | |
44 | + required | |
45 | + ></v-text-field> | |
43 | 46 | </div> |
44 | 47 | </v-form> |
45 | 48 | </v-flex> |
46 | 49 | </v-card-text> |
47 | 50 | <v-card-actions> |
48 | 51 | <v-flex text-xs-center> |
49 | - <v-btn style="background-color: #71d9ea; color: #0c0754;" dark flat @click="reset">Send Request</v-btn> | |
52 | + <v-btn | |
53 | + style="background-color: #71d9ea; color: #0c0754;" | |
54 | + dark | |
55 | + flat | |
56 | + @click="reset" | |
57 | + >Send Request</v-btn> | |
50 | 58 | </v-flex> |
51 | 59 | </v-card-actions> |
52 | 60 | <v-snackbar |
... | ... | @@ -55,220 +63,227 @@ |
55 | 63 | :right="x === 'right'" |
56 | 64 | :vertical="mode === 'vertical'" |
57 | 65 | v-model="snackbar" |
58 | - :color= color | |
59 | - >{{ text }}</v-snackbar> | |
60 | - </v-card> | |
61 | - </v-flex> | |
62 | - </v-layout> | |
63 | - </v-container> | |
64 | - </v-content> | |
65 | - </v-stepper-content> | |
66 | - <v-stepper-content step="2"> | |
67 | - <v-content> | |
68 | - <v-container fluid fill-height> | |
69 | - <v-layout align-center justify-center> | |
70 | - <v-flex> | |
71 | - <v-toolbar style="background-color: #7852cc" dark> | |
72 | - <v-spacer></v-spacer> | |
73 | - <v-toolbar-title>Forget Password</v-toolbar-title> | |
74 | - <v-spacer></v-spacer> | |
75 | - </v-toolbar> | |
76 | - <v-card class="elevation-1 pa-1"> | |
77 | - <v-card-text> | |
78 | - <h5 class="text-xs-center"> Not to Worry! Enter to your registered Email ID And New Password. </h5> | |
79 | - <h5 class="text-xs-center"> We'll send you a reset.</h5> | |
80 | - <v-flex lg6 sm6 xs10 offset-sm3 offset-xs1 offset-lg3> | |
81 | - <v-form class="mt-4"> | |
82 | - <div class="custom-input-align"> | |
83 | - <v-text-field | |
84 | - class="text-md-center" | |
85 | - v-model="uniqueCode" | |
86 | - type="text" | |
87 | - label="Enter Unique Code" | |
88 | - required> | |
89 | - </v-text-field> | |
90 | - <v-text-field | |
91 | - :rules="[rules.required,rules.min]" | |
92 | - v-model="changepassword" | |
93 | - :append-icon="e1 ? 'visibility_off' : 'visibility'" | |
94 | - :append-icon-cb="() => (e1 = !e1)" | |
95 | - :type="e1 ? 'password' : 'text'" | |
96 | - name="input-10-1" | |
97 | - label="New Password" | |
98 | - counter | |
99 | - ></v-text-field> | |
100 | - </div> | |
101 | - </v-form> | |
102 | - </v-flex> | |
103 | - </v-card-text> | |
104 | - <v-card-actions> | |
105 | - <v-flex text-xs-center> | |
106 | - <v-btn style="background-color: #71d9ea; color: #0c0754;" dark flat @click="resetPassword">Send Request</v-btn> | |
107 | - </v-flex> | |
108 | - </v-card-actions> | |
109 | - <v-snackbar | |
110 | - :timeout="timeout" | |
111 | - :top="y === 'top'" | |
112 | - :right="x === 'right'" | |
113 | - :vertical="mode === 'vertical'" | |
114 | - v-model="snackbar" | |
115 | - :color= color | |
116 | - >{{ text }}</v-snackbar> | |
117 | - </v-card> | |
118 | - </v-flex> | |
119 | - </v-layout> | |
120 | - </v-container> | |
121 | - </v-content> | |
122 | - <v-btn | |
123 | - color="#7852cc" | |
124 | - dark | |
125 | - @click="e2 = 1" | |
126 | - >Back</v-btn> | |
127 | - </v-stepper-content> | |
128 | - </v-stepper-items> | |
129 | - </v-stepper> | |
130 | - </v-app> | |
131 | - </div> | |
132 | - </v-flex> | |
133 | - </v-layout> | |
134 | - </v-container> | |
135 | - <!-- <v-footer class="pa-4 fixcolors"> | |
136 | - </v-footer> --> | |
137 | - </v-app> | |
66 | + :color="color" | |
67 | + >{{ text }}</v-snackbar> | |
68 | + </v-card> | |
69 | + </v-flex> | |
70 | + </v-layout> | |
71 | + </v-container> | |
72 | + </v-content> | |
73 | + </v-stepper-content> | |
74 | + <v-stepper-content step="2"> | |
75 | + <v-content> | |
76 | + <v-container fluid fill-height> | |
77 | + <v-layout align-center justify-center> | |
78 | + <v-flex> | |
79 | + <v-toolbar style="background-color: #7852cc" dark> | |
80 | + <v-spacer></v-spacer> | |
81 | + <v-toolbar-title>Forget Password</v-toolbar-title> | |
82 | + <v-spacer></v-spacer> | |
83 | + </v-toolbar> | |
84 | + <v-card class="elevation-1 pa-1"> | |
85 | + <v-card-text> | |
86 | + <h5 | |
87 | + class="text-xs-center" | |
88 | + >Not to Worry! Enter to your registered Email ID And New Password.</h5> | |
89 | + <h5 class="text-xs-center">We'll send you a reset.</h5> | |
90 | + <v-flex lg6 sm6 xs10 offset-sm3 offset-xs1 offset-lg3> | |
91 | + <v-form class="mt-4"> | |
92 | + <div class="custom-input-align"> | |
93 | + <v-text-field | |
94 | + class="text-md-center" | |
95 | + v-model="uniqueCode" | |
96 | + type="text" | |
97 | + label="Enter Unique Code" | |
98 | + required | |
99 | + ></v-text-field> | |
100 | + <v-text-field | |
101 | + :rules="[rules.required,rules.min]" | |
102 | + v-model="changepassword" | |
103 | + :append-icon="e1 ? 'visibility_off' : 'visibility'" | |
104 | + :append-icon-cb="() => (e1 = !e1)" | |
105 | + :type="e1 ? 'password' : 'text'" | |
106 | + name="input-10-1" | |
107 | + label="New Password" | |
108 | + counter | |
109 | + ></v-text-field> | |
110 | + </div> | |
111 | + </v-form> | |
112 | + </v-flex> | |
113 | + </v-card-text> | |
114 | + <v-card-actions> | |
115 | + <v-flex text-xs-center> | |
116 | + <v-btn | |
117 | + style="background-color: #71d9ea; color: #0c0754;" | |
118 | + dark | |
119 | + flat | |
120 | + @click="resetPassword" | |
121 | + >Send Request</v-btn> | |
122 | + </v-flex> | |
123 | + </v-card-actions> | |
124 | + <v-snackbar | |
125 | + :timeout="timeout" | |
126 | + :top="y === 'top'" | |
127 | + :right="x === 'right'" | |
128 | + :vertical="mode === 'vertical'" | |
129 | + v-model="snackbar" | |
130 | + :color="color" | |
131 | + >{{ text }}</v-snackbar> | |
132 | + </v-card> | |
133 | + </v-flex> | |
134 | + </v-layout> | |
135 | + </v-container> | |
136 | + </v-content> | |
137 | + <v-btn color="#7852cc" dark @click="e2 = 1">Back</v-btn> | |
138 | + </v-stepper-content> | |
139 | + </v-stepper-items> | |
140 | + </v-stepper> | |
141 | + </v-app> | |
142 | + </div> | |
143 | + </v-flex> | |
144 | + </v-layout> | |
145 | + </v-container> | |
146 | + <!-- <v-footer class="pa-4 fixcolors"> | |
147 | + </v-footer>--> | |
148 | + </v-app> | |
138 | 149 | </template> |
139 | 150 | |
140 | 151 | |
141 | 152 | |
142 | 153 | <script> |
143 | -import http from '@/Services/http.js'; | |
154 | +import http from "@/Services/http.js"; | |
144 | 155 | |
145 | 156 | export default { |
146 | 157 | data: () => ({ |
147 | 158 | e1: true, |
148 | - e2:0, | |
159 | + e2: 0, | |
149 | 160 | snackbar: false, |
150 | - y: 'top', | |
151 | - x: 'right', | |
152 | - mode: '', | |
161 | + y: "top", | |
162 | + x: "right", | |
163 | + mode: "", | |
153 | 164 | timeout: 4000, |
154 | - text: '', | |
165 | + text: "", | |
155 | 166 | loading: false, |
156 | - forgetemail:'', | |
157 | - uniqueCode: '', | |
158 | - password:'', | |
159 | - changepassword:'', | |
167 | + forgetemail: "", | |
168 | + uniqueCode: "", | |
169 | + password: "", | |
170 | + changepassword: "", | |
160 | 171 | valid: true, |
161 | 172 | emailRules: [ |
162 | - v => !!v || "E-mail is required", | |
163 | - v => | |
173 | + (v) => !!v || "E-mail is required", | |
174 | + (v) => | |
164 | 175 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || |
165 | - "E-mail must be valid" | |
176 | + "E-mail must be valid", | |
166 | 177 | ], |
167 | 178 | |
168 | 179 | rules: { |
169 | - required: value => !!value || "password is Required.", | |
170 | - min: v => | |
171 | - (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test( | |
172 | - v | |
173 | - ) && | |
174 | - v.length >= 6) || | |
175 | - "Min 4 characters upper case lower case symbol required" | |
176 | - } | |
180 | + required: (value) => !!value || "password is Required.", | |
181 | + min: (v) => | |
182 | + (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/.test( | |
183 | + v | |
184 | + ) && | |
185 | + v.length >= 6) || | |
186 | + "Min 4 characters upper case lower case symbol required", | |
187 | + }, | |
177 | 188 | }), |
178 | 189 | |
179 | 190 | methods: { |
180 | - reset () { | |
191 | + reset() { | |
181 | 192 | if (this.$refs.form.validate()) { |
182 | - http().get('/forgot-password?email='+ this.forgetemail) | |
183 | - .then(response => { | |
184 | - // console.log("response=====>",response.data.data.token); | |
185 | - this.$store.dispatch("setToken", response.data.data.token); | |
186 | - this.loading = true; | |
187 | - this.e2 = 2 ; | |
188 | - if(this.snackbar=true){ | |
189 | - this.text= "Please Fill your Last Step of Forget Password!" | |
190 | - } | |
191 | - }).catch(err => { | |
192 | - this.text="User Not Found or Incorrect Email" | |
193 | - this.snackbar= true; | |
194 | - this.loading = false; | |
195 | - }) | |
196 | - } | |
193 | + http() | |
194 | + .get("/forgot-password?email=" + this.forgetemail) | |
195 | + .then((response) => { | |
196 | + // console.log("response=====>",response.data.data.token); | |
197 | + this.$store.dispatch("setToken", response.data.data.token); | |
198 | + this.loading = true; | |
199 | + this.e2 = 2; | |
200 | + if ((this.snackbar = true)) { | |
201 | + this.text = "Please Fill your Last Step of Forget Password!"; | |
202 | + } | |
203 | + }) | |
204 | + .catch((err) => { | |
205 | + this.text = "User Not Found or Incorrect Email"; | |
206 | + this.snackbar = true; | |
207 | + this.loading = false; | |
208 | + }); | |
209 | + } | |
197 | 210 | }, |
198 | - resetPassword(){ | |
211 | + resetPassword() { | |
199 | 212 | let forgotPassword = { |
200 | 213 | email: this.forgetemail, |
201 | 214 | uniqueCode: this.uniqueCode, |
202 | - password: this.changepassword | |
203 | - } | |
204 | - http().post('/reset-password',forgotPassword) | |
205 | - .then(response => { | |
206 | - console.log("response=====>",response); | |
215 | + password: this.changepassword, | |
216 | + }; | |
217 | + http() | |
218 | + .post("/reset-password", forgotPassword) | |
219 | + .then((response) => { | |
220 | + // console.log("response=====>",response); | |
207 | 221 | this.loading = true; |
208 | - if(this.snackbar=true){ | |
209 | - this.text= "Successfully Change your Password" | |
222 | + if ((this.snackbar = true)) { | |
223 | + this.text = "Successfully Change your Password"; | |
210 | 224 | } |
211 | 225 | setTimeout(() => { |
212 | - this.$router.push('/'); | |
213 | - }, 1000); | |
214 | - }).catch(err => { | |
215 | - this.text="User Not Found or Incorrect Email" | |
216 | - this.snackbar= true; | |
217 | - this.loading = false; | |
218 | - }) | |
219 | - } | |
226 | + this.$router.push("/"); | |
227 | + }, 1000); | |
228 | + }) | |
229 | + .catch((err) => { | |
230 | + this.text = "User Not Found or Incorrect Email"; | |
231 | + this.snackbar = true; | |
232 | + this.loading = false; | |
233 | + }); | |
234 | + }, | |
235 | + }, | |
236 | + computed: { | |
237 | + color() { | |
238 | + return this.loading ? "success" : "error"; | |
239 | + }, | |
220 | 240 | }, |
221 | - computed:{ | |
222 | - color(){ | |
223 | - return this.loading ? 'success' : 'error' | |
224 | -} | |
225 | -} | |
226 | - | |
227 | 241 | }; |
228 | 242 | </script> |
229 | 243 | <style scoped lang="css"> |
230 | 244 | .content { |
231 | - padding: 100px 0px 100px 0px !important; | |
245 | + padding: 100px 0px 100px 0px !important; | |
232 | 246 | } |
233 | - #login { | |
234 | - height: 50%; | |
235 | - width: 100%; | |
236 | - position: absolute; | |
237 | - top: 0; | |
238 | - left: 0; | |
239 | - content: ""; | |
240 | - z-index: 0; | |
241 | - } | |
242 | -img{ | |
243 | - /* position:absolute; */ | |
244 | - top:13px; | |
245 | - left:8px; | |
247 | +#login { | |
248 | + height: 50%; | |
249 | + width: 100%; | |
250 | + position: absolute; | |
251 | + top: 0; | |
252 | + left: 0; | |
253 | + content: ""; | |
254 | + z-index: 0; | |
255 | +} | |
256 | +img { | |
257 | + /* position:absolute; */ | |
258 | + top: 13px; | |
259 | + left: 8px; | |
246 | 260 | } |
247 | 261 | .v-btn--large { |
248 | - padding: 0px 74px; | |
262 | + padding: 0px 74px; | |
249 | 263 | } |
250 | -.button{ | |
264 | +.button { | |
251 | 265 | text-transform: none; |
252 | 266 | } |
253 | 267 | @media screen and (max-width: 472px) { |
254 | -.v-btn--large { | |
255 | - padding:0px 20px !important; | |
256 | - font-size:13px; | |
257 | -} | |
258 | -h5 { | |
268 | + .v-btn--large { | |
269 | + padding: 0px 20px !important; | |
270 | + font-size: 13px; | |
271 | + } | |
272 | + h5 { | |
259 | 273 | font-size: 11px; |
274 | + } | |
260 | 275 | } |
261 | -} | |
262 | -@media screen and (max-width: 600px) { | |
263 | -.theme--light .v-btn, .application .theme--light.v-btn { | |
276 | +@media screen and (max-width: 600px) { | |
277 | + .theme--light .v-btn, | |
278 | + .application .theme--light.v-btn { | |
264 | 279 | color: white !important; |
265 | -} | |
266 | -.logoSchool{ | |
267 | -font-size: 18px; | |
268 | -margin-top: 20px !important; | |
269 | -} | |
270 | -.content { | |
280 | + } | |
281 | + .logoSchool { | |
282 | + font-size: 18px; | |
283 | + margin-top: 20px !important; | |
284 | + } | |
285 | + .content { | |
271 | 286 | padding: 0px 0px 0px 0px !important; |
272 | -} | |
287 | + } | |
273 | 288 | } |
274 | 289 | </style> |
275 | 290 | \ No newline at end of file | ... | ... |
src/pages/Course/course.vue
... | ... | @@ -503,8 +503,11 @@ export default { |
503 | 503 | this.showLoader = false; |
504 | 504 | }) |
505 | 505 | .catch((err) => { |
506 | - console.log("err====>", err); | |
506 | + // console.log("err====>", err); | |
507 | 507 | this.showLoader = false; |
508 | + this.snackbar = true; | |
509 | + this.color = "error"; | |
510 | + this.text = error.response.data.message; | |
508 | 511 | }); |
509 | 512 | }, |
510 | 513 | getSections(_id) { |
... | ... | @@ -559,11 +562,11 @@ export default { |
559 | 562 | } |
560 | 563 | }, |
561 | 564 | onEditFilePicked(e) { |
562 | - console.log(e); | |
565 | + // console.log(e); | |
563 | 566 | const files = e.target.files; |
564 | 567 | if (files[0] !== undefined) { |
565 | 568 | this.editImageName = files[0].name; |
566 | - console.log("this.editImageName", this.editImageName); | |
569 | + // console.log("this.editImageName", this.editImageName); | |
567 | 570 | |
568 | 571 | if (this.editImageName.lastIndexOf(".") <= 0) { |
569 | 572 | return; | ... | ... |
src/pages/Course/courseDetail.vue
... | ... | @@ -897,6 +897,8 @@ export default { |
897 | 897 | }, |
898 | 898 | getCourses(classId) { |
899 | 899 | this.showLoader = true; |
900 | + this.CourseDetailsList = []; | |
901 | + this.getCourse.courseId = ""; | |
900 | 902 | http() |
901 | 903 | .get("/getCourseesList", { |
902 | 904 | params: { |
... | ... | @@ -910,8 +912,11 @@ export default { |
910 | 912 | this.showLoader = false; |
911 | 913 | }) |
912 | 914 | .catch((err) => { |
913 | - console.log("err====>", err); | |
915 | + // console.log("err====>", err); | |
914 | 916 | this.showLoader = false; |
917 | + this.snackbar = true; | |
918 | + this.color = "error"; | |
919 | + this.text = error.response.data.message; | |
915 | 920 | }); |
916 | 921 | }, |
917 | 922 | getCourseDetailsList() { | ... | ... |
src/pages/Course/courseDiscussion.vue
... | ... | @@ -311,11 +311,11 @@ export default { |
311 | 311 | this.$refs.editDataImage.click(); |
312 | 312 | }, |
313 | 313 | onEditFilePicked(e) { |
314 | - console.log(e); | |
314 | + // console.log(e); | |
315 | 315 | const files = e.target.files; |
316 | 316 | if (files[0] !== undefined) { |
317 | 317 | this.editImageName = files[0].name; |
318 | - console.log("this.editImageName", this.editImageName); | |
318 | + // console.log("this.editImageName", this.editImageName); | |
319 | 319 | |
320 | 320 | if (this.editImageName.lastIndexOf(".") <= 0) { |
321 | 321 | return; |
... | ... | @@ -357,8 +357,11 @@ export default { |
357 | 357 | this.showLoader = false; |
358 | 358 | }) |
359 | 359 | .catch((err) => { |
360 | - console.log("err====>", err); | |
360 | + // console.log("err====>", err); | |
361 | 361 | this.showLoader = false; |
362 | + this.snackbar = true; | |
363 | + this.color = "error"; | |
364 | + this.text = error.response.data.message; | |
362 | 365 | }); |
363 | 366 | }, |
364 | 367 | editGetCourses(classId) { |
... | ... | @@ -374,8 +377,11 @@ export default { |
374 | 377 | this.showLoader = false; |
375 | 378 | }) |
376 | 379 | .catch((err) => { |
377 | - console.log("err====>", err); | |
380 | + // console.log("err====>", err); | |
378 | 381 | this.showLoader = false; |
382 | + this.snackbar = true; | |
383 | + this.color = "error"; | |
384 | + this.text = error.response.data.message; | |
379 | 385 | }); |
380 | 386 | }, |
381 | 387 | getCourseDiscussionTable(id) { |
... | ... | @@ -402,8 +408,11 @@ export default { |
402 | 408 | this.showLoader = false; |
403 | 409 | }) |
404 | 410 | .catch((error) => { |
405 | - console.log("err====>", error); | |
411 | + // console.log("err====>", error); | |
406 | 412 | this.showLoader = false; |
413 | + this.snackbar = true; | |
414 | + this.color = "error"; | |
415 | + this.text = error.response.data.message; | |
407 | 416 | }); |
408 | 417 | }, |
409 | 418 | rowCourseDiscussion(id) { |
... | ... | @@ -418,7 +427,7 @@ export default { |
418 | 427 | this.editDialog = true; |
419 | 428 | }, |
420 | 429 | save() { |
421 | - console.log("this.editedItem", this.editedItem); | |
430 | + // console.log("this.editedItem", this.editedItem); | |
422 | 431 | let editCourseDiscuss = { |
423 | 432 | courseDiscussionId: this.editedItem._id, |
424 | 433 | courseId: this.editedItem.courseId, | ... | ... |
src/pages/Course/discussion.vue
... | ... | @@ -173,10 +173,10 @@ export default { |
173 | 173 | showReplyBox: false, |
174 | 174 | replyDescription: "", |
175 | 175 | loginId: "", |
176 | - editedIndex: -1 | |
176 | + editedIndex: -1, | |
177 | 177 | }), |
178 | 178 | methods: { |
179 | - dates: function(date) { | |
179 | + dates: function (date) { | |
180 | 180 | return moment(date).format("MMMM DD, YYYY hh:mm A"); |
181 | 181 | }, |
182 | 182 | getDiscussionesThread() { |
... | ... | @@ -185,10 +185,10 @@ export default { |
185 | 185 | http() |
186 | 186 | .get("/getParticularCourseDiscussion", { |
187 | 187 | params: { |
188 | - courseDiscussionId: this.$route.params.discussionId | |
189 | - } | |
188 | + courseDiscussionId: this.$route.params.discussionId, | |
189 | + }, | |
190 | 190 | }) |
191 | - .then(response => { | |
191 | + .then((response) => { | |
192 | 192 | // console.log("response", response.data.data); |
193 | 193 | this.courseDiscussionData = response.data.data; |
194 | 194 | for (let i = 0; i < this.courseDiscussionData.length; i++) { |
... | ... | @@ -208,9 +208,12 @@ export default { |
208 | 208 | this.showLoader = false; |
209 | 209 | this.showReplyBox = false; |
210 | 210 | }) |
211 | - .catch(error => { | |
212 | - console.log("err====>", error); | |
211 | + .catch((error) => { | |
212 | + // console.log("err====>", error); | |
213 | 213 | this.showLoader = false; |
214 | + this.snackbar = true; | |
215 | + this.color = "error"; | |
216 | + this.text = error.response.data.message; | |
214 | 217 | }); |
215 | 218 | }, |
216 | 219 | replyThreadDiscussion() { |
... | ... | @@ -218,16 +221,16 @@ export default { |
218 | 221 | var payloadData = { |
219 | 222 | courseDiscussionId: this.$route.params.discussionId, |
220 | 223 | teacherId: this.loginId, |
221 | - description: this.replyDescription | |
224 | + description: this.replyDescription, | |
222 | 225 | }; |
223 | 226 | http() |
224 | 227 | .put("/replyForumThread", payloadData) |
225 | - .then(response => { | |
228 | + .then((response) => { | |
226 | 229 | // console.log("response", response.data.data); |
227 | 230 | this.showLoader = false; |
228 | 231 | this.getDiscussionesThread(); |
229 | 232 | }) |
230 | - .catch(error => { | |
233 | + .catch((error) => { | |
231 | 234 | this.showLoader = false; |
232 | 235 | }); |
233 | 236 | }, |
... | ... | @@ -262,15 +265,15 @@ export default { |
262 | 265 | forumThreadId: replyThread._id, |
263 | 266 | courseDiscussionId: this.$route.params.discussionId, |
264 | 267 | teacherId: this.loginId, |
265 | - description: replyThread.description | |
268 | + description: replyThread.description, | |
266 | 269 | }; |
267 | 270 | http() |
268 | 271 | .put("/updateForumThread", payloadData) |
269 | - .then(response => { | |
272 | + .then((response) => { | |
270 | 273 | this.showLoader = false; |
271 | 274 | this.getDiscussionesThread(); |
272 | 275 | }) |
273 | - .catch(error => { | |
276 | + .catch((error) => { | |
274 | 277 | this.showLoader = false; |
275 | 278 | }); |
276 | 279 | }, |
... | ... | @@ -278,21 +281,21 @@ export default { |
278 | 281 | this.showLoader = true; |
279 | 282 | var payloadData = { |
280 | 283 | forumThreadId: id, |
281 | - courseDiscussionId: this.$route.params.discussionId | |
284 | + courseDiscussionId: this.$route.params.discussionId, | |
282 | 285 | }; |
283 | 286 | http() |
284 | 287 | .put( |
285 | 288 | "/deleteForumThread", |
286 | 289 | confirm("Are you sure you want to delete this?") && payloadData |
287 | 290 | ) |
288 | - .then(response => { | |
291 | + .then((response) => { | |
289 | 292 | this.showLoader = false; |
290 | 293 | this.getDiscussionesThread(); |
291 | 294 | }) |
292 | - .catch(error => { | |
295 | + .catch((error) => { | |
293 | 296 | this.showLoader = false; |
294 | 297 | }); |
295 | - } | |
298 | + }, | |
296 | 299 | }, |
297 | 300 | mounted() { |
298 | 301 | // this.getStudentList(); |
... | ... | @@ -300,7 +303,7 @@ export default { |
300 | 303 | this.role = this.$store.state.role; |
301 | 304 | this.loginId = this.$store.state.id; |
302 | 305 | this.getDiscussionesThread(); |
303 | - } | |
306 | + }, | |
304 | 307 | }; |
305 | 308 | </script> |
306 | 309 | ... | ... |
src/pages/Course/enrollStudents.vue
... | ... | @@ -210,8 +210,11 @@ export default { |
210 | 210 | this.showLoader = false; |
211 | 211 | }) |
212 | 212 | .catch((err) => { |
213 | - console.log("err====>", err); | |
213 | + // console.log("err====>", err); | |
214 | 214 | this.showLoader = false; |
215 | + this.snackbar = true; | |
216 | + this.color = "error"; | |
217 | + this.text = error.response.data.message; | |
215 | 218 | }); |
216 | 219 | }, |
217 | 220 | getStudents(message) { |
... | ... | @@ -234,8 +237,11 @@ export default { |
234 | 237 | this.getParticularCourse(message); |
235 | 238 | }) |
236 | 239 | .catch((error) => { |
237 | - console.log("err====>", error); | |
240 | + // console.log("err====>", error); | |
238 | 241 | this.showLoader = false; |
242 | + this.snackbar = true; | |
243 | + this.color = "error"; | |
244 | + this.text = error.response.data.message; | |
239 | 245 | }); |
240 | 246 | }, |
241 | 247 | getStudentTable(id) { | ... | ... |
src/pages/Dashboard/Announcement.vue
... | ... | @@ -277,22 +277,22 @@ export default { |
277 | 277 | moment: moment, |
278 | 278 | search: "", |
279 | 279 | pagination: { |
280 | - rowsPerPage: 10 | |
280 | + rowsPerPage: 10, | |
281 | 281 | }, |
282 | 282 | announcementHeaders: [ |
283 | 283 | { |
284 | 284 | text: "Image", |
285 | 285 | value: "attachementUrl", |
286 | 286 | sortable: false, |
287 | - align: "center" | |
287 | + align: "center", | |
288 | 288 | }, |
289 | 289 | { |
290 | 290 | text: "Discussion Type", |
291 | 291 | value: "discussionType", |
292 | 292 | sortable: false, |
293 | - align: "center" | |
293 | + align: "center", | |
294 | 294 | }, |
295 | - { text: "Action", value: "", sortable: false, align: "center" } | |
295 | + { text: "Action", value: "", sortable: false, align: "center" }, | |
296 | 296 | ], |
297 | 297 | announcementsList: [], |
298 | 298 | selectedAnnoucementId: "", |
... | ... | @@ -315,7 +315,7 @@ export default { |
315 | 315 | showReplyBox: false, |
316 | 316 | replyDescription: "", |
317 | 317 | loginId: "", |
318 | - editedIndex: -1 | |
318 | + editedIndex: -1, | |
319 | 319 | }; |
320 | 320 | }, |
321 | 321 | methods: { |
... | ... | @@ -325,16 +325,19 @@ export default { |
325 | 325 | .get("/getAnnoucementesList", { |
326 | 326 | params: { |
327 | 327 | courseId: this.$route.query.courseId, |
328 | - classId: localStorage.getItem("parentClassId") | |
329 | - } | |
328 | + classId: localStorage.getItem("parentClassId"), | |
329 | + }, | |
330 | 330 | }) |
331 | - .then(response => { | |
331 | + .then((response) => { | |
332 | 332 | this.announcementsList = response.data.data; |
333 | 333 | this.showLoader = false; |
334 | 334 | }) |
335 | - .catch(err => { | |
336 | - console.log("err====>", err); | |
335 | + .catch((err) => { | |
336 | + // console.log("err====>", err); | |
337 | 337 | this.showLoader = false; |
338 | + this.snackbar = true; | |
339 | + this.color = "error"; | |
340 | + this.text = error.response.data.message; | |
338 | 341 | }); |
339 | 342 | }, |
340 | 343 | |
... | ... | @@ -346,7 +349,7 @@ export default { |
346 | 349 | if (response.data.data.length > 0) { |
347 | 350 | this.$router.push({ |
348 | 351 | name: "Course Details", |
349 | - query: { courseId: courseId } | |
352 | + query: { courseId: courseId }, | |
350 | 353 | }); |
351 | 354 | } else { |
352 | 355 | this.seeSnackbar("No Data Available", "warning"); |
... | ... | @@ -354,7 +357,7 @@ export default { |
354 | 357 | }, |
355 | 358 | |
356 | 359 | // COURSE ANNOUNCEMENTS REPLY FUNCTONALITY |
357 | - dates: function(date) { | |
360 | + dates: function (date) { | |
358 | 361 | return moment(date).format("MMMM DD, YYYY hh:mm A"); |
359 | 362 | }, |
360 | 363 | getDiscussionesThread() { |
... | ... | @@ -363,10 +366,10 @@ export default { |
363 | 366 | http() |
364 | 367 | .get("/getParticularAnnoucement", { |
365 | 368 | params: { |
366 | - annoucementId: this.selectedAnnoucementId | |
367 | - } | |
369 | + annoucementId: this.selectedAnnoucementId, | |
370 | + }, | |
368 | 371 | }) |
369 | - .then(response => { | |
372 | + .then((response) => { | |
370 | 373 | // console.log("response", response.data.data); |
371 | 374 | this.annoucementData = response.data.data; |
372 | 375 | // console.log("response", this.annoucementData); |
... | ... | @@ -389,9 +392,12 @@ export default { |
389 | 392 | this.showLoader = false; |
390 | 393 | this.showReplyBox = false; |
391 | 394 | }) |
392 | - .catch(error => { | |
393 | - console.log("err====>", error); | |
395 | + .catch((error) => { | |
396 | + // console.log("err====>", error); | |
394 | 397 | this.showLoader = false; |
398 | + this.snackbar = true; | |
399 | + this.color = "error"; | |
400 | + this.text = error.response.data.message; | |
395 | 401 | }); |
396 | 402 | }, |
397 | 403 | replyThreadDiscussion() { |
... | ... | @@ -399,15 +405,15 @@ export default { |
399 | 405 | var payloadData = { |
400 | 406 | annoucementId: this.selectedAnnoucementId, |
401 | 407 | studentId: localStorage.getItem("parentStudentId"), |
402 | - description: this.replyDescription | |
408 | + description: this.replyDescription, | |
403 | 409 | }; |
404 | 410 | http() |
405 | 411 | .put("/replyThread", payloadData) |
406 | - .then(response => { | |
412 | + .then((response) => { | |
407 | 413 | this.showLoader = false; |
408 | 414 | this.getDiscussionesThread(); |
409 | 415 | }) |
410 | - .catch(error => { | |
416 | + .catch((error) => { | |
411 | 417 | this.showLoader = false; |
412 | 418 | }); |
413 | 419 | }, |
... | ... | @@ -442,15 +448,15 @@ export default { |
442 | 448 | discussionThreadId: replyThread._id, |
443 | 449 | annoucementId: this.selectedAnnoucementId, |
444 | 450 | studentId: localStorage.getItem("parentStudentId"), |
445 | - description: replyThread.description | |
451 | + description: replyThread.description, | |
446 | 452 | }; |
447 | 453 | http() |
448 | 454 | .put("/updateThread", payloadData) |
449 | - .then(response => { | |
455 | + .then((response) => { | |
450 | 456 | this.showLoader = false; |
451 | 457 | this.getDiscussionesThread(); |
452 | 458 | }) |
453 | - .catch(error => { | |
459 | + .catch((error) => { | |
454 | 460 | this.showLoader = false; |
455 | 461 | }); |
456 | 462 | }, |
... | ... | @@ -458,32 +464,32 @@ export default { |
458 | 464 | this.showLoader = true; |
459 | 465 | var payloadData = { |
460 | 466 | discussionThreadId: id, |
461 | - annoucementId: this.selectedAnnoucementId | |
467 | + annoucementId: this.selectedAnnoucementId, | |
462 | 468 | }; |
463 | 469 | http() |
464 | 470 | .put( |
465 | 471 | "/deleteThread", |
466 | 472 | confirm("Are you sure you want to delete this?") && payloadData |
467 | 473 | ) |
468 | - .then(response => { | |
474 | + .then((response) => { | |
469 | 475 | this.showLoader = false; |
470 | 476 | this.getDiscussionesThread(); |
471 | 477 | }) |
472 | - .catch(error => { | |
478 | + .catch((error) => { | |
473 | 479 | this.showLoader = false; |
474 | 480 | }); |
475 | - } | |
481 | + }, | |
476 | 482 | }, |
477 | 483 | async created() { |
478 | 484 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ |
479 | 485 | await this.getStudentCourses({ |
480 | 486 | classId: localStorage.getItem("parentClassId"), |
481 | - studentId: localStorage.getItem("parentStudentId") | |
487 | + studentId: localStorage.getItem("parentStudentId"), | |
482 | 488 | }); |
483 | 489 | |
484 | 490 | /* getAnnoucementesList - to populate the data table */ |
485 | 491 | this.getAnnoucementes(); |
486 | - } | |
492 | + }, | |
487 | 493 | }; |
488 | 494 | </script> |
489 | 495 | <style scoped> | ... | ... |
src/pages/Dashboard/ChapterInfo.vue
... | ... | @@ -118,7 +118,7 @@ import CoursesSideBar from "@/pages/Common/CoursesSideBar.vue"; |
118 | 118 | export default { |
119 | 119 | mixins: [AllApiCalls], |
120 | 120 | components: { |
121 | - CoursesSideBar | |
121 | + CoursesSideBar, | |
122 | 122 | }, |
123 | 123 | data() { |
124 | 124 | return { |
... | ... | @@ -130,7 +130,7 @@ export default { |
130 | 130 | chapterIds: [], |
131 | 131 | selectedChapterId: "", |
132 | 132 | indexSelectedChapter: "", |
133 | - pdfLink: "" | |
133 | + pdfLink: "", | |
134 | 134 | }; |
135 | 135 | }, |
136 | 136 | methods: { |
... | ... | @@ -151,18 +151,21 @@ export default { |
151 | 151 | .get("/getParticularChapterDetail", { |
152 | 152 | params: { |
153 | 153 | courseDetailId: this.$route.query.courseDetailId, |
154 | - chapterId: this.selectedChapterId | |
155 | - } | |
154 | + chapterId: this.selectedChapterId, | |
155 | + }, | |
156 | 156 | }) |
157 | - .then(response => { | |
157 | + .then((response) => { | |
158 | 158 | this.chapter = response.data.data; |
159 | 159 | this.showLoader = false; |
160 | 160 | }) |
161 | - .catch(err => { | |
162 | - console.log("err in getParticularChapterDetail====>", err); | |
161 | + .catch((err) => { | |
162 | + // console.log("err in getParticularChapterDetail====>", err); | |
163 | 163 | this.showLoader = false; |
164 | + this.snackbar = true; | |
165 | + this.color = "error"; | |
166 | + this.text = error.response.data.message; | |
164 | 167 | }); |
165 | - } | |
168 | + }, | |
166 | 169 | }, |
167 | 170 | // computed:{ |
168 | 171 | // nextChapterIndex(){ |
... | ... | @@ -170,7 +173,7 @@ export default { |
170 | 173 | // } |
171 | 174 | // } |
172 | 175 | async created() { |
173 | - console.log("route query - ", this.$route.query); | |
176 | + // console.log("route query - ", this.$route.query); | |
174 | 177 | |
175 | 178 | this.selectedChapterId = this.$route.query.selectedChapterId; |
176 | 179 | |
... | ... | @@ -185,14 +188,14 @@ export default { |
185 | 188 | this.chapterIds.pop(); |
186 | 189 | this.chapterIds.pop(); |
187 | 190 | this.chapterIds.pop(); |
188 | - | |
189 | - this.indexSelectedChapter = this.chapterIds.findIndex(id => { | |
191 | + | |
192 | + this.indexSelectedChapter = this.chapterIds.findIndex((id) => { | |
190 | 193 | return id == this.selectedChapterId; |
191 | 194 | }); |
192 | 195 | |
193 | 196 | /* get chapter clicked on using the id */ |
194 | 197 | await this.getParticularChapterDetail(this.selectedChapterId); |
195 | - } | |
198 | + }, | |
196 | 199 | }; |
197 | 200 | </script> |
198 | 201 | <style scoped> | ... | ... |
src/pages/Dashboard/CourseDetails.vue
... | ... | @@ -127,7 +127,7 @@ export default { |
127 | 127 | courseDetails: [{ courseId: {}, classId: {} }], |
128 | 128 | chapterIds: [], |
129 | 129 | // courseData: [], |
130 | - courseDataTree: [] | |
130 | + courseDataTree: [], | |
131 | 131 | }; |
132 | 132 | }, |
133 | 133 | methods: { |
... | ... | @@ -144,7 +144,7 @@ export default { |
144 | 144 | obj.courseId = this.$route.query.courseId; |
145 | 145 | this.$router.push({ |
146 | 146 | name: "Chapter Info", |
147 | - query: obj | |
147 | + query: obj, | |
148 | 148 | }); |
149 | 149 | }, |
150 | 150 | async routeToCourseDetails(courseId) { |
... | ... | @@ -161,23 +161,23 @@ export default { |
161 | 161 | } else { |
162 | 162 | this.seeSnackbar("No Data Available", "warning"); |
163 | 163 | } |
164 | - } | |
164 | + }, | |
165 | 165 | }, |
166 | 166 | async created() { |
167 | - console.log("its working"); | |
167 | + // console.log("its working"); | |
168 | 168 | /* getParticularCourseDetail- To get courseDetail - defined in GetApis.js*/ |
169 | 169 | let response = await this.getParticularCourseDetail( |
170 | 170 | this.$route.query.courseId |
171 | 171 | ); |
172 | 172 | this.courseDetails = response.data.data; |
173 | - console.log("its working courseDetails - ", this.courseDetails); | |
173 | + // console.log("its working courseDetails - ", this.courseDetails); | |
174 | 174 | |
175 | 175 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ |
176 | 176 | await this.getStudentCourses({ |
177 | 177 | classId: localStorage.getItem("parentClassId"), |
178 | - studentId: localStorage.getItem("parentStudentId") | |
178 | + studentId: localStorage.getItem("parentStudentId"), | |
179 | 179 | }); |
180 | - } | |
180 | + }, | |
181 | 181 | }; |
182 | 182 | </script> |
183 | 183 | <style scoped> | ... | ... |
src/pages/Dashboard/CourseDiscussionForum.vue
... | ... | @@ -407,29 +407,29 @@ export default { |
407 | 407 | // DATA TABLE |
408 | 408 | search: "", |
409 | 409 | pagination: { |
410 | - rowsPerPage: 10 | |
410 | + rowsPerPage: 10, | |
411 | 411 | }, |
412 | 412 | courseDiscussionHeaders: [ |
413 | 413 | { |
414 | 414 | text: "Image", |
415 | 415 | value: "attachementUrl", |
416 | 416 | sortable: false, |
417 | - align: "center" | |
417 | + align: "center", | |
418 | 418 | }, |
419 | 419 | { |
420 | 420 | text: "Discussion", |
421 | 421 | align: "center", |
422 | 422 | sortable: false, |
423 | - value: "" | |
423 | + value: "", | |
424 | 424 | }, |
425 | 425 | { |
426 | 426 | text: "Started", |
427 | 427 | value: "", |
428 | 428 | sortable: false, |
429 | - align: "center" | |
429 | + align: "center", | |
430 | 430 | }, |
431 | 431 | { text: "Last Pot", value: "", sortable: false, align: "center" }, |
432 | - { text: "Replies", value: "", sortable: false, align: "center" } | |
432 | + { text: "Replies", value: "", sortable: false, align: "center" }, | |
433 | 433 | ], |
434 | 434 | courseDiscussionItems: [], |
435 | 435 | |
... | ... | @@ -439,11 +439,11 @@ export default { |
439 | 439 | courseDiscussionData: [], |
440 | 440 | replyDescription: "", |
441 | 441 | loginId: "", |
442 | - editedIndex: -1 | |
442 | + editedIndex: -1, | |
443 | 443 | }; |
444 | 444 | }, |
445 | 445 | methods: { |
446 | - dates: function(date) { | |
446 | + dates: function (date) { | |
447 | 447 | return moment(date).format("MMMM DD, YYYY hh:mm A"); |
448 | 448 | }, |
449 | 449 | /* UPLOAD IMAGE */ |
... | ... | @@ -487,16 +487,16 @@ export default { |
487 | 487 | this.loading = true; |
488 | 488 | await http() |
489 | 489 | .post("/createCourseDiscussion", this.addForumParams) |
490 | - .then(response => { | |
490 | + .then((response) => { | |
491 | 491 | this.snackbar = true; |
492 | 492 | this.text = "Discussion added successfully"; |
493 | 493 | this.snackbarColor = "green"; |
494 | 494 | this.addForumDialog = false; |
495 | 495 | this.clear(); |
496 | 496 | this.loading = false; |
497 | - console.log("response of createCourseDiscussion - ", response); | |
497 | + // console.log("response of createCourseDiscussion - ", response); | |
498 | 498 | }) |
499 | - .catch(error => { | |
499 | + .catch((error) => { | |
500 | 500 | this.snackbar = true; |
501 | 501 | this.text = error.response.data.message; |
502 | 502 | this.snackbarColor = "error"; |
... | ... | @@ -506,7 +506,7 @@ export default { |
506 | 506 | /* getCourseDiscussionesList - to populate the data table */ |
507 | 507 | await this.getCourseDiscussionesList({ |
508 | 508 | courseId: this.$route.query.courseId, |
509 | - classId: localStorage.getItem("parentClassId") | |
509 | + classId: localStorage.getItem("parentClassId"), | |
510 | 510 | }); |
511 | 511 | this.addForumDialog = false; |
512 | 512 | } |
... | ... | @@ -523,7 +523,7 @@ export default { |
523 | 523 | if (response.data.data.length > 0) { |
524 | 524 | this.$router.push({ |
525 | 525 | name: "Course Details", |
526 | - query: { courseId: courseId } | |
526 | + query: { courseId: courseId }, | |
527 | 527 | }); |
528 | 528 | } else { |
529 | 529 | this.seeSnackbar("No Data Available", "warning"); |
... | ... | @@ -538,10 +538,10 @@ export default { |
538 | 538 | http() |
539 | 539 | .get("/getParticularCourseDiscussion", { |
540 | 540 | params: { |
541 | - courseDiscussionId: this.courseDiscussionId | |
542 | - } | |
541 | + courseDiscussionId: this.courseDiscussionId, | |
542 | + }, | |
543 | 543 | }) |
544 | - .then(response => { | |
544 | + .then((response) => { | |
545 | 545 | // console.log("response", response.data.data); |
546 | 546 | this.courseDiscussionData = response.data.data; |
547 | 547 | for (let i = 0; i < this.courseDiscussionData.length; i++) { |
... | ... | @@ -561,9 +561,12 @@ export default { |
561 | 561 | this.showLoader = false; |
562 | 562 | this.showReplyBox = false; |
563 | 563 | }) |
564 | - .catch(error => { | |
565 | - console.log("err====>", error); | |
564 | + .catch((error) => { | |
565 | + // console.log("err====>", error); | |
566 | 566 | this.showLoader = false; |
567 | + this.snackbar = true; | |
568 | + this.color = "error"; | |
569 | + this.text = error.response.data.message; | |
567 | 570 | }); |
568 | 571 | }, |
569 | 572 | replyThreadDiscussion(selected) { |
... | ... | @@ -571,16 +574,16 @@ export default { |
571 | 574 | var payloadData = { |
572 | 575 | courseDiscussionId: selected._id, |
573 | 576 | studentId: localStorage.getItem("parentStudentId"), |
574 | - description: this.replyDescription | |
577 | + description: this.replyDescription, | |
575 | 578 | }; |
576 | 579 | http() |
577 | 580 | .put("/replyForumThread", payloadData) |
578 | - .then(response => { | |
581 | + .then((response) => { | |
579 | 582 | // console.log("response", response.data.data); |
580 | 583 | this.showLoader = false; |
581 | 584 | this.getDiscussionesThread(); |
582 | 585 | }) |
583 | - .catch(error => { | |
586 | + .catch((error) => { | |
584 | 587 | this.showLoader = false; |
585 | 588 | }); |
586 | 589 | }, |
... | ... | @@ -615,15 +618,15 @@ export default { |
615 | 618 | forumThreadId: replyThread._id, |
616 | 619 | courseDiscussionId: selected._id, |
617 | 620 | studentId: localStorage.getItem("parentStudentId"), |
618 | - description: replyThread.description | |
621 | + description: replyThread.description, | |
619 | 622 | }; |
620 | 623 | http() |
621 | 624 | .put("/updateForumThread", payloadData) |
622 | - .then(response => { | |
625 | + .then((response) => { | |
623 | 626 | this.showLoader = false; |
624 | 627 | this.getDiscussionesThread(); |
625 | 628 | }) |
626 | - .catch(error => { | |
629 | + .catch((error) => { | |
627 | 630 | this.showLoader = false; |
628 | 631 | }); |
629 | 632 | }, |
... | ... | @@ -631,36 +634,36 @@ export default { |
631 | 634 | this.showLoader = true; |
632 | 635 | var payloadData = { |
633 | 636 | forumThreadId: id, |
634 | - courseDiscussionId: courseDiscussionId | |
637 | + courseDiscussionId: courseDiscussionId, | |
635 | 638 | }; |
636 | 639 | http() |
637 | 640 | .put( |
638 | 641 | "/deleteForumThread", |
639 | 642 | confirm("Are you sure you want to delete this?") && payloadData |
640 | 643 | ) |
641 | - .then(response => { | |
644 | + .then((response) => { | |
642 | 645 | this.showLoader = false; |
643 | 646 | this.getDiscussionesThread(); |
644 | 647 | }) |
645 | - .catch(error => { | |
648 | + .catch((error) => { | |
646 | 649 | this.showLoader = false; |
647 | 650 | }); |
648 | - } | |
651 | + }, | |
649 | 652 | }, |
650 | 653 | async created() { |
651 | 654 | this.loginId = this.$store.state.id; |
652 | 655 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ |
653 | 656 | await this.getStudentCourses({ |
654 | 657 | classId: localStorage.getItem("parentClassId"), |
655 | - studentId: localStorage.getItem("parentStudentId") | |
658 | + studentId: localStorage.getItem("parentStudentId"), | |
656 | 659 | }); |
657 | 660 | |
658 | 661 | /* getCourseDiscussionesList - to populate the data table */ |
659 | 662 | await this.getCourseDiscussionesList({ |
660 | 663 | courseId: this.$route.query.courseId, |
661 | - classId: localStorage.getItem("parentClassId") | |
664 | + classId: localStorage.getItem("parentClassId"), | |
662 | 665 | }); |
663 | - } | |
666 | + }, | |
664 | 667 | }; |
665 | 668 | </script> |
666 | 669 | <style scoped> | ... | ... |
src/pages/Dashboard/LiveOnlineClass.vue
... | ... | @@ -71,7 +71,12 @@ |
71 | 71 | <!-- JOIN OR END SESSION --> |
72 | 72 | <v-flex> |
73 | 73 | <div> |
74 | - <v-btn round class="open-dialog-button" dark @click="showLoader = true;startChat()">Start Session</v-btn> | |
74 | + <v-btn | |
75 | + round | |
76 | + class="open-dialog-button" | |
77 | + dark | |
78 | + @click="showLoader = true;startChat()" | |
79 | + >Start Session</v-btn> | |
75 | 80 | </div> |
76 | 81 | </v-flex> |
77 | 82 | <v-flex id="teacherClone"> |
... | ... | @@ -163,7 +168,7 @@ export default { |
163 | 168 | async startChat() { |
164 | 169 | if (this.$store.state.role === "PARENT") { |
165 | 170 | if (this.counter == 0) { |
166 | - console.log("enter start chat"); | |
171 | + // console.log("enter start chat"); | |
167 | 172 | this.startConference(); |
168 | 173 | this.counter += 1; |
169 | 174 | } |
... | ... | @@ -177,7 +182,7 @@ export default { |
177 | 182 | }, |
178 | 183 | // JITSI CONTAINER |
179 | 184 | startConference() { |
180 | - console.log("yes session started"); | |
185 | + // console.log("yes session started"); | |
181 | 186 | var _this = this; |
182 | 187 | try { |
183 | 188 | const domain = "meet.intrack.in"; |
... | ... | @@ -227,21 +232,19 @@ export default { |
227 | 232 | romm: "", |
228 | 233 | }; |
229 | 234 | _this.api = new JitsiMeetExternalAPI(domain, options); |
230 | - console.log("this.api ", this.api); | |
235 | + // console.log("this.api ", this.api); | |
231 | 236 | _this.api.addEventListener("videoConferenceJoined", () => { |
232 | - console.log("Local User Joined"); | |
237 | + // console.log("Local User Joined"); | |
233 | 238 | this.showLoader = false; |
234 | 239 | _this.api.executeCommand("displayName", _this.username); |
235 | 240 | _this.api.executeCommand("password", this_.roomPassword); |
236 | 241 | }); |
237 | - | |
242 | + | |
238 | 243 | _this.api.on("readyToClose", () => { |
239 | 244 | this.$router.push({ name: "Refresh" }); |
240 | - | |
241 | 245 | }); |
242 | - | |
243 | 246 | } catch (error) { |
244 | - console.error("Failed to load Jitsi API", error); | |
247 | + // console.error("Failed to load Jitsi API", error); | |
245 | 248 | } |
246 | 249 | }, |
247 | 250 | openRoom() { |
... | ... | @@ -258,7 +261,7 @@ export default { |
258 | 261 | }, |
259 | 262 | |
260 | 263 | createRoom(classId) { |
261 | - this.showLoader = true; | |
264 | + // this.showLoader = true; | |
262 | 265 | var classId = { |
263 | 266 | classId: classId, |
264 | 267 | }; |
... | ... | @@ -270,18 +273,18 @@ export default { |
270 | 273 | }) |
271 | 274 | .then((response) => { |
272 | 275 | // this.addSection = response.data.data; |
273 | - console.log("CREATE___ROOOM", response.data); | |
276 | + // console.log("CREATE___ROOOM", response.data); | |
274 | 277 | var room = response.data.data.roomName; |
275 | - var username = localStorage.getItem("teacherName") | |
278 | + var username = localStorage.getItem("teacherName"); | |
276 | 279 | var roomPassword = response.data.data.password; |
277 | - console.log( | |
278 | - "room", | |
279 | - room, | |
280 | - "username", | |
281 | - username, | |
282 | - "roomPassword", | |
283 | - roomPassword | |
284 | - ); | |
280 | + // console.log( | |
281 | + // "room", | |
282 | + // room, | |
283 | + // "username", | |
284 | + // username, | |
285 | + // "roomPassword", | |
286 | + // roomPassword | |
287 | + // ); | |
285 | 288 | var this_ = this; |
286 | 289 | if (username != "" || room != "") { |
287 | 290 | if (window.JitsiMeetExternalAPI) { |
... | ... | @@ -299,7 +302,6 @@ export default { |
299 | 302 | } else alert("Jitsi Meet API script not loaded"); |
300 | 303 | this_.startConference(); |
301 | 304 | } |
302 | - this.showLoader = false; | |
303 | 305 | }) |
304 | 306 | .catch((err) => { |
305 | 307 | this.showLoader = false; |
... | ... | @@ -316,7 +318,7 @@ export default { |
316 | 318 | courseId: this.$route.query.courseId, |
317 | 319 | chapterId: this.$route.query.chapterId, |
318 | 320 | }); |
319 | - console.log("response getLiveClassesesList- ", response); | |
321 | + // console.log("response getLiveClassesesList- ", response); | |
320 | 322 | |
321 | 323 | /* CHECK RESPONSE TO ASSIGN MESSAGE INSIDE BUTTON */ |
322 | 324 | if (response.data.data[0].sessionStatus == "ENDED") { |
... | ... | @@ -359,10 +361,10 @@ export default { |
359 | 361 | }, |
360 | 362 | |
361 | 363 | async created() { |
362 | - console.log( | |
363 | - "this.$store.state.studentsData", | |
364 | - this.$store.state.studentsData[0].name | |
365 | - ); | |
364 | + // console.log( | |
365 | + // "this.$store.state.studentsData", | |
366 | + // this.$store.state.studentsData[0].name | |
367 | + // ); | |
366 | 368 | this.currentUser = localStorage.getItem("studentName"); |
367 | 369 | this.token = this.$store.state.token; |
368 | 370 | if (this.$store.state.role === "PARENT") { | ... | ... |
src/pages/Dashboard/dashboard.vue
... | ... | @@ -292,7 +292,7 @@ |
292 | 292 | </v-flex> |
293 | 293 | </v-layout> |
294 | 294 | |
295 | - <!-- FOR ADMIN ROLE --> | |
295 | + <!-- FOR ADMIN,TEACHER ROLE --> | |
296 | 296 | <v-layout row wrap v-if="role == 'ADMIN'||role == 'TEACHER'"> |
297 | 297 | <!-- NOTICE --> |
298 | 298 | <v-flex xs12 sm6> |
... | ... | @@ -344,6 +344,7 @@ |
344 | 344 | </v-flex> |
345 | 345 | |
346 | 346 | <!-- SCHOOL EVENTS --> |
347 | + | |
347 | 348 | <v-flex xs12 sm6> |
348 | 349 | <v-card class="card"> |
349 | 350 | <v-container> |
... | ... | @@ -380,8 +381,6 @@ |
380 | 381 | </v-flex> |
381 | 382 | </v-layout> |
382 | 383 | |
383 | - | |
384 | - | |
385 | 384 | <!-- FOR TEACHER ROLE --> |
386 | 385 | <!-- <v-card class="mt-2 card" v-if="role == 'TEACHER'"> |
387 | 386 | <v-layout> |
... | ... | @@ -460,139 +459,179 @@ |
460 | 459 | </v-card-text> |
461 | 460 | </v-flex> |
462 | 461 | </v-layout> |
463 | - </v-card> --> | |
462 | + </v-card>--> | |
464 | 463 | |
465 | - <!-- COURSES --> | |
464 | + <!-- ROLE == PARENT, MY COURSES --> | |
466 | 465 | <v-layout v-if="role == 'PARENT'"> |
467 | 466 | <v-flex xs12> |
468 | - <v-card class="card mt-2 account-Card"> | |
469 | - <h4> | |
470 | - <b>My Courses</b> | |
471 | - </h4> | |
472 | - <v-layout wrap> | |
473 | - <v-flex xs12 sm12> | |
474 | - <v-list two-line> | |
475 | - <template> | |
476 | - <v-list-tile v-for="(course,i) in courseData" :key="i"> | |
477 | - <v-list-tile-avatar> | |
478 | - <!-- <v-icon | |
467 | + <v-card class="elevation-0 account-Card"> | |
468 | + <v-container> | |
469 | + <v-card-title class="justify-center title font-weight-bold">My Courses</v-card-title> | |
470 | + <v-layout wrap> | |
471 | + <v-flex xs12 sm12> | |
472 | + <v-list two-line> | |
473 | + <template> | |
474 | + <v-list-tile v-for="(course,i) in courseData" :key="i"> | |
475 | + <v-list-tile-avatar> | |
476 | + <!-- <v-icon | |
479 | 477 | class="account-circle darkBlue-color" |
480 | 478 | style="cursor: pointer;" |
481 | 479 | @click="routeToCourseDetails(course._id)" |
482 | - >panorama_fish_eye</v-icon>--> | |
483 | - <span> | |
484 | - <v-tooltip top> | |
485 | - <img | |
486 | - slot="activator" | |
487 | - style="cursor:pointer; width:25px; height:25px; " | |
488 | - src="/static/icon/view.png" | |
489 | - @click="routeToCourseDetails(course._id)" | |
490 | - /> | |
491 | - <span>View</span> | |
492 | - </v-tooltip> | |
493 | - </span> | |
494 | - </v-list-tile-avatar> | |
495 | - <v-list-tile-content> | |
496 | - <v-list-tile-title | |
497 | - style="cursor: pointer;" | |
498 | - @click="routeToCourseDetails(course._id)" | |
499 | - >{{ course.courseName }}</v-list-tile-title> | |
500 | - </v-list-tile-content> | |
501 | - </v-list-tile> | |
502 | - </template> | |
503 | - </v-list> | |
504 | - </v-flex> | |
505 | - </v-layout> | |
480 | + >panorama_fish_eye</v-icon>--> | |
481 | + <span> | |
482 | + <v-tooltip top> | |
483 | + <img | |
484 | + slot="activator" | |
485 | + style="cursor:pointer; width:25px; height:25px; " | |
486 | + src="/static/icon/view.png" | |
487 | + @click="routeToCourseDetails(course._id)" | |
488 | + /> | |
489 | + <span>View</span> | |
490 | + </v-tooltip> | |
491 | + </span> | |
492 | + </v-list-tile-avatar> | |
493 | + <v-list-tile-content> | |
494 | + <v-list-tile-title | |
495 | + style="cursor: pointer;" | |
496 | + @click="routeToCourseDetails(course._id)" | |
497 | + >{{ course.courseName }}</v-list-tile-title> | |
498 | + </v-list-tile-content> | |
499 | + </v-list-tile> | |
500 | + </template> | |
501 | + </v-list> | |
502 | + </v-flex> | |
503 | + </v-layout> | |
504 | + </v-container> | |
506 | 505 | </v-card> |
507 | 506 | </v-flex> |
508 | 507 | </v-layout> |
509 | - <v-layout v-if="role == 'PARENT'"> | |
508 | + | |
509 | + <v-layout row wrap v-if="role == 'PARENT'"> | |
510 | + <!-- LATEST ANNOUNCEMENTSS , IF ROLE == PARENT --> | |
510 | 511 | <v-flex xs6> |
511 | - <v-card class="mt-2 card"> | |
512 | - <h4 class="pa-3"> | |
513 | - <b>Latest Annoucements</b> | |
514 | - </h4> | |
512 | + <v-card class="card"> | |
513 | + <v-container> | |
514 | + <v-card-title | |
515 | + class="justify-center subheading font-weight-bold" | |
516 | + >Latest Announcements</v-card-title> | |
515 | 517 | |
516 | - <v-data-table | |
517 | - :items="annoucementData" | |
518 | - class="elevation-0" | |
519 | - flat | |
520 | - hide-actions | |
521 | - hide-headers | |
522 | - style="border-spacing: 0 !important;" | |
523 | - > | |
524 | - <template | |
525 | - slot="items" | |
526 | - slot-scope="props" | |
527 | - v-if="props.index < 5" | |
518 | + <v-data-table | |
519 | + :items="annoucementData" | |
520 | + class="elevation-0" | |
521 | + flat | |
522 | + hide-actions | |
523 | + hide-headers | |
528 | 524 | style="border-spacing: 0 !important;" |
529 | 525 | > |
530 | - <tr class="td-notice"> | |
531 | - <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | |
532 | - <td> | |
533 | - <span class="grey--text caption">{{ date(props.item.created) }}</span> | |
534 | - <br /> | |
535 | - <span class="body-2">{{ props.item.discussionType}}</span> | |
536 | - </td> | |
537 | - <td class="text-xs-center"> | |
538 | - <span> | |
539 | - <v-tooltip top> | |
540 | - <img | |
541 | - slot="activator" | |
542 | - style="cursor:pointer; width:25px; height:25px; " | |
543 | - src="/static/icon/view.png" | |
544 | - /> | |
545 | - <span>View</span> | |
546 | - </v-tooltip> | |
547 | - </span> | |
548 | - </td> | |
549 | - </tr> | |
550 | - </template> | |
551 | - </v-data-table> | |
526 | + <template | |
527 | + slot="items" | |
528 | + slot-scope="props" | |
529 | + v-if="props.index < 5" | |
530 | + style="border-spacing: 0 !important;" | |
531 | + > | |
532 | + <tr class="td-notice"> | |
533 | + <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | |
534 | + <td> | |
535 | + <span class="grey--text caption">{{ date(props.item.created) }}</span> | |
536 | + <br /> | |
537 | + <span class="body-2">{{ props.item.discussionType}}</span> | |
538 | + </td> | |
539 | + <td class="text-xs-center"> | |
540 | + <span> | |
541 | + <v-tooltip top> | |
542 | + <img | |
543 | + slot="activator" | |
544 | + style="cursor:pointer; width:25px; height:25px; " | |
545 | + src="/static/icon/view.png" | |
546 | + /> | |
547 | + <span>View</span> | |
548 | + </v-tooltip> | |
549 | + </span> | |
550 | + </td> | |
551 | + </tr> | |
552 | + </template> | |
553 | + </v-data-table> | |
554 | + </v-container> | |
552 | 555 | </v-card> |
553 | 556 | </v-flex> |
557 | + <!-- IF ROLE == PARENT, SCHOOL EVENTS --> | |
554 | 558 | <v-flex xs6> |
555 | - <v-card class="mt-2 card"> | |
556 | - <h4 class="pa-3"> | |
557 | - <b>Online User</b> | |
558 | - </h4> | |
559 | + <v-card class="card"> | |
560 | + <v-container> | |
561 | + <v-card-title class="justify-center subheading font-weight-bold">School Events</v-card-title> | |
562 | + <div | |
563 | + v-for="(schoolEvent,index) in schoolEvents" | |
564 | + :key="schoolEvent.title" | |
565 | + class="mt-2" | |
566 | + style="cursor: pointer;" | |
567 | + @click="seeEventDetails(schoolEvent,'schoolEvent')" | |
568 | + > | |
569 | + <!-- color dot--> | |
570 | + <span | |
571 | + :style="{ 'background-color': colorsArray[index%colorsArray.length] }" | |
572 | + style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" | |
573 | + ></span> | |
574 | + <div style="display: inline-block;" class="ml-2"> | |
575 | + <div> | |
576 | + <!-- date of event --> | |
577 | + <div | |
578 | + class="grey--text lighten-1 caption" | |
579 | + v-if="schoolEvent.dateOfEvent" | |
580 | + >{{moment(schoolEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> | |
581 | + <!-- event title--> | |
582 | + <div class="body-1" v-if="schoolEvent.title">{{schoolEvent.title}}</div> | |
583 | + </div> | |
584 | + </div> | |
585 | + </div> | |
586 | + <div v-if="schoolEvents.length == 0"> | |
587 | + <p class="text-center title grey lighten-4 error--text">No Data Found!</p> | |
588 | + </div> | |
589 | + </v-container> | |
590 | + </v-card> | |
591 | + </v-flex> | |
592 | + <!-- ONLINE USER , IF ROLE == PARENT --> | |
593 | + <!-- <v-flex xs6> | |
594 | + <v-card class="card"> | |
595 | + <v-container> | |
596 | + <v-card-title class="justify-center subheading font-weight-bold">Online user</v-card-title> | |
559 | 597 | |
560 | - <v-data-table | |
561 | - :items="onlineUser" | |
562 | - class="elevation-0" | |
563 | - flat | |
564 | - hide-actions | |
565 | - hide-headers | |
566 | - style="border-spacing: 0 !important;" | |
567 | - > | |
568 | - <template | |
569 | - slot="items" | |
570 | - slot-scope="props" | |
571 | - v-if="props.index < 5" | |
598 | + <v-data-table | |
599 | + :items="onlineUser" | |
600 | + class="elevation-0" | |
601 | + flat | |
602 | + hide-actions | |
603 | + hide-headers | |
572 | 604 | style="border-spacing: 0 !important;" |
573 | 605 | > |
574 | - <tr class="td-notice"> | |
575 | - <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | |
576 | - <td> | |
577 | - <span class="body-2">{{ props.item.user }}</span> | |
578 | - </td> | |
579 | - <td class="text-xs-center"> | |
580 | - <span> | |
581 | - <v-tooltip top> | |
582 | - <img | |
583 | - slot="activator" | |
584 | - style="cursor:pointer; width:25px; height:25px; " | |
585 | - src="/static/icon/view.png" | |
586 | - /> | |
587 | - <span>View</span> | |
588 | - </v-tooltip> | |
589 | - </span> | |
590 | - </td> | |
591 | - </tr> | |
592 | - </template> | |
593 | - </v-data-table> | |
606 | + <template | |
607 | + slot="items" | |
608 | + slot-scope="props" | |
609 | + v-if="props.index < 5" | |
610 | + style="border-spacing: 0 !important;" | |
611 | + > | |
612 | + <tr class="td-notice"> | |
613 | + <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | |
614 | + <td> | |
615 | + <span class="body-2">{{ props.item.user }}</span> | |
616 | + </td> | |
617 | + <td class="text-xs-center"> | |
618 | + <span> | |
619 | + <v-tooltip top> | |
620 | + <img | |
621 | + slot="activator" | |
622 | + style="cursor:pointer; width:25px; height:25px; " | |
623 | + src="/static/icon/view.png" | |
624 | + /> | |
625 | + <span>View</span> | |
626 | + </v-tooltip> | |
627 | + </span> | |
628 | + </td> | |
629 | + </tr> | |
630 | + </template> | |
631 | + </v-data-table> | |
632 | + </v-container> | |
594 | 633 | </v-card> |
595 | - </v-flex> | |
634 | + </v-flex> --> | |
596 | 635 | </v-layout> |
597 | 636 | </v-container> |
598 | 637 | </v-flex> |
... | ... | @@ -934,12 +973,14 @@ export default { |
934 | 973 | |
935 | 974 | methods: { |
936 | 975 | test(e) { |
937 | - console.log(" test - ", e); | |
976 | + // console.log(" test - ", e); | |
938 | 977 | }, |
978 | + | |
979 | + /*WHEN CALENDER IS CLICKED - DISPLAYS EVENTS IN DIALOG BOX */ | |
939 | 980 | async handleDayChanged(e) { |
940 | - console.log("event calender - ", e); | |
981 | + // console.log("event calender - ", e); | |
941 | 982 | /*the list of events that will be used in dialog box to display events */ |
942 | - // this.displayEventsList = []; | |
983 | + | |
943 | 984 | this.dialogMeetingEvents = []; |
944 | 985 | this.dialogSchoolEvents = []; |
945 | 986 | |
... | ... | @@ -957,9 +998,11 @@ export default { |
957 | 998 | this.dialogSchoolEvents.push(schoolEventResponse.data.data); |
958 | 999 | } |
959 | 1000 | } |
960 | - | |
1001 | + /* Opens the dialog box */ | |
961 | 1002 | this.viewEventDetails = true; |
962 | 1003 | }, |
1004 | + | |
1005 | + /* see meeting events, school events individually (when calender is not clicked) */ | |
963 | 1006 | async seeEventDetails(activity, message) { |
964 | 1007 | // if (this.$store.state.role === "TEACHER") { |
965 | 1008 | // let response = await this.getParticularMeetingEvent({ |
... | ... | @@ -970,14 +1013,25 @@ export default { |
970 | 1013 | // this.viewEventDetails = true; |
971 | 1014 | // } |
972 | 1015 | if (this.$store.state.role === "PARENT") { |
973 | - let response = await this.getParticularMeetingEvent({ | |
974 | - meetingEventId: activity.meetingEvent._id, | |
975 | - }); | |
976 | - this.displayEventsList = []; | |
977 | - this.displayEventsList.push(response.data.data); | |
1016 | + if (message == "schoolEvent") { | |
1017 | + let response = await this.getParticularSchoolEvent({ | |
1018 | + schoolEventId: activity._id, | |
1019 | + }); | |
1020 | + this.displayEventsList = []; | |
1021 | + this.displayEventsList.push(response.data.data); | |
1022 | + } else { | |
1023 | + let response = await this.getParticularMeetingEvent({ | |
1024 | + meetingEventId: activity.meetingEvent._id, | |
1025 | + }); | |
1026 | + this.displayEventsList = []; | |
1027 | + this.displayEventsList.push(response.data.data); | |
1028 | + } | |
978 | 1029 | this.viewEventDetails = true; |
979 | 1030 | } |
980 | - if (this.$store.state.role === "ADMIN" || this.$store.state.role === "TEACHER") { | |
1031 | + if ( | |
1032 | + this.$store.state.role === "ADMIN" || | |
1033 | + this.$store.state.role === "TEACHER" | |
1034 | + ) { | |
981 | 1035 | if (message == "schoolEvent") { |
982 | 1036 | let response = await this.getParticularSchoolEvent({ |
983 | 1037 | schoolEventId: activity._id, |
... | ... | @@ -1038,7 +1092,7 @@ export default { |
1038 | 1092 | // event.editable = false; |
1039 | 1093 | // }, |
1040 | 1094 | eventCreated(...test) { |
1041 | - console.log(test); | |
1095 | + // console.log(test); | |
1042 | 1096 | }, |
1043 | 1097 | getStudents() { |
1044 | 1098 | http() |
... | ... | @@ -1204,10 +1258,15 @@ export default { |
1204 | 1258 | this.showLoader = false; |
1205 | 1259 | }) |
1206 | 1260 | .catch((err) => { |
1207 | - console.log("err====>", err); | |
1261 | + // console.log("err====>", err); | |
1208 | 1262 | this.showLoader = false; |
1263 | + this.snackbar = true; | |
1264 | + this.color = "error"; | |
1265 | + this.text = error.response.data.message; | |
1209 | 1266 | }); |
1210 | 1267 | }, |
1268 | + | |
1269 | + /* MEETING EVENTS, SCHOOL EVENTS */ | |
1211 | 1270 | async getMeetingEventes() { |
1212 | 1271 | if (this.role == "TEACHER" || this.role === "ADMIN") { |
1213 | 1272 | this.showLoader = true; |
... | ... | @@ -1235,8 +1294,13 @@ export default { |
1235 | 1294 | this.showLoader = false; |
1236 | 1295 | }); |
1237 | 1296 | } |
1238 | - /* If role is ADMIN or TEACHER then school events need to be displayed too */ | |
1239 | - if (this.role === "ADMIN" || this.role === "TEACHER") { | |
1297 | + /* If role is ADMIN,TEACHER, PARENT then school events need to be displayed too */ | |
1298 | + if ( | |
1299 | + this.role === "ADMIN" || | |
1300 | + this.role === "TEACHER" || | |
1301 | + this.role === "PARENT" | |
1302 | + ) { | |
1303 | + /* this will get data in a "schoolEvents" data property */ | |
1240 | 1304 | await this.getSchoolEventsList(); |
1241 | 1305 | /* set schoolEvents in activityEvents array to highlight event dates in calender */ |
1242 | 1306 | for (var i = 0; i < this.schoolEvents.length; i++) { |
... | ... | @@ -1247,7 +1311,7 @@ export default { |
1247 | 1311 | obj.title = this.schoolEvents[i].title; |
1248 | 1312 | obj._id = this.schoolEvents[i]._id; |
1249 | 1313 | obj.eventType = "schoolEvent"; |
1250 | - /* activityEvents is an array used to display events in calender on particular dates */ | |
1314 | + /* activityEvents is an array used to display events in calender on particular dates */ | |
1251 | 1315 | this.activityEvents.push(obj); |
1252 | 1316 | } |
1253 | 1317 | } |
... | ... | @@ -1279,7 +1343,7 @@ export default { |
1279 | 1343 | // this.token = this.$store.state.token; |
1280 | 1344 | // await this.getparentStudents(); |
1281 | 1345 | this.studentsData = this.$store.getters.GET_STUDENTS_DATA; |
1282 | - console.log("students data - ", this.studentsData); | |
1346 | + // console.log("students data - ", this.studentsData); | |
1283 | 1347 | await this.getCourses(); |
1284 | 1348 | await this.getAnnoucementes(); |
1285 | 1349 | } |
... | ... | @@ -1307,12 +1371,17 @@ export default { |
1307 | 1371 | ); |
1308 | 1372 | obj.title = this.activityList[i].meetingEvent.title; |
1309 | 1373 | obj._id = this.activityList[i].meetingEvent._id; |
1374 | + obj.eventType = "meetingEvent"; | |
1310 | 1375 | this.activityEvents.push(obj); |
1311 | 1376 | } |
1312 | 1377 | } |
1313 | 1378 | |
1314 | 1379 | /* get Latest events list for teacher login*/ |
1315 | - if (this.role == "TEACHER" || this.role == "ADMIN") { | |
1380 | + if ( | |
1381 | + this.role == "TEACHER" || | |
1382 | + this.role == "ADMIN" || | |
1383 | + this.role == "PARENT" | |
1384 | + ) { | |
1316 | 1385 | await this.getMeetingEventes(); |
1317 | 1386 | } |
1318 | 1387 | }, | ... | ... |
src/pages/Exam/examAttendence.vue
... | ... | @@ -174,7 +174,12 @@ |
174 | 174 | </v-dialog> |
175 | 175 | |
176 | 176 | <!-- ****** ADD Exam Attendence ****** --> |
177 | - <v-dialog v-model="addExamAttendenceDialog" max-width="800px" v-if="addExamAttendenceDialog" persistent> | |
177 | + <v-dialog | |
178 | + v-model="addExamAttendenceDialog" | |
179 | + max-width="800px" | |
180 | + v-if="addExamAttendenceDialog" | |
181 | + persistent | |
182 | + > | |
178 | 183 | <v-card flat> |
179 | 184 | <v-layout class="pa-3 card-style white--text"> |
180 | 185 | <v-flex xs12> |
... | ... | @@ -710,8 +715,11 @@ export default { |
710 | 715 | } |
711 | 716 | }) |
712 | 717 | .catch((err) => { |
713 | - console.log("err====>", err); | |
718 | + // console.log("err====>", err); | |
714 | 719 | this.showLoader = false; |
720 | + this.snackbar = true; | |
721 | + this.color = "error"; | |
722 | + this.text = error.response.data.message; | |
715 | 723 | }); |
716 | 724 | }, |
717 | 725 | getExamAttendenceList() { |
... | ... | @@ -746,8 +754,11 @@ export default { |
746 | 754 | this.showLoader = false; |
747 | 755 | }) |
748 | 756 | .catch((error) => { |
749 | - console.log("error", error); | |
757 | + // console.log("error", error); | |
750 | 758 | this.showLoader = false; |
759 | + this.snackbar = true; | |
760 | + this.color = "error"; | |
761 | + this.text = error.response.data.message; | |
751 | 762 | }); |
752 | 763 | }, |
753 | 764 | markParticularStudentAttendence(selected) { | ... | ... |
src/pages/Exam/grade.vue
... | ... | @@ -508,7 +508,7 @@ export default { |
508 | 508 | }); |
509 | 509 | }, |
510 | 510 | editItem(item) { |
511 | - console.log("item", item); | |
511 | + // console.log("item", item); | |
512 | 512 | this.editedIndex = this.gradeData.indexOf(item); |
513 | 513 | this.editedItem = Object.assign({}, item); |
514 | 514 | this.editedItem.date = | ... | ... |
src/pages/Gallery/gallery.vue
... | ... | @@ -611,7 +611,7 @@ export default { |
611 | 611 | e.target.result |
612 | 612 | ); |
613 | 613 | }; |
614 | - console.log("uploadImage=======>", this.files); | |
614 | + // console.log("uploadImage=======>", this.files); | |
615 | 615 | }); |
616 | 616 | fr.readAsDataURL(file); |
617 | 617 | return getResult.then((file) => { |
... | ... | @@ -647,7 +647,7 @@ export default { |
647 | 647 | e.target.result |
648 | 648 | ); |
649 | 649 | }; |
650 | - console.log("uploadeditFilesImage=======>", this.editFiles); | |
650 | + // console.log("uploadeditFilesImage=======>", this.editFiles); | |
651 | 651 | }); |
652 | 652 | fr.readAsDataURL(file); |
653 | 653 | return getResult.then((file) => { | ... | ... |
src/pages/Library/books.vue
... | ... | @@ -494,7 +494,7 @@ export default { |
494 | 494 | editItem(item) { |
495 | 495 | this.editedIndex = this.bookData.indexOf(item); |
496 | 496 | this.editedItem = Object.assign({}, item); |
497 | - console.log(this.editedItem); | |
497 | + // console.log(this.editedItem); | |
498 | 498 | this.editBookDialog = true; |
499 | 499 | }, |
500 | 500 | profile(item) { | ... | ... |
src/pages/Library/eBook.vue
... | ... | @@ -696,12 +696,12 @@ export default { |
696 | 696 | if (this.files) { |
697 | 697 | const [baseUrl, imageUrl] = this.files.split(/,/); |
698 | 698 | uploadCover = imageUrl; |
699 | - console.log("anyFile.split(/,/)", uploadCover); | |
699 | + // console.log("anyFile.split(/,/)", uploadCover); | |
700 | 700 | } |
701 | 701 | if (this.anyFile) { |
702 | 702 | const [baseUrl, fileUrl] = this.anyFile.split(/,/); |
703 | 703 | uploadFile = fileUrl; |
704 | - console.log("anyFile.split(/,/)", uploadFile); | |
704 | + // console.log("anyFile.split(/,/)", uploadFile); | |
705 | 705 | } |
706 | 706 | let data = { |
707 | 707 | classId: this.addEBooks.classId, |
... | ... | @@ -752,7 +752,7 @@ export default { |
752 | 752 | this.editedItem.classId = this.editedItem.classId._id; |
753 | 753 | } |
754 | 754 | this.editedItem.ebookId = this.editedItem._id; |
755 | - console.log("this.editedItem", this.editedItem); | |
755 | + // console.log("this.editedItem", this.editedItem); | |
756 | 756 | http() |
757 | 757 | .put("/updateEBook", this.editedItem) |
758 | 758 | .then((response) => { | ... | ... |
src/pages/Library/member.vue
... | ... | @@ -342,6 +342,7 @@ |
342 | 342 | <h3>Edit Student Profile</h3> |
343 | 343 | </v-toolbar-title> |
344 | 344 | <v-spacer></v-spacer> |
345 | + <v-icon @click="editStudentdialog = false">close</v-icon> | |
345 | 346 | </v-toolbar> |
346 | 347 | <v-card-text style="height: 426px;"> |
347 | 348 | <v-form ref="form"> |
... | ... | @@ -682,7 +683,7 @@ export default { |
682 | 683 | return moment(date).format("MMMM DD, YYYY"); |
683 | 684 | }, |
684 | 685 | profile(item) { |
685 | - console.log("item", item); | |
686 | + // console.log("item", item); | |
686 | 687 | this.editedIndex = this.studentData.indexOf(item); |
687 | 688 | this.editedItem = Object.assign({}, item); |
688 | 689 | this.dialogStudents = true; | ... | ... |
src/pages/Mark/mark.vue
... | ... | @@ -626,8 +626,11 @@ export default { |
626 | 626 | this.showLoader = false; |
627 | 627 | }) |
628 | 628 | .catch((error) => { |
629 | - console.log("err====>", error); | |
629 | + // console.log("err====>", error); | |
630 | 630 | this.showLoader = false; |
631 | + this.snackbar = true; | |
632 | + this.color = "error"; | |
633 | + this.text = error.response.data.message; | |
631 | 634 | }); |
632 | 635 | }, |
633 | 636 | displaySearch() { | ... | ... |
src/pages/Mark/markDistribution.vue
... | ... | @@ -75,7 +75,13 @@ |
75 | 75 | </v-card-title> |
76 | 76 | <v-flex xs8 sm8 md3 lg2 v-if="showSearch"> |
77 | 77 | <v-layout> |
78 | - <v-text-field autofocus v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | |
78 | + <v-text-field | |
79 | + autofocus | |
80 | + v-model="search" | |
81 | + label="Search" | |
82 | + prepend-inner-icon="search" | |
83 | + color="primary" | |
84 | + ></v-text-field> | |
79 | 85 | <v-icon @click="closeSearch" color="error">close</v-icon> |
80 | 86 | </v-layout> |
81 | 87 | </v-flex> |
... | ... | @@ -121,7 +127,11 @@ |
121 | 127 | <v-layout> |
122 | 128 | <v-flex xs12> |
123 | 129 | <label class="title text-xs-center">Add Mark Distribution</label> |
124 | - <v-icon size="24" class="right" @click="$refs.form.reset();addMarkDistributionDialog = false">cancel</v-icon> | |
130 | + <v-icon | |
131 | + size="24" | |
132 | + class="right" | |
133 | + @click="$refs.form.reset();addMarkDistributionDialog = false" | |
134 | + >cancel</v-icon> | |
125 | 135 | </v-flex> |
126 | 136 | </v-layout> |
127 | 137 | <v-form ref="form" v-model="valid" lazy-validation> |
... | ... | @@ -209,49 +219,51 @@ export default { |
209 | 219 | isActive: true, |
210 | 220 | newActive: false, |
211 | 221 | pagination: { |
212 | - rowsPerPage: 15 | |
222 | + rowsPerPage: 15, | |
213 | 223 | }, |
214 | - markDistributionRules: [v => !!v || " Mark Distribution type is required"], | |
215 | - markValueRules: [v => !!v || "Mark Value is required"], | |
224 | + markDistributionRules: [ | |
225 | + (v) => !!v || " Mark Distribution type is required", | |
226 | + ], | |
227 | + markValueRules: [(v) => !!v || "Mark Value is required"], | |
216 | 228 | headers: [ |
217 | 229 | { |
218 | 230 | text: "No", |
219 | 231 | align: "center", |
220 | 232 | sortable: false, |
221 | - value: "No" | |
233 | + value: "No", | |
222 | 234 | }, |
223 | 235 | { |
224 | 236 | text: " Mark Distribution Type", |
225 | 237 | value: " distributionType", |
226 | 238 | sortable: false, |
227 | - align: "center" | |
239 | + align: "center", | |
228 | 240 | }, |
229 | 241 | { |
230 | 242 | text: " Mark Value", |
231 | 243 | value: "markValue", |
232 | 244 | sortable: false, |
233 | - align: "center" | |
245 | + align: "center", | |
234 | 246 | }, |
235 | - { text: "Action", value: "", sortable: false, align: "center" } | |
247 | + { text: "Action", value: "", sortable: false, align: "center" }, | |
236 | 248 | ], |
237 | 249 | markList: [], |
238 | 250 | editedIndex: -1, |
239 | 251 | mark: {}, |
240 | 252 | editedItem: {}, |
241 | - token: "" | |
253 | + token: "", | |
242 | 254 | }), |
243 | 255 | methods: { |
244 | 256 | getMarkDistributions() { |
245 | 257 | this.showLoader = true; |
246 | 258 | http() |
247 | 259 | .get("/getMarkDistributionsList", { |
248 | - headers: { Authorization: "Bearer " + this.token } | |
260 | + headers: { Authorization: "Bearer " + this.token }, | |
249 | 261 | }) |
250 | - .then(response => { | |
262 | + .then((response) => { | |
251 | 263 | this.markList = response.data.data; |
252 | 264 | this.showLoader = false; |
253 | 265 | }) |
254 | - .catch(error => { | |
266 | + .catch((error) => { | |
255 | 267 | this.showLoader = false; |
256 | 268 | // if (error.response.status === 401) { |
257 | 269 | // this.$router.replace({ path: "/" }); |
... | ... | @@ -267,22 +279,25 @@ export default { |
267 | 279 | }, |
268 | 280 | deleteItem(item) { |
269 | 281 | let deleteParticularMark = { |
270 | - markDistributionId: item._id | |
282 | + markDistributionId: item._id, | |
271 | 283 | }; |
272 | 284 | http() |
273 | 285 | .delete( |
274 | 286 | "/deleteMarkDistribution", |
275 | 287 | confirm("Are you sure you want to delete this?") && { |
276 | - params: deleteParticularMark | |
288 | + params: deleteParticularMark, | |
277 | 289 | } |
278 | 290 | ) |
279 | - .then(response => { | |
291 | + .then((response) => { | |
280 | 292 | this.snackbar = true; |
281 | 293 | this.text = response.data.message; |
282 | 294 | this.getMarkDistributions(); |
283 | 295 | }) |
284 | - .catch(error => { | |
285 | - console.log(error); | |
296 | + .catch((error) => { | |
297 | + // console.log(error); | |
298 | + this.snackbar = true; | |
299 | + this.color = "error"; | |
300 | + this.text = error.response.data.message; | |
286 | 301 | }); |
287 | 302 | }, |
288 | 303 | close() { |
... | ... | @@ -293,7 +308,7 @@ export default { |
293 | 308 | this.loading = true; |
294 | 309 | http() |
295 | 310 | .post("/createMarkDistribution", this.mark) |
296 | - .then(response => { | |
311 | + .then((response) => { | |
297 | 312 | this.snackbar = true; |
298 | 313 | this.text = response.data.message; |
299 | 314 | this.getMarkDistributions(); |
... | ... | @@ -301,7 +316,7 @@ export default { |
301 | 316 | this.addMarkDistributionDialog = false; |
302 | 317 | this.loading = false; |
303 | 318 | }) |
304 | - .catch(error => { | |
319 | + .catch((error) => { | |
305 | 320 | this.snackbar = true; |
306 | 321 | this.text = error.response.data.message; |
307 | 322 | this.loading = false; |
... | ... | @@ -315,15 +330,15 @@ export default { |
315 | 330 | (this.editedItem.markDistributionId = this.editedItem._id), |
316 | 331 | http() |
317 | 332 | .put("/updateMarkDistribution", this.editedItem) |
318 | - .then(response => { | |
333 | + .then((response) => { | |
319 | 334 | this.snackbar = true; |
320 | 335 | this.text = "Successfully Edit Notification"; |
321 | 336 | this.color = "green"; |
322 | 337 | this.getMarkDistributions(); |
323 | 338 | this.close(); |
324 | 339 | }) |
325 | - .catch(error => { | |
326 | - console.log(error); | |
340 | + .catch((error) => { | |
341 | + // console.log(error); | |
327 | 342 | this.snackbar = true; |
328 | 343 | this.text = error.response.data.message; |
329 | 344 | this.color = "red"; |
... | ... | @@ -336,12 +351,12 @@ export default { |
336 | 351 | this.showSearch = false; |
337 | 352 | this.show = true; |
338 | 353 | this.search = ""; |
339 | - } | |
354 | + }, | |
340 | 355 | }, |
341 | 356 | mounted() { |
342 | 357 | this.token = this.$store.state.token; |
343 | 358 | this.getMarkDistributions(); |
344 | - } | |
359 | + }, | |
345 | 360 | }; |
346 | 361 | </script> |
347 | 362 | <style scoped> |
348 | 363 | \ No newline at end of file | ... | ... |
src/pages/Mark/promotion.vue
... | ... | @@ -185,17 +185,17 @@ export default { |
185 | 185 | passmark: { |
186 | 186 | hindi: "40", |
187 | 187 | english: "40", |
188 | - mathematics: "40" | |
188 | + mathematics: "40", | |
189 | 189 | }, |
190 | 190 | selected: ["John", "Jacob", "Jacobs"], |
191 | - token: "" | |
191 | + token: "", | |
192 | 192 | }; |
193 | 193 | }, |
194 | 194 | mounted() { |
195 | 195 | var year = new Date().getFullYear() + 1; |
196 | 196 | // this.promotion.acedemicYear = new Date().getFullYear() + "-" + year; |
197 | 197 | this.acedemicYear.push({ year: new Date().getFullYear() + "-" + year }); |
198 | - console.log(" this.promotion.acedemicYear ", this.acedemicYear); | |
198 | + // console.log(" this.promotion.acedemicYear ", this.acedemicYear); | |
199 | 199 | this.token = this.$store.state.token; |
200 | 200 | this.getClass(); |
201 | 201 | }, |
... | ... | @@ -203,12 +203,12 @@ export default { |
203 | 203 | getClass() { |
204 | 204 | http() |
205 | 205 | .get("/getClassesList", { |
206 | - headers: { Authorization: "Bearer " + this.token } | |
206 | + headers: { Authorization: "Bearer " + this.token }, | |
207 | 207 | }) |
208 | - .then(response => { | |
208 | + .then((response) => { | |
209 | 209 | this.classList = response.data.data; |
210 | 210 | }) |
211 | - .catch(error => { | |
211 | + .catch((error) => { | |
212 | 212 | this.showLoader = false; |
213 | 213 | if (error.response.status === 401) { |
214 | 214 | this.$router.replace({ path: "/" }); |
... | ... | @@ -217,7 +217,7 @@ export default { |
217 | 217 | this.$store.dispatch("Role", null); |
218 | 218 | } |
219 | 219 | }); |
220 | - } | |
221 | - } | |
220 | + }, | |
221 | + }, | |
222 | 222 | }; |
223 | 223 | </script> |
224 | 224 | \ No newline at end of file | ... | ... |
src/pages/Meet/meet.vue
... | ... | @@ -112,13 +112,16 @@ export default { |
112 | 112 | |
113 | 113 | this.api = new JitsiMeetExternalAPI(domain, options); |
114 | 114 | this.api.addEventListener("videoConferenceJoined", () => { |
115 | - console.log("Local User Joined"); | |
115 | + // console.log("Local User Joined"); | |
116 | 116 | |
117 | 117 | _this.api.executeCommand("displayName", _this.username); |
118 | 118 | _this.api.executeCommand("password", this.roomPassword); |
119 | 119 | }); |
120 | 120 | } catch (error) { |
121 | - console.error("Failed to load Jitsi API", error); | |
121 | + // console.error("Failed to load Jitsi API", error); | |
122 | + this.snackbar = true; | |
123 | + this.color = "error"; | |
124 | + this.text = error.response.data.message; | |
122 | 125 | } |
123 | 126 | }, |
124 | 127 | openRoom() { |
... | ... | @@ -160,7 +163,7 @@ export default { |
160 | 163 | .post("/createRoom", classId) |
161 | 164 | .then((response) => { |
162 | 165 | // this.addSection = response.data.data; |
163 | - console.log("CREATE___ROOOM", response.data); | |
166 | + // console.log("CREATE___ROOOM", response.data); | |
164 | 167 | this.room = response.data.data.roomName; |
165 | 168 | this.username = response.data.data.teacherName; |
166 | 169 | this.roomPassword = response.data.data.roomPassword; | ... | ... |
src/pages/News/news.vue
... | ... | @@ -474,7 +474,10 @@ export default { |
474 | 474 | this.addSection = response.data.data; |
475 | 475 | }) |
476 | 476 | .catch((err) => { |
477 | - console.log("err====>", err); | |
477 | + // console.log("err====>", err); | |
478 | + this.snackbar = true; | |
479 | + this.color = "error"; | |
480 | + this.text = error.response.data.message; | |
478 | 481 | }); |
479 | 482 | }, |
480 | 483 | pickFile() { | ... | ... |
src/pages/NoticeBoard/noticeBoard.vue
... | ... | @@ -213,12 +213,20 @@ |
213 | 213 | </td> |
214 | 214 | <td class="text-xs-center td td-row">{{ props.item.title}}</td> |
215 | 215 | <td class="text-xs-center td td-row"> |
216 | - <v-btn | |
216 | + <!-- <v-btn | |
217 | 217 | class="add-button" |
218 | 218 | @click="generatePDF2Canvas(props.item)" |
219 | 219 | :loading="loadingPdf" |
220 | 220 | dark |
221 | - >{{ props.item.fileType }}</v-btn> | |
221 | + >{{ props.item.fileType }}</v-btn>--> | |
222 | + <a | |
223 | + class="hover" | |
224 | + :href="props.item.eventImageUrl" | |
225 | + target="_blank" | |
226 | + style="text-decoration: none!important; color: grey" | |
227 | + > | |
228 | + <h5>{{props.item.fileName}}</h5> | |
229 | + </a> | |
222 | 230 | </td> |
223 | 231 | <td class="text-xs-center td td-row"> |
224 | 232 | <span> |
... | ... | @@ -263,7 +271,12 @@ |
263 | 271 | >Your search for "{{ search }}" found no results.</v-alert> |
264 | 272 | </v-data-table> |
265 | 273 | <!-- ****** ADD Notice Board ****** --> |
266 | - <v-dialog v-model="addNoticeBoardDialog" max-width="600px" v-if="addNoticeBoardDialog" persistent> | |
274 | + <v-dialog | |
275 | + v-model="addNoticeBoardDialog" | |
276 | + max-width="600px" | |
277 | + v-if="addNoticeBoardDialog" | |
278 | + persistent | |
279 | + > | |
267 | 280 | <v-card flat class="card-style pa-2" dark> |
268 | 281 | <v-layout> |
269 | 282 | <v-flex xs12> |
... | ... | @@ -401,6 +414,7 @@ export default { |
401 | 414 | pagination: { |
402 | 415 | rowsPerPage: 10, |
403 | 416 | }, |
417 | + imageData: {}, | |
404 | 418 | imageName: "", |
405 | 419 | imageUrl: "", |
406 | 420 | imageFile: "", |
... | ... | @@ -440,14 +454,14 @@ export default { |
440 | 454 | }, |
441 | 455 | }), |
442 | 456 | watch: { |
443 | - addNoticeBoardDialog: function (val) { | |
444 | - if (!val) { | |
445 | - this.addNoticeBoard = []; | |
446 | - this.imageName = ""; | |
447 | - this.imageFile = ""; | |
448 | - this.imageUrl = ""; | |
449 | - } | |
450 | - }, | |
457 | + // addNoticeBoardDialog: function (val) { | |
458 | + // if (!val) { | |
459 | + // this.addNoticeBoard = []; | |
460 | + // this.imageName = ""; | |
461 | + // this.imageFile = ""; | |
462 | + // this.imageUrl = ""; | |
463 | + // } | |
464 | + // }, | |
451 | 465 | }, |
452 | 466 | methods: { |
453 | 467 | pickFile() { |
... | ... | @@ -522,13 +536,13 @@ export default { |
522 | 536 | }, |
523 | 537 | submit() { |
524 | 538 | var signatures = { |
525 | - JVBERi0: "other", | |
526 | - iVBORw0KGgo: "image", | |
527 | - UEsDBBQ: "other", | |
528 | - "/": "image", | |
529 | - AAABAA: "image", | |
530 | - IywiV2hhdC: "other", | |
531 | - bmFtZSxl: "other", | |
539 | + // JVBERi0: "other", | |
540 | + // iVBORw0KGgo: "image", | |
541 | + // UEsDBBQ: "other", | |
542 | + // "/": "image", | |
543 | + // AAABAA: "image", | |
544 | + // IywiV2hhdC: "other", | |
545 | + // bmFtZSxl: "other", | |
532 | 546 | }; |
533 | 547 | function detectMimeType(b64) { |
534 | 548 | for (var s in signatures) { |
... | ... | @@ -596,12 +610,12 @@ export default { |
596 | 610 | fileName: this.imageName, |
597 | 611 | }; |
598 | 612 | var signatures = { |
599 | - JVBERi0: "other", | |
600 | - iVBORw0KGgo: "image", | |
601 | - UEsDBBQ: "other", | |
602 | - "/": "image", | |
603 | - AAABAA: "image", | |
604 | - IywiV2hhdC: "other", | |
613 | + // JVBERi0: "other", | |
614 | + // iVBORw0KGgo: "image", | |
615 | + // UEsDBBQ: "other", | |
616 | + // "/": "image", | |
617 | + // AAABAA: "image", | |
618 | + // IywiV2hhdC: "other", | |
605 | 619 | }; |
606 | 620 | function detectMimeType(b64) { |
607 | 621 | for (var s in signatures) { |
... | ... | @@ -659,4 +673,11 @@ export default { |
659 | 673 | this.getNoticeDataList(); |
660 | 674 | }, |
661 | 675 | }; |
662 | -</script> | |
663 | 676 | \ No newline at end of file |
677 | +</script> | |
678 | + | |
679 | +<style scoped> | |
680 | +a:hover :hover { | |
681 | + text-decoration: underline !important; | |
682 | + color: blue; | |
683 | +} | |
684 | +</style> | |
664 | 685 | \ No newline at end of file | ... | ... |
src/pages/Parent/parents.vue
... | ... | @@ -312,7 +312,7 @@ |
312 | 312 | |
313 | 313 | <!-- ****** PROFILE VIEW Parents DEATILS ****** --> |
314 | 314 | |
315 | - <v-dialog v-model="profileParentDialog" max-width="500px" scrollable persistent> | |
315 | + <v-dialog v-model="profileParentDialog" max-width="700px" persistent> | |
316 | 316 | <v-card class="card-style pa-2" dark> |
317 | 317 | <v-layout> |
318 | 318 | <v-flex xs12> | ... | ... |
src/pages/Payroll/hourlyTemplate.vue
... | ... | @@ -304,7 +304,7 @@ export default { |
304 | 304 | this.loading = false; |
305 | 305 | }) |
306 | 306 | .catch((error) => { |
307 | - console.log("error", error); | |
307 | + // console.log("error", error); | |
308 | 308 | this.snackbar = true; |
309 | 309 | this.color = "red"; |
310 | 310 | // this.text = error.response.data.message; |
... | ... | @@ -367,7 +367,7 @@ export default { |
367 | 367 | this.getHourlyList(); |
368 | 368 | }) |
369 | 369 | .catch((error) => { |
370 | - console.log("error", error); | |
370 | + // console.log("error", error); | |
371 | 371 | this.snackbar = true; |
372 | 372 | this.text = error.response.data.message; |
373 | 373 | this.color = "red"; |
... | ... | @@ -396,10 +396,12 @@ export default { |
396 | 396 | this.editHourDialog = false; |
397 | 397 | }) |
398 | 398 | .catch((error) => { |
399 | - console.log("error", error); | |
399 | + // console.log("error", error); | |
400 | 400 | this.snackbar = true; |
401 | 401 | // this.text = error.response.data.message; |
402 | - this.color = "red"; | |
402 | + this.snackbar = true; | |
403 | + this.color = "error"; | |
404 | + this.text = error.response.data.message; | |
403 | 405 | }); |
404 | 406 | }, |
405 | 407 | ... | ... |
src/pages/Payroll/manageSalary.vue
... | ... | @@ -508,10 +508,10 @@ export default { |
508 | 508 | data: () => ({ |
509 | 509 | search: "", |
510 | 510 | pagination: { |
511 | - rowsPerPage: 10 | |
511 | + rowsPerPage: 10, | |
512 | 512 | }, |
513 | 513 | |
514 | - role: [v => !!v || "Role Name is required"], | |
514 | + role: [(v) => !!v || "Role Name is required"], | |
515 | 515 | getRoles: [], |
516 | 516 | teacherList: [], |
517 | 517 | roleList: [], |
... | ... | @@ -522,7 +522,7 @@ export default { |
522 | 522 | salaryItem: "", |
523 | 523 | |
524 | 524 | getReport: { |
525 | - role: "" | |
525 | + role: "", | |
526 | 526 | }, |
527 | 527 | |
528 | 528 | showTeacher: false, |
... | ... | @@ -536,9 +536,9 @@ export default { |
536 | 536 | editedItem: { |
537 | 537 | salaryTemplate: { |
538 | 538 | allowances: {}, |
539 | - deduction: {} | |
539 | + deduction: {}, | |
540 | 540 | }, |
541 | - hourlyTemplate: {} | |
541 | + hourlyTemplate: {}, | |
542 | 542 | }, |
543 | 543 | |
544 | 544 | // salaryGrades: {}, |
... | ... | @@ -561,31 +561,31 @@ export default { |
561 | 561 | text: "No", |
562 | 562 | align: "", |
563 | 563 | sortable: false, |
564 | - value: "No" | |
564 | + value: "No", | |
565 | 565 | }, |
566 | 566 | { |
567 | 567 | text: "Profile Pic", |
568 | 568 | value: "profilePicUrl", |
569 | 569 | sortable: false, |
570 | - align: "center" | |
570 | + align: "center", | |
571 | 571 | }, |
572 | 572 | { text: "Name", value: "name", sortable: false, align: "center" }, |
573 | 573 | { |
574 | 574 | text: "Join Date", |
575 | 575 | value: "joinDate", |
576 | 576 | sortable: false, |
577 | - align: "center" | |
577 | + align: "center", | |
578 | 578 | }, |
579 | - { text: "Action", value: "", sortable: false, align: "center" } | |
579 | + { text: "Action", value: "", sortable: false, align: "center" }, | |
580 | 580 | ], |
581 | - desserts: [] | |
581 | + desserts: [], | |
582 | 582 | }), |
583 | 583 | |
584 | 584 | methods: { |
585 | 585 | close() { |
586 | 586 | this.editHourDialog = false; |
587 | 587 | }, |
588 | - dates: function(date) { | |
588 | + dates: function (date) { | |
589 | 589 | return moment(date).format("MMMM DD, YYYY"); |
590 | 590 | }, |
591 | 591 | editItem(item) { |
... | ... | @@ -611,29 +611,24 @@ export default { |
611 | 611 | var token = this.$store.state.token; |
612 | 612 | http() |
613 | 613 | .get("/getRolesList", { |
614 | - headers: { Authorization: "Bearer " + token } | |
614 | + headers: { Authorization: "Bearer " + token }, | |
615 | 615 | }) |
616 | - .then(response => { | |
616 | + .then((response) => { | |
617 | 617 | this.getRoles = response.data.data; |
618 | 618 | // if (this.getRoles[2].role !== 3) { |
619 | 619 | // this.getRoles = response.data.data; |
620 | 620 | // console.log("roles", this.getRoles[2].role); |
621 | 621 | // } |
622 | - this.getRoles = response.data.data; | |
623 | - var removedRoles = _.remove(this.getRoles, function(c) { | |
624 | - //remove if color is green or yellow | |
625 | - return c.role === 1 || c.role === 4 || c.role === 5; | |
626 | - // console.log(c); | |
627 | - }); | |
622 | + | |
623 | + // var removedRoles = _.remove(this.getRoles, function (c) { | |
624 | + // //remove if color is green or yellow | |
625 | + // return c.role === 1 || c.role === 4 || c.role === 5; | |
626 | + // // console.log(c); | |
627 | + // }); | |
628 | 628 | this.showLoader = false; |
629 | 629 | }) |
630 | - .catch(error => { | |
630 | + .catch((error) => { | |
631 | 631 | this.showLoader = false; |
632 | - if (error.response.status === 401) { | |
633 | - this.$router.replace({ path: "/" }); | |
634 | - this.$store.dispatch("setToken", null); | |
635 | - this.$store.dispatch("Id", null); | |
636 | - } | |
637 | 632 | }); |
638 | 633 | }, |
639 | 634 | |
... | ... | @@ -650,14 +645,14 @@ export default { |
650 | 645 | var token = this.$store.state.token; |
651 | 646 | http() |
652 | 647 | .get("/getTeachersList", { |
653 | - headers: { Authorization: "Bearer " + token } | |
648 | + headers: { Authorization: "Bearer " + token }, | |
654 | 649 | }) |
655 | - .then(response => { | |
650 | + .then((response) => { | |
656 | 651 | this.teacherList = response.data.data; |
657 | 652 | this.showTeacher = true; |
658 | 653 | this.showLoader = false; |
659 | 654 | }) |
660 | - .catch(error => { | |
655 | + .catch((error) => { | |
661 | 656 | this.showLoader = false; |
662 | 657 | if (error.response.status === 401) { |
663 | 658 | this.$router.replace({ path: "/" }); |
... | ... | @@ -674,14 +669,14 @@ export default { |
674 | 669 | "/getUserDetailWithRoles", |
675 | 670 | { params: { role: this.getReport.role } }, |
676 | 671 | { |
677 | - headers: { Authorization: "Bearer " + this.token } | |
672 | + headers: { Authorization: "Bearer " + this.token }, | |
678 | 673 | } |
679 | 674 | ) |
680 | - .then(response => { | |
675 | + .then((response) => { | |
681 | 676 | this.roleList = response.data.data; |
682 | 677 | this.showLoader = false; |
683 | 678 | }) |
684 | - .catch(err => { | |
679 | + .catch((err) => { | |
685 | 680 | this.showLoader = false; |
686 | 681 | }); |
687 | 682 | }, |
... | ... | @@ -690,14 +685,14 @@ export default { |
690 | 685 | this.loadingSearch = true; |
691 | 686 | http() |
692 | 687 | .get("/getSalaryList", { |
693 | - headers: { Authorization: "Bearer " + this.token } | |
688 | + headers: { Authorization: "Bearer " + this.token }, | |
694 | 689 | }) |
695 | - .then(response => { | |
690 | + .then((response) => { | |
696 | 691 | this.salaryData = response.data.data; |
697 | 692 | this.showLoader = false; |
698 | 693 | this.loadingSearch = false; |
699 | 694 | }) |
700 | - .catch(error => { | |
695 | + .catch((error) => { | |
701 | 696 | // console.log("err====>", err); |
702 | 697 | this.showLoader = false; |
703 | 698 | this.loadingSearch = false; |
... | ... | @@ -715,14 +710,14 @@ export default { |
715 | 710 | this.loadingSearch = true; |
716 | 711 | http() |
717 | 712 | .get("/getHourlyList", { |
718 | - headers: { Authorization: "Bearer " + this.token } | |
713 | + headers: { Authorization: "Bearer " + this.token }, | |
719 | 714 | }) |
720 | - .then(response => { | |
715 | + .then((response) => { | |
721 | 716 | this.hourlyData = response.data.data; |
722 | 717 | this.showLoader = false; |
723 | 718 | this.loadingSearch = false; |
724 | 719 | }) |
725 | - .catch(error => { | |
720 | + .catch((error) => { | |
726 | 721 | // console.log("err====>", err); |
727 | 722 | this.showLoader = false; |
728 | 723 | this.loadingSearch = false; |
... | ... | @@ -755,7 +750,7 @@ export default { |
755 | 750 | } |
756 | 751 | }, |
757 | 752 | selectGrade() { |
758 | - console.log("this.editedItem", this.editedItem); | |
753 | + // console.log("this.editedItem", this.editedItem); | |
759 | 754 | }, |
760 | 755 | selectView() { |
761 | 756 | if (this.editedItem.view.png === "Monthly") { |
... | ... | @@ -772,15 +767,15 @@ export default { |
772 | 767 | role: this.editedItem.role, |
773 | 768 | userId: this.editedItem._id, |
774 | 769 | templateName: this.editedItem.salary, |
775 | - templateId: this.editedItem.salaryId | |
770 | + templateId: this.editedItem.salaryId, | |
776 | 771 | }; |
777 | 772 | http() |
778 | 773 | .put("/updateUserSalary", updateSalary, { |
779 | 774 | headers: { |
780 | - Authorization: "Bearer " + this.token | |
781 | - } | |
775 | + Authorization: "Bearer " + this.token, | |
776 | + }, | |
782 | 777 | }) |
783 | - .then(response => { | |
778 | + .then((response) => { | |
784 | 779 | this.getUserDetailWithRoles(); |
785 | 780 | this.close(); |
786 | 781 | this.snackbar = true; |
... | ... | @@ -788,10 +783,12 @@ export default { |
788 | 783 | this.color = "green"; |
789 | 784 | this.editSalaryDialog = false; |
790 | 785 | }) |
791 | - .catch(error => { | |
792 | - console.log("error", error); | |
786 | + .catch((error) => { | |
787 | + // console.log("error", error); | |
788 | + this.snackbar = true; | |
793 | 789 | this.snackbar = true; |
794 | - this.color = "red"; | |
790 | + this.color = "error"; | |
791 | + this.text = error.response.data.message; | |
795 | 792 | }); |
796 | 793 | }, |
797 | 794 | |
... | ... | @@ -824,7 +821,7 @@ export default { |
824 | 821 | // this.text = error.response.data.message; |
825 | 822 | // this.color = "red"; |
826 | 823 | // }); |
827 | - } | |
824 | + }, | |
828 | 825 | |
829 | 826 | // selectAllowances() { |
830 | 827 | // this.salaryTypeData.push({ |
... | ... | @@ -911,6 +908,6 @@ export default { |
911 | 908 | this.getRole(); |
912 | 909 | this.getSalaryList(); |
913 | 910 | this.getHourlyList(); |
914 | - } | |
911 | + }, | |
915 | 912 | }; |
916 | 913 | </script> |
917 | 914 | \ No newline at end of file | ... | ... |
src/pages/Payroll/salaryTemplate.vue
... | ... | @@ -1019,7 +1019,7 @@ export default { |
1019 | 1019 | this.clear(); |
1020 | 1020 | }) |
1021 | 1021 | .catch((error) => { |
1022 | - console.log("error", error); | |
1022 | + // console.log("error", error); | |
1023 | 1023 | this.snackbar = true; |
1024 | 1024 | this.text = error.response.data.message; |
1025 | 1025 | this.color = "red"; |
... | ... | @@ -1053,11 +1053,11 @@ export default { |
1053 | 1053 | // console.log("allowances", allowancesValue_.allowancesValue); |
1054 | 1054 | totalAllowances = |
1055 | 1055 | Number(totalAllowances) + Number(allowancesValue_.allowancesValue); |
1056 | - console.log("totalAllowances", totalAllowances); | |
1056 | + // console.log("totalAllowances", totalAllowances); | |
1057 | 1057 | } |
1058 | 1058 | this.editedItem.grossSalary = |
1059 | 1059 | totalAllowances + Number(this.editedItem.basicSalary); |
1060 | - console.log("this.editedItem.grossSalary", this.editedItem.grossSalary); | |
1060 | + // console.log("this.editedItem.grossSalary", this.editedItem.grossSalary); | |
1061 | 1061 | }); |
1062 | 1062 | }, |
1063 | 1063 | selectDeduction() { |
... | ... | @@ -1083,7 +1083,7 @@ export default { |
1083 | 1083 | // console.log("deduction", deductionValue_.deductionValue); |
1084 | 1084 | totalDeductions = |
1085 | 1085 | Number(totalDeductions) + Number(deductionValue_.deductionValue); |
1086 | - console.log("this.totalDeductions", totalDeductions); | |
1086 | + // console.log("this.totalDeductions", totalDeductions); | |
1087 | 1087 | } |
1088 | 1088 | // this.editedItem.totalDeduction = totalDeductions; |
1089 | 1089 | // console.log("this.totalDeduction", this.editedItem.totalDeduction); | ... | ... |
src/pages/Reminder/reminder.vue
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> |
20 | 20 | <v-btn icon large flat slot="activator"> |
21 | 21 | <v-avatar size="40px"> |
22 | - <img src="/static/icon/user.png"> | |
22 | + <img src="/static/icon/user.png" /> | |
23 | 23 | </v-avatar> |
24 | 24 | </v-btn> |
25 | 25 | <v-list class="pa-0"> |
... | ... | @@ -73,7 +73,7 @@ |
73 | 73 | color="success" |
74 | 74 | >{{ text }}</v-snackbar> |
75 | 75 | <v-dialog v-model="dialog" max-width="600px" persistent> |
76 | - <v-flex xs12 sm12 class=""> | |
76 | + <v-flex xs12 sm12 class> | |
77 | 77 | <v-toolbar color="white"> |
78 | 78 | <v-spacer></v-spacer> |
79 | 79 | <v-toolbar-title>Edit Reminder</v-toolbar-title> |
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | class="text-xs-center text-sm-center text-md-center text-lg-center mr-4" |
89 | 89 | > |
90 | 90 | <v-avatar size="100px"> |
91 | - <img src="/static/icon/user.png" v-if="!imageUrl"> | |
91 | + <img src="/static/icon/user.png" v-if="!imageUrl" /> | |
92 | 92 | </v-avatar> |
93 | 93 | <input |
94 | 94 | type="file" |
... | ... | @@ -96,51 +96,51 @@ |
96 | 96 | ref="image" |
97 | 97 | accept="image/*" |
98 | 98 | @change="onFilePicked" |
99 | - > | |
99 | + /> | |
100 | 100 | <img |
101 | 101 | :src="imageData.imageUrl" |
102 | 102 | height="150" |
103 | 103 | v-if="imageUrl" |
104 | 104 | style="border-radius:50%; width:200px" |
105 | - > | |
105 | + /> | |
106 | 106 | </v-flex> |
107 | 107 | </v-layout> |
108 | - <v-flex xs12 sm12> | |
109 | - <v-layout> | |
110 | - <v-flex xs4 class="pt-4 subheading"> | |
111 | - <label class="right">Title:</label> | |
112 | - </v-flex> | |
113 | - <v-flex xs5 class="ml-3"> | |
114 | - <v-text-field | |
115 | - v-model="editedItem.title" | |
116 | - placeholder="fill your Title" | |
117 | - name="name" | |
118 | - type="text" | |
119 | - ></v-text-field> | |
120 | - </v-flex> | |
121 | - </v-layout> | |
122 | - </v-flex> | |
123 | - <v-flex xs12 sm12> | |
124 | - <v-layout> | |
125 | - <v-flex xs4 class="pt-4 subheading"> | |
126 | - <label class="right">Description:</label> | |
127 | - </v-flex> | |
128 | - <v-flex xs5 class="ml-3"> | |
129 | - <v-text-field | |
130 | - placeholder="fill your Description" | |
131 | - v-model="editedItem.description" | |
132 | - type="text" | |
133 | - ></v-text-field> | |
134 | - </v-flex> | |
135 | - </v-layout> | |
136 | - </v-flex> | |
108 | + <v-flex xs12 sm12> | |
109 | + <v-layout> | |
110 | + <v-flex xs4 class="pt-4 subheading"> | |
111 | + <label class="right">Title:</label> | |
112 | + </v-flex> | |
113 | + <v-flex xs5 class="ml-3"> | |
114 | + <v-text-field | |
115 | + v-model="editedItem.title" | |
116 | + placeholder="fill your Title" | |
117 | + name="name" | |
118 | + type="text" | |
119 | + ></v-text-field> | |
120 | + </v-flex> | |
121 | + </v-layout> | |
122 | + </v-flex> | |
123 | + <v-flex xs12 sm12> | |
124 | + <v-layout> | |
125 | + <v-flex xs4 class="pt-4 subheading"> | |
126 | + <label class="right">Description:</label> | |
127 | + </v-flex> | |
128 | + <v-flex xs5 class="ml-3"> | |
129 | + <v-text-field | |
130 | + placeholder="fill your Description" | |
131 | + v-model="editedItem.description" | |
132 | + type="text" | |
133 | + ></v-text-field> | |
134 | + </v-flex> | |
135 | + </v-layout> | |
136 | + </v-flex> | |
137 | 137 | <v-layout> |
138 | 138 | <v-flex xs12 sm10 offset-sm1> |
139 | - <v-card-actions> | |
140 | - <v-btn round dark @click.native="close">Cancel</v-btn> | |
141 | - <v-spacer></v-spacer> | |
142 | - <v-btn round dark @click="save">Save</v-btn> | |
143 | - </v-card-actions> | |
139 | + <v-card-actions> | |
140 | + <v-btn round dark @click.native="close">Cancel</v-btn> | |
141 | + <v-spacer></v-spacer> | |
142 | + <v-btn round dark @click="save">Save</v-btn> | |
143 | + </v-card-actions> | |
144 | 144 | </v-flex> |
145 | 145 | </v-layout> |
146 | 146 | </v-container> |
... | ... | @@ -160,15 +160,15 @@ |
160 | 160 | <v-card> |
161 | 161 | <v-flex align-center justify-center layout text-xs-center> |
162 | 162 | <v-avatar size="50px" style="position:absolute; top:20px;"> |
163 | - <img src="/static/icon/user.png"> | |
163 | + <img src="/static/icon/user.png" /> | |
164 | 164 | </v-avatar> |
165 | 165 | </v-flex> |
166 | 166 | <v-card-text> |
167 | 167 | <v-container grid-list-md> |
168 | 168 | <v-layout wrap> |
169 | 169 | <v-flex> |
170 | - <br> | |
171 | - <br> | |
170 | + <br /> | |
171 | + <br /> | |
172 | 172 | <v-layout> |
173 | 173 | <v-flex xs5 sm6> |
174 | 174 | <h5 class="right my-1">Title:</h5> |
... | ... | @@ -201,7 +201,7 @@ |
201 | 201 | color="success" |
202 | 202 | >{{ text }}</v-snackbar> |
203 | 203 | |
204 | - <!-- ****** EXISTING-USERS REMINDER TABLE ****** --> | |
204 | + <!-- ****** EXISTING-USERS REMINDER TABLE ****** --> | |
205 | 205 | <v-data-table |
206 | 206 | :headers="headers" |
207 | 207 | :items="desserts" |
... | ... | @@ -209,7 +209,7 @@ |
209 | 209 | :search="search" |
210 | 210 | > |
211 | 211 | <template slot="items" slot-scope="props"> |
212 | - <td id="td" class="text-xs-center">{{ props.index + 1}}</td> | |
212 | + <td id="td" class="text-xs-center">{{ props.index + 1}}</td> | |
213 | 213 | <td id="td" class="text-xs-center">{{ props.item.title}}</td> |
214 | 214 | <td id="td" class="text-xs-center">{{ props.item.description}}</td> |
215 | 215 | |
... | ... | @@ -220,19 +220,19 @@ |
220 | 220 | class="mr-5" |
221 | 221 | @click="profile(props.item)" |
222 | 222 | src="/static/icon/eye1.png" |
223 | - > | |
223 | + /> | |
224 | 224 | <img |
225 | 225 | style="cursor:pointer; width:20px; height:18px; " |
226 | 226 | class="mr-5" |
227 | 227 | @click="editItem(props.item)" |
228 | 228 | src="/static/icon/edit1.png" |
229 | - > | |
229 | + /> | |
230 | 230 | <img |
231 | 231 | style="cursor:pointer; width:20px;height:20px; " |
232 | 232 | class="mr-5" |
233 | 233 | @click="deleteItem(props.item)" |
234 | 234 | src="/static/icon/delete1.png" |
235 | - > | |
235 | + /> | |
236 | 236 | </span> |
237 | 237 | </td> |
238 | 238 | </template> |
... | ... | @@ -246,7 +246,7 @@ |
246 | 246 | </v-tab-item> |
247 | 247 | |
248 | 248 | <!-- ****** ADD MULTIPLE REMINDER ****** --> |
249 | - | |
249 | + | |
250 | 250 | <v-tab-item> |
251 | 251 | <v-container> |
252 | 252 | <v-snackbar |
... | ... | @@ -267,7 +267,7 @@ |
267 | 267 | class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" |
268 | 268 | > |
269 | 269 | <v-avatar size="100px"> |
270 | - <img src="/static/icon/user.png" v-if="!imageUrl"> | |
270 | + <img src="/static/icon/user.png" v-if="!imageUrl" /> | |
271 | 271 | </v-avatar> |
272 | 272 | <input |
273 | 273 | type="file" |
... | ... | @@ -275,47 +275,47 @@ |
275 | 275 | ref="image" |
276 | 276 | accept="image/*" |
277 | 277 | @change="onFilePicked" |
278 | - > | |
278 | + /> | |
279 | 279 | <img |
280 | 280 | :src="imageData.imageUrl" |
281 | 281 | height="150" |
282 | 282 | v-if="imageUrl" |
283 | 283 | style="border-radius:50%; width:200px" |
284 | - > | |
284 | + /> | |
285 | 285 | </v-flex> |
286 | 286 | </v-layout> |
287 | - <v-flex xs12> | |
288 | - <v-layout> | |
289 | - <v-flex xs4 class="pt-4 subheading"> | |
290 | - <label class="right">Title:</label> | |
291 | - </v-flex> | |
292 | - <v-flex xs4 class="ml-3"> | |
293 | - <v-text-field | |
294 | - v-model="addRemind.title" | |
295 | - placeholder="fill your Title" | |
296 | - type="text" | |
297 | - :rules="titleRules" | |
298 | - required | |
299 | - ></v-text-field> | |
300 | - </v-flex> | |
301 | - </v-layout> | |
302 | - </v-flex> | |
303 | - <v-flex xs12> | |
304 | - <v-layout> | |
305 | - <v-flex xs4 class="pt-4 subheading"> | |
306 | - <label class="right">Description:</label> | |
307 | - </v-flex> | |
308 | - <v-flex xs4 class="ml-3"> | |
309 | - <v-text-field | |
310 | - placeholder="fill your Description" | |
311 | - :rules="descriptionRules" | |
312 | - v-model="addRemind.description" | |
313 | - type="text" | |
314 | - required | |
315 | - ></v-text-field> | |
316 | - </v-flex> | |
317 | - </v-layout> | |
318 | - </v-flex> | |
287 | + <v-flex xs12> | |
288 | + <v-layout> | |
289 | + <v-flex xs4 class="pt-4 subheading"> | |
290 | + <label class="right">Title:</label> | |
291 | + </v-flex> | |
292 | + <v-flex xs4 class="ml-3"> | |
293 | + <v-text-field | |
294 | + v-model="addRemind.title" | |
295 | + placeholder="fill your Title" | |
296 | + type="text" | |
297 | + :rules="titleRules" | |
298 | + required | |
299 | + ></v-text-field> | |
300 | + </v-flex> | |
301 | + </v-layout> | |
302 | + </v-flex> | |
303 | + <v-flex xs12> | |
304 | + <v-layout> | |
305 | + <v-flex xs4 class="pt-4 subheading"> | |
306 | + <label class="right">Description:</label> | |
307 | + </v-flex> | |
308 | + <v-flex xs4 class="ml-3"> | |
309 | + <v-text-field | |
310 | + placeholder="fill your Description" | |
311 | + :rules="descriptionRules" | |
312 | + v-model="addRemind.description" | |
313 | + type="text" | |
314 | + required | |
315 | + ></v-text-field> | |
316 | + </v-flex> | |
317 | + </v-layout> | |
318 | + </v-flex> | |
319 | 319 | <v-layout> |
320 | 320 | <v-flex xs12 sm6 offset-sm3> |
321 | 321 | <v-card-actions> |
... | ... | @@ -353,7 +353,7 @@ export default { |
353 | 353 | loading: false, |
354 | 354 | date: null, |
355 | 355 | search: "", |
356 | - showLoader:false, | |
356 | + showLoader: false, | |
357 | 357 | dialog: false, |
358 | 358 | dialog1: false, |
359 | 359 | valid: true, |
... | ... | @@ -361,56 +361,61 @@ export default { |
361 | 361 | newActive: false, |
362 | 362 | AddUsercredentials: {}, |
363 | 363 | pagination: { |
364 | - rowsPerPage: 15 | |
364 | + rowsPerPage: 15, | |
365 | 365 | }, |
366 | 366 | imageData: {}, |
367 | 367 | imageName: "", |
368 | 368 | imageUrl: "", |
369 | 369 | imageFile: "", |
370 | - titleRules: [v => !!v || " Tilte is required"], | |
371 | - descriptionRules: [v => !!v || " Description is required"], | |
370 | + titleRules: [(v) => !!v || " Tilte is required"], | |
371 | + descriptionRules: [(v) => !!v || " Description is required"], | |
372 | 372 | headers: [ |
373 | 373 | { |
374 | 374 | text: "No", |
375 | 375 | align: "center", |
376 | 376 | sortable: false, |
377 | - value: "No" | |
377 | + value: "No", | |
378 | 378 | }, |
379 | 379 | { text: "Title", value: "title", sortable: false, align: "center" }, |
380 | - { text: "Description", value: "description", sortable: false, align: "center" }, | |
381 | - { text: "Action", value: "", sortable: false, align: "center" } | |
380 | + { | |
381 | + text: "Description", | |
382 | + value: "description", | |
383 | + sortable: false, | |
384 | + align: "center", | |
385 | + }, | |
386 | + { text: "Action", value: "", sortable: false, align: "center" }, | |
382 | 387 | ], |
383 | 388 | desserts: [], |
384 | 389 | editedIndex: -1, |
385 | - addRemind:{ | |
386 | - title:'', | |
387 | - description:'' | |
390 | + addRemind: { | |
391 | + title: "", | |
392 | + description: "", | |
388 | 393 | }, |
389 | 394 | editedItem: { |
390 | - title:'', | |
391 | - description:'' | |
395 | + title: "", | |
396 | + description: "", | |
392 | 397 | }, |
393 | 398 | defaultItem: { |
394 | - title:'', | |
395 | - description:'' | |
399 | + title: "", | |
400 | + description: "", | |
396 | 401 | }, |
397 | 402 | userName: "", |
398 | 403 | items: [ |
399 | 404 | { |
400 | 405 | href: "/changepassword", |
401 | 406 | title: "Change Password", |
402 | - click: e => { | |
403 | - console.log(e); | |
404 | - } | |
407 | + click: (e) => { | |
408 | + // console.log(e); | |
409 | + }, | |
405 | 410 | }, |
406 | 411 | { |
407 | 412 | href: "#", |
408 | 413 | title: "Logout", |
409 | - click: e => { | |
414 | + click: (e) => { | |
410 | 415 | window.getApp.$emit("APP_LOGOUT"); |
411 | - } | |
412 | - } | |
413 | - ] | |
416 | + }, | |
417 | + }, | |
418 | + ], | |
414 | 419 | }), |
415 | 420 | methods: { |
416 | 421 | pickFile() { |
... | ... | @@ -432,8 +437,8 @@ export default { |
432 | 437 | this.imageUrl = fr.result; |
433 | 438 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
434 | 439 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
435 | - console.log("upload=======>", this.imageData.imageUrl); | |
436 | - console.log("imageFile", this.imageFile); | |
440 | + // console.log("upload=======>", this.imageData.imageUrl); | |
441 | + // console.log("imageFile", this.imageFile); | |
437 | 442 | }); |
438 | 443 | } else { |
439 | 444 | this.imageName = ""; |
... | ... | @@ -446,14 +451,14 @@ export default { |
446 | 451 | var token = this.$store.state.token; |
447 | 452 | http() |
448 | 453 | .get("/getRemindersList", { |
449 | - headers: { Authorization: "Bearer " + token } | |
454 | + headers: { Authorization: "Bearer " + token }, | |
450 | 455 | }) |
451 | - .then(response => { | |
456 | + .then((response) => { | |
452 | 457 | this.desserts = response.data.data; |
453 | 458 | this.showLoader = false; |
454 | 459 | // console.log("getRemindersList=====>",this.desserts) |
455 | 460 | }) |
456 | - .catch(error => { | |
461 | + .catch((error) => { | |
457 | 462 | // console.log("err====>", err); |
458 | 463 | this.showLoader = false; |
459 | 464 | if (error.response.status === 401) { |
... | ... | @@ -476,23 +481,23 @@ export default { |
476 | 481 | |
477 | 482 | deleteItem(item) { |
478 | 483 | let deleteReminder = { |
479 | - reminderId: item._id | |
484 | + reminderId: item._id, | |
480 | 485 | }; |
481 | 486 | http() |
482 | 487 | .delete( |
483 | 488 | "/deleteReminder", |
484 | 489 | confirm("Are you sure you want to delete this?") && { |
485 | - params: deleteReminder | |
490 | + params: deleteReminder, | |
486 | 491 | } |
487 | 492 | ) |
488 | - .then(response => { | |
493 | + .then((response) => { | |
489 | 494 | // console.log("deleteReminder",deleteReminder) |
490 | 495 | if ((this.snackbar = true)) { |
491 | 496 | this.text = "Successfully delete Existing User"; |
492 | 497 | } |
493 | - this.getReminderList(); | |
498 | + this.getReminderList(); | |
494 | 499 | }) |
495 | - .catch(error => { | |
500 | + .catch((error) => { | |
496 | 501 | // console.log(error); |
497 | 502 | }); |
498 | 503 | }, |
... | ... | @@ -523,7 +528,7 @@ export default { |
523 | 528 | if (this.$refs.form.validate()) { |
524 | 529 | let imageData = new FormData(); |
525 | 530 | imageData.append("upload", this.imageFile); |
526 | - console.log(imageData); | |
531 | + // console.log(imageData); | |
527 | 532 | let addReminds = { |
528 | 533 | title: this.addRemind.title, |
529 | 534 | description: this.addRemind.description, |
... | ... | @@ -531,7 +536,7 @@ export default { |
531 | 536 | }; |
532 | 537 | http() |
533 | 538 | .post("/createReminder", addReminds) |
534 | - .then(response => { | |
539 | + .then((response) => { | |
535 | 540 | // console.log(addReminds) |
536 | 541 | if ((this.snackbar = true)) { |
537 | 542 | this.text = "New user added successfully"; |
... | ... | @@ -539,7 +544,7 @@ export default { |
539 | 544 | this.getReminderList(); |
540 | 545 | this.clear(); |
541 | 546 | }) |
542 | - .catch(error => { | |
547 | + .catch((error) => { | |
543 | 548 | // console.log(error); |
544 | 549 | if ((this.snackbar = true)) { |
545 | 550 | this.text = error.response.data.message; |
... | ... | @@ -553,25 +558,25 @@ export default { |
553 | 558 | this.$refs.form.reset(); |
554 | 559 | }, |
555 | 560 | save() { |
556 | - let imageData = new FormData(); | |
557 | - imageData.append("upload", this.imageFile); | |
558 | - console.log(imageData); | |
561 | + let imageData = new FormData(); | |
562 | + imageData.append("upload", this.imageFile); | |
563 | + // console.log(imageData); | |
559 | 564 | let editReminder = { |
560 | - reminderId:this.editedItem._id, | |
561 | - title: this.editedItem.title, | |
562 | - description: this.editedItem.description, | |
563 | - // imageData | |
565 | + reminderId: this.editedItem._id, | |
566 | + title: this.editedItem.title, | |
567 | + description: this.editedItem.description, | |
568 | + // imageData | |
564 | 569 | }; |
565 | 570 | http() |
566 | 571 | .put("/updateReminder", editReminder) |
567 | - .then(response => { | |
572 | + .then((response) => { | |
568 | 573 | // console.log("updateReminder",updateReminder); |
569 | 574 | if ((this.snackbar = true)) { |
570 | 575 | this.text = "Successfully Edit Existing User"; |
571 | 576 | } |
572 | 577 | this.getReminderList(); |
573 | 578 | }) |
574 | - .catch(error => { | |
579 | + .catch((error) => { | |
575 | 580 | // console.log(error); |
576 | 581 | }); |
577 | 582 | this.close(); |
... | ... | @@ -581,7 +586,7 @@ export default { |
581 | 586 | }, |
582 | 587 | handleFullScreen() { |
583 | 588 | Util.toggleFullScreen(); |
584 | - } | |
589 | + }, | |
585 | 590 | }, |
586 | 591 | mounted() { |
587 | 592 | this.getReminderList(); |
... | ... | @@ -589,8 +594,8 @@ export default { |
589 | 594 | computed: { |
590 | 595 | toolbarColor() { |
591 | 596 | return this.$vuetify.options.extra.mainNav; |
592 | - } | |
593 | - } | |
597 | + }, | |
598 | + }, | |
594 | 599 | }; |
595 | 600 | </script> |
596 | 601 | <style scoped> |
... | ... | @@ -688,7 +693,7 @@ h4 { |
688 | 693 | } |
689 | 694 | @media screen and (max-width: 380px) { |
690 | 695 | .pl-3 { |
691 | - padding-left: 0px !important; | |
696 | + padding-left: 0px !important; | |
692 | 697 | } |
693 | 698 | .right { |
694 | 699 | float: none !important; | ... | ... |
src/pages/Report/admitCard.vue
... | ... | @@ -524,8 +524,11 @@ export default { |
524 | 524 | this.showLoader = false; |
525 | 525 | }) |
526 | 526 | .catch((error) => { |
527 | - console.log("err====>", error); | |
527 | + // console.log("err====>", error); | |
528 | 528 | this.showLoader = false; |
529 | + this.snackbar = true; | |
530 | + this.color = "error"; | |
531 | + this.text = error.response.data.message; | |
529 | 532 | }); |
530 | 533 | }, |
531 | 534 | getSchedule() { |
... | ... | @@ -556,7 +559,7 @@ export default { |
556 | 559 | .then((response) => { |
557 | 560 | this.showTable = true; |
558 | 561 | this.getScheduleList = response.data.data; |
559 | - console.log(" getScheduleList - ", this.getScheduleList); | |
562 | + // console.log(" getScheduleList - ", this.getScheduleList); | |
560 | 563 | // this.schoolData = response.data.data.studentData.schoolId; |
561 | 564 | if (response.data.data.scheduleData.length === 0) { |
562 | 565 | this.showLoader = false; | ... | ... |
src/pages/Report/idCard.vue
... | ... | @@ -682,8 +682,11 @@ export default { |
682 | 682 | this.showLoader = false; |
683 | 683 | }) |
684 | 684 | .catch((error) => { |
685 | - console.log("err====>", error); | |
685 | + // console.log("err====>", error); | |
686 | 686 | this.showLoader = false; |
687 | + this.snackbar = true; | |
688 | + this.color = "error"; | |
689 | + this.text = error.response.data.message; | |
687 | 690 | }); |
688 | 691 | }, |
689 | 692 | getCards() { | ... | ... |
src/pages/Report/progressCardReport.vue
... | ... | @@ -501,8 +501,11 @@ export default { |
501 | 501 | this.showLoader = false; |
502 | 502 | }) |
503 | 503 | .catch((error) => { |
504 | - console.log("err====>", error); | |
504 | + // console.log("err====>", error); | |
505 | 505 | this.showLoader = false; |
506 | + this.snackbar = true; | |
507 | + this.color = "error"; | |
508 | + this.text = error.response.data.message; | |
506 | 509 | }); |
507 | 510 | }, |
508 | 511 | getMarkReportList() { |
... | ... | @@ -527,7 +530,7 @@ export default { |
527 | 530 | headers: { Authorization: "Bearer " + this.token }, |
528 | 531 | }) |
529 | 532 | .then((response) => { |
530 | - console.log("===response===", response.data.data[0].schoolId); | |
533 | + // console.log("===response===", response.data.data[0].schoolId); | |
531 | 534 | this.cardData = response.data.data; |
532 | 535 | this.schoolData = response.data.data[0].schoolId; |
533 | 536 | let newData = response.data.data; | ... | ... |
src/pages/Report/studentReport.vue
... | ... | @@ -224,7 +224,9 @@ |
224 | 224 | <td class="td td-row text-xs-center">{{ props.item.rollNo }}</td> |
225 | 225 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> |
226 | 226 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> |
227 | - <td class="td td-row text-xs-center">{{ props.item.sectionId.name }}</td> | |
227 | + <td | |
228 | + class="td td-row text-xs-center" | |
229 | + >{{ props.item.sectionId ? props.item.sectionId.name: '-' }}</td> | |
228 | 230 | </tr> |
229 | 231 | </template> |
230 | 232 | <v-alert |
... | ... | @@ -238,7 +240,14 @@ |
238 | 240 | <v-flex xs12 id="printMe" v-show="hidePrintStudentReport"> |
239 | 241 | <v-layout> |
240 | 242 | <v-flex xs12 style="text-align:center;margin-bottom:10px"> |
241 | - <img :src="userData.schoolLogoUrl" width="80" alt="logo" /> | |
243 | + <!-- <img :src="userData.schoolLogoUrl" width="80" alt="logo" /> --> | |
244 | + <v-avatar> | |
245 | + <img :src="userData.schoolLogoUrl" v-if="userData.schoolLogoUrl" /> | |
246 | + <img | |
247 | + src="/static/schoolIcons/INTRACK_White.png" | |
248 | + v-else-if="!userData.schoolLogoUrl" | |
249 | + /> | |
250 | + </v-avatar> | |
242 | 251 | <p class="title">{{ userData.name }}</p> |
243 | 252 | <p>{{ userData.address }}</p> |
244 | 253 | </v-flex> |
... | ... | @@ -280,9 +289,10 @@ |
280 | 289 | <td |
281 | 290 | style="border: 1px solid lightgrey !important;padding: 4px;" |
282 | 291 | >{{ studentReport.classId.classNum }}</td> |
283 | - <td | |
284 | - style="border: 1px solid lightgrey !important;padding: 4px;" | |
285 | - >{{ studentReport.sectionId.name }}</td> | |
292 | + <td style="border: 1px solid lightgrey !important;padding: 4px;"> | |
293 | + {{ studentReport.sectionId ? studentReport.sectionId.name: '-' | |
294 | + }} | |
295 | + </td> | |
286 | 296 | </tr> |
287 | 297 | </tbody> |
288 | 298 | </table> |
... | ... | @@ -326,59 +336,59 @@ export default { |
326 | 336 | hidePrintStudentReport: false, |
327 | 337 | addSection: [], |
328 | 338 | pagination: { |
329 | - rowsPerPage: 10 | |
339 | + rowsPerPage: 10, | |
330 | 340 | }, |
331 | - formRules: [v => !!v || "Form For is required"], | |
332 | - bloodGroupRules: [v => !!v || "Blood group is required"], | |
333 | - classRules: [v => !!v || "Class is required"], | |
334 | - sectionRules: [v => !!v || "Class is required"], | |
335 | - genderRules: [v => !!v || "Gender is required"], | |
336 | - routeRules: [v => !!v || "RouteI is required"], | |
337 | - hostelRules: [v => !!v || "Hostel is required"], | |
338 | - countryRules: [v => !!v || "Country is required"], | |
341 | + formRules: [(v) => !!v || "Form For is required"], | |
342 | + bloodGroupRules: [(v) => !!v || "Blood group is required"], | |
343 | + classRules: [(v) => !!v || "Class is required"], | |
344 | + sectionRules: [(v) => !!v || "Class is required"], | |
345 | + genderRules: [(v) => !!v || "Gender is required"], | |
346 | + routeRules: [(v) => !!v || "RouteI is required"], | |
347 | + hostelRules: [(v) => !!v || "Hostel is required"], | |
348 | + countryRules: [(v) => !!v || "Country is required"], | |
339 | 349 | headers: [ |
340 | 350 | { |
341 | 351 | align: "", |
342 | 352 | text: "No", |
343 | 353 | sortable: false, |
344 | - value: "No" | |
354 | + value: "No", | |
345 | 355 | }, |
346 | 356 | { |
347 | 357 | text: "Profile Pic", |
348 | 358 | vaue: "profilePicUrl", |
349 | 359 | sortable: false, |
350 | - align: "center" | |
360 | + align: "center", | |
351 | 361 | }, |
352 | 362 | { |
353 | 363 | text: "Name", |
354 | 364 | vaue: "name", |
355 | 365 | sortable: false, |
356 | - align: "center" | |
366 | + align: "center", | |
357 | 367 | }, |
358 | 368 | { |
359 | 369 | text: "Roll No.", |
360 | 370 | value: "rollNo", |
361 | 371 | sortable: false, |
362 | - align: "center" | |
372 | + align: "center", | |
363 | 373 | }, |
364 | 374 | { |
365 | 375 | text: "Email", |
366 | 376 | value: "email", |
367 | 377 | sortable: false, |
368 | - align: "center" | |
378 | + align: "center", | |
369 | 379 | }, |
370 | 380 | { |
371 | 381 | text: "Class", |
372 | 382 | value: "classId", |
373 | 383 | sortable: false, |
374 | - align: "center" | |
384 | + align: "center", | |
375 | 385 | }, |
376 | 386 | { |
377 | 387 | text: "Section", |
378 | 388 | value: "sectionId", |
379 | 389 | sortable: false, |
380 | - align: "center" | |
381 | - } | |
390 | + align: "center", | |
391 | + }, | |
382 | 392 | ], |
383 | 393 | classList: [], |
384 | 394 | report: {}, |
... | ... | @@ -387,12 +397,12 @@ export default { |
387 | 397 | formList: [ |
388 | 398 | { |
389 | 399 | name: "Blood Group", |
390 | - value: "bloodGroup" | |
400 | + value: "bloodGroup", | |
391 | 401 | }, |
392 | 402 | "Country", |
393 | 403 | "Gender", |
394 | 404 | "Transport", |
395 | - "Hostel" | |
405 | + "Hostel", | |
396 | 406 | // "Birthday" |
397 | 407 | ], |
398 | 408 | bloodGroupList: ["A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-"], |
... | ... | @@ -403,7 +413,7 @@ export default { |
403 | 413 | route: [], |
404 | 414 | Hostel: [], |
405 | 415 | hostelList: [], |
406 | - token: "" | |
416 | + token: "", | |
407 | 417 | }), |
408 | 418 | methods: { |
409 | 419 | clear() { |
... | ... | @@ -413,13 +423,13 @@ export default { |
413 | 423 | this.showLoader = true; |
414 | 424 | http() |
415 | 425 | .get("/getClassesList", { |
416 | - headers: { Authorization: "Bearer " + this.token } | |
426 | + headers: { Authorization: "Bearer " + this.token }, | |
417 | 427 | }) |
418 | - .then(response => { | |
428 | + .then((response) => { | |
419 | 429 | this.classList = response.data.data; |
420 | 430 | this.showLoader = false; |
421 | 431 | }) |
422 | - .catch(err => { | |
432 | + .catch((err) => { | |
423 | 433 | this.showLoader = false; |
424 | 434 | if (error.response.status === 401) { |
425 | 435 | this.$router.replace({ path: "/" }); |
... | ... | @@ -496,20 +506,23 @@ export default { |
496 | 506 | country: this.report.country, |
497 | 507 | gender: this.report.gender, |
498 | 508 | classId: this.report.classId, |
499 | - sectionId: this.report.sectionId | |
509 | + sectionId: this.report.sectionId, | |
500 | 510 | }, |
501 | - headers: { Authorization: "Bearer " + this.token } | |
511 | + headers: { Authorization: "Bearer " + this.token }, | |
502 | 512 | }) |
503 | - .then(response => { | |
513 | + .then((response) => { | |
504 | 514 | this.getStudentsReportList = response.data.data; |
505 | 515 | this.showTable = true; |
506 | 516 | this.showLoader = false; |
507 | 517 | this.clear(); |
508 | 518 | // console.log("getSectionsList=====>", response.data.data); |
509 | 519 | }) |
510 | - .catch(error => { | |
511 | - console.log("err====>", error); | |
520 | + .catch((error) => { | |
521 | + // console.log("err====>", error); | |
512 | 522 | this.showLoader = false; |
523 | + this.snackbar = true; | |
524 | + this.color = "error"; | |
525 | + this.text = error.response.data.message; | |
513 | 526 | }); |
514 | 527 | } |
515 | 528 | }, |
... | ... | @@ -521,16 +534,19 @@ export default { |
521 | 534 | "/getSectionsList", |
522 | 535 | { params: { classId: this.report.classId } }, |
523 | 536 | { |
524 | - headers: { Authorization: "Bearer " + this.token } | |
537 | + headers: { Authorization: "Bearer " + this.token }, | |
525 | 538 | } |
526 | 539 | ) |
527 | - .then(response => { | |
540 | + .then((response) => { | |
528 | 541 | this.addSection = response.data.data; |
529 | 542 | this.showLoader = false; |
530 | 543 | }) |
531 | - .catch(error => { | |
532 | - console.log("err====>", error); | |
544 | + .catch((error) => { | |
545 | + // console.log("err====>", error); | |
533 | 546 | this.showLoader = false; |
547 | + this.snackbar = true; | |
548 | + this.color = "error"; | |
549 | + this.text = error.response.data.message; | |
534 | 550 | }); |
535 | 551 | }, |
536 | 552 | // getFormList() { |
... | ... | @@ -561,17 +577,17 @@ export default { |
561 | 577 | getUserData() { |
562 | 578 | http() |
563 | 579 | .get("/getParticularUserDetail") |
564 | - .then(response => { | |
580 | + .then((response) => { | |
565 | 581 | this.userData = response.data.data; |
566 | 582 | }) |
567 | - .catch(error => { | |
583 | + .catch((error) => { | |
568 | 584 | // if (error.response.status === 401) { |
569 | 585 | // this.$router.replace({ path: "/" }); |
570 | 586 | // this.$store.dispatch("setToken", null); |
571 | 587 | // this.$store.dispatch("Id", null); |
572 | 588 | // } |
573 | 589 | }); |
574 | - } | |
590 | + }, | |
575 | 591 | }, |
576 | 592 | mounted() { |
577 | 593 | this.token = this.$store.state.token; |
... | ... | @@ -583,14 +599,14 @@ export default { |
583 | 599 | this.getClass(); |
584 | 600 | }, |
585 | 601 | created() { |
586 | - this.$root.$on("app:search", search => { | |
602 | + this.$root.$on("app:search", (search) => { | |
587 | 603 | this.search = search; |
588 | 604 | }); |
589 | 605 | }, |
590 | 606 | beforeDestroy() { |
591 | 607 | // dont forget to remove the listener |
592 | 608 | this.$root.$off("app:search"); |
593 | - } | |
609 | + }, | |
594 | 610 | }; |
595 | 611 | </script> |
596 | 612 | <style scoped> | ... | ... |
src/pages/School/viewSchoolDashboard.vue
... | ... | @@ -144,9 +144,15 @@ |
144 | 144 | </template> |
145 | 145 | </v-list> |
146 | 146 | </v-flex> |
147 | - <v-flex xs12 sm12 md9 lg9 > | |
147 | + <v-flex xs12 sm12 md9 lg9> | |
148 | 148 | <!-- <div id="chart"> --> |
149 | - <apexchart type="bar" height="250" style="max-width:800px !important" :options="chartOptions" :series="series"></apexchart> | |
149 | + <apexchart | |
150 | + type="bar" | |
151 | + height="250" | |
152 | + style="max-width:800px !important" | |
153 | + :options="chartOptions" | |
154 | + :series="series" | |
155 | + ></apexchart> | |
150 | 156 | <!-- </div> --> |
151 | 157 | </v-flex> |
152 | 158 | </v-layout> |
... | ... | @@ -298,14 +304,14 @@ export default { |
298 | 304 | demoEvents: [ |
299 | 305 | { |
300 | 306 | date: "2020/01/10", // Required |
301 | - title: "Foo" // Required | |
307 | + title: "Foo", // Required | |
302 | 308 | }, |
303 | 309 | { |
304 | 310 | date: "2020/01/12", |
305 | 311 | title: "Bar", |
306 | 312 | desc: "description", |
307 | - customClass: "disabled highlight" // Custom classes to an calendar cell | |
308 | - } | |
313 | + customClass: "disabled highlight", // Custom classes to an calendar cell | |
314 | + }, | |
309 | 315 | ], |
310 | 316 | |
311 | 317 | showLoader: false, |
... | ... | @@ -316,10 +322,10 @@ export default { |
316 | 322 | EventsList: [], |
317 | 323 | events: [], |
318 | 324 | config: { |
319 | - eventClick: event => { | |
325 | + eventClick: (event) => { | |
320 | 326 | this.selected = event; |
321 | 327 | this.dialog = true; |
322 | - } | |
328 | + }, | |
323 | 329 | }, |
324 | 330 | selected: {}, |
325 | 331 | // notice: {}, |
... | ... | @@ -336,28 +342,28 @@ export default { |
336 | 342 | { |
337 | 343 | key: "today", |
338 | 344 | highlight: true, |
339 | - dates: new Date() | |
340 | - } | |
345 | + dates: new Date(), | |
346 | + }, | |
341 | 347 | ], |
342 | 348 | drawer: true, |
343 | 349 | items: [ |
344 | 350 | { title: "Home", icon: "dashboard" }, |
345 | - { title: "About", icon: "question_answer" } | |
351 | + { title: "About", icon: "question_answer" }, | |
346 | 352 | ], |
347 | 353 | right: null, |
348 | 354 | |
349 | 355 | series: [ |
350 | 356 | { |
351 | 357 | name: "Total", |
352 | - data: [66, 44, 33] | |
353 | - } | |
358 | + data: [66, 44, 33], | |
359 | + }, | |
354 | 360 | ], |
355 | 361 | chartOptions: { |
356 | 362 | chart: { |
357 | 363 | // type: "bar", |
358 | 364 | height: 150, |
359 | - stacked: true | |
360 | - | |
365 | + stacked: true, | |
366 | + | |
361 | 367 | // animations: { |
362 | 368 | // enabled: true, |
363 | 369 | // easing: "easeinout", |
... | ... | @@ -377,8 +383,8 @@ export default { |
377 | 383 | horizontal: false, |
378 | 384 | columnWidth: "25%", |
379 | 385 | // endingShape: "rounded", |
380 | - distributed: true | |
381 | - } | |
386 | + distributed: true, | |
387 | + }, | |
382 | 388 | }, |
383 | 389 | responsive: [ |
384 | 390 | { |
... | ... | @@ -387,45 +393,45 @@ export default { |
387 | 393 | legend: { |
388 | 394 | position: "bottom", |
389 | 395 | offsetX: -10, |
390 | - offsetY: 0 | |
391 | - } | |
392 | - } | |
393 | - } | |
396 | + offsetY: 0, | |
397 | + }, | |
398 | + }, | |
399 | + }, | |
394 | 400 | ], |
395 | 401 | |
396 | 402 | legend: { |
397 | 403 | position: "right", |
398 | - offsetY: 40 | |
404 | + offsetY: 40, | |
399 | 405 | }, |
400 | 406 | colors: ["#7852cc", "#f9a825", "#ff8a89"], |
401 | 407 | dataLabels: { |
402 | - enabled: false | |
408 | + enabled: false, | |
403 | 409 | }, |
404 | 410 | stroke: { |
405 | 411 | show: true, |
406 | 412 | width: 2, |
407 | - colors: ["transparent"] | |
413 | + colors: ["transparent"], | |
408 | 414 | }, |
409 | 415 | xaxis: { |
410 | - categories: ["Fee", "Collections", "Expences"] | |
416 | + categories: ["Fee", "Collections", "Expences"], | |
411 | 417 | }, |
412 | 418 | yaxis: { |
413 | 419 | title: { |
414 | - text: "" | |
415 | - } | |
420 | + text: "", | |
421 | + }, | |
416 | 422 | }, |
417 | 423 | fill: { |
418 | - opacity: 1 | |
424 | + opacity: 1, | |
419 | 425 | }, |
420 | 426 | tooltip: { |
421 | 427 | y: { |
422 | - formatter: function(val, opts) { | |
428 | + formatter: function (val, opts) { | |
423 | 429 | // console.log("opts",opts.w.config.xaxis.categories) |
424 | 430 | return "" + val + " "; |
425 | - } | |
426 | - } | |
427 | - } | |
428 | - } | |
431 | + }, | |
432 | + }, | |
433 | + }, | |
434 | + }, | |
429 | 435 | }; |
430 | 436 | }, |
431 | 437 | mounted() { |
... | ... | @@ -456,7 +462,7 @@ export default { |
456 | 462 | // this.dialogNotice = true; |
457 | 463 | this.$router.push({ name: "NoticeBoard" }); |
458 | 464 | }, |
459 | - date: function(date) { | |
465 | + date: function (date) { | |
460 | 466 | return moment(date).format("MMMM DD, YYYY HH:mm"); |
461 | 467 | }, |
462 | 468 | refreshEvents() { |
... | ... | @@ -468,26 +474,26 @@ export default { |
468 | 474 | }, |
469 | 475 | eventSelected(event) { |
470 | 476 | this.selected = event; |
471 | - console.log("this.selected", this.selected); | |
477 | + // console.log("this.selected", this.selected); | |
472 | 478 | }, |
473 | 479 | // eventDropStart: function(event) { |
474 | 480 | // event.editable = false; |
475 | 481 | // }, |
476 | 482 | eventCreated(...test) { |
477 | - console.log(test); | |
483 | + // console.log(test); | |
478 | 484 | }, |
479 | 485 | getStudents() { |
480 | 486 | http() |
481 | 487 | .get("/getStudentsList", { |
482 | 488 | headers: { |
483 | - Authorization: "Bearer " + this.token | |
484 | - } | |
489 | + Authorization: "Bearer " + this.token, | |
490 | + }, | |
485 | 491 | }) |
486 | - .then(response => { | |
492 | + .then((response) => { | |
487 | 493 | this.students = response.data.data; |
488 | 494 | this.showLoader = false; |
489 | 495 | }) |
490 | - .catch(error => { | |
496 | + .catch((error) => { | |
491 | 497 | // console.log("err====>", err); |
492 | 498 | this.showLoader = false; |
493 | 499 | // if (error.response.status === 401) { |
... | ... | @@ -501,14 +507,14 @@ export default { |
501 | 507 | http() |
502 | 508 | .get("/getParentsList", { |
503 | 509 | headers: { |
504 | - Authorization: "Bearer " + this.token | |
505 | - } | |
510 | + Authorization: "Bearer " + this.token, | |
511 | + }, | |
506 | 512 | }) |
507 | - .then(response => { | |
513 | + .then((response) => { | |
508 | 514 | this.parents = response.data.data; |
509 | 515 | this.showLoader = false; |
510 | 516 | }) |
511 | - .catch(error => { | |
517 | + .catch((error) => { | |
512 | 518 | // console.log("err====>", err); |
513 | 519 | this.showLoader = false; |
514 | 520 | // if (error.response.status === 401) { |
... | ... | @@ -522,14 +528,14 @@ export default { |
522 | 528 | http() |
523 | 529 | .get("/getTeachersList", { |
524 | 530 | headers: { |
525 | - Authorization: "Bearer " + this.token | |
526 | - } | |
531 | + Authorization: "Bearer " + this.token, | |
532 | + }, | |
527 | 533 | }) |
528 | - .then(response => { | |
534 | + .then((response) => { | |
529 | 535 | this.teachers = response.data.data; |
530 | 536 | this.showLoader = false; |
531 | 537 | }) |
532 | - .catch(error => { | |
538 | + .catch((error) => { | |
533 | 539 | // console.log("err====>", err); |
534 | 540 | this.showLoader = false; |
535 | 541 | // if (error.response.status === 401) { |
... | ... | @@ -543,14 +549,14 @@ export default { |
543 | 549 | http() |
544 | 550 | .get("/getClassesList", { |
545 | 551 | headers: { |
546 | - Authorization: "Bearer " + this.token | |
547 | - } | |
552 | + Authorization: "Bearer " + this.token, | |
553 | + }, | |
548 | 554 | }) |
549 | - .then(response => { | |
555 | + .then((response) => { | |
550 | 556 | this.classes = response.data.data; |
551 | 557 | this.showLoader = false; |
552 | 558 | }) |
553 | - .catch(error => { | |
559 | + .catch((error) => { | |
554 | 560 | this.showLoader = false; |
555 | 561 | // if (error.response.status === 401) { |
556 | 562 | // this.$router.replace({ path: "/" }); |
... | ... | @@ -565,14 +571,14 @@ export default { |
565 | 571 | http() |
566 | 572 | .get("/getEventsList", { |
567 | 573 | headers: { |
568 | - Authorization: "Bearer " + this.token | |
569 | - } | |
574 | + Authorization: "Bearer " + this.token, | |
575 | + }, | |
570 | 576 | }) |
571 | - .then(response => { | |
577 | + .then((response) => { | |
572 | 578 | this.noticeData = response.data.data; |
573 | 579 | this.showLoader = false; |
574 | 580 | }) |
575 | - .catch(error => { | |
581 | + .catch((error) => { | |
576 | 582 | this.showLoader = false; |
577 | 583 | // if (error.response.status === 401) { |
578 | 584 | // this.$router.replace({ path: "/" }); |
... | ... | @@ -586,14 +592,14 @@ export default { |
586 | 592 | http() |
587 | 593 | .get("/getParticularUserDetail", { |
588 | 594 | headers: { |
589 | - Authorization: "Bearer " + this.token | |
590 | - } | |
595 | + Authorization: "Bearer " + this.token, | |
596 | + }, | |
591 | 597 | }) |
592 | - .then(response => { | |
598 | + .then((response) => { | |
593 | 599 | this.userData = response.data.data; |
594 | 600 | this.showLoader = false; |
595 | 601 | }) |
596 | - .catch(error => { | |
602 | + .catch((error) => { | |
597 | 603 | this.showLoader = false; |
598 | 604 | // if (error.response.status === 401) { |
599 | 605 | // this.$router.replace({ path: "/" }); |
... | ... | @@ -601,8 +607,8 @@ export default { |
601 | 607 | // this.$store.dispatch("Id", null); |
602 | 608 | // } |
603 | 609 | }); |
604 | - } | |
605 | - } | |
610 | + }, | |
611 | + }, | |
606 | 612 | }; |
607 | 613 | </script> |
608 | 614 | ... | ... |
src/pages/Students/students.vue
... | ... | @@ -2101,8 +2101,11 @@ export default { |
2101 | 2101 | this.showLoader = false; |
2102 | 2102 | }) |
2103 | 2103 | .catch((err) => { |
2104 | - console.log("err====>", err); | |
2104 | + // console.log("err====>", err); | |
2105 | 2105 | this.showLoader = false; |
2106 | + this.snackbar = true; | |
2107 | + this.color = "error"; | |
2108 | + this.text = error.response.data.message; | |
2106 | 2109 | }); |
2107 | 2110 | }, |
2108 | 2111 | getSections(_id) { |
... | ... | @@ -2176,11 +2179,11 @@ export default { |
2176 | 2179 | } |
2177 | 2180 | }, |
2178 | 2181 | onEditFilePicked(e) { |
2179 | - console.log(e); | |
2182 | + // console.log(e); | |
2180 | 2183 | const files = e.target.files; |
2181 | 2184 | if (files[0] !== undefined) { |
2182 | 2185 | this.editImageName = files[0].name; |
2183 | - console.log("this.editImageName", this.editImageName); | |
2186 | + // console.log("this.editImageName", this.editImageName); | |
2184 | 2187 | |
2185 | 2188 | if (this.editImageName.lastIndexOf(".") <= 0) { |
2186 | 2189 | return; |
... | ... | @@ -2419,7 +2422,7 @@ export default { |
2419 | 2422 | this.isFatherCellExists = true; |
2420 | 2423 | }) |
2421 | 2424 | .catch((error) => { |
2422 | - console.log("err====>", error.response.data.message); | |
2425 | + // console.log("err====>", error.response.data.message); | |
2423 | 2426 | this.text = error.response.data.message; |
2424 | 2427 | this.snackbar = true; |
2425 | 2428 | this.color = "error"; | ... | ... |
src/pages/Subjects/subjects.vue
... | ... | @@ -133,7 +133,13 @@ |
133 | 133 | <v-flex xs12 sm12> |
134 | 134 | <v-card-actions> |
135 | 135 | <v-spacer></v-spacer> |
136 | - <v-btn round dark @click="save" :loading="editLoading" class="add-button">Update Subject</v-btn> | |
136 | + <v-btn | |
137 | + round | |
138 | + dark | |
139 | + @click="save" | |
140 | + :loading="editLoading" | |
141 | + class="add-button" | |
142 | + >Update Subject</v-btn> | |
137 | 143 | </v-card-actions> |
138 | 144 | </v-flex> |
139 | 145 | </v-form> |
... | ... | @@ -279,7 +285,7 @@ |
279 | 285 | <v-flex xs9 sm9 md2 lg2 xl2 v-if="showSearch"> |
280 | 286 | <v-layout> |
281 | 287 | <v-text-field |
282 | - autofocus | |
288 | + autofocus | |
283 | 289 | v-model="search" |
284 | 290 | label="Search" |
285 | 291 | prepend-inner-icon="search" |
... | ... | @@ -546,39 +552,39 @@ export default { |
546 | 552 | // newActive: false, |
547 | 553 | type: ["Optional", "Mandatory"], |
548 | 554 | pagination: { |
549 | - rowsPerPage: 10 | |
555 | + rowsPerPage: 10, | |
550 | 556 | }, |
551 | 557 | token: "", |
552 | - classRules: [v => !!v || " Class Name is required"], | |
553 | - teacherRules: [v => !!v || " Teacher Name is required"], | |
554 | - typeRules: [v => !!v || "Type is required"], | |
555 | - markRules: [v => !!v || " Pass Mark is required"], | |
556 | - finalRules: [v => !!v || "Final MArk is required"], | |
557 | - subjectRules: [v => !!v || " Subject Name is required"], | |
558 | + classRules: [(v) => !!v || " Class Name is required"], | |
559 | + teacherRules: [(v) => !!v || " Teacher Name is required"], | |
560 | + typeRules: [(v) => !!v || "Type is required"], | |
561 | + markRules: [(v) => !!v || " Pass Mark is required"], | |
562 | + finalRules: [(v) => !!v || "Final MArk is required"], | |
563 | + subjectRules: [(v) => !!v || " Subject Name is required"], | |
558 | 564 | headers: [ |
559 | 565 | { |
560 | 566 | text: "No", |
561 | 567 | align: "", |
562 | 568 | sortable: false, |
563 | - value: "No" | |
569 | + value: "No", | |
564 | 570 | }, |
565 | 571 | { |
566 | 572 | text: "Subject Name", |
567 | 573 | value: "subjectName", |
568 | 574 | sortable: false, |
569 | - align: "center" | |
575 | + align: "center", | |
570 | 576 | }, |
571 | 577 | { |
572 | 578 | text: "Subject Author", |
573 | 579 | value: "subjectAuthor", |
574 | 580 | sortable: false, |
575 | - align: "center" | |
581 | + align: "center", | |
576 | 582 | }, |
577 | 583 | { |
578 | 584 | text: "Subject Code", |
579 | 585 | value: "subjectCode", |
580 | 586 | sortable: false, |
581 | - align: "center" | |
587 | + align: "center", | |
582 | 588 | }, |
583 | 589 | // { |
584 | 590 | // text: "Teacher", |
... | ... | @@ -590,21 +596,21 @@ export default { |
590 | 596 | text: "Pass Marks", |
591 | 597 | value: "passMarks", |
592 | 598 | sortable: false, |
593 | - align: "center" | |
599 | + align: "center", | |
594 | 600 | }, |
595 | 601 | { |
596 | 602 | text: "Final Marks", |
597 | 603 | value: "finalMarks", |
598 | 604 | sortable: false, |
599 | - align: "center" | |
605 | + align: "center", | |
600 | 606 | }, |
601 | 607 | { |
602 | 608 | text: "Type", |
603 | 609 | value: "type", |
604 | 610 | sortable: false, |
605 | - align: "center" | |
611 | + align: "center", | |
606 | 612 | }, |
607 | - { text: "Action", value: "", sortable: false, align: "center" } | |
613 | + { text: "Action", value: "", sortable: false, align: "center" }, | |
608 | 614 | ], |
609 | 615 | subjectList: [], |
610 | 616 | classList: [], |
... | ... | @@ -615,7 +621,7 @@ export default { |
615 | 621 | editedItem: { |
616 | 622 | // subjectName: "", |
617 | 623 | // subjectAuthor: "" |
618 | - } | |
624 | + }, | |
619 | 625 | }), |
620 | 626 | methods: { |
621 | 627 | pickFile() { |
... | ... | @@ -636,22 +642,22 @@ export default { |
636 | 642 | deleteItem(item) { |
637 | 643 | let deleteSubject = { |
638 | 644 | classId: this.addSubject.classId, |
639 | - subjectId: item._id | |
645 | + subjectId: item._id, | |
640 | 646 | }; |
641 | 647 | http() |
642 | 648 | .delete( |
643 | 649 | "/deleteSubject", |
644 | 650 | confirm("Are you sure you want to delete this?") && { |
645 | - params: deleteSubject | |
651 | + params: deleteSubject, | |
646 | 652 | } |
647 | 653 | ) |
648 | - .then(response => { | |
654 | + .then((response) => { | |
649 | 655 | this.getClassSubject(_id); |
650 | 656 | this.snackbar = true; |
651 | 657 | this.text = "Successfully delete Existing Subject"; |
652 | 658 | this.color = "green"; |
653 | 659 | }) |
654 | - .catch(error => { | |
660 | + .catch((error) => { | |
655 | 661 | this.snackbar = true; |
656 | 662 | this.text = error.response.data.message; |
657 | 663 | this.color = "error"; |
... | ... | @@ -667,7 +673,7 @@ export default { |
667 | 673 | if (this.$refs.form.validate()) { |
668 | 674 | http() |
669 | 675 | .post("/addSubject", this.addSubject) |
670 | - .then(response => { | |
676 | + .then((response) => { | |
671 | 677 | this.getClassSubject(_id); |
672 | 678 | this.snackbar = true; |
673 | 679 | this.text = "New Subject added successfully"; |
... | ... | @@ -675,7 +681,7 @@ export default { |
675 | 681 | this.color = "green"; |
676 | 682 | this.addSubjectDialog = false; |
677 | 683 | }) |
678 | - .catch(error => { | |
684 | + .catch((error) => { | |
679 | 685 | // console.log(error); |
680 | 686 | this.snackbar = true; |
681 | 687 | this.text = error.response.data.message; |
... | ... | @@ -697,12 +703,12 @@ export default { |
697 | 703 | finalMarks: this.editedItem.finalMarks, |
698 | 704 | subjectAuthor: this.editedItem.subjectAuthor, |
699 | 705 | subjectCode: this.editedItem.subjectCode, |
700 | - subjectName: this.editedItem.subjectName | |
706 | + subjectName: this.editedItem.subjectName, | |
701 | 707 | }; |
702 | 708 | this.editLoading = true; |
703 | 709 | http() |
704 | 710 | .put("/updateSubject", editSubject) |
705 | - .then(response => { | |
711 | + .then((response) => { | |
706 | 712 | this.snackbar = true; |
707 | 713 | this.text = "Successfully Edit Existing Subject"; |
708 | 714 | this.color = "green"; |
... | ... | @@ -713,21 +719,24 @@ export default { |
713 | 719 | "/getParticularClass", |
714 | 720 | { params: { classId: _id } }, |
715 | 721 | { |
716 | - headers: { Authorization: "Bearer " + this.token } | |
722 | + headers: { Authorization: "Bearer " + this.token }, | |
717 | 723 | } |
718 | 724 | ) |
719 | - .then(response => { | |
725 | + .then((response) => { | |
720 | 726 | this.subjectList = response.data.data; |
721 | 727 | this.snackbar = true; |
722 | 728 | this.color = "green"; |
723 | 729 | this.text = response.data.message; |
724 | 730 | this.close(); |
725 | 731 | }) |
726 | - .catch(err => { | |
727 | - console.log("err====>", err); | |
732 | + .catch((err) => { | |
733 | + // console.log("err====>", err); | |
734 | + this.snackbar = true; | |
735 | + this.color = "error"; | |
736 | + this.text = error.response.data.message; | |
728 | 737 | }); |
729 | 738 | }) |
730 | - .catch(error => { | |
739 | + .catch((error) => { | |
731 | 740 | this.editLoading = false; |
732 | 741 | |
733 | 742 | // console.log(error); |
... | ... | @@ -742,26 +751,26 @@ export default { |
742 | 751 | "/getParticularClass", |
743 | 752 | { params: { classId: _id } }, |
744 | 753 | { |
745 | - headers: { Authorization: "Bearer " + this.token } | |
754 | + headers: { Authorization: "Bearer " + this.token }, | |
746 | 755 | } |
747 | 756 | ) |
748 | - .then(response => { | |
757 | + .then((response) => { | |
749 | 758 | this.subjectList = response.data.data; |
750 | 759 | this.showLoader = false; |
751 | 760 | }) |
752 | - .catch(err => { | |
761 | + .catch((err) => { | |
753 | 762 | this.showLoader = false; |
754 | 763 | }); |
755 | 764 | }, |
756 | 765 | getClass() { |
757 | 766 | http() |
758 | 767 | .get("/getClassesList", { |
759 | - headers: { Authorization: "Bearer " + this.token } | |
768 | + headers: { Authorization: "Bearer " + this.token }, | |
760 | 769 | }) |
761 | - .then(response => { | |
770 | + .then((response) => { | |
762 | 771 | this.classList = response.data.data; |
763 | 772 | }) |
764 | - .catch(error => { | |
773 | + .catch((error) => { | |
765 | 774 | if (error.response.status === 401) { |
766 | 775 | this.$router.replace({ path: "/" }); |
767 | 776 | this.$store.dispatch("setToken", null); |
... | ... | @@ -774,14 +783,14 @@ export default { |
774 | 783 | var token = this.$store.state.token; |
775 | 784 | http() |
776 | 785 | .get("/getTeachersList", { |
777 | - headers: { Authorization: "Bearer " + token } | |
786 | + headers: { Authorization: "Bearer " + token }, | |
778 | 787 | }) |
779 | - .then(response => { | |
788 | + .then((response) => { | |
780 | 789 | this.teacherList = response.data.data; |
781 | 790 | this.showLoader = false; |
782 | 791 | // console.log("getTeacherList=====>",this.desserts) |
783 | 792 | }) |
784 | - .catch(error => { | |
793 | + .catch((error) => { | |
785 | 794 | this.showLoader = false; |
786 | 795 | if (error.response.status === 401) { |
787 | 796 | this.$router.replace({ path: "/" }); |
... | ... | @@ -797,7 +806,7 @@ export default { |
797 | 806 | this.showSearch = false; |
798 | 807 | this.show = true; |
799 | 808 | this.search = ""; |
800 | - } | |
809 | + }, | |
801 | 810 | }, |
802 | 811 | mounted() { |
803 | 812 | this.token = this.$store.state.token; |
... | ... | @@ -805,6 +814,6 @@ export default { |
805 | 814 | this.getClass(); |
806 | 815 | this.getTeacherList(); |
807 | 816 | this.role = this.$store.state.role; |
808 | - } | |
817 | + }, | |
809 | 818 | }; |
810 | 819 | </script> |
811 | 820 | \ No newline at end of file | ... | ... |
src/pages/Teachers/teachers.vue
... | ... | @@ -322,7 +322,7 @@ |
322 | 322 | |
323 | 323 | <!-- ****** PROFILE VIEW TEACHERS DETAILS ****** --> |
324 | 324 | |
325 | - <v-dialog v-model="viewTeacherProfileDialog" max-width="500px" scrollable persistent> | |
325 | + <v-dialog v-model="viewTeacherProfileDialog" max-width="500px" persistent> | |
326 | 326 | <v-card flat class="card-style pa-3" dark> |
327 | 327 | <v-layout> |
328 | 328 | <v-flex xs12> | ... | ... |
src/pages/TimeTable/timeTable.vue
... | ... | @@ -1248,7 +1248,7 @@ export default { |
1248 | 1248 | http() |
1249 | 1249 | .put("/updateLecture", EditLecture) |
1250 | 1250 | .then((response) => { |
1251 | - console.log("updateLecture", EditLecture); | |
1251 | + // console.log("updateLecture", EditLecture); | |
1252 | 1252 | this.snackbar = true; |
1253 | 1253 | this.text = response.data.message; |
1254 | 1254 | this.color = "green"; |
... | ... | @@ -1437,7 +1437,10 @@ export default { |
1437 | 1437 | } |
1438 | 1438 | }) |
1439 | 1439 | .catch((error) => { |
1440 | - console.log(error); | |
1440 | + // console.log(error); | |
1441 | + this.snackbar = true; | |
1442 | + this.color = "error"; | |
1443 | + this.text = error.response.data.message; | |
1441 | 1444 | }); |
1442 | 1445 | }, |
1443 | 1446 | addSchedule(id) { | ... | ... |
src/pages/User/user.vue
... | ... | @@ -926,7 +926,7 @@ export default { |
926 | 926 | // console.log(e) |
927 | 927 | const files = e.target.files; |
928 | 928 | this.upload = e.target.files[0]; |
929 | - console.log("imageData-upload========>", this.upload); | |
929 | + // console.log("imageData-upload========>", this.upload); | |
930 | 930 | if (files[0] !== undefined) { |
931 | 931 | this.imageName = files[0].name; |
932 | 932 | if (this.imageName.lastIndexOf(".") <= 0) { |
... | ... | @@ -939,7 +939,7 @@ export default { |
939 | 939 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
940 | 940 | // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
941 | 941 | // console.log("upload=======>", this.imageData.imageUrl); |
942 | - console.log("imageFile", this.imageUrl); | |
942 | + // console.log("imageFile", this.imageUrl); | |
943 | 943 | }); |
944 | 944 | } else { |
945 | 945 | this.imageName = ""; | ... | ... |
src/pages/changeStudents/changeStudents.vue
... | ... | @@ -84,7 +84,7 @@ export default { |
84 | 84 | http() |
85 | 85 | .get("/parentStudentsList") |
86 | 86 | .then((response) => { |
87 | - console.log("students - ", response.data.data.students); | |
87 | + // console.log("students - ", response.data.data.students); | |
88 | 88 | /* prepare an array of false status students */ |
89 | 89 | var indexStatusFalse = []; |
90 | 90 | for (var i = 0; i < response.data.data.students.length; i++) { |
... | ... | @@ -104,7 +104,7 @@ export default { |
104 | 104 | if (indexStatusFalse[0] > 0) { |
105 | 105 | this.changeStudent = response.data.data.students[0]._id; |
106 | 106 | } |
107 | - console.log("indexStatusFalse - ", indexStatusFalse); | |
107 | + // console.log("indexStatusFalse - ", indexStatusFalse); | |
108 | 108 | /* if false student is the first one in the list then see if the next is also false */ |
109 | 109 | if (indexStatusFalse[0] == 0) { |
110 | 110 | if (indexStatusFalse.length > 1) { |
... | ... | @@ -123,7 +123,7 @@ export default { |
123 | 123 | counter = 1; |
124 | 124 | } |
125 | 125 | } |
126 | - console.log("counter - ", counter); | |
126 | + // console.log("counter - ", counter); | |
127 | 127 | if (counter == response.data.data.students.length) { |
128 | 128 | this.seeSnackbar( |
129 | 129 | "Your wards have been removed you will be logged out", |
... | ... | @@ -146,8 +146,11 @@ export default { |
146 | 146 | this.showLoader = false; |
147 | 147 | }) |
148 | 148 | .catch((err) => { |
149 | - console.log("err====>", err); | |
149 | + // console.log("err====>", err); | |
150 | 150 | this.showLoader = false; |
151 | + this.snackbar = true; | |
152 | + this.color = "error"; | |
153 | + this.text = error.response.data.message; | |
151 | 154 | }); |
152 | 155 | }, |
153 | 156 | }, | ... | ... |
src/pages/meetingEvent/meetingEvent.vue
... | ... | @@ -297,7 +297,7 @@ |
297 | 297 | >Your search for "{{ search }}" found no results.</v-alert> |
298 | 298 | </v-data-table> |
299 | 299 | <!-- ****** ADD MULTIPLE EVENT ****** --> |
300 | - <v-dialog v-model="meetEventDialog" max-width="500px" persistent v-if="meetEventDialog" persistent> | |
300 | + <v-dialog v-model="meetEventDialog" max-width="500px" persistent v-if="meetEventDialog"> | |
301 | 301 | <v-card flat class="card-style pa-2" dark> |
302 | 302 | <v-layout> |
303 | 303 | <v-flex xs12> |
... | ... | @@ -665,8 +665,11 @@ export default { |
665 | 665 | this.showLoader = false; |
666 | 666 | }) |
667 | 667 | .catch((err) => { |
668 | - console.log("err====>", err); | |
668 | + // console.log("err====>", err); | |
669 | 669 | this.showLoader = false; |
670 | + this.snackbar = true; | |
671 | + this.color = "error"; | |
672 | + this.text = error.response.data.message; | |
670 | 673 | }); |
671 | 674 | }, |
672 | 675 | close() { |
... | ... | @@ -702,7 +705,7 @@ export default { |
702 | 705 | this.$refs.form.reset(); |
703 | 706 | }, |
704 | 707 | save() { |
705 | - console.log("=======this.editedItem=====", this.editedItem); | |
708 | + // console.log("=======this.editedItem=====", this.editedItem); | |
706 | 709 | if (this.editedItem.courseId) { |
707 | 710 | this.editedItem.courseId = this.editedItem.courseId._id; |
708 | 711 | } | ... | ... |
src/router/paths.js
... | ... | @@ -851,20 +851,20 @@ export default [{ |
851 | 851 | `@/pages/Mark/markDistribution.vue` |
852 | 852 | ) |
853 | 853 | }, |
854 | -{ | |
855 | - path: '/meet', | |
856 | - meta: {}, | |
857 | - name: 'Meet', | |
858 | - props: (route) => ({ | |
859 | - type: route.query.type | |
860 | - }), | |
861 | - component: () => | |
862 | - import( | |
863 | - /* webpackChunkName: "routes" */ | |
864 | - /* webpackMode: "lazy-once" */ | |
865 | - `@/pages/Meet/meet.vue` | |
866 | - ) | |
867 | -}, | |
854 | +// { | |
855 | +// path: '/meet', | |
856 | +// meta: {}, | |
857 | +// name: 'Meet', | |
858 | +// props: (route) => ({ | |
859 | +// type: route.query.type | |
860 | +// }), | |
861 | +// component: () => | |
862 | +// import( | |
863 | +// /* webpackChunkName: "routes" */ | |
864 | +// /* webpackMode: "lazy-once" */ | |
865 | +// `@/pages/Meet/meet.vue` | |
866 | +// ) | |
867 | +// }, | |
868 | 868 | { |
869 | 869 | path: '/academicYear', |
870 | 870 | meta: {}, | ... | ... |