Commit 3311ad345da53df300459b3302cb95a27eab61b8

Authored by Neeraj Sharma
1 parent ab1ba03f4a

add event list in dashbaord

src/pages/Annoucement/annoucementForum.vue
1 <template> 1 <template>
2 <v-container fluid class="body-color"> 2 <v-container fluid class="body-color">
3 <!-- ******ANNOUCEMNET DISCUSSION COMMENT ****** --> 3 <!-- ******ANNOUCEMNET DISCUSSION COMMENT ****** -->
4 <v-layout> 4 <v-layout>
5 <v-flex xs12 v-for="(annoucementData,i) in annoucementData" :key="i"> 5 <v-flex xs12 v-for="(annoucementData,i) in annoucementData" :key="i">
6 <v-card class="elevation-0 grey lighten-3 pa-2" flat> 6 <v-card class="elevation-0 grey lighten-3 pa-2" flat>
7 <v-list two-line subheader> 7 <v-list two-line subheader>
8 <v-list-tile> 8 <v-list-tile>
9 <v-list-tile-avatar> 9 <v-list-tile-avatar>
10 <v-avatar size="46"> 10 <v-avatar size="46">
11 <img :src="annoucementData.attachementUrl" v-if="annoucementData.attachementUrl" /> 11 <img :src="annoucementData.attachementUrl" v-if="annoucementData.attachementUrl" />
12 <img src="/static/icon/user.png" v-else-if="!annoucementData.attachementUrl" /> 12 <img src="/static/icon/user.png" v-else-if="!annoucementData.attachementUrl" />
13 </v-avatar> 13 </v-avatar>
14 </v-list-tile-avatar> 14 </v-list-tile-avatar>
15 <v-list-tile-content> 15 <v-list-tile-content>
16 <v-list-tile-title>{{ annoucementData.discussionType }}</v-list-tile-title> 16 <v-list-tile-title>{{ annoucementData.discussionType }}</v-list-tile-title>
17 <!-- <v-list-tile-sub-title> 17 <v-list-tile-sub-title>
18 By 18 By
19 <span class="info--text">{{ annoucementData.studentId.name }}</span> 19 <span class="info--text" v-if="annoucementData.studentId">{{ annoucementData.studentId.name }}</span>
20 <span class="info--text" v-if="annoucementData.teacherId">{{ annoucementData.teacherId.name }}</span>
20 - {{dates(annoucementData.created ) }} 21 - {{dates(annoucementData.created ) }}
21 </v-list-tile-sub-title>--> 22 </v-list-tile-sub-title>
22 </v-list-tile-content> 23 </v-list-tile-content>
23 <v-list-tile-action> 24 <v-list-tile-action>
24 <div> 25 <div>
25 <v-btn flat round dark class="reply-btn" @click="showReplyBox = true">Reply</v-btn> 26 <v-btn flat round dark class="reply-btn" @click="showReplyBox = true">Reply</v-btn>
26 </div> 27 </div>
27 </v-list-tile-action> 28 </v-list-tile-action>
28 </v-list-tile> 29 </v-list-tile>
29 </v-list> 30 </v-list>
30 </v-card> 31 </v-card>
31 <v-flex xs12 class="mt-4" v-show="showReplyBox"> 32 <v-flex xs12 class="mt-4" v-show="showReplyBox">
32 <v-textarea 33 <v-textarea
33 name="input-7-1" 34 name="input-7-1"
34 solo 35 solo
35 label="Label Text" 36 label="Label Text"
36 multi-line 37 multi-line
37 v-model="replyDescription" 38 v-model="replyDescription"
38 ></v-textarea> 39 ></v-textarea>
39 <v-btn round dark class="open-dialog-button" flat @click="showReplyBox = false">Cancel</v-btn> 40 <v-btn round dark class="open-dialog-button" flat @click="showReplyBox = false">Cancel</v-btn>
40 <v-btn 41 <v-btn
41 round 42 round
42 dark 43 dark
43 :loading="loading" 44 :loading="loading"
44 class="reply-btn" 45 class="reply-btn"
45 @click="replyThreadDiscussion()" 46 @click="replyThreadDiscussion()"
46 >Submit</v-btn> 47 >Submit</v-btn>
47 </v-flex> 48 </v-flex>
48 <v-flex 49 <v-flex
49 xs12 50 xs12
50 class="mt-4 pl-5 mx-auto" 51 class="mt-4 pl-5 mx-auto"
51 v-for="(replyThread,i) in annoucementData.discussionThread" 52 v-for="(replyThread,i) in annoucementData.discussionThread"
52 :key="i" 53 :key="i"
53 > 54 >
54 <v-card class="elevation-0 grey lighten-3" flat> 55 <v-card class="elevation-0 grey lighten-3" flat>
55 <v-list two-line subheader class="grey lighten-3 pa-1"> 56 <v-list two-line subheader class="grey lighten-3 pa-1">
56 <v-list-tile> 57 <v-list-tile>
57 <v-list-tile-avatar> 58 <v-list-tile-avatar>
58 <v-avatar size="46"> 59 <v-avatar size="46">
59 <img 60 <img
60 :src="annoucementData.attachementUrl" 61 :src="annoucementData.attachementUrl"
61 v-if="annoucementData.attachementUrl" 62 v-if="annoucementData.attachementUrl"
62 /> 63 />
63 <img src="/static/icon/user.png" v-else-if="!annoucementData.attachementUrl" /> 64 <img src="/static/icon/user.png" v-else-if="!annoucementData.attachementUrl" />
64 </v-avatar> 65 </v-avatar>
65 </v-list-tile-avatar> 66 </v-list-tile-avatar>
66 <v-list-tile-content> 67 <v-list-tile-content>
67 <v-list-tile-title>Re: {{ annoucementData.discussionType }}</v-list-tile-title> 68 <v-list-tile-title>Re: {{ annoucementData.discussionType }}</v-list-tile-title>
68 <v-list-tile-sub-title> 69 <v-list-tile-sub-title>
69 By 70 By
70 <span 71 <span
71 class="info--text" 72 class="info--text"
72 v-if="replyThread.teacherId" 73 v-if="replyThread.teacherId"
73 >{{ replyThread.teacherId.name }}</span> 74 >{{ replyThread.teacherId.name }}</span>
74 <span 75 <span
75 class="info--text" 76 class="info--text"
76 v-if="replyThread.studentId" 77 v-if="replyThread.studentId"
77 >{{ replyThread.studentId.name }}</span> 78 >{{ replyThread.studentId.name }}</span>
78 - {{dates(replyThread.created ) }} 79 - {{dates(replyThread.created ) }}
79 </v-list-tile-sub-title> 80 </v-list-tile-sub-title>
80 </v-list-tile-content> 81 </v-list-tile-content>
81 </v-list-tile> 82 </v-list-tile>
82 </v-list> 83 </v-list>
83 <v-list class="pa-2 reply-desc"> 84 <v-list class="pa-2 reply-desc">
84 <v-list-tile-content> 85 <v-list-tile-content>
85 <v-list-tile-title 86 <v-list-tile-title
86 v-show="replyThread.showDescriptionReplyThread" 87 v-show="replyThread.showDescriptionReplyThread"
87 >{{ replyThread.description }}</v-list-tile-title> 88 >{{ replyThread.description }}</v-list-tile-title>
88 <v-flex xs12 sm12 md4 v-show="replyThread.showUpdateReplyThread == true"> 89 <v-flex xs12 sm12 md4 v-show="replyThread.showUpdateReplyThread == true">
89 <v-text-field v-model="replyThread.description"></v-text-field> 90 <v-text-field v-model="replyThread.description"></v-text-field>
90 <v-btn 91 <v-btn
91 flat 92 flat
92 round 93 round
93 dark 94 dark
94 class="reply-btn right" 95 class="reply-btn right"
95 @click="updateRelpyThreadDiscussion(replyThread)" 96 @click="updateRelpyThreadDiscussion(replyThread)"
96 >Save</v-btn> 97 >Save</v-btn>
97 </v-flex> 98 </v-flex>
98 </v-list-tile-content> 99 </v-list-tile-content>
99 </v-list> 100 </v-list>
100 <v-list class="grey lighten-4 pa-0"> 101 <v-list class="grey lighten-4 pa-0">
101 <v-list-tile-action> 102 <v-list-tile-action>
102 <v-spacer></v-spacer> 103 <v-spacer></v-spacer>
103 <div> 104 <div>
104 <v-btn 105 <v-btn
105 flat 106 flat
106 round 107 round
107 dark 108 dark
108 class="reply-btn" 109 class="reply-btn"
109 @click="deleteRelpyThreadDiscussion(replyThread._id)" 110 @click="deleteRelpyThreadDiscussion(replyThread._id)"
110 >Delete</v-btn> 111 >Delete</v-btn>
111 <v-btn 112 <v-btn
112 flat 113 flat
113 round 114 round
114 dark 115 dark
115 class="reply-btn mr-4" 116 class="reply-btn mr-4"
116 @click="showUpdateReplyThreadDiscussion(replyThread)" 117 @click="showUpdateReplyThreadDiscussion(replyThread)"
117 >Edit</v-btn> 118 >Edit</v-btn>
118 </div> 119 </div>
119 </v-list-tile-action> 120 </v-list-tile-action>
120 </v-list> 121 </v-list>
121 </v-card> 122 </v-card>
122 </v-flex> 123 </v-flex>
123 </v-flex> 124 </v-flex>
124 </v-layout> 125 </v-layout>
125 <v-snackbar 126 <v-snackbar
126 :timeout="timeout" 127 :timeout="timeout"
127 :top="y === 'top'" 128 :top="y === 'top'"
128 :right="x === 'right'" 129 :right="x === 'right'"
129 :vertical="mode === 'vertical'" 130 :vertical="mode === 'vertical'"
130 v-model="snackbar" 131 v-model="snackbar"
131 color="success" 132 color="success"
132 >{{ text }}</v-snackbar> 133 >{{ text }}</v-snackbar>
133 <div class="loader" v-if="showLoader"> 134 <div class="loader" v-if="showLoader">
134 <v-progress-circular indeterminate color="white"></v-progress-circular> 135 <v-progress-circular indeterminate color="white"></v-progress-circular>
135 </div> 136 </div>
136 </v-container> 137 </v-container>
137 </template> 138 </template>
138 139
139 <script> 140 <script>
140 import http from "@/Services/http.js"; 141 import http from "@/Services/http.js";
141 import moment from "moment"; 142 import moment from "moment";
142 143
143 export default { 144 export default {
144 data: () => ({ 145 data: () => ({
145 localStorage: localStorage, 146 localStorage: localStorage,
146 snackbar: false, 147 snackbar: false,
147 y: "top", 148 y: "top",
148 x: "right", 149 x: "right",
149 mode: "", 150 mode: "",
150 timeout: 3000, 151 timeout: 3000,
151 text: "", 152 text: "",
152 showLoader: false, 153 showLoader: false,
153 loading: false, 154 loading: false,
154 date: null, 155 date: null,
155 token: "", 156 token: "",
156 role: "", 157 role: "",
157 schoolRole: "", 158 schoolRole: "",
158 menu: false, 159 menu: false,
159 annoucementData: {}, 160 annoucementData: {},
160 showReplyBox: false, 161 showReplyBox: false,
161 replyDescription: "", 162 replyDescription: "",
162 loginId: "", 163 loginId: "",
163 editedIndex: -1 164 editedIndex: -1
164 }), 165 }),
165 methods: { 166 methods: {
166 dates: function(date) { 167 dates: function(date) {
167 return moment(date).format("MMMM DD, YYYY hh:mm A"); 168 return moment(date).format("MMMM DD, YYYY hh:mm A");
168 }, 169 },
169 getDiscussionesThread() { 170 getDiscussionesThread() {
170 // console.log("id", this.getSelectedData.courseId); 171 // console.log("id", this.getSelectedData.courseId);
171 this.showLoader = true; 172 this.showLoader = true;
172 http() 173 http()
173 .get("/getParticularAnnoucement", { 174 .get("/getParticularAnnoucement", {
174 params: { 175 params: {
175 annoucementId: this.$route.params.annoucementId 176 annoucementId: this.$route.params.annoucementId
176 } 177 }
177 }) 178 })
178 .then(response => { 179 .then(response => {
179 // console.log("response", response.data.data); 180 // console.log("response", response.data.data);
180 this.annoucementData = response.data.data; 181 this.annoucementData = response.data.data;
181 // console.log("response", this.annoucementData); 182 // console.log("response", this.annoucementData);
182 for (let i = 0; i < this.annoucementData.length; i++) { 183 for (let i = 0; i < this.annoucementData.length; i++) {
183 for ( 184 for (
184 let j = 0; 185 let j = 0;
185 j < this.annoucementData[i].discussionThread.length; 186 j < this.annoucementData[i].discussionThread.length;
186 j++ 187 j++
187 ) { 188 ) {
188 if (this.annoucementData[i].discussionThread[j]) { 189 if (this.annoucementData[i].discussionThread[j]) {
189 this.annoucementData[i].discussionThread[ 190 this.annoucementData[i].discussionThread[
190 j 191 j
191 ].showUpdateReplyThread = false; 192 ].showUpdateReplyThread = false;
192 this.annoucementData[i].discussionThread[ 193 this.annoucementData[i].discussionThread[
193 j 194 j
194 ].showDescriptionReplyThread = true; 195 ].showDescriptionReplyThread = true;
195 } 196 }
196 } 197 }
197 } 198 }
198 this.showLoader = false; 199 this.showLoader = false;
199 this.showReplyBox = false; 200 this.showReplyBox = false;
200 }) 201 })
201 .catch(error => { 202 .catch(error => {
202 console.log("err====>", error); 203 console.log("err====>", error);
203 this.showLoader = false; 204 this.showLoader = false;
204 }); 205 });
205 }, 206 },
206 replyThreadDiscussion() { 207 replyThreadDiscussion() {
207 this.showLoader = true; 208 this.showLoader = true;
208 var payloadData = { 209 var payloadData = {
209 annoucementId: this.$route.params.annoucementId, 210 annoucementId: this.$route.params.annoucementId,
210 teacherId: this.loginId, 211 teacherId: this.loginId,
211 description: this.replyDescription 212 description: this.replyDescription
212 }; 213 };
213 http() 214 http()
214 .put("/replyThread", payloadData) 215 .put("/replyThread", payloadData)
215 .then(response => { 216 .then(response => {
216 // console.log("response", response.data.data); 217 // console.log("response", response.data.data);
217 this.showLoader = false; 218 this.showLoader = false;
218 this.getDiscussionesThread(); 219 this.getDiscussionesThread();
219 }) 220 })
220 .catch(error => { 221 .catch(error => {
221 this.showLoader = false; 222 this.showLoader = false;
222 }); 223 });
223 }, 224 },
224 showUpdateReplyThreadDiscussion(item) { 225 showUpdateReplyThreadDiscussion(item) {
225 this.editedIndex = this.annoucementData.indexOf(item); 226 this.editedIndex = this.annoucementData.indexOf(item);
226 var editedItem = Object.assign({}, item); 227 var editedItem = Object.assign({}, item);
227 var arrayOfannoucementData = []; 228 var arrayOfannoucementData = [];
228 for (let i = 0; i < this.annoucementData.length; i++) { 229 for (let i = 0; i < this.annoucementData.length; i++) {
229 for ( 230 for (
230 let j = 0; 231 let j = 0;
231 j < this.annoucementData[i].discussionThread.length; 232 j < this.annoucementData[i].discussionThread.length;
232 j++ 233 j++
233 ) { 234 ) {
234 if ( 235 if (
235 editedItem._id == this.annoucementData[i].discussionThread[j]._id 236 editedItem._id == this.annoucementData[i].discussionThread[j]._id
236 ) { 237 ) {
237 this.annoucementData[i].discussionThread[ 238 this.annoucementData[i].discussionThread[
238 j 239 j
239 ].showUpdateReplyThread = true; 240 ].showUpdateReplyThread = true;
240 this.annoucementData[i].discussionThread[ 241 this.annoucementData[i].discussionThread[
241 j 242 j
242 ].showDescriptionReplyThread = false; 243 ].showDescriptionReplyThread = false;
243 } 244 }
244 } 245 }
245 arrayOfannoucementData.push(this.annoucementData[i]); 246 arrayOfannoucementData.push(this.annoucementData[i]);
246 } 247 }
247 this.annoucementData = arrayOfannoucementData; 248 this.annoucementData = arrayOfannoucementData;
248 }, 249 },
249 updateRelpyThreadDiscussion(replyThread) { 250 updateRelpyThreadDiscussion(replyThread) {
250 this.showLoader = true; 251 this.showLoader = true;
251 var payloadData = { 252 var payloadData = {
252 discussionThreadId: replyThread._id, 253 discussionThreadId: replyThread._id,
253 annoucementId: this.$route.params.annoucementId, 254 annoucementId: this.$route.params.annoucementId,
254 teacherId: this.loginId, 255 teacherId: this.loginId,
255 description: replyThread.description 256 description: replyThread.description
256 }; 257 };
257 http() 258 http()
258 .put("/updateThread", payloadData) 259 .put("/updateThread", payloadData)
259 .then(response => { 260 .then(response => {
260 this.showLoader = false; 261 this.showLoader = false;
261 this.getDiscussionesThread(); 262 this.getDiscussionesThread();
262 }) 263 })
263 .catch(error => { 264 .catch(error => {
264 this.showLoader = false; 265 this.showLoader = false;
265 }); 266 });
266 }, 267 },
267 deleteRelpyThreadDiscussion(id) { 268 deleteRelpyThreadDiscussion(id) {
268 this.showLoader = true; 269 this.showLoader = true;
269 var payloadData = { 270 var payloadData = {
270 discussionThreadId: id, 271 discussionThreadId: id,
271 annoucementId: this.$route.params.annoucementId 272 annoucementId: this.$route.params.annoucementId
272 }; 273 };
273 http() 274 http()
274 .put( 275 .put(
275 "/deleteThread", 276 "/deleteThread",
276 confirm("Are you sure you want to delete this?") && payloadData 277 confirm("Are you sure you want to delete this?") && payloadData
277 ) 278 )
278 .then(response => { 279 .then(response => {
279 this.showLoader = false; 280 this.showLoader = false;
280 this.getDiscussionesThread(); 281 this.getDiscussionesThread();
281 }) 282 })
282 .catch(error => { 283 .catch(error => {
283 this.showLoader = false; 284 this.showLoader = false;
284 }); 285 });
285 } 286 }
286 }, 287 },
287 mounted() { 288 mounted() {
288 // this.getStudentList(); 289 // this.getStudentList();
289 this.token = this.$store.state.token; 290 this.token = this.$store.state.token;
290 this.role = this.$store.state.role; 291 this.role = this.$store.state.role;
291 this.loginId = this.$store.state.id; 292 this.loginId = this.$store.state.id;
292 this.getDiscussionesThread(); 293 this.getDiscussionesThread();
293 } 294 }
294 }; 295 };
295 </script> 296 </script>
296 297
297 <style> 298 <style>
298 .reply-desc { 299 .reply-desc {
299 border: 1px solid #f2f2f2; 300 border: 1px solid #f2f2f2;
300 } 301 }
301 .open-dialog-button { 302 .open-dialog-button {
302 background: #827bfa !important; 303 background: #827bfa !important;
303 border-color: #827bfa !important; 304 border-color: #827bfa !important;
304 text-transform: none !important; 305 text-transform: none !important;
305 } 306 }
306 307
307 .reply-btn { 308 .reply-btn {
308 background: #feb83c !important; 309 background: #feb83c !important;
309 border-color: #feb83c !important; 310 border-color: #feb83c !important;
310 text-transform: none !important; 311 text-transform: none !important;
311 -webkit-box-shadow: none !important; 312 -webkit-box-shadow: none !important;
312 box-shadow: none !important; 313 box-shadow: none !important;
313 } 314 }
314 </style> 315 </style>
src/pages/Dashboard/dashboard.vue
1 <template> 1 <template>
2 <v-app id="pages-dasboard"> 2 <v-app id="pages-dasboard">
3 <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> 3 <!-- ****** VIEW PROFIL NOTICE BOARD ****** -->
4 <!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable> 4 <!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable>
5 <v-card> 5 <v-card>
6 <v-toolbar color="grey lighten-2" flat> 6 <v-toolbar color="grey lighten-2" flat>
7 <v-spacer></v-spacer> 7 <v-spacer></v-spacer>
8 <v-toolbar-title> 8 <v-toolbar-title>
9 <h3>Notice Board</h3> 9 <h3>Notice Board</h3>
10 </v-toolbar-title> 10 </v-toolbar-title>
11 <v-spacer></v-spacer> 11 <v-spacer></v-spacer>
12 <v-icon @click="closeNotice">close</v-icon> 12 <v-icon @click="closeNotice">close</v-icon>
13 </v-toolbar> 13 </v-toolbar>
14 <v-card-text> 14 <v-card-text>
15 <v-layout> 15 <v-layout>
16 <v-flex align-center justify-center layout text-xs-center class="mt-2"> 16 <v-flex align-center justify-center layout text-xs-center class="mt-2">
17 <img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" /> 17 <img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" />
18 <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" /> 18 <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" />
19 </v-flex> 19 </v-flex>
20 </v-layout> 20 </v-layout>
21 <v-container grid-list-md> 21 <v-container grid-list-md>
22 <v-layout wrap> 22 <v-layout wrap>
23 <v-flex> 23 <v-flex>
24 <v-layout> 24 <v-layout>
25 <v-flex xs5 sm6> 25 <v-flex xs5 sm6>
26 <h5 class="right my-1"> 26 <h5 class="right my-1">
27 <b>Title:</b> 27 <b>Title:</b>
28 </h5> 28 </h5>
29 </v-flex> 29 </v-flex>
30 <v-flex sm6 xs8> 30 <v-flex sm6 xs8>
31 <h5 class="my-1">{{ notice.title }}</h5> 31 <h5 class="my-1">{{ notice.title }}</h5>
32 </v-flex> 32 </v-flex>
33 </v-layout> 33 </v-layout>
34 <v-layout> 34 <v-layout>
35 <v-flex xs5 sm6> 35 <v-flex xs5 sm6>
36 <h5 class="right my-1"> 36 <h5 class="right my-1">
37 <b>Description:</b> 37 <b>Description:</b>
38 </h5> 38 </h5>
39 </v-flex> 39 </v-flex>
40 <v-flex sm6 xs8> 40 <v-flex sm6 xs8>
41 <h5 class="my-1">{{ notice.description }}</h5> 41 <h5 class="my-1">{{ notice.description }}</h5>
42 </v-flex> 42 </v-flex>
43 </v-layout> 43 </v-layout>
44 </v-flex> 44 </v-flex>
45 </v-layout> 45 </v-layout>
46 </v-container> 46 </v-container>
47 </v-card-text> 47 </v-card-text>
48 </v-card> 48 </v-card>
49 </v-dialog>--> 49 </v-dialog>-->
50 <!-- <v-container fluid grid-list-xl> --> 50 <!-- <v-container fluid grid-list-xl> -->
51 51
52 <!-- LOADER --> 52 <!-- LOADER -->
53 <div class="loader" v-if="showLoader"> 53 <div class="loader" v-if="showLoader">
54 <v-progress-circular indeterminate color="white"></v-progress-circular> 54 <v-progress-circular indeterminate color="white"></v-progress-circular>
55 </div> 55 </div>
56 56
57 <!-- SNACKBAR --> 57 <!-- SNACKBAR -->
58 <v-snackbar 58 <v-snackbar
59 :timeout="timeout" 59 :timeout="timeout"
60 :top="y === 'top'" 60 :top="y === 'top'"
61 :right="x === 'right'" 61 :right="x === 'right'"
62 :vertical="mode === 'vertical'" 62 :vertical="mode === 'vertical'"
63 v-model="snackbar" 63 v-model="snackbar"
64 :color="snackbarColor" 64 :color="snackbarColor"
65 > 65 >
66 {{ text }} 66 {{ text }}
67 <v-spacer></v-spacer> 67 <v-spacer></v-spacer>
68 <v-btn flat text @click="snackbar = false">X</v-btn> 68 <v-btn flat text @click="snackbar = false">X</v-btn>
69 </v-snackbar> 69 </v-snackbar>
70 70
71 <v-layout wrap row> 71 <v-layout wrap row>
72 <v-flex xs12 sm12 md9> 72 <v-flex xs12 sm12 md9>
73 <v-container fluid grid-list-xl> 73 <v-container fluid grid-list-xl>
74 <!-- ***** Total Students ***** --> 74 <!-- ***** Total Students ***** -->
75 <!-- <v-flex xs12 sm12 md12> 75 <!-- <v-flex xs12 sm12 md12>
76 <v-layout wrap class> 76 <v-layout wrap class>
77 <v-flex xs12 sm12 md3> 77 <v-flex xs12 sm12 md3>
78 <router-link :to="{ name:'Students' }"> 78 <router-link :to="{ name:'Students' }">
79 <v-card class="card pink-bgcolor"> 79 <v-card class="card pink-bgcolor">
80 <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title> 80 <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title>
81 <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" /> 81 <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" />
82 <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title> 82 <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title>
83 </v-card> 83 </v-card>
84 </router-link> 84 </router-link>
85 </v-flex>--> 85 </v-flex>-->
86 <!-- ***** Total Teachers***** --> 86 <!-- ***** Total Teachers***** -->
87 <!-- <v-flex xs12 sm12 md3> 87 <!-- <v-flex xs12 sm12 md3>
88 <router-link :to="{ name:'Teachers' }"> 88 <router-link :to="{ name:'Teachers' }">
89 <v-card flat class="card elevation-2 firozi-bgcolor"> 89 <v-card flat class="card elevation-2 firozi-bgcolor">
90 <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title> 90 <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title>
91 <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" /> 91 <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" />
92 92
93 <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title> 93 <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title>
94 </v-card> 94 </v-card>
95 </router-link> 95 </router-link>
96 </v-flex>--> 96 </v-flex>-->
97 <!-- ***** Total Parents ***** --> 97 <!-- ***** Total Parents ***** -->
98 <!-- <v-flex xs12 sm12 md3> 98 <!-- <v-flex xs12 sm12 md3>
99 <router-link :to="{ name:'Parents' }"> 99 <router-link :to="{ name:'Parents' }">
100 <v-card flat class="card yellow darken-3"> 100 <v-card flat class="card yellow darken-3">
101 <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title> 101 <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title>
102 <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" /> 102 <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" />
103 <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title> 103 <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title>
104 </v-card> 104 </v-card>
105 </router-link> 105 </router-link>
106 </v-flex>--> 106 </v-flex>-->
107 <!-- ***** Total Class***** --> 107 <!-- ***** Total Class***** -->
108 <!-- <v-flex xs12 sm12 md3> 108 <!-- <v-flex xs12 sm12 md3>
109 <router-link :to="{ name:'Class' }"> 109 <router-link :to="{ name:'Class' }">
110 <v-card flat class="card darkBlue-bgcolor"> 110 <v-card flat class="card darkBlue-bgcolor">
111 <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title> 111 <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title>
112 <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" /> 112 <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" />
113 <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title> 113 <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title>
114 </v-card> 114 </v-card>
115 </router-link> 115 </router-link>
116 </v-flex> 116 </v-flex>
117 </v-layout> 117 </v-layout>
118 </v-flex>--> 118 </v-flex>-->
119 <p 119 <p
120 v-if="studentsData.length === 0 && role == 'PARENT'" 120 v-if="studentsData.length === 0 && role == 'PARENT'"
121 class="text-center title grey lighten-4 error--text" 121 class="text-center title grey lighten-4 error--text"
122 >You have no student registered with school</p> 122 >You have no student registered with school</p>
123 <v-layout v-if="role != 'PARENT'"> 123 <v-layout v-if="role != 'PARENT'">
124 <v-flex xs12> 124 <v-flex xs12>
125 <v-card class="card mt-2 account-Card"> 125 <v-card class="card mt-2 account-Card">
126 <h4> 126 <h4>
127 <b>Account</b> 127 <b>Account</b>
128 </h4> 128 </h4>
129 <v-layout wrap> 129 <v-layout wrap>
130 <v-flex xs12 sm12 md3> 130 <v-flex xs12 sm12 md3>
131 <v-list two-line> 131 <v-list two-line>
132 <template> 132 <template>
133 <v-list-tile> 133 <v-list-tile>
134 <v-list-tile-avatar> 134 <v-list-tile-avatar>
135 <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> 135 <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon>
136 </v-list-tile-avatar> 136 </v-list-tile-avatar>
137 <v-list-tile-content> 137 <v-list-tile-content>
138 <v-list-tile-title class="mt-2"> 138 <v-list-tile-title class="mt-2">
139 <p class="subheading font-color">Fees</p> 139 <p class="subheading font-color">Fees</p>
140 </v-list-tile-title> 140 </v-list-tile-title>
141 <v-list-tile-title>Rs. {{ feeData.totalFees }}</v-list-tile-title> 141 <v-list-tile-title>Rs. {{ feeData.totalFees }}</v-list-tile-title>
142 </v-list-tile-content> 142 </v-list-tile-content>
143 </v-list-tile> 143 </v-list-tile>
144 <v-list-tile> 144 <v-list-tile>
145 <v-list-tile-avatar> 145 <v-list-tile-avatar>
146 <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon> 146 <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon>
147 </v-list-tile-avatar> 147 </v-list-tile-avatar>
148 <v-list-tile-content> 148 <v-list-tile-content>
149 <v-list-tile-title class="mt-2"> 149 <v-list-tile-title class="mt-2">
150 <p class="subheading font-color">Collection</p> 150 <p class="subheading font-color">Collection</p>
151 </v-list-tile-title> 151 </v-list-tile-title>
152 <v-list-tile-title>Rs. {{ feeData.totalCollection }}</v-list-tile-title> 152 <v-list-tile-title>Rs. {{ feeData.totalCollection }}</v-list-tile-title>
153 </v-list-tile-content> 153 </v-list-tile-content>
154 </v-list-tile> 154 </v-list-tile>
155 <v-list-tile> 155 <v-list-tile>
156 <v-list-tile-avatar> 156 <v-list-tile-avatar>
157 <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon> 157 <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon>
158 </v-list-tile-avatar> 158 </v-list-tile-avatar>
159 <v-list-tile-content> 159 <v-list-tile-content>
160 <v-list-tile-title class="mt-2"> 160 <v-list-tile-title class="mt-2">
161 <p class="subheading font-color">Expences</p> 161 <p class="subheading font-color">Expences</p>
162 </v-list-tile-title> 162 </v-list-tile-title>
163 <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title> 163 <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title>
164 </v-list-tile-content> 164 </v-list-tile-content>
165 </v-list-tile> 165 </v-list-tile>
166 </template> 166 </template>
167 </v-list> 167 </v-list>
168 </v-flex> 168 </v-flex>
169 <v-flex xs12 sm12 md9 lg9> 169 <v-flex xs12 sm12 md9 lg9>
170 <div id="chart"> 170 <div id="chart">
171 <div v-if="this.series"> 171 <div v-if="this.series">
172 <apexchart 172 <apexchart
173 type="bar" 173 type="bar"
174 height="250" 174 height="250"
175 style="max-width: 800px !important" 175 style="max-width: 800px !important"
176 :options="chartOptions" 176 :options="chartOptions"
177 :series="series" 177 :series="series"
178 v-show="true" 178 v-show="true"
179 ></apexchart> 179 ></apexchart>
180 </div> 180 </div>
181 </div> 181 </div>
182 </v-flex> 182 </v-flex>
183 </v-layout> 183 </v-layout>
184 </v-card> 184 </v-card>
185 </v-flex> 185 </v-flex>
186 </v-layout> 186 </v-layout>
187 <v-card class="mt-2 card" v-if="role != 'PARENT'"> 187 <v-card class="mt-2 card" v-if="role != 'PARENT'">
188 <!-- <full-calendar 188 <!-- <full-calendar
189 ref="calendar" 189 ref="calendar"
190 defaultView="month" 190 defaultView="month"
191 droppable="false" 191 droppable="false"
192 :events="events" 192 :events="events"
193 :config="config" 193 :config="config"
194 ></full-calendar>--> 194 ></full-calendar>-->
195 <h4 class="pa-3"> 195 <h4 class="pa-3">
196 <b>Notice</b> 196 <b>Notice</b>
197 </h4> 197 </h4>
198 198
199 <v-data-table 199 <v-data-table
200 :items="noticeData" 200 :items="noticeData"
201 class="elevation-0" 201 class="elevation-0"
202 flat 202 flat
203 hide-actions 203 hide-actions
204 hide-headers 204 hide-headers
205 style="border-spacing: 0 !important;" 205 style="border-spacing: 0 !important;"
206 > 206 >
207 <template 207 <template
208 slot="items" 208 slot="items"
209 slot-scope="props" 209 slot-scope="props"
210 v-if="props.index < 5" 210 v-if="props.index < 5"
211 style="border-spacing: 0 !important;" 211 style="border-spacing: 0 !important;"
212 > 212 >
213 <tr class="td-notice"> 213 <tr class="td-notice">
214 <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> 214 <td class="grey--text" style="width:18px">{{ props.index + 1}}</td>
215 <td> 215 <td>
216 <span class="grey--text caption">{{ date(props.item.created) }}</span> 216 <span class="grey--text caption">{{ date(props.item.created) }}</span>
217 <br /> 217 <br />
218 <span class="body-2">{{ props.item.title}}</span> 218 <span class="body-2">{{ props.item.title}}</span>
219 </td> 219 </td>
220 <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td> 220 <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td>
221 221
222 <td class="text-xs-center"> 222 <td class="text-xs-center">
223 <span> 223 <span>
224 <v-tooltip top> 224 <v-tooltip top>
225 <img 225 <img
226 slot="activator" 226 slot="activator"
227 style="cursor:pointer; width:25px; height:25px; " 227 style="cursor:pointer; width:25px; height:25px; "
228 @click="profile" 228 @click="profile"
229 src="/static/icon/view.png" 229 src="/static/icon/view.png"
230 /> 230 />
231 <span>View</span> 231 <span>View</span>
232 </v-tooltip> 232 </v-tooltip>
233 </span> 233 </span>
234 </td> 234 </td>
235 </tr> 235 </tr>
236 </template> 236 </template>
237 </v-data-table> 237 </v-data-table>
238 </v-card> 238 </v-card>
239 <!-- COURSES --> 239 <!-- COURSES -->
240 <v-layout v-if="role == 'PARENT'"> 240 <v-layout v-if="role == 'PARENT'">
241 <v-flex xs12> 241 <v-flex xs12>
242 <v-card class="card mt-2 account-Card"> 242 <v-card class="card mt-2 account-Card">
243 <h4> 243 <h4>
244 <b>My Courses</b> 244 <b>My Courses</b>
245 </h4> 245 </h4>
246 <v-layout wrap> 246 <v-layout wrap>
247 <v-flex xs12 sm12> 247 <v-flex xs12 sm12>
248 <v-list two-line> 248 <v-list two-line>
249 <template> 249 <template>
250 <v-list-tile v-for="(course,i) in courseData" :key="i"> 250 <v-list-tile v-for="(course,i) in courseData" :key="i">
251 <v-list-tile-avatar> 251 <v-list-tile-avatar>
252 <v-icon 252 <v-icon
253 class="account-circle darkBlue-color" 253 class="account-circle darkBlue-color"
254 style="cursor: pointer;" 254 style="cursor: pointer;"
255 >panorama_fish_eye</v-icon> 255 >panorama_fish_eye</v-icon>
256 </v-list-tile-avatar> 256 </v-list-tile-avatar>
257 <v-list-tile-content> 257 <v-list-tile-content>
258 <v-list-tile-title 258 <v-list-tile-title
259 style="cursor: pointer;" 259 style="cursor: pointer;"
260 @click="routeToCourseDetails(course._id)" 260 @click="routeToCourseDetails(course._id)"
261 >{{ course.courseName }}</v-list-tile-title> 261 >{{ course.courseName }}</v-list-tile-title>
262 </v-list-tile-content> 262 </v-list-tile-content>
263 </v-list-tile> 263 </v-list-tile>
264 </template> 264 </template>
265 </v-list> 265 </v-list>
266 </v-flex> 266 </v-flex>
267 </v-layout> 267 </v-layout>
268 </v-card> 268 </v-card>
269 </v-flex> 269 </v-flex>
270 </v-layout> 270 </v-layout>
271 <v-layout v-if="role == 'PARENT'"> 271 <v-layout v-if="role == 'PARENT'">
272 <v-flex xs6> 272 <v-flex xs6>
273 <v-card class="mt-2 card"> 273 <v-card class="mt-2 card">
274 <h4 class="pa-3"> 274 <h4 class="pa-3">
275 <b>Latest Annoucements</b> 275 <b>Latest Annoucements</b>
276 </h4> 276 </h4>
277 277
278 <v-data-table 278 <v-data-table
279 :items="annoucementData" 279 :items="annoucementData"
280 class="elevation-0" 280 class="elevation-0"
281 flat 281 flat
282 hide-actions 282 hide-actions
283 hide-headers 283 hide-headers
284 style="border-spacing: 0 !important;" 284 style="border-spacing: 0 !important;"
285 > 285 >
286 <template 286 <template
287 slot="items" 287 slot="items"
288 slot-scope="props" 288 slot-scope="props"
289 v-if="props.index < 5" 289 v-if="props.index < 5"
290 style="border-spacing: 0 !important;" 290 style="border-spacing: 0 !important;"
291 > 291 >
292 <tr class="td-notice"> 292 <tr class="td-notice">
293 <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> 293 <td class="grey--text" style="width:18px">{{ props.index + 1}}</td>
294 <td> 294 <td>
295 <span class="grey--text caption">{{ date(props.item.created) }}</span> 295 <span class="grey--text caption">{{ date(props.item.created) }}</span>
296 <br /> 296 <br />
297 <span class="body-2">{{ props.item.discussionType}}</span> 297 <span class="body-2">{{ props.item.discussionType}}</span>
298 </td> 298 </td>
299 <td class="text-xs-center"> 299 <td class="text-xs-center">
300 <span> 300 <span>
301 <v-tooltip top> 301 <v-tooltip top>
302 <img 302 <img
303 slot="activator" 303 slot="activator"
304 style="cursor:pointer; width:25px; height:25px; " 304 style="cursor:pointer; width:25px; height:25px; "
305 src="/static/icon/view.png" 305 src="/static/icon/view.png"
306 /> 306 />
307 <span>View</span> 307 <span>View</span>
308 </v-tooltip> 308 </v-tooltip>
309 </span> 309 </span>
310 </td> 310 </td>
311 </tr> 311 </tr>
312 </template> 312 </template>
313 </v-data-table> 313 </v-data-table>
314 </v-card> 314 </v-card>
315 </v-flex> 315 </v-flex>
316 <v-flex xs6> 316 <v-flex xs6>
317 <v-card class="mt-2 card"> 317 <v-card class="mt-2 card">
318 <h4 class="pa-3"> 318 <h4 class="pa-3">
319 <b>Online User</b> 319 <b>Online User</b>
320 </h4> 320 </h4>
321 321
322 <v-data-table 322 <v-data-table
323 :items="onlineUser" 323 :items="onlineUser"
324 class="elevation-0" 324 class="elevation-0"
325 flat 325 flat
326 hide-actions 326 hide-actions
327 hide-headers 327 hide-headers
328 style="border-spacing: 0 !important;" 328 style="border-spacing: 0 !important;"
329 > 329 >
330 <template 330 <template
331 slot="items" 331 slot="items"
332 slot-scope="props" 332 slot-scope="props"
333 v-if="props.index < 5" 333 v-if="props.index < 5"
334 style="border-spacing: 0 !important;" 334 style="border-spacing: 0 !important;"
335 > 335 >
336 <tr class="td-notice"> 336 <tr class="td-notice">
337 <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> 337 <td class="grey--text" style="width:18px">{{ props.index + 1}}</td>
338 <td> 338 <td>
339 <span class="body-2">{{ props.item.user }}</span> 339 <span class="body-2">{{ props.item.user }}</span>
340 </td> 340 </td>
341 <td class="text-xs-center"> 341 <td class="text-xs-center">
342 <span> 342 <span>
343 <v-tooltip top> 343 <v-tooltip top>
344 <img 344 <img
345 slot="activator" 345 slot="activator"
346 style="cursor:pointer; width:25px; height:25px; " 346 style="cursor:pointer; width:25px; height:25px; "
347 src="/static/icon/view.png" 347 src="/static/icon/view.png"
348 /> 348 />
349 <span>View</span> 349 <span>View</span>
350 </v-tooltip> 350 </v-tooltip>
351 </span> 351 </span>
352 </td> 352 </td>
353 </tr> 353 </tr>
354 </template> 354 </template>
355 </v-data-table> 355 </v-data-table>
356 </v-card> 356 </v-card>
357 </v-flex> 357 </v-flex>
358 </v-layout> 358 </v-layout>
359 </v-container> 359 </v-container>
360 </v-flex> 360 </v-flex>
361 <v-spacer></v-spacer> 361 <v-spacer></v-spacer>
362 <!-- SIDE BAR --> 362 <!-- SIDE BAR -->
363 <v-flex xs12 sm12 md3> 363 <v-flex xs12 sm12 md3>
364 <v-card height="100%" class="elevation-0 mt-3 profileDasboard"> 364 <v-card height="100%" class="elevation-0 mt-3 profileDasboard">
365 <v-card-text class="px-2"> 365 <v-card-text class="px-2">
366 <h4 class="text-xs-center py-3"> 366 <h4 class="text-xs-center py-3">
367 <b>Profile</b> 367 <b>Profile</b>
368 </h4> 368 </h4>
369 <v-flex xs12 class="py-3"> 369 <v-flex xs12 class="py-3">
370 <v-layout wrap> 370 <v-layout wrap>
371 <v-flex xs12 sm12 md4> 371 <v-flex xs12 sm12 md4>
372 <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" /> 372 <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" />
373 <img :src="userData.schoolLogoUrl" v-else-if="userData.schoolLogoUrl" width="80" /> 373 <img :src="userData.schoolLogoUrl" v-else-if="userData.schoolLogoUrl" width="80" />
374 </v-flex> 374 </v-flex>
375 <v-flex xs12 sm12 md6> 375 <v-flex xs12 sm12 md6>
376 <p class="mb-0 body-1"> 376 <p class="mb-0 body-1">
377 <i>{{ userData.name }}</i> 377 <i>{{ userData.name }}</i>
378 </p> 378 </p>
379 <p class="mb-0 caption grey--text">{{ userData.email }}</p> 379 <p class="mb-0 caption grey--text">{{ userData.email }}</p>
380 <p class="mb-0 caption grey--text">{{ userData.mobile }}</p> 380 <p class="mb-0 caption grey--text">{{ userData.mobile }}</p>
381 <address class="caption grey--text mb-3">{{ userData.address }}</address> 381 <address class="caption grey--text mb-3">{{ userData.address }}</address>
382 </v-flex> 382 </v-flex>
383 </v-layout> 383 </v-layout>
384 </v-flex> 384 </v-flex>
385 <hr /> 385 <hr />
386 <div class="text-xs-center py-3 subheading font-weight-bold">Calender</div> 386 <div class="text-xs-center py-3 subheading font-weight-bold">Calender</div>
387 <vue-event-calendar :events="activityEvents"></vue-event-calendar> 387 <vue-event-calendar :events="activityEvents"></vue-event-calendar>
388 <!-- LATEST ACTIVITY --> 388 <!-- LATEST ACTIVITY -->
389 <v-card class="my-3 elevation-0" v-if="role == 'PARENT'"> 389 <v-card class="my-3 elevation-0">
390 <v-card-text> 390 <v-card-text>
391 <v-card-title class="justify-center subheading font-weight-bold">Latest Activity</v-card-title> 391 <v-card-title
392 class="justify-center subheading font-weight-bold"
393 v-if="role != 'TEACHER'"
394 >Latest Activity</v-card-title>
395 <v-card-title
396 class="justify-center subheading font-weight-bold"
397 v-if="role == 'TEACHER'"
398 >Latest Event</v-card-title>
392 <div v-for="(activity,index) in activityList" :key="index" class="mt-2"> 399 <div v-for="(activity,index) in activityList" :key="index" class="mt-2">
393 <span 400 <span
394 :style="{ 'background-color': colorsArray[index%colorsArray.length] }" 401 :style="{ 'background-color': colorsArray[index%colorsArray.length] }"
395 style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" 402 style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;"
396 ></span> 403 ></span>
397 <div style="display: inline-block;" class="ml-2"> 404 <div style="display: inline-block;" class="ml-2">
398 <div 405 <div
399 class="grey--text lighten-1 caption" 406 class="grey--text lighten-1 caption"
407 v-if="activity.meetingEvent"
400 >{{moment(activity.meetingEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> 408 >{{moment(activity.meetingEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div>
401 <div class="body-2">{{activity.meetingEvent.title}}</div> 409 <div class="body-2" v-if="activity.meetingEvent">{{activity.meetingEvent.title}}</div>
410 <div v-if="role == 'TEACHER'">
411 <div
412 class="grey--text lighten-1 caption"
413 v-if="activity.dateOfEvent"
414 >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div>
415 <div class="body-2" v-if="activity.title">{{activity.title}}</div>
416 </div>
402 </div> 417 </div>
403 </div> 418 </div>
419 <div v-if="activityList.length == 0">
420 <p class="text-center title grey lighten-4 error--text">No Data Found!</p>
421 </div>
404 </v-card-text> 422 </v-card-text>
405 </v-card> 423 </v-card>
406 </v-card-text> 424 </v-card-text>
407 </v-card> 425 </v-card>
408 </v-flex> 426 </v-flex>
409 </v-layout> 427 </v-layout>
410 428
411 <v-dialog v-model="dialog" max-width="500"> 429 <v-dialog v-model="dialog" max-width="500">
412 <v-card color="grey lighten-4" flat> 430 <v-card color="grey lighten-4" flat>
413 <v-toolbar dark color="fixcolors"> 431 <v-toolbar dark color="fixcolors">
414 <v-spacer></v-spacer> 432 <v-spacer></v-spacer>
415 <v-btn icon @click="dialog= false"> 433 <v-btn icon @click="dialog= false">
416 <v-icon>close</v-icon> 434 <v-icon>close</v-icon>
417 </v-btn> 435 </v-btn>
418 </v-toolbar> 436 </v-toolbar>
419 <v-flex class="py-4"> 437 <v-flex class="py-4">
420 <v-list-tile> 438 <v-list-tile>
421 <v-list-tile-action> 439 <v-list-tile-action>
422 <v-icon>edit</v-icon> 440 <v-icon>edit</v-icon>
423 </v-list-tile-action> 441 </v-list-tile-action>
424 <v-list-tile-content> 442 <v-list-tile-content>
425 <v-list-tile-title>{{ selected.title }}</v-list-tile-title> 443 <v-list-tile-title>{{ selected.title }}</v-list-tile-title>
426 </v-list-tile-content> 444 </v-list-tile-content>
427 </v-list-tile> 445 </v-list-tile>
428 <v-list-tile> 446 <v-list-tile>
429 <v-list-tile-action> 447 <v-list-tile-action>
430 <v-icon>access_time</v-icon> 448 <v-icon>access_time</v-icon>
431 </v-list-tile-action> 449 </v-list-tile-action>
432 <v-list-tile-content> 450 <v-list-tile-content>
433 <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title> 451 <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title>
434 </v-list-tile-content> 452 </v-list-tile-content>
435 </v-list-tile> 453 </v-list-tile>
436 </v-flex> 454 </v-flex>
437 </v-card> 455 </v-card>
438 </v-dialog> 456 </v-dialog>
439 </v-app> 457 </v-app>
440 </template> 458 </template>
441 459
442 <script> 460 <script>
443 import http from "@/Services/http.js"; 461 import http from "@/Services/http.js";
444 import moment from "moment"; 462 import moment from "moment";
445 import AllApiCalls from "@/Services/AllApiCalls.js"; 463 import AllApiCalls from "@/Services/AllApiCalls.js";
446 // import { FunctionalCalendar } from "vue-functional-calendar"; 464 // import { FunctionalCalendar } from "vue-functional-calendar";
447 465
448 export default { 466 export default {
449 components: { 467 components: {
450 // FunctionalCalendar 468 // FunctionalCalendar
451 }, 469 },
452 mixins: [AllApiCalls], 470 mixins: [AllApiCalls],
453 data() { 471 data() {
454 return { 472 return {
455 // data: { 473 // data: {
456 // clieckedToday: false 474 // clieckedToday: false
457 // }, 475 // },
458 // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"], 476 // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"],
459 // calendarData: {}, 477 // calendarData: {},
460 // calendar: {}, 478 // calendar: {},
461 479
462 // CALENDER 480 // CALENDER
463 moment: moment, 481 moment: moment,
464 activityEvents: [], 482 activityEvents: [],
465 onlineUser: [ 483 onlineUser: [
466 { 484 {
467 user: "Student Demo" 485 user: "Student Demo"
468 }, 486 },
469 { 487 {
470 user: "Teacher Demo" 488 user: "Teacher Demo"
471 }, 489 },
472 { 490 {
473 user: "Priyansh Gupta" 491 user: "Priyansh Gupta"
474 }, 492 },
475 { 493 {
476 user: "Gaurav Aggarwal" 494 user: "Gaurav Aggarwal"
477 }, 495 },
478 { 496 {
479 user: "Approve Arorra" 497 user: "Approve Arorra"
480 } 498 }
481 ], 499 ],
482 showLoader: false, 500 showLoader: false,
483 calendarData: {}, 501 calendarData: {},
484 dialog: false, 502 dialog: false,
485 dialogNotice: false, 503 dialogNotice: false,
486 HolidaysList: [], 504 HolidaysList: [],
487 EventsList: [], 505 EventsList: [],
488 events: [], 506 events: [],
489 config: { 507 config: {
490 eventClick: event => { 508 eventClick: event => {
491 this.selected = event; 509 this.selected = event;
492 this.dialog = true; 510 this.dialog = true;
493 } 511 }
494 }, 512 },
495 selected: {}, 513 selected: {},
496 barGraph: [], 514 barGraph: [],
497 // notice: {}, 515 // notice: {},
498 userData: {}, 516 userData: {},
499 dated: new Date(2018, 0, 9), 517 dated: new Date(2018, 0, 9),
500 userList: [], 518 userList: [],
501 sectionList: [], 519 sectionList: [],
502 students: "", 520 students: "",
503 parents: "", 521 parents: "",
504 teachers: "", 522 teachers: "",
505 classes: "", 523 classes: "",
506 noticeData: [], 524 noticeData: [],
507 expenseData: [], 525 expenseData: [],
508 feeData: [], 526 feeData: [],
509 collectionData: [], 527 collectionData: [],
510 courseData: [], 528 courseData: [],
511 studentsData: [], 529 studentsData: [],
512 annoucementData: [], 530 annoucementData: [],
513 role: "", 531 role: "",
514 attrs: [ 532 attrs: [
515 { 533 {
516 key: "today", 534 key: "today",
517 highlight: true, 535 highlight: true,
518 dates: new Date() 536 dates: new Date()
519 } 537 }
520 ], 538 ],
521 drawer: true, 539 drawer: true,
522 items: [ 540 items: [
523 { title: "Home", icon: "dashboard" }, 541 { title: "Home", icon: "dashboard" },
524 { title: "About", icon: "question_answer" } 542 { title: "About", icon: "question_answer" }
525 ], 543 ],
526 right: null, 544 right: null,
527 545
528 series: [ 546 series: [
529 { 547 {
530 name: "Total", 548 name: "Total",
531 data: [] 549 data: []
532 } 550 }
533 ], 551 ],
534 chartOptions: { 552 chartOptions: {
535 chart: { 553 chart: {
536 type: "bar", 554 type: "bar",
537 height: 150, 555 height: 150,
538 stacked: true 556 stacked: true
539 // animations: { 557 // animations: {
540 // enabled: true, 558 // enabled: true,
541 // easing: "easeinout", 559 // easing: "easeinout",
542 // speed: 1200, 560 // speed: 1200,
543 // animateGradually: { 561 // animateGradually: {
544 // enabled: true, 562 // enabled: true,
545 // delay: 450 563 // delay: 450
546 // }, 564 // },
547 // dynamicAnimation: { 565 // dynamicAnimation: {
548 // enabled: true, 566 // enabled: true,
549 // speed: 450 567 // speed: 450
550 // } 568 // }
551 // } 569 // }
552 }, 570 },
553 plotOptions: { 571 plotOptions: {
554 bar: { 572 bar: {
555 horizontal: false, 573 horizontal: false,
556 columnWidth: "25%", 574 columnWidth: "25%",
557 // endingShape: "rounded", 575 // endingShape: "rounded",
558 distributed: true 576 distributed: true
559 } 577 }
560 }, 578 },
561 responsive: [ 579 responsive: [
562 { 580 {
563 breakpoint: 480, 581 breakpoint: 480,
564 options: { 582 options: {
565 legend: { 583 legend: {
566 position: "bottom", 584 position: "bottom",
567 offsetX: -10, 585 offsetX: -10,
568 offsetY: 0 586 offsetY: 0
569 } 587 }
570 } 588 }
571 } 589 }
572 ], 590 ],
573 legend: { 591 legend: {
574 show: false 592 show: false
575 }, 593 },
576 colors: ["#7852cc", "#f9a825", "#ff8a89"], 594 colors: ["#7852cc", "#f9a825", "#ff8a89"],
577 dataLabels: { 595 dataLabels: {
578 enabled: false 596 enabled: false
579 }, 597 },
580 stroke: { 598 stroke: {
581 show: true, 599 show: true,
582 width: 2, 600 width: 2,
583 colors: ["transparent"] 601 colors: ["transparent"]
584 }, 602 },
585 xaxis: { 603 xaxis: {
586 categories: ["Fee", "Collections", "Expences"] 604 categories: ["Fee", "Collections", "Expences"]
587 }, 605 },
588 yaxis: { 606 yaxis: {
589 title: { 607 title: {
590 text: "" 608 text: ""
591 } 609 }
592 }, 610 },
593 fill: { 611 fill: {
594 opacity: 1 612 opacity: 1
595 }, 613 },
596 tooltip: { 614 tooltip: {
597 y: { 615 y: {
598 formatter: function(val, opts) { 616 formatter: function(val, opts) {
599 // console.log("opts",opts.w.config.xaxis.categories) 617 // console.log("opts",opts.w.config.xaxis.categories)
600 return "" + val + " "; 618 return "" + val + " ";
601 } 619 }
602 } 620 }
603 } 621 }
604 }, 622 },
605 623
606 // LATEST ACTIVITY 624 // LATEST ACTIVITY
607 colorsArray: ["#ff8a89", "#71d9ea", "#7852cc", "#F9A825"], 625 colorsArray: ["#ff8a89", "#71d9ea", "#7852cc", "#F9A825"],
608 activityList: [] 626 activityList: []
609 }; 627 };
610 }, 628 },
611 mounted() { 629 mounted() {
612 // = this.$store.state.schoolToken; 630 // = this.$store.state.schoolToken;
613 // console.log("this.$store.state.role", this.token); 631 // console.log("this.$store.state.role", this.token);
614 if (this.$store.state.role === "ADMIN") { 632 if (this.$store.state.role === "ADMIN") {
615 this.token = this.$store.state.token; 633 this.token = this.$store.state.token;
616 } else if (this.$store.state.schoolRole === "SUPERADMIN") { 634 } else if (this.$store.state.schoolRole === "SUPERADMIN") {
617 this.token = this.$store.state.schoolToken; 635 this.token = this.$store.state.schoolToken;
618 } else if (this.$store.state.role === "TEACHER") { 636 } else if (this.$store.state.role === "TEACHER") {
619 this.token = this.$store.state.token; 637 this.token = this.$store.state.token;
620 } else if (this.$store.state.role === "ACCOUNTANT") { 638 } else if (this.$store.state.role === "ACCOUNTANT") {
621 this.token = this.$store.state.token; 639 this.token = this.$store.state.token;
622 } else if (this.$store.state.role === "LIBRARIAN") { 640 } else if (this.$store.state.role === "LIBRARIAN") {
623 this.token = this.$store.state.token; 641 this.token = this.$store.state.token;
624 } else if (this.$store.state.role === "PARENT") { 642 } else if (this.$store.state.role === "PARENT") {
625 this.token = this.$store.state.token; 643 this.token = this.$store.state.token;
626 } 644 }
627 this.role = this.$store.state.role; 645 this.role = this.$store.state.role;
628 // console.log("role", this.$store.state.schoolRole,"tt",this.$store.state.schoolToken); 646 // console.log("role", this.$store.state.schoolRole,"tt",this.$store.state.schoolToken);
629 // this.getData(); 647 // this.getData();
630 this.getStudents(); 648 this.getStudents();
631 this.getTeachers(); 649 this.getTeachers();
632 this.getParents(); 650 this.getParents();
633 this.getClasses(); 651 this.getClasses();
634 this.getNoticeData(); 652 this.getNoticeData();
635 this.getUserData(); 653 this.getUserData();
636 this.getFeesAndCollectionsData(); 654 this.getFeesAndCollectionsData();
637 this.getExpensesData(); 655 this.getExpensesData();
638 this.getparentStudents(); 656 this.getparentStudents();
657 this.getMeetingEventes();
639 // this.getUsersList(); 658 // this.getUsersList();
640 }, 659 },
641 methods: { 660 methods: {
642 async routeToCourseDetails(courseId) { 661 async routeToCourseDetails(courseId) {
643 /* getParticularCourseDetail- To get courseDetail - defined in GetApis.js*/ 662 /* getParticularCourseDetail- To get courseDetail - defined in GetApis.js*/
644 let response = await this.getParticularCourseDetail(courseId); 663 let response = await this.getParticularCourseDetail(courseId);
645 664
646 /* If the response is null then dont route */ 665 /* If the response is null then dont route */
647 if (response.data.data.length > 0) { 666 if (response.data.data.length > 0) {
648 this.$router.push({ 667 this.$router.push({
649 name: "Course Details", 668 name: "Course Details",
650 query: { courseId: courseId } 669 query: { courseId: courseId }
651 }); 670 });
652 } else { 671 } else {
653 this.seeSnackbar("No Data Available", "warning"); 672 this.seeSnackbar("No Data Available", "warning");
654 } 673 }
655 }, 674 },
656 675
657 closeNotice() { 676 closeNotice() {
658 this.dialogNotice = false; 677 this.dialogNotice = false;
659 }, 678 },
660 profile() { 679 profile() {
661 // this.editedIndex = this.desserts.indexOf(item); 680 // this.editedIndex = this.desserts.indexOf(item);
662 // this.notice = Object.assign({}, item); 681 // this.notice = Object.assign({}, item);
663 // this.dialogNotice = true; 682 // this.dialogNotice = true;
664 this.$router.push({ name: "NoticeBoard" }); 683 this.$router.push({ name: "NoticeBoard" });
665 }, 684 },
666 date: function(date) { 685 date: function(date) {
667 return moment(date).format("MMMM DD, YYYY HH:mm"); 686 return moment(date).format("MMMM DD, YYYY HH:mm");
668 }, 687 },
669 activityDate(date) { 688 activityDate(date) {
670 return moment(date).format("MMMM DD, YYYY"); 689 return moment(date).format("MMMM DD, YYYY");
671 }, 690 },
672 refreshEvents() { 691 refreshEvents() {
673 this.$refs.calendar.$emit("refetch-events"); 692 this.$refs.calendar.$emit("refetch-events");
674 }, 693 },
675 removeEvent() { 694 removeEvent() {
676 this.$refs.calendar.$emit("remove-event", this.selected); 695 this.$refs.calendar.$emit("remove-event", this.selected);
677 this.selected = {}; 696 this.selected = {};
678 }, 697 },
679 eventSelected(event) { 698 eventSelected(event) {
680 this.selected = event; 699 this.selected = event;
681 console.log("this.selected", this.selected); 700 console.log("this.selected", this.selected);
682 }, 701 },
683 // eventDropStart: function(event) { 702 // eventDropStart: function(event) {
684 // event.editable = false; 703 // event.editable = false;
685 // }, 704 // },
686 eventCreated(...test) { 705 eventCreated(...test) {
687 console.log(test); 706 console.log(test);
688 }, 707 },
689 getStudents() { 708 getStudents() {
690 http() 709 http()
691 .get("/getStudentsList", { 710 .get("/getStudentsList", {
692 headers: { 711 headers: {
693 Authorization: "Bearer " + this.token 712 Authorization: "Bearer " + this.token
694 } 713 }
695 }) 714 })
696 .then(response => { 715 .then(response => {
697 this.students = response.data.data; 716 this.students = response.data.data;
698 this.showLoader = false; 717 this.showLoader = false;
699 }) 718 })
700 .catch(error => { 719 .catch(error => {
701 // console.log("err====>", err); 720 // console.log("err====>", err);
702 this.showLoader = false; 721 this.showLoader = false;
703 if (error.response.status === 401) { 722 if (error.response.status === 401) {
704 this.$router.replace({ path: "/" }); 723 this.$router.replace({ path: "/" });
705 this.$store.dispatch("setToken", null); 724 this.$store.dispatch("setToken", null);
706 this.$store.dispatch("Id", null); 725 this.$store.dispatch("Id", null);
707 } 726 }
708 }); 727 });
709 }, 728 },
710 getParents() { 729 getParents() {
711 http() 730 http()
712 .get("/getParentsList", { 731 .get("/getParentsList", {
713 headers: { 732 headers: {
714 Authorization: "Bearer " + this.token 733 Authorization: "Bearer " + this.token
715 } 734 }
716 }) 735 })
717 .then(response => { 736 .then(response => {
718 this.parents = response.data.data; 737 this.parents = response.data.data;
719 this.showLoader = false; 738 this.showLoader = false;
720 }) 739 })
721 .catch(error => { 740 .catch(error => {
722 // console.log("err====>", err); 741 // console.log("err====>", err);
723 this.showLoader = false; 742 this.showLoader = false;
724 }); 743 });
725 }, 744 },
726 getTeachers() { 745 getTeachers() {
727 http() 746 http()
728 .get("/getTeachersList", { 747 .get("/getTeachersList", {
729 headers: { 748 headers: {
730 Authorization: "Bearer " + this.token 749 Authorization: "Bearer " + this.token
731 } 750 }
732 }) 751 })
733 .then(response => { 752 .then(response => {
734 this.teachers = response.data.data; 753 this.teachers = response.data.data;
735 this.showLoader = false; 754 this.showLoader = false;
736 }) 755 })
737 .catch(error => { 756 .catch(error => {
738 // console.log("err====>", err); 757 // console.log("err====>", err);
739 this.showLoader = false; 758 this.showLoader = false;
740 }); 759 });
741 }, 760 },
742 getClasses() { 761 getClasses() {
743 http() 762 http()
744 .get("/getClassesList", { 763 .get("/getClassesList", {
745 headers: { 764 headers: {
746 Authorization: "Bearer " + this.token 765 Authorization: "Bearer " + this.token
747 } 766 }
748 }) 767 })
749 .then(response => { 768 .then(response => {
750 this.classes = response.data.data; 769 this.classes = response.data.data;
751 this.showLoader = false; 770 this.showLoader = false;
752 }) 771 })
753 .catch(error => { 772 .catch(error => {
754 this.showLoader = false; 773 this.showLoader = false;
755 }); 774 });
756 }, 775 },
757 getNoticeData() { 776 getNoticeData() {
758 this.showLoader = true; 777 this.showLoader = true;
759 http() 778 http()
760 .get("/getEventsList", { 779 .get("/getEventsList", {
761 headers: { 780 headers: {
762 Authorization: "Bearer " + this.token 781 Authorization: "Bearer " + this.token
763 } 782 }
764 }) 783 })
765 .then(response => { 784 .then(response => {
766 this.noticeData = response.data.data; 785 this.noticeData = response.data.data;
767 this.showLoader = false; 786 this.showLoader = false;
768 }) 787 })
769 .catch(error => { 788 .catch(error => {
770 this.showLoader = false; 789 this.showLoader = false;
771 }); 790 });
772 }, 791 },
773 getUserData() { 792 getUserData() {
774 // this.showLoader = true; 793 // this.showLoader = true;
775 if (this.$store.state.role === "PARENT") { 794 if (this.$store.state.role === "PARENT") {
776 http() 795 http()
777 .get("/getParticularUserDetail", { 796 .get("/getParticularUserDetail", {
778 headers: { 797 headers: {
779 Authorization: "Bearer " + this.token 798 Authorization: "Bearer " + this.token
780 }, 799 },
781 params: { 800 params: {
782 studentId: localStorage.getItem("parentStudentId") 801 studentId: localStorage.getItem("parentStudentId")
783 } 802 }
784 }) 803 })
785 .then(response => { 804 .then(response => {
786 this.userData = response.data.data; 805 this.userData = response.data.data;
787 this.showLoader = false; 806 this.showLoader = false;
788 console.log("sdsdfsdfsd - ", response); 807 console.log("sdsdfsdfsd - ", response);
789 }) 808 })
790 .catch(error => { 809 .catch(error => {
791 this.showLoader = false; 810 this.showLoader = false;
792 }); 811 });
793 } else { 812 } else {
794 http() 813 http()
795 .get("/getParticularUserDetail", { 814 .get("/getParticularUserDetail", {
796 headers: { 815 headers: {
797 Authorization: "Bearer " + this.token 816 Authorization: "Bearer " + this.token
798 } 817 }
799 }) 818 })
800 .then(response => { 819 .then(response => {
801 this.userData = response.data.data; 820 this.userData = response.data.data;
802 this.showLoader = false; 821 this.showLoader = false;
803 }) 822 })
804 .catch(error => { 823 .catch(error => {
805 this.showLoader = false; 824 this.showLoader = false;
806 }); 825 });
807 } 826 }
808 }, 827 },
809 828
810 getFeesAndCollectionsData() { 829 getFeesAndCollectionsData() {
811 http() 830 http()
812 .get("/getTotalFeesAndCollections", { 831 .get("/getTotalFeesAndCollections", {
813 headers: { 832 headers: {
814 Authorization: "Bearer " + this.token 833 Authorization: "Bearer " + this.token
815 } 834 }
816 }) 835 })
817 .then(response => { 836 .then(response => {
818 this.feeData = response.data.data; 837 this.feeData = response.data.data;
819 // this.collectionData = response.data.data; 838 // this.collectionData = response.data.data;
820 this.series[0].data[0] = this.feeData.totalFees; 839 this.series[0].data[0] = this.feeData.totalFees;
821 this.series[0].data[1] = this.feeData.totalCollection; 840 this.series[0].data[1] = this.feeData.totalCollection;
822 // console.log("this.series====", this.series); 841 // console.log("this.series====", this.series);
823 842
824 this.showLoader = false; 843 this.showLoader = false;
825 }) 844 })
826 .catch(error => { 845 .catch(error => {
827 this.showLoader = false; 846 this.showLoader = false;
828 }); 847 });
829 }, 848 },
830 getExpensesData() { 849 getExpensesData() {
831 http() 850 http()
832 .get("/getTotalExpenses", { 851 .get("/getTotalExpenses", {
833 headers: { 852 headers: {
834 Authorization: "Bearer " + this.token 853 Authorization: "Bearer " + this.token
835 } 854 }
836 }) 855 })
837 .then(response => { 856 .then(response => {
838 this.expenseData = response.data.data; 857 this.expenseData = response.data.data;
839 // var array = response.data.data.sum; 858 // var array = response.data.data.sum;
840 this.series[0].data[2] = this.expenseData.sum; 859 this.series[0].data[2] = this.expenseData.sum;
841 // this.series = [ 860 // this.series = [
842 // { 861 // {
843 // name: "Total", 862 // name: "Total",
844 // data: array 863 // data: array
845 // } 864 // }
846 // ]; 865 // ];
847 // console.log("this.series====", this.series); 866 // console.log("this.series====", this.series);
848 this.showLoader = false; 867 this.showLoader = false;
849 }) 868 })
850 .catch(error => { 869 .catch(error => {
851 this.showLoader = false; 870 this.showLoader = false;
852 }); 871 });
853 }, 872 },
854 getparentStudents() { 873 getparentStudents() {
855 this.showLoader = true; 874 this.showLoader = true;
856 http() 875 http()
857 .get("/parentStudentsList") 876 .get("/parentStudentsList")
858 .then(response => { 877 .then(response => {
859 // console.log("resssssss", response.data.data.students[0].classId); 878 // console.log("resssssss", response.data.data.students[0].classId);
860 this.studentsData = response.data.data; 879 this.studentsData = response.data.data;
861 // localStorage.setItem( 880 // localStorage.setItem(
862 // "parentStudentId", 881 // "parentStudentId",
863 // this.studentsData.students[0]._id 882 // this.studentsData.students[0]._id
864 // ); 883 // );
865 // localStorage.setItem( 884 // localStorage.setItem(
866 // "parentClassId", 885 // "parentClassId",
867 // this.studentsData.students[0].classId 886 // this.studentsData.students[0].classId
868 // ); 887 // );
869 888
870 if (localStorage.getItem("parentStudentId") == null) { 889 if (localStorage.getItem("parentStudentId") == null) {
871 var parentStudentsId = response.data.data.students[0].classId; 890 var parentStudentsId = response.data.data.students[0].classId;
872 var classId = response.data.data.students[0]._id; 891 var classId = response.data.data.students[0]._id;
873 } 892 }
874 if (localStorage.getItem("parentStudentId")) { 893 if (localStorage.getItem("parentStudentId")) {
875 var parentStudentsId = localStorage.getItem("parentStudentId"); 894 var parentStudentsId = localStorage.getItem("parentStudentId");
876 var classId = localStorage.getItem("parentClassId"); 895 var classId = localStorage.getItem("parentClassId");
877 } 896 }
878 this.getCourses(parentStudentsId, classId); 897 this.getCourses(parentStudentsId, classId);
879 this.getAnnoucementes(classId); 898 this.getAnnoucementes(classId);
880 this.showLoader = false; 899 this.showLoader = false;
881 }) 900 })
882 .catch(err => { 901 .catch(err => {
883 console.log("err====>", err); 902 console.log("err====>", err);
884 this.showLoader = false; 903 this.showLoader = false;
885 }); 904 });
886 }, 905 },
887 async getCourses(parentStudentsId, classId) { 906 async getCourses(parentStudentsId, classId) {
888 /* getStudentCourses - to get courseData - defined in GetApis.js*/ 907 /* getStudentCourses - to get courseData - defined in GetApis.js*/
889 await this.getStudentCourses({ 908 await this.getStudentCourses({
890 classId: classId, 909 classId: classId,
891 studentId: parentStudentsId 910 studentId: parentStudentsId
892 }); 911 });
893 }, 912 },
894 getAnnoucementes(classId) { 913 getAnnoucementes(classId) {
895 this.showLoader = true; 914 this.showLoader = true;
896 http() 915 http()
897 .get("/getAnnoucementesList", { 916 .get("/getAnnoucementesList", {
898 params: { 917 params: {
899 classId: classId 918 classId: classId
900 } 919 }
901 }) 920 })
902 .then(response => { 921 .then(response => {
903 this.annoucementData = response.data.data; 922 this.annoucementData = response.data.data;
904 this.showLoader = false; 923 this.showLoader = false;
905 }) 924 })
906 .catch(err => { 925 .catch(err => {
907 console.log("err====>", err); 926 console.log("err====>", err);
908 this.showLoader = false; 927 this.showLoader = false;
909 }); 928 });
929 },
930 getMeetingEventes() {
931 if (this.role == "TEACHER") {
932 this.showLoader = true;
933 http()
934 .get("/getMeetingEventesList", {
935 headers: {
936 Authorization: "Bearer " + this.token
937 }
938 })
939 .then(response => {
940 var activityList = response.data.data;
941 this.activityList = activityList;
942 this.showLoader = false;
943 })
944 .catch(error => {
945 this.showLoader = false;
946 });
947 }
910 } 948 }
911 }, 949 },
912 async created() { 950 async created() {
913 /* get Latest events list */ 951 /* get Latest events list */
914 let response = await this.studentMeetingEvents({ 952 if (this.$store.state.role != "TEACHER") {
915 studentId: localStorage.getItem("parentStudentId") 953 let response = await this.studentMeetingEvents({
916 }); 954 studentId: localStorage.getItem("parentStudentId")
917 this.activityList = response.data.data; 955 });
956 this.activityList = response.data.data;
918 957
919 /* set activityEvents array to highlight event dates in calender */ 958 /* set activityEvents array to highlight event dates in calender */
920 for (var i = 0; i < this.activityList.length; i++) { 959 for (var i = 0; i < this.activityList.length; i++) {
921 let obj = {}; 960 let obj = {};
922 obj.date = moment(this.activityList[i].meetingEvent.dateOfEvent).format( 961 obj.date = moment(this.activityList[i].meetingEvent.dateOfEvent).format(
923 "YYYY/MM/DD" 962 "YYYY/MM/DD"
924 ); 963 );
925 obj.title = this.activityList[i].meetingEvent.title; 964 obj.title = this.activityList[i].meetingEvent.title;
926 this.activityEvents.push(obj); 965 this.activityEvents.push(obj);
966 }
927 } 967 }
928 } 968 }
929 }; 969 };
930 </script> 970 </script>
931 971
932 <style scoped> 972 <style scoped>
933 @import "fullcalendar/dist/fullcalendar.css"; 973 @import "fullcalendar/dist/fullcalendar.css";
934 </style> 974 </style>