From 8527136546cb772071058a2de88e2a1b05c9bf9f Mon Sep 17 00:00:00 2001 From: Amber Dev Date: Mon, 20 Jul 2020 11:31:47 +0530 Subject: [PATCH] added live class message --- src/pages/Dashboard/LiveOnlineClass.vue | 33 ++++++++++++++++++++++----------- src/pages/Dashboard/dashboard.vue | 4 ++++ 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/pages/Dashboard/LiveOnlineClass.vue b/src/pages/Dashboard/LiveOnlineClass.vue index a075269..9ec89a9 100644 --- a/src/pages/Dashboard/LiveOnlineClass.vue +++ b/src/pages/Dashboard/LiveOnlineClass.vue @@ -29,16 +29,17 @@ -
{{startLiveSession}}
+
- Join Session + {{studentBtn}} + Session hasnt started yet
@@ -81,10 +82,10 @@ -
{{startLiveSession}}
-
--> + @@ -95,7 +96,7 @@ class="open-dialog-button" dark @click="createRoom($route.query.classId)" - >Start Session + >{{startLiveSession}} @@ -160,6 +161,7 @@ export default { data() { return { startLiveSession: "", + studentBtn: "", // DATA TABLE search: "", @@ -326,8 +328,6 @@ export default { this.token = this.$store.state.token; }, async created() { - console.log("local st - ",localStorage) - /* getLiveClassesesList - To up date line under heading*/ let response = await this.getLiveClassesesList({ classId: this.$route.query.classId, @@ -335,9 +335,20 @@ export default { chapterId: this.$route.query.chapterId }); console.log("response getLiveClassesesList- ", response); + + /* CHECK RESPONSE TO ASSIGN MESSAGE INSIDE BUTTON */ if (response.data.data.length == 0) { - console.log("response of - ", response); - this.startLiveSession = "Start live session"; + this.startLiveSession = "Start Session"; + this.studentBtn = ""; + } else { + if (response.data.data[0].sessionStatus == "ENDED") { + this.startLiveSession = "Start Session"; + this.studentBtn = ""; + } + if (response.data.data[0].sessionStatus == "STARTED") { + this.startLiveSession = "Join Session"; + this.studentBtn = "Join Session"; + } } /* getStudentCourses - to get courseData - defined in GetApis.js*/ diff --git a/src/pages/Dashboard/dashboard.vue b/src/pages/Dashboard/dashboard.vue index 8c77820..b3f93f2 100644 --- a/src/pages/Dashboard/dashboard.vue +++ b/src/pages/Dashboard/dashboard.vue @@ -415,6 +415,7 @@
Calender
+ @@ -669,6 +670,9 @@ export default { }; }, methods: { + test(e) { + console.log(" test - ", e); + }, async handleDayChanged(e) { await this.getParticularMeetingEvent({ meetingEventId: e.events[0]._id -- 2.0.0