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 @@
Live Online Classes - {{$route.query.chapterName}}
- {{startLiveSession}}
+
- Join Session
+ {{studentBtn}}
+ Session hasnt started yet
@@ -81,10 +82,10 @@
Live Online Classes - {{$route.query.chapterName}}
- {{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