Commit 2d3a8e9c375e89b96fb35eb7f800cd33d1495fc9

Authored by Amber Dev
1 parent 102209e4d5

added pdf link

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