From e5699315cd8e31dbf038aa32a45b1804e079ba9e Mon Sep 17 00:00:00 2001 From: Shikha Mishra Date: Wed, 19 Aug 2020 17:17:54 +0530 Subject: [PATCH] Show latest event in dashboard while admin login --- src/pages/Dashboard/dashboard.vue | 67 +++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/src/pages/Dashboard/dashboard.vue b/src/pages/Dashboard/dashboard.vue index e410521..453753b 100644 --- a/src/pages/Dashboard/dashboard.vue +++ b/src/pages/Dashboard/dashboard.vue @@ -530,7 +530,7 @@ - + Latest Events
- -
-
{{moment(activity.meetingEvent.dateOfEvent).format("DD MMMM, YYYY")}}
-
{{activity.meetingEvent.title}}
-
- - -
+
No Data Found!

+ + + +
+ +
+
{{moment(activity.meetingEvent.dateOfEvent).format("DD MMMM, YYYY")}}
+
{{activity.meetingEvent.title}}
+
+ + +
+
{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}
+
{{activity.title}}
+
+
+
+

No Data Found!

+
+ +
@@ -801,6 +825,12 @@ export default { }); this.viewEventDetails = true; } + if (this.$store.state.role === "ADMIN") { + await this.getParticularMeetingEvent({ + meetingEventId: activity._id, + }); + this.viewEventDetails = true; + } }, async routeToCourseDetails(courseId) { /* getParticularCourseDetail- To get courseDetail - defined in GetApis.js*/ @@ -1017,7 +1047,7 @@ export default { }); }, async getMeetingEventes() { - if (this.role == "TEACHER") { + if (this.role == "TEACHER" || this.role === "ADMIN") { this.showLoader = true; await http() .get("/getMeetingEventesList") @@ -1102,7 +1132,7 @@ export default { } /* get Latest events list for teacher login*/ - if (this.role == "TEACHER") { + if (this.role == "TEACHER" || this.role == "ADMIN") { await this.getMeetingEventes(); } }, @@ -1115,7 +1145,4 @@ export default { a { color: white; } - -#pages-dasboard { -} \ No newline at end of file -- 2.0.0