From 88b7fd92ad55faf2a2338fc958314d6bd83412c6 Mon Sep 17 00:00:00 2001 From: amber Date: Thu, 17 Sep 2020 14:12:20 +0530 Subject: [PATCH] added male female data --- src/pages/Dashboard/dashboard.vue | 152 ++++++++++++++++++++++++++++---------- 1 file changed, 114 insertions(+), 38 deletions(-) diff --git a/src/pages/Dashboard/dashboard.vue b/src/pages/Dashboard/dashboard.vue index c440b96..e7897e1 100644 --- a/src/pages/Dashboard/dashboard.vue +++ b/src/pages/Dashboard/dashboard.vue @@ -298,9 +298,36 @@ - Notice + Notice + + + + + + {{ moment(item.created).format("DD MMMM, YYYY") }} + + + +
{{item.title}}
+
- + + + +
+
+
+ + - + --> + +
- - - - School Events -
- - -
-
- -
{{moment(schoolEvent.dateOfEvent).format("DD MMMM, YYYY")}}
- -
{{schoolEvent.title}}
+ + + + + + School Events +
+ + +
+
+ +
{{moment(schoolEvent.dateOfEvent).format("DD MMMM, YYYY")}}
+ +
{{schoolEvent.title}}
+
+
+
+

No Data Found!

+
+
+
+
+ + + +
+
-
-
-

No Data Found!

-
- - + + + @@ -793,15 +836,17 @@ import http from "@/Services/http.js"; import moment from "moment"; import AllApiCalls from "@/Services/AllApiCalls.js"; +import VueApexCharts from "vue-apexcharts"; // import { FunctionalCalendar } from "vue-functional-calendar"; export default { components: { - // FunctionalCalendar + apexcharts: VueApexCharts, }, mixins: [AllApiCalls], data() { return { + today: new Date(), // data: { // clieckedToday: false // }, @@ -821,6 +866,24 @@ export default { dialogSchoolEvents: [], dialogMeetingEvents: [], + // apexCharts + maleFemaleSeries: [20, 30], + maleFemaleData: { + labels: ["Male", "Female"], + legend: { + formatter: function (val, opts) { + return val + " - " + opts.w.globals.series[opts.seriesIndex]; + }, + position: 'bottom', + }, + dataLabels: { + enabled: true, + formatter: function (val,opts) { + return opts.w.globals.series[opts.seriesIndex]; + }, + }, + }, + // CALENDER moment: moment, activityEvents: [], @@ -1316,6 +1379,16 @@ export default { } } }, + async getMaleFemaleData(){ + await http() + .get("/getStudentsByGender") + .then((response) => { + console.log("gender response - ", response) + }) + .catch((error) => { + this.showLoader = false; + }); + } }, mounted() { @@ -1329,12 +1402,15 @@ export default { // this.token = this.$store.state.token; await this.getFeesAndCollectionsData(); await this.getExpensesData(); + await this.getMaleFemaleData(); } else if (this.$store.state.schoolRole === "SUPERADMIN") { // this.token = this.$store.state.schoolToken; await this.getFeesAndCollectionsData(); await this.getExpensesData(); + await this.getMaleFemaleData(); } else if (this.$store.state.role === "TEACHER") { // this.token = this.$store.state.token; + await this.getMaleFemaleData(); } else if (this.$store.state.role === "ACCOUNTANT") { // this.token = this.$store.state.token; } else if (this.$store.state.role === "LIBRARIAN") { -- 2.0.0