Commit 32eff55c5ddfb59a31ba954d217f50bfd62a6e83

Authored by Shikha Mishra
1 parent d32525d71b

password required while second user join video issue solved

Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
src/pages/Dashboard/LiveOnlineClass.vue
1 <template> 1 <template>
2 <div class="body-color"> 2 <div class="body-color">
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 grid-list-xl class="pt-0"> 22 <v-container grid-list-xl class="pt-0">
23 <v-layout row wrap class="mt-1"> 23 <v-layout row wrap class="mt-1">
24 <!-- if logged in user is parent --> 24 <!-- if logged in user is parent -->
25 <v-flex xs12 sm12 md9 v-if=" $store.state.role === 'PARENT' "> 25 <v-flex xs12 sm12 md9 v-if=" $store.state.role === 'PARENT' ">
26 <v-layout column> 26 <v-layout column>
27 <!-- HEADING --> 27 <!-- HEADING -->
28 <v-flex> 28 <v-flex>
29 <div 29 <div
30 class="title side-bar-color font-weight-bold" 30 class="title side-bar-color font-weight-bold"
31 >Live Online Classes - {{$route.query.chapterName}}</div> 31 >Live Online Classes - {{$route.query.chapterName}}</div>
32 <!-- <div class="subheading grey--text lighten-1">{{liveLink}}</div> --> 32 <!-- <div class="subheading grey--text lighten-1">{{liveLink}}</div> -->
33 <!-- <div 33 <!-- <div
34 class="subheading grey--text lighten-1" 34 class="subheading grey--text lighten-1"
35 >The session started at 1:00 there is 1 moderator</div>--> 35 >The session started at 1:00 there is 1 moderator</div>-->
36 </v-flex> 36 </v-flex>
37 37
38 <!-- JOIN OR END SESSION --> 38 <!-- JOIN OR END SESSION -->
39 <v-flex v-if="showJoinSessionButton"> 39 <v-flex v-if="showJoinSessionButton">
40 <div> 40 <div>
41 <v-btn 41 <v-btn
42 round 42 round
43 class="open-dialog-button" 43 class="open-dialog-button"
44 dark 44 dark
45 v-if="studentBtn" 45 v-if="studentBtn"
46 @click="showLoader = true;startChat();" 46 @click="showLoader = true;startChat();"
47 >{{studentBtn}}</v-btn> 47 >{{studentBtn}}</v-btn>
48 <span class="subheading grey--twxt lighten-1" v-else>Session hasnt started yet</span> 48 <span class="subheading grey--twxt lighten-1" v-else>Session hasnt started yet</span>
49 </div> 49 </div>
50 </v-flex> 50 </v-flex>
51 <v-flex id="studentClone"> 51 <v-flex id="studentClone">
52 <div id="jitsi-container"></div> 52 <div id="jitsi-container"></div>
53 </v-flex> 53 </v-flex>
54 </v-layout> 54 </v-layout>
55 </v-flex> 55 </v-flex>
56 56
57 <!-- if logged in user is teacher --> 57 <!-- if logged in user is teacher -->
58 <v-flex xs12 sm12 md12 v-else> 58 <v-flex xs12 sm12 md12 v-else>
59 <v-layout column> 59 <v-layout column>
60 <!-- HEADING --> 60 <!-- HEADING -->
61 <v-flex> 61 <v-flex>
62 <div 62 <div
63 class="title side-bar-color font-weight-bold" 63 class="title side-bar-color font-weight-bold"
64 >Live Online Classes - {{$route.query.chapterName}}</div> 64 >Live Online Classes - {{$route.query.chapterName}}</div>
65 <!-- <div class="subheading grey--text lighten-1"></div> --> 65 <!-- <div class="subheading grey--text lighten-1"></div> -->
66 <!-- <div 66 <!-- <div
67 class="subheading grey--text lighten-1" 67 class="subheading grey--text lighten-1"
68 >The session started at 1:00 there is 1 moderator</div>--> 68 >The session started at 1:00 there is 1 moderator</div>-->
69 </v-flex> 69 </v-flex>
70 70
71 <!-- JOIN OR END SESSION --> 71 <!-- JOIN OR END SESSION -->
72 <v-flex v-if="showStartSessionButton"> 72 <v-flex v-if="showStartSessionButton">
73 <div> 73 <div>
74 <v-btn 74 <v-btn
75 round 75 round
76 class="open-dialog-button" 76 class="open-dialog-button"
77 dark 77 dark
78 @click="showLoader = true;startChat()" 78 @click="showLoader = true;startChat()"
79 >Start Session</v-btn> 79 >Start Session</v-btn>
80 </div> 80 </div>
81 </v-flex> 81 </v-flex>
82 <v-flex id="teacherClone"> 82 <v-flex id="teacherClone">
83 <div id="jitsi-container"></div> 83 <div id="jitsi-container"></div>
84 </v-flex> 84 </v-flex>
85 </v-layout> 85 </v-layout>
86 </v-flex> 86 </v-flex>
87 87
88 <v-spacer></v-spacer> 88 <v-spacer></v-spacer>
89 89
90 <!-- COURSES SIDE BAR- positioned to the right of the page --> 90 <!-- COURSES SIDE BAR- positioned to the right of the page -->
91 <!-- <v-flex xs3> 91 <!-- <v-flex xs3>
92 <v-card class="elevation-0 card-border" height="100%"> 92 <v-card class="elevation-0 card-border" height="100%">
93 <CoursesSideBar></CoursesSideBar> 93 <CoursesSideBar></CoursesSideBar>
94 </v-card> 94 </v-card>
95 </v-flex>--> 95 </v-flex>-->
96 </v-layout> 96 </v-layout>
97 </v-container> 97 </v-container>
98 </div> 98 </div>
99 </template> 99 </template>
100 <script> 100 <script>
101 import AllApiCalls from "@/Services/AllApiCalls.js"; 101 import AllApiCalls from "@/Services/AllApiCalls.js";
102 import http from "@/Services/http.js"; 102 import http from "@/Services/http.js";
103 import moment from "moment"; 103 import moment from "moment";
104 import Meet from "@/pages/Meet/meet.vue"; 104 import Meet from "@/pages/Meet/meet.vue";
105 import CoursesSideBar from "@/pages/Common/CoursesSideBar.vue"; 105 import CoursesSideBar from "@/pages/Common/CoursesSideBar.vue";
106 export default { 106 export default {
107 mixins: [AllApiCalls], 107 mixins: [AllApiCalls],
108 components: { 108 components: {
109 CoursesSideBar, 109 CoursesSideBar,
110 }, 110 },
111 data() { 111 data() {
112 return { 112 return {
113 startLiveSession: "", 113 startLiveSession: "",
114 studentBtn: "", 114 studentBtn: "",
115 115
116 // DATA TABLE 116 // DATA TABLE
117 search: "", 117 search: "",
118 pagination: { 118 pagination: {
119 rowsPerPage: 10, 119 rowsPerPage: 10,
120 }, 120 },
121 liveOnlineHeaders: [ 121 liveOnlineHeaders: [
122 { 122 {
123 text: "Playback", 123 text: "Playback",
124 value: "attachementUrl", 124 value: "attachementUrl",
125 sortable: false, 125 sortable: false,
126 align: "center", 126 align: "center",
127 }, 127 },
128 { 128 {
129 text: "Meeting", 129 text: "Meeting",
130 align: "center", 130 align: "center",
131 sortable: false, 131 sortable: false,
132 value: "", 132 value: "",
133 }, 133 },
134 { 134 {
135 text: "Recording", 135 text: "Recording",
136 value: "", 136 value: "",
137 sortable: false, 137 sortable: false,
138 align: "center", 138 align: "center",
139 }, 139 },
140 { 140 {
141 text: "Description Preview", 141 text: "Description Preview",
142 value: "", 142 value: "",
143 sortable: false, 143 sortable: false,
144 align: "center", 144 align: "center",
145 }, 145 },
146 { text: "Date", value: "", sortable: false, align: "center" }, 146 { text: "Date", value: "", sortable: false, align: "center" },
147 { text: "Duration", value: "", sortable: false, align: "center" }, 147 { text: "Duration", value: "", sortable: false, align: "center" },
148 { text: "Toolbar", value: "", sortable: false, align: "center" }, 148 { text: "Toolbar", value: "", sortable: false, align: "center" },
149 ], 149 ],
150 liveOnlineItems: [], 150 liveOnlineItems: [],
151 151
152 // JITSI CONTAINER 152 // JITSI CONTAINER
153 liveLink: "", 153 liveLink: "",
154 token: "", 154 token: "",
155 selectStudents: {}, 155 selectStudents: {},
156 classRules: [(v) => !!v || " Class Name is required"], 156 classRules: [(v) => !!v || " Class Name is required"],
157 sectionRules: [(v) => !!v || " Section Name is required"], 157 sectionRules: [(v) => !!v || " Section Name is required"],
158 addclass: [], 158 addclass: [],
159 addSection: [], 159 addSection: [],
160 loading: false, 160 loading: false,
161 room: "", 161 room: "",
162 username: "", 162 username: "",
163 roomPassword: "", 163 roomPassword: "",
164 counter: 0, 164 counter: 0,
165 appLink: "", 165 appLink: "",
166 showStartSessionButton: true, 166 showStartSessionButton: true,
167 showJoinSessionButton: true, 167 showJoinSessionButton: true,
168 }; 168 };
169 }, 169 },
170 methods: { 170 methods: {
171 async startChat() { 171 async startChat() {
172 if (this.$store.state.role === "PARENT") { 172 if (this.$store.state.role === "PARENT") {
173 // if (this.counter == 0) { 173 // if (this.counter == 0) {
174 // console.log("enter start chat"); 174 // console.log("enter start chat");
175 const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); 175 const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
176 if (isMobile) { 176 if (isMobile) {
177 window.open(this.appLink); 177 window.open(this.appLink);
178 this.showLoader = false; 178 this.showLoader = false;
179 } else { 179 } else {
180 this.startConference(); 180 this.startConference();
181 // this.counter += 1; 181 // this.counter += 1;
182 this.showJoinSessionButton = false; 182 this.showJoinSessionButton = false;
183 } 183 }
184 // } 184 // }
185 } 185 }
186 if (this.$store.state.role === "TEACHER") { 186 if (this.$store.state.role === "TEACHER") {
187 // if (this.counter == 0) { 187 // if (this.counter == 0) {
188 this.createRoom(); 188 this.createRoom();
189 // this.counter += 1; 189 // this.counter += 1;
190 // } 190 // }
191 } 191 }
192 }, 192 },
193 // JITSI CONTAINER 193 // JITSI CONTAINER
194 startConference() { 194 startConference() {
195 // console.log("yes session started"); 195 // console.log("yes session started");
196 var _this = this; 196 var _this = this;
197 try { 197 try {
198 const domain = "meet.intrack.in"; 198 const domain = "meet.intrack.in";
199 const options = { 199 const options = {
200 audioInput: "<deviceLabel>", 200 audioInput: "<deviceLabel>",
201 audioOutput: "<deviceLabel>", 201 audioOutput: "<deviceLabel>",
202 videoInput: "<deviceLabel>", 202 videoInput: "<deviceLabel>",
203 prejoinPageEnabled: false, 203 prejoinPageEnabled: false,
204 roomName: this.room, 204 roomName: this.room,
205 height: 500, 205 height: 500,
206 parentNode: document.getElementById("jitsi-container"), 206 parentNode: document.getElementById("jitsi-container"),
207 interfaceConfigOverwrite: { 207 interfaceConfigOverwrite: {
208 filmStripOnly: false, 208 filmStripOnly: false,
209 SHOW_PROMOTIONAL_CLOSE_PAGE: false, 209 SHOW_PROMOTIONAL_CLOSE_PAGE: false,
210 SHOW_POWERED_BY: false, 210 SHOW_POWERED_BY: false,
211 SHOW_JITSI_WATERMARK: false, 211 SHOW_JITSI_WATERMARK: false,
212 TOOLBAR_BUTTONS: [ 212 TOOLBAR_BUTTONS: [
213 "microphone", 213 "microphone",
214 "camera", 214 "camera",
215 "closedcaptions", 215 "closedcaptions",
216 "desktop", 216 "desktop",
217 "fullscreen", 217 "fullscreen",
218 "fodeviceselection", 218 "fodeviceselection",
219 "hangup", 219 "hangup",
220 "profile", 220 "profile",
221 "info", 221 "info",
222 "chat", 222 "chat",
223 "recording", 223 "recording",
224 "livestreaming", 224 "livestreaming",
225 "etherpad", 225 "etherpad",
226 "sharedvideo", 226 "sharedvideo",
227 "settings", 227 "settings",
228 "raisehand", 228 "raisehand",
229 "videoquality", 229 "videoquality",
230 "filmstrip", 230 "filmstrip",
231 "invite", 231 "invite",
232 "feedback", 232 "feedback",
233 "stats", 233 "stats",
234 "shortcuts", 234 "shortcuts",
235 "tileview", 235 "tileview",
236 ], 236 ],
237 }, 237 },
238 configOverwrite: { 238 configOverwrite: {
239 disableSimulcast: false, 239 disableSimulcast: false,
240 }, 240 },
241 teacherName: "", 241 teacherName: "",
242 room: "", 242 room: "",
243 }; 243 };
244 _this.api = new JitsiMeetExternalAPI(domain, options); 244 _this.api = new JitsiMeetExternalAPI(domain, options);
245 // console.log("this.api ", this.api); 245 // console.log("this.api ", this.api);
246 _this.api.addEventListener("videoConferenceJoined", () => { 246 _this.api.addEventListener("videoConferenceJoined", () => {
247 this.showLoader = false; 247 this.showLoader = false;
248 setTimeout(() => { 248 setTimeout(() => {
249 _this.api.executeCommand("displayName", _this.username); 249 _this.api.executeCommand("displayName", _this.username);
250 _this.api.executeCommand("password", _this.roomPassword); 250 _this.api.executeCommand("password", _this.roomPassword);
251 }, 1000); 251 }, 1000);
252 }); 252 });
253 253
254 _this.api.on("passwordRequired", () => {
255 _this.api.executeCommand("password", _this.roomPassword);
256 });
257
254 _this.api.on("readyToClose", () => { 258 _this.api.on("readyToClose", () => {
255 // this.$router.push({ name: "Refresh" }); 259 // this.$router.push({ name: "Refresh" });
256 let jitsi = document.getElementById("jitsi-container"); 260 let jitsi = document.getElementById("jitsi-container");
257 jitsi.innerHTML = ""; 261 jitsi.innerHTML = "";
258 this.showStartSessionButton = true; 262 this.showStartSessionButton = true;
259 this.showJoinSessionButton = true; 263 this.showJoinSessionButton = true;
260 }); 264 });
261 } catch (error) { 265 } catch (error) {
262 // console.error("Failed to load Jitsi API", error); 266 // console.error("Failed to load Jitsi API", error);
263 } 267 }
264 }, 268 },
265 openRoom() { 269 openRoom() {
266 // verify the JitsiMeetExternalAPI constructor is added to the global.. 270 // verify the JitsiMeetExternalAPI constructor is added to the global..
267 // if (this.teacherName != "" || this.room != "") { 271 // if (this.teacherName != "" || this.room != "") {
268 // if (window.JitsiMeetExternalAPI) { 272 // if (window.JitsiMeetExternalAPI) {
269 // // var person = prompt("Please enter your name:", "Rabie"); 273 // // var person = prompt("Please enter your name:", "Rabie");
270 // if (person != null || person != "") this.username = this.teacherName; 274 // if (person != null || person != "") this.username = this.teacherName;
271 // var room = prompt("Please enter your room:", "Test Room"); 275 // var room = prompt("Please enter your room:", "Test Room");
272 // if (room != null || room != "") this.room = this.room; 276 // if (room != null || room != "") this.room = this.room;
273 // this.startConference(); 277 // this.startConference();
274 // } else alert("Jitsi Meet API script not loaded"); 278 // } else alert("Jitsi Meet API script not loaded");
275 // } 279 // }
276 }, 280 },
277 281
278 createRoom(classId) { 282 createRoom(classId) {
279 // this.showLoader = true; 283 // this.showLoader = true;
280 var classId = { 284 var classId = {
281 classId: classId, 285 classId: classId,
282 }; 286 };
283 http() 287 http()
284 .post("/createLiveClasses", { 288 .post("/createLiveClasses", {
285 classId: this.$route.query.classId, 289 classId: this.$route.query.classId,
286 courseId: this.$route.query.courseId, 290 courseId: this.$route.query.courseId,
287 chapterId: this.$route.query.chapterId, 291 chapterId: this.$route.query.chapterId,
288 }) 292 })
289 .then((response) => { 293 .then((response) => {
290 // this.addSection = response.data.data; 294 // this.addSection = response.data.data;
291 // console.log("CREATE___ROOOM", response.data); 295 // console.log("CREATE___ROOOM", response.data);
292 var room = response.data.data.roomName; 296 var room = response.data.data.roomName;
293 var username = localStorage.getItem("teacherName"); 297 var username = localStorage.getItem("teacherName");
294 var roomPassword = response.data.data.password; 298 var roomPassword = response.data.data.password;
295 this.appLink = response.data.data.appLink; 299 this.appLink = response.data.data.appLink;
296 // console.log( 300 // console.log(
297 // "room", 301 // "room",
298 // room, 302 // room,
299 // "username", 303 // "username",
300 // username, 304 // username,
301 // "roomPassword", 305 // "roomPassword",
302 // roomPassword 306 // roomPassword
303 // ); 307 // );
304 var this_ = this; 308 var this_ = this;
305 if (username != "" || room != "") { 309 if (username != "" || room != "") {
306 const isMobile = /iPhone|iPad|iPod|Android/i.test( 310 const isMobile = /iPhone|iPad|iPod|Android/i.test(
307 navigator.userAgent 311 navigator.userAgent
308 ); 312 );
309 if (isMobile) { 313 if (isMobile) {
310 // console.log("==TEACHER=appLink==", this.appLink); 314 // console.log("==TEACHER=appLink==", this.appLink);
311 window.open(this.appLink); 315 window.open(this.appLink);
312 this.showLoader = false; 316 this.showLoader = false;
313 this.showStartSessionButton = false; 317 this.showStartSessionButton = false;
314 } else { 318 } else {
315 if (window.JitsiMeetExternalAPI) { 319 if (window.JitsiMeetExternalAPI) {
316 // var person = prompt("Please enter your name:", "Rabie"); 320 // var person = prompt("Please enter your name:", "Rabie");
317 if (username != null || username != "") { 321 if (username != null || username != "") {
318 this_.username = username; 322 this_.username = username;
319 } 323 }
320 // var room = prompt("Please enter your room:", "Test Room"); 324 // var room = prompt("Please enter your room:", "Test Room");
321 if (room != null || room != "") { 325 if (room != null || room != "") {
322 this_.room = room; 326 this_.room = room;
323 } 327 }
324 if (roomPassword != null || roomPassword != "") { 328 if (roomPassword != null || roomPassword != "") {
325 this_.roomPassword = roomPassword; 329 this_.roomPassword = roomPassword;
326 } 330 }
327 } else alert("Jitsi Meet API script not loaded"); 331 } else alert("Jitsi Meet API script not loaded");
328 this_.startConference(); 332 this_.startConference();
329 this.showStartSessionButton = false; 333 this.showStartSessionButton = false;
330 } 334 }
331 } 335 }
332 }) 336 })
333 .catch((err) => { 337 .catch((err) => {
334 this.showLoader = false; 338 this.showLoader = false;
335 }); 339 });
336 }, 340 },
337 async studentClasses() { 341 async studentClasses() {
338 this.liveLink = ""; 342 this.liveLink = "";
339 this.room = ""; 343 this.room = "";
340 this.username = ""; 344 this.username = "";
341 this.roomPassword = ""; 345 this.roomPassword = "";
342 /* getLiveClassesesList - To up date line under heading*/ 346 /* getLiveClassesesList - To up date line under heading*/
343 let response = await this.getLiveClassesesList({ 347 let response = await this.getLiveClassesesList({
344 classId: this.$route.query.classId, 348 classId: this.$route.query.classId,
345 courseId: this.$route.query.courseId, 349 courseId: this.$route.query.courseId,
346 chapterId: this.$route.query.chapterId, 350 chapterId: this.$route.query.chapterId,
347 }); 351 });
348 // console.log("response getLiveClassesesList- ", response); 352 // console.log("response getLiveClassesesList- ", response);
349 353
350 /* CHECK RESPONSE TO ASSIGN MESSAGE INSIDE BUTTON */ 354 /* CHECK RESPONSE TO ASSIGN MESSAGE INSIDE BUTTON */
351 if (response.data.data[0].sessionStatus == "ENDED") { 355 if (response.data.data[0].sessionStatus == "ENDED") {
352 // this.startLiveSession = "Start Session"; 356 // this.startLiveSession = "Start Session";
353 this.studentBtn = ""; 357 this.studentBtn = "";
354 } 358 }
355 if (response.data.data[0].sessionStatus == "STARTED") { 359 if (response.data.data[0].sessionStatus == "STARTED") {
356 // this.startLiveSession = "Join Session"; 360 // this.startLiveSession = "Join Session";
357 this.studentBtn = "Join Session"; 361 this.studentBtn = "Join Session";
358 } 362 }
359 if (response.data.data.length == 0) { 363 if (response.data.data.length == 0) {
360 this.startLiveSession = "Start Session"; 364 this.startLiveSession = "Start Session";
361 this.studentBtn = ""; 365 this.studentBtn = "";
362 } else { 366 } else {
363 this.liveLink = response.data.data[0].link; 367 this.liveLink = response.data.data[0].link;
364 this.appLink = response.data.data[0].appLink; 368 this.appLink = response.data.data[0].appLink;
365 var room = response.data.data[0].roomName; 369 var room = response.data.data[0].roomName;
366 var username = this.currentUser; 370 var username = this.currentUser;
367 var roomPassword = response.data.data[0].password; 371 var roomPassword = response.data.data[0].password;
368 var this_ = this; 372 var this_ = this;
369 // console.log(this.room, this.roomPassword, this.username); 373 // console.log(this.room, this.roomPassword, this.username);
370 374
371 if (username != "" || room != "") { 375 if (username != "" || room != "") {
372 if (window.JitsiMeetExternalAPI) { 376 if (window.JitsiMeetExternalAPI) {
373 // var person = prompt("Please enter your name:", "Rabie"); 377 // var person = prompt("Please enter your name:", "Rabie");
374 if (username != null || username != "") { 378 if (username != null || username != "") {
375 this_.username = username; 379 this_.username = username;
376 } 380 }
377 if (roomPassword != null || roomPassword != "") { 381 if (roomPassword != null || roomPassword != "") {
378 this_.roomPassword = roomPassword; 382 this_.roomPassword = roomPassword;
379 } 383 }
380 // var room = prompt("Please enter your room:", "Test Room"); 384 // var room = prompt("Please enter your room:", "Test Room");
381 if (room != null || room != "") { 385 if (room != null || room != "") {
382 this_.room = room; 386 this_.room = room;
383 } 387 }
384 // this.startConference(); 388 // this.startConference();
385 } 389 }
386 } 390 }
387 } 391 }
388 }, 392 },
389 }, 393 },
390 394
391 async created() { 395 async created() {
392 // console.log( 396 // console.log(
393 // "this.$store.state.studentsData", 397 // "this.$store.state.studentsData",
394 // this.$store.state.studentsData[0].name 398 // this.$store.state.studentsData[0].name
395 // ); 399 // );
396 this.currentUser = localStorage.getItem("studentName"); 400 this.currentUser = localStorage.getItem("studentName");
397 this.token = this.$store.state.token; 401 this.token = this.$store.state.token;
398 if (this.$store.state.role === "PARENT") { 402 if (this.$store.state.role === "PARENT") {
399 await this.studentClasses(); 403 await this.studentClasses();
400 } 404 }
401 405
402 /* getStudentCourses - to get courseData - defined in GetApis.js*/ 406 /* getStudentCourses - to get courseData - defined in GetApis.js*/
403 if (this.$store.state.role === "PARENT") { 407 if (this.$store.state.role === "PARENT") {
404 await this.getStudentCourses({ 408 await this.getStudentCourses({
405 classId: localStorage.getItem("parentClassId"), 409 classId: localStorage.getItem("parentClassId"),
406 studentId: localStorage.getItem("parentStudentId"), 410 studentId: localStorage.getItem("parentStudentId"),
407 }); 411 });
408 } 412 }
409 }, 413 },
410 }; 414 };
411 </script> 415 </script>
412 <style scoped> 416 <style scoped>
413 .side-bar-color { 417 .side-bar-color {
414 color: #827bfa !important; 418 color: #827bfa !important;
415 /* border-top-right-radius: 74px !important; */ 419 /* border-top-right-radius: 74px !important; */
416 } 420 }
417 .card-border { 421 .card-border {
418 border: 1px #bdbdbd solid; 422 border: 1px #bdbdbd solid;
419 border-radius: 3px; 423 border-radius: 3px;
420 } 424 }
421 .reply-desc { 425 .reply-desc {
422 border: 1px solid #f2f2f2; 426 border: 1px solid #f2f2f2;
423 } 427 }
424 .open-dialog-button { 428 .open-dialog-button {
425 background: #827bfa !important; 429 background: #827bfa !important;
426 border-color: #827bfa !important; 430 border-color: #827bfa !important;
427 text-transform: none !important; 431 text-transform: none !important;
428 } 432 }
429 433
430 .reply-btn { 434 .reply-btn {
431 background: #feb83c !important; 435 background: #feb83c !important;
432 border-color: #feb83c !important; 436 border-color: #feb83c !important;
433 text-transform: none !important; 437 text-transform: none !important;
434 -webkit-box-shadow: none !important; 438 -webkit-box-shadow: none !important;
435 box-shadow: none !important; 439 box-shadow: none !important;
436 } 440 }
437 #jitsi-container { 441 #jitsi-container {
438 height: 100vh; 442 height: 100vh;
439 } 443 }
440 </style> 444 </style>