diff --git a/src/pages/Dashboard/LiveOnlineClass.vue b/src/pages/Dashboard/LiveOnlineClass.vue index 59548ff..cc88ba5 100644 --- a/src/pages/Dashboard/LiveOnlineClass.vue +++ b/src/pages/Dashboard/LiveOnlineClass.vue @@ -45,7 +45,7 @@ v-if="studentBtn" @click="showLoader = true;startChat();" >{{studentBtn}} - Session hasnt started yet + Session hasn't started yet @@ -161,7 +161,7 @@ export default { room: "", username: "", roomPassword: "", - counter: 0, + // counter: 0, appLink: "", showStartSessionButton: true, showJoinSessionButton: true, @@ -261,6 +261,9 @@ export default { jitsi.innerHTML = ""; this.showStartSessionButton = true; this.showJoinSessionButton = true; + if (this.$store.state.role === "TEACHER") { + this.updateLiveClass(); + } }); } catch (error) { // console.error("Failed to load Jitsi API", error); @@ -297,6 +300,7 @@ export default { var username = localStorage.getItem("teacherName"); var roomPassword = response.data.data.password; this.appLink = response.data.data.appLink; + this.liveClassId = response.data.data._id; // console.log( // "room", // room, @@ -338,6 +342,20 @@ export default { this.showLoader = false; }); }, + updateLiveClass() { + this.showLoader = true; + var payloadData = { + liveClassesId: this.liveClassId, + }; + http() + .put("/updateLiveClasses", payloadData) + .then((response) => { + this.showLoader = false; + }) + .catch((error) => { + this.showLoader = false; + }); + }, async studentClasses() { this.liveLink = ""; this.room = "";