Commit 0065443861a856169118b8291432c0e2a7c496e0

Authored by Neeraj Sharma
1 parent 6e4ee81cb4

implement task

... ... @@ -23,7 +23,7 @@
23 23 <!-- built files will be auto injected -->
24 24 <!-- Global site tag (gtag.js) - Google Analytics -->
25 25 <!-- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-3881136-11"></script> -->
26   - <script>
  26 + <!-- <script>
27 27 window.dataLayer = window.dataLayer || [];
28 28  
29 29 function gtag() {
... ... @@ -31,7 +31,7 @@
31 31 }
32 32 gtag('js', new Date());
33 33 gtag('config', 'UA-3881136-11');
34   - </script>
  34 + </script> -->
35 35 </body>
36 36  
37 37 </html>
38 38 \ No newline at end of file
... ...
... ... @@ -13,6 +13,20 @@
13 13 <!-- App Footer -->
14 14 <v-footer height="auto" class="fixcolors pa-3 app--footer"></v-footer>
15 15 </v-content>
  16 + <!-- theme setting -->
  17 + <!-- <v-btn small fab dark falt fixed top="top" right="right" class="setting-fab" color="red" @click="openThemeSettings">
  18 + <v-icon>settings</v-icon>
  19 + </v-btn>
  20 + <v-navigation-drawer
  21 + class="setting-drawer"
  22 + temporary
  23 + right
  24 + v-model="rightDrawer"
  25 + hide-overlay
  26 + fixed
  27 + >
  28 + <theme-settings></theme-settings>
  29 + </v-navigation-drawer> -->
16 30 </v-app>
17 31 </template>
18 32 <template v-else>
... ... @@ -35,11 +49,13 @@ import AppDrawer from &quot;@/components/pageHeader/AppDrawer&quot;;
35 49 import AppToolbar from "@/components/pageHeader/AppToolbar";
36 50 import menu from "@/api/menu";
37 51 import AppEvents from "./event";
  52 +import ThemeSettings from "@/components/ThemeSettings"
38 53  
39 54 export default {
40 55 components: {
41 56 AppDrawer,
42   - AppToolbar
  57 + AppToolbar,
  58 + ThemeSettings
43 59 },
44 60 data: () => ({
45 61 expanded: true,
... ... @@ -58,7 +74,13 @@ export default {
58 74 this.$on(item.name, item.callback);
59 75 });
60 76 window.getApp = this;
61   - }
  77 + },
  78 + methods: {
  79 + openThemeSettings () {
  80 + this.$vuetify.goTo(0);
  81 + this.rightDrawer = (!this.rightDrawer);
  82 + }
  83 + },
62 84 };
63 85 </script>
64 86  
... ...
src/Services/http.js
... ... @@ -3,7 +3,7 @@ import store from &#39;@/store/store&#39;
3 3  
4 4 export default () => {
5 5 return axios.create({
6   - // baseURL: 'http://192.168.2.221:3002/v1',
  6 + // baseURL: 'http://192.168.4.220:3002/v1',
7 7 baseURL: 'http://13.234.251.173:8001/v1',
8 8 headers: {
9 9 Authorization: `Bearer ${store.state.token}`
... ...
... ... @@ -70,6 +70,30 @@ const Menu = [
70 70 ]
71 71 },
72 72 {
  73 + title: 'Mark',
  74 + group: 'Mark',
  75 + component: 'Mark',
  76 + icon: '/static/schoolIcons/marks.png',
  77 + items: [
  78 + { name: 'Mark', title: 'Mark', component: 'Mark', action: '', },
  79 + { name: 'markDistribution', title: 'Mark Distribution', component: 'markDistribution', action: '', },
  80 + { name: 'Promotion', title: 'promotion', component: 'Promotion', action: '', },
  81 + // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', },
  82 + ]
  83 + },
  84 + {
  85 + title: 'Administrator',
  86 + group: 'Administrator',
  87 + component: 'Administrator',
  88 + icon: '/static/schoolIcons/administrator.png',
  89 + items: [
  90 + { name: 'academicYear', title: 'Academic Year', component: 'academicYear', action: '', },
  91 + { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', },
  92 + { name: 'resetPassword', title: 'Reset Password', component: 'resetPassword', action: '', },
  93 + { name: 'Role', title: 'Role', component: 'Role', action: '', },
  94 + ]
  95 + },
  96 + {
73 97 title: 'Notice Board',
74 98 path: '/NoticeBoard',
75 99 icon: '/static/schoolIcons/Notice_board.png',
... ... @@ -103,6 +127,16 @@ const Menu = [
103 127 ]
104 128 },
105 129 {
  130 + title: 'Report',
  131 + group: 'Report',
  132 + component: 'Report',
  133 + icon: '/static/schoolIcons/reports.png',
  134 + items: [
  135 + { name: 'studentReport', title: 'Student Report', component: 'studentReport', action: '', },
  136 + { name: 'markSheetReport', title: 'Mark Sheet Report', component: 'markSheetReport', action: '', }
  137 + ]
  138 + },
  139 + {
106 140 title: 'Notification',
107 141 path: '/notification',
108 142 icon: '/static/schoolIcons/Notification.png',
... ...
src/components/ThemeSettings.vue
... ... @@ -0,0 +1,222 @@
  1 +<template>
  2 + <div id="themeSetting">
  3 + <v-toolbar color="blue" dark>
  4 + <v-toolbar-title>Theme Settings</v-toolbar-title>
  5 + </v-toolbar>
  6 + <v-container>
  7 + <v-layout column>
  8 + <v-flex>
  9 + <v-subheader class="px-1 my-2">Color Option</v-subheader>
  10 + <div class="color-option">
  11 + <v-layout wrap>
  12 + <label
  13 + class="color-option--label flex xs6 pa-1"
  14 + v-for="(option,index) in themeColorOptions"
  15 + :key="index"
  16 + >
  17 + <input type="radio" name="color" v-bind:value="option.key" v-model="themeColor" />
  18 + <span class="color-option--item bg">
  19 + <span class="overlay">
  20 + <span class="material-icons">check</span>
  21 + </span>
  22 + <span class="color-option--item--header sideNav" :class="option.value.sideNav"></span>
  23 + <span class="color-option--item--header mainNav" :class="option.value.mainNav"></span>
  24 + <span class="sideMenu" :class="option.value.sideManu"></span>
  25 + </span>
  26 + </label>
  27 + </v-layout>
  28 + </div>
  29 + <div class="theme-options">
  30 + <v-subheader class="px-1 my-2">Sidebar Option</v-subheader>
  31 + <v-divider></v-divider>
  32 + <div class="my-3">
  33 + <v-btn-toggle v-model="sideBarOption">
  34 + <v-btn flat value="dark">Dark</v-btn>
  35 + <v-btn flat value="light">Light</v-btn>
  36 + </v-btn-toggle>
  37 + </div>
  38 + </div>
  39 + </v-flex>
  40 + </v-layout>
  41 + </v-container>
  42 + </div>
  43 +</template>
  44 +
  45 +<script>
  46 +import colors from "vuetify/es5/util/colors";
  47 +export default {
  48 + data() {
  49 + return {
  50 + themeColor: "indigo",
  51 + sideBarOption: "light",
  52 + colors: colors
  53 + };
  54 + },
  55 + computed: {
  56 + themeColorOptions() {
  57 + return [
  58 + {
  59 + key: "blue",
  60 + value: {
  61 + sideNav: "blue",
  62 + mainNav: "blue",
  63 + sideManu: "white"
  64 + }
  65 + },
  66 + {
  67 + key: "lightBlue",
  68 + value: {
  69 + sideNav: "blue",
  70 + mainNav: "white",
  71 + sideManu: "blue lighten-1"
  72 + }
  73 + },
  74 + {
  75 + key: "teal",
  76 + value: {
  77 + sideNav: "teal",
  78 + mainNav: "teal",
  79 + sideManu: "white"
  80 + }
  81 + },
  82 + {
  83 + key: "red",
  84 + value: {
  85 + sideNav: "red",
  86 + mainNav: "red",
  87 + sideManu: "white"
  88 + }
  89 + },
  90 + {
  91 + key: "orange",
  92 + value: {
  93 + sideNav: "orange",
  94 + mainNav: "orange",
  95 + sideManu: "white"
  96 + }
  97 + },
  98 + {
  99 + key: "purple",
  100 + value: {
  101 + sideNav: "purple",
  102 + mainNav: "purple",
  103 + sideManu: "white"
  104 + }
  105 + },
  106 + {
  107 + key: "indigo",
  108 + value: {
  109 + sideNav: "indigo",
  110 + mainNav: "indigo",
  111 + sideManu: "white"
  112 + }
  113 + },
  114 + {
  115 + key: "cyan",
  116 + value: {
  117 + sideNav: "cyan",
  118 + mainNav: "cyan",
  119 + sideManu: "white"
  120 + }
  121 + },
  122 + {
  123 + key: "pink",
  124 + value: {
  125 + sideNav: "pink",
  126 + mainNav: "pink",
  127 + sideManu: "white"
  128 + }
  129 + },
  130 + {
  131 + key: "green",
  132 + value: {
  133 + sideNav: "green",
  134 + mainNav: "green",
  135 + sideManu: "white"
  136 + }
  137 + }
  138 + ];
  139 + }
  140 + },
  141 + watch: {
  142 + themeColor: {
  143 + handler(val) {
  144 + console.log(val);
  145 + this.$vuetify.theme.primary = this.colors[val].base;
  146 + },
  147 + immediate: true
  148 + },
  149 + sideBarOption: {
  150 + handler(val) {
  151 + this.$vuetify.dark = val === "dark";
  152 + },
  153 + immediate: true
  154 + }
  155 + }
  156 +};
  157 +</script>
  158 +<style lang="stylus" scoped>
  159 +.color-option {
  160 + &--label {
  161 + position: relative;
  162 + display: block;
  163 + cursor: pointer;
  164 +
  165 + & input[type='radio'] {
  166 + display: none;
  167 +
  168 + &+span {
  169 + position: relative;
  170 +
  171 + &>.overlay {
  172 + display: none;
  173 + position: absolute;
  174 + top: 0;
  175 + bottom: 0;
  176 + right: 0;
  177 + left: 0;
  178 + width: 100%;
  179 + height: 100%;
  180 + background-color: rgba(0, 0, 0, 0.3);
  181 + text-align: center;
  182 + line-height: 30px;
  183 + color: #fff;
  184 + }
  185 + }
  186 +
  187 + &:checked+span>.overlay {
  188 + display: block;
  189 + }
  190 + }
  191 +
  192 + & .bg {
  193 + background-color: #f1f1f1;
  194 + }
  195 + }
  196 +
  197 + &--item {
  198 + overflow: hidden;
  199 + display: block;
  200 + box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
  201 + margin-bottom: 15px;
  202 +
  203 + &--header {
  204 + height: 10px;
  205 + }
  206 +
  207 + &>span {
  208 + display: block;
  209 + float: left;
  210 + width: 50%;
  211 + height: 20px;
  212 + }
  213 + }
  214 +}
  215 +</style>
  216 +
  217 +<style>
  218 +.indigo {
  219 + background-color: #444b54 !important;
  220 + border-color: #444b54 !important;
  221 +}
  222 +</style>
... ...
... ... @@ -29,9 +29,9 @@ Vue.filter(&#39;truncate&#39;, Truncate);
29 29 Vue.use(VeeValidate, { fieldsBagName: 'formFields' });
30 30 Vue.use(Vuetify, {
31 31 // theme: {
32   - // primary: colors.indigo.base, // #E53935
33   - // secondary: colors.indigo.lighten4, // #FFCDD2
34   - // accent: colors.indigo.base // #3F51B5
  32 + // primary: "f1f1f1", // #E53935
  33 + // // secondary: colors.indigo.lighten4, // #FFCDD2
  34 + // // accent: colors.indigo.base // #3F51B5
35 35 // },
36 36 options: {
37 37 themeVariations: ['primary', 'secondary', 'accent'],
... ...
src/pages/Account/editInvoice.vue
... ... @@ -224,7 +224,6 @@
224 224  
225 225 <script>
226 226 import http from "@/Services/http.js";
227   -import Util from "@/util";
228 227 import moment from "moment";
229 228  
230 229 export default {
... ...
src/pages/Account/expense.vue
... ... @@ -168,7 +168,7 @@
168 168 </v-card>
169 169 </v-dialog>
170 170  
171   - <!-- ****** PROFILE VIEW TEACHERS DETAILS ****** -->
  171 + <!-- ****** PROFILE VIEW EXPENSE DETAILS ****** -->
172 172  
173 173 <v-dialog v-model="dialog1" max-width="600px" scrollable>
174 174 <v-card>
... ... @@ -298,7 +298,7 @@
298 298 </v-data-table>
299 299 </v-tab-item>
300 300  
301   - <!-- ****** Add Expense Data****** -->
  301 + <!-- ****** Add Expense Data ****** -->
302 302 <v-tab-item>
303 303 <v-container>
304 304 <v-snackbar
... ...
src/pages/Account/feeTypes.vue
... ... @@ -188,7 +188,7 @@
188 188 </v-data-table>
189 189 </v-tab-item>
190 190  
191   - <!-- ****** ADD multiple Students ****** -->
  191 + <!-- ****** ADD Fee Type ****** -->
192 192  
193 193 <v-tab-item>
194 194 <v-container>
... ... @@ -359,14 +359,14 @@ export default {
359 359 this.dialog1 = true;
360 360 },
361 361 deleteItem(item) {
362   - let deleteStudent = {
  362 + let deleteFeeType = {
363 363 feeId: item._id
364 364 };
365 365 http()
366 366 .delete(
367 367 "/deleteFee",
368 368 confirm("Are you sure you want to delete this?") && {
369   - params: deleteStudent
  369 + params: deleteFeeType
370 370 }
371 371 )
372 372 .then(response => {
... ...
src/pages/Account/invoice.vue
... ... @@ -659,7 +659,7 @@ export default {
659 659 },
660 660 deleteSelectFee: function(index) {
661 661 this.feeTypeData.splice(index, 1);
662   - console.log("this.feeTypeData", this.feeTypeData);
  662 + // console.log("this.feeTypeData", this.feeTypeData);
663 663 // if (index === 1)
664 664 for (let i = 0; i < this.feeTypeData.length; i++) {
665 665 this.feeType = this.feeTypeData[i];
... ...
src/pages/Account/viewInvoice.vue
... ... @@ -4,117 +4,122 @@
4 4 <v-container fluid grid-list-md>
5 5 <v-card>
6 6 <v-layout wrap>
7   - <v-flex 12>
8   - <br />
9   - <v-layout wrap>
10   - <v-flex xs12 sm6>
11   - <v-layout>
12   - <v-flex xs4 sm2>
13   - <h5 class="right my-1">
14   - <b>invoice:</b>
15   - </h5>
16   - </v-flex>
17   - <v-flex sm11 xs8>
18   - <h5 class="my-1">#{{ invoiceParticularData.invoiceNumber }}</h5>
19   - </v-flex>
20   - </v-layout>
21   - <v-layout>
22   - <v-flex xs4 sm2>
23   - <h5 class="right my-1">
24   - <b>Name:</b>
25   - </h5>
26   - </v-flex>
27   - <v-flex sm11 xs8>
28   - <h5 class="my-1">{{ invoiceParticularData.studentId.name }}</h5>
29   - </v-flex>
30   - </v-layout>
31   - <v-layout>
32   - <v-flex xs4 sm2>
33   - <h5 class="right my-1">
34   - <b>Class:</b>
35   - </h5>
36   - </v-flex>
37   - <v-flex sm11 xs8>
38   - <h5 class="my-1">{{ invoiceParticularData.classId.classNum }}</h5>
39   - </v-flex>
40   - </v-layout>
41   - </v-flex>
42   - <v-flex xs12 sm6>
43   -
44   - <v-layout>
45   - <v-flex xs4 sm2>
46   - <h5 class="right my-1">
47   - <b>Roll No:</b>
48   - </h5>
49   - </v-flex>
50   - <v-flex sm6 xs8>
51   - <h5 class="my-1">{{ invoiceParticularData.studentId.rollNo }}</h5>
52   - </v-flex>
53   - </v-layout>
54   - <v-layout>
55   - <v-flex xs4 sm2>
56   - <h5 class="right my-1">
57   - <b>email:</b>
58   - </h5>
59   - </v-flex>
60   - <v-flex sm6 xs8>
61   - <h5 class="my-1 linkCover">{{ invoiceParticularData.studentId.email }}</h5>
62   - </v-flex>
63   - </v-layout>
64   - <v-layout>
65   - <v-flex xs4 sm2>
66   - <h5 class="right my-1">
67   - <b>Status :</b>
68   - </h5>
69   - </v-flex>
70   - <v-flex sm6 xs8>
71   - <h5 class="my-1">{{ invoiceParticularData.paymentStatus }}</h5>
72   - </v-flex>
73   - </v-layout>
74   - </v-flex>
75   - </v-layout>
  7 + <v-flex 12>
  8 + <br />
  9 + <v-layout wrap>
  10 + <v-flex xs12 sm6>
  11 + <v-layout>
  12 + <v-flex xs4 sm2>
  13 + <h5 class="right my-1">
  14 + <b>invoice:</b>
  15 + </h5>
  16 + </v-flex>
  17 + <v-flex sm11 xs8>
  18 + <h5 class="my-1">#{{ invoiceParticularData.invoiceNumber }}</h5>
  19 + </v-flex>
  20 + </v-layout>
  21 + <v-layout>
  22 + <v-flex xs4 sm2>
  23 + <h5 class="right my-1">
  24 + <b>Name:</b>
  25 + </h5>
  26 + </v-flex>
  27 + <v-flex sm11 xs8>
  28 + <h5 class="my-1">{{ invoiceParticularData.studentId.name }}</h5>
  29 + </v-flex>
  30 + </v-layout>
  31 + <v-layout>
  32 + <v-flex xs4 sm2>
  33 + <h5 class="right my-1">
  34 + <b>Class:</b>
  35 + </h5>
  36 + </v-flex>
  37 + <v-flex sm11 xs8>
  38 + <h5 class="my-1">{{ invoiceParticularData.classId.classNum }}</h5>
  39 + </v-flex>
  40 + </v-layout>
  41 + </v-flex>
  42 + <v-flex xs12 sm6>
  43 + <v-layout>
  44 + <v-flex xs4 sm2>
  45 + <h5 class="right my-1">
  46 + <b>Roll No:</b>
  47 + </h5>
  48 + </v-flex>
  49 + <v-flex sm6 xs8>
  50 + <h5 class="my-1">{{ invoiceParticularData.studentId.rollNo }}</h5>
  51 + </v-flex>
  52 + </v-layout>
  53 + <v-layout>
  54 + <v-flex xs4 sm2>
  55 + <h5 class="right my-1">
  56 + <b>email:</b>
  57 + </h5>
  58 + </v-flex>
  59 + <v-flex sm6 xs8>
  60 + <h5 class="my-1 linkCover">{{ invoiceParticularData.studentId.email }}</h5>
  61 + </v-flex>
  62 + </v-layout>
  63 + <v-layout>
  64 + <v-flex xs4 sm2>
  65 + <h5 class="right my-1">
  66 + <b>Status :</b>
  67 + </h5>
  68 + </v-flex>
  69 + <v-flex sm6 xs8>
  70 + <h5 class="my-1">{{ invoiceParticularData.paymentStatus }}</h5>
76 71 </v-flex>
77 72 </v-layout>
78   - </v-card>
79   - <table class="feeTypeTable tableRsponsive">
80   - <tr class="info white--text">
81   - <th>#</th>
82   - <th>Fee Type</th>
83   - <th>Amount</th>
84   - <th>Discount</th>
85   - <th>Subtotal</th>
86   - </tr>
87   - <tr
88   - v-for="(feeType, index) in feeTypeData"
89   - :key="index"
90   - v-on:keyup="getAmmountDetails(feeType)"
91   - >
92   - <td style="width:40px">{{ index + 1 }}</td>
93   - <td style="width:120px">{{ feeType.feeTypeName }}</td>
94   - <td style="width:120px">{{ feeType.amount }}</td>
95   - <td style="width:120px">{{ feeType.amount-feeType.subTotal }}</td>
96   - <td style="width:120px">{{ feeType.subTotal }}</td>
97   - </tr>
98   - <tfoot>
99   - <tr>
100   - <td colspan="4"><span class="right subheding">Total Amount (RS) :</span></td>
101   - <td>{{ feeType.subTotal }}</td>
102   - </tr>
103   - <tr>
104   - <td colspan="4"><span class="right subheding">Paid (RS) :</span></td>
105   - <td>{{ feeType.totalPaidAmount ? feeType.totalPaidAmount : 0 }}</td>
106   - </tr>
107   - <tr>
108   - <td colspan="4"><span class="right subheding">Balance (RS) :</span></td>
109   - <td>{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td>
110   - </tr>
111   - </tfoot>
112   - </table>
113   - </v-card>
114   - </v-flex>
115   - </v-layout>
116   - </v-container>
117   - </v-flex>
  73 + </v-flex>
  74 + </v-layout>
  75 + </v-flex>
  76 + </v-layout>
  77 + </v-card>
  78 + <table class="feeTypeTable tableRsponsive">
  79 + <tr class="info white--text">
  80 + <th>#</th>
  81 + <th>Fee Type</th>
  82 + <th>Amount</th>
  83 + <th>Discount</th>
  84 + <th>Subtotal</th>
  85 + </tr>
  86 + <tr
  87 + v-for="(feeType, index) in feeTypeData"
  88 + :key="index"
  89 + v-on:keyup="getAmmountDetails(feeType)"
  90 + >
  91 + <td style="width:40px">{{ index + 1 }}</td>
  92 + <td style="width:120px">{{ feeType.feeTypeName }}</td>
  93 + <td style="width:120px">{{ feeType.amount }}</td>
  94 + <td style="width:120px">{{ feeType.amount-feeType.subTotal }}</td>
  95 + <td style="width:120px">{{ feeType.subTotal }}</td>
  96 + </tr>
  97 + <tfoot>
  98 + <tr>
  99 + <td colspan="4">
  100 + <span class="right subheding">Total Amount (RS) :</span>
  101 + </td>
  102 + <td>{{ feeType.subTotal }}</td>
  103 + </tr>
  104 + <tr>
  105 + <td colspan="4">
  106 + <span class="right subheding">Paid (RS) :</span>
  107 + </td>
  108 + <td>{{ feeType.totalPaidAmount ? feeType.totalPaidAmount : 0 }}</td>
  109 + </tr>
  110 + <tr>
  111 + <td colspan="4">
  112 + <span class="right subheding">Balance (RS) :</span>
  113 + </td>
  114 + <td>{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td>
  115 + </tr>
  116 + </tfoot>
  117 + </table>
  118 + <!-- </v-card> -->
  119 + <!-- </v-flex> -->
  120 + <!-- </v-layout> -->
  121 + <!-- </v-container> -->
  122 + <!-- </v-flex> -->
118 123 </v-container>
119 124 <div class="loader" v-if="showLoader">
120 125 <v-progress-circular indeterminate color="white"></v-progress-circular>
... ... @@ -141,11 +146,10 @@ export default {
141 146 },
142 147 feeTypeData: [],
143 148 token: "",
144   - invoiceParticularData: {},
  149 + invoiceParticularData: {}
145 150 }),
146   -
  151 +
147 152 methods: {
148   -
149 153 getInvoiceList() {
150 154 http()
151 155 .get("/getParticularInvoice", {
... ... @@ -160,9 +164,10 @@ export default {
160 164 (this.feeType.amount = response.data.data.totalAmount),
161 165 (this.feeType.discount = response.data.data.totalDiscount),
162 166 (this.feeType.subTotal = response.data.data.totalSubTotal),
163   - this.feeType.totalPaidAmount = response.data.data.totalPaidAmount
164   - console.log("response.data.data.totalPaidAmount",response.data.data.totalPaidAmount)
165   - (this.showLoader = false);
  167 + (this.feeType.totalPaidAmount = response.data.data.totalPaidAmount(
  168 + // console.log("response.data.data.totalPaidAmount",response.data.data.totalPaidAmount)
  169 + (this.showLoader = false)
  170 + ));
166 171 })
167 172 .catch(err => {
168 173 this.showLoader = false;
... ... @@ -186,14 +191,14 @@ export default {
186 191 subParticularTotal: "",
187 192 paidAmount: ""
188 193 };
189   - // *********** SUBTOTAL ***********
190   - feeType.subTotal =
191   - Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal);
192   - this.feeType.subTotal = feeType.subTotal.toFixed(2);
193   - // *********** PAID-AMOUNT ***********
194   - feeType.paidAmount =
195   - Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount);
196   - this.feeType.paidAmount = feeType.paidAmount.toFixed(2);
  194 + // *********** SUBTOTAL ***********
  195 + feeType.subTotal =
  196 + Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal);
  197 + this.feeType.subTotal = feeType.subTotal.toFixed(2);
  198 + // *********** PAID-AMOUNT ***********
  199 + feeType.paidAmount =
  200 + Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount);
  201 + this.feeType.paidAmount = feeType.paidAmount.toFixed(2);
197 202 }
198 203 },
199 204 mounted() {
... ... @@ -238,10 +243,10 @@ table.feeTypeTable {
238 243 width: 100% !important;
239 244 }
240 245 @media screen and (max-width: 380px) {
241   - .tableRsponsive {
242   - display: block;
243   - position: relative;
244   - overflow: scroll;
245   - }
  246 + .tableRsponsive {
  247 + display: block;
  248 + position: relative;
  249 + overflow: scroll;
  250 + }
246 251 }
247 252 </style>
248 253 \ No newline at end of file
... ...
src/pages/Administrator/academicYear.vue
... ... @@ -0,0 +1,614 @@
  1 +<template>
  2 + <v-app id="pages-dasboard">
  3 + <v-tabs grow slider-color="gary">
  4 + <v-tab
  5 + ripple
  6 + @click="activeTab('existing')"
  7 + v-bind:class="{ active: isActive }"
  8 + id="tab"
  9 + class="subheading"
  10 + >Existing Academic Year</v-tab>
  11 + <v-tab
  12 + ripple
  13 + @click="activeTab('new')"
  14 + v-bind:class="{ active: newActive }"
  15 + id="tab1"
  16 + User
  17 + class="subheading"
  18 + >Add New Academic Year</v-tab>
  19 +
  20 + <!-- ****** EDIT ACADEMIC YEAR ****** -->
  21 +
  22 + <v-tab-item>
  23 + <v-snackbar
  24 + :timeout="timeout"
  25 + :top="y === 'top'"
  26 + :right="x === 'right'"
  27 + :vertical="mode === 'vertical'"
  28 + v-model="snackbar"
  29 + color="success"
  30 + >{{ text }}</v-snackbar>
  31 + <v-dialog v-model="dialog" max-width="600px">
  32 + <v-flex xs12 sm12>
  33 + <v-toolbar color="v-toolbar">
  34 + <v-spacer></v-spacer>
  35 + <v-toolbar-title>
  36 + <h3>Edit Academic Year</h3>
  37 + </v-toolbar-title>
  38 + <v-spacer></v-spacer>
  39 + </v-toolbar>
  40 + <v-card flat>
  41 + <v-container fluid>
  42 + <v-flex xs12 sm12>
  43 + <v-layout>
  44 + <v-flex xs4 class="pt-4 subheading">
  45 + <label class="right">Year:</label>
  46 + </v-flex>
  47 + <v-flex xs8 sm5 class="ml-3">
  48 + <v-text-field
  49 + v-model="editedItem.year"
  50 + placeholder="fill your Title"
  51 + name="name"
  52 + type="text"
  53 + ></v-text-field>
  54 + </v-flex>
  55 + </v-layout>
  56 + </v-flex>
  57 + <v-flex xs12 sm12>
  58 + <v-layout>
  59 + <v-flex xs4 class="pt-4 subheading">
  60 + <label class="right">Year Title:</label>
  61 + </v-flex>
  62 + <v-flex xs8 sm5 class="ml-3">
  63 + <v-text-field
  64 + v-model="editedItem.yearTitle"
  65 + placeholder="fill your Year Title"
  66 + name="name"
  67 + type="text"
  68 + ></v-text-field>
  69 + </v-flex>
  70 + </v-layout>
  71 + </v-flex>
  72 + <v-flex xs12 sm12>
  73 + <v-layout>
  74 + <v-flex xs4 class="pt-4 subheading">
  75 + <label class="right">Date:</label>
  76 + </v-flex>
  77 + <v-flex xs8 sm5 class="ml-3">
  78 + <v-menu
  79 + ref="menu"
  80 + :close-on-content-click="false"
  81 + v-model="menu"
  82 + :nudge-right="40"
  83 + lazy
  84 + transition="scale-transition"
  85 + offset-y
  86 + full-width
  87 + min-width="290px"
  88 + >
  89 + <v-text-field
  90 + slot="activator"
  91 + v-model="editedItem.startingDate"
  92 + placeholder="Select date"
  93 + ></v-text-field>
  94 + <v-date-picker
  95 + color="info"
  96 + ref="picker"
  97 + v-model="editedItem.startingDate"
  98 + @input="$refs.menu.save(editedItem.startingDate)"
  99 + ></v-date-picker>
  100 + </v-menu>
  101 + </v-flex>
  102 + </v-layout>
  103 + </v-flex>
  104 + <v-flex xs12 sm12>
  105 + <v-layout>
  106 + <v-flex xs4 class="pt-4 subheading">
  107 + <label class="right">Date:</label>
  108 + </v-flex>
  109 + <v-flex xs8 sm5 class="ml-3">
  110 + <v-menu
  111 + ref="menuEndDate"
  112 + :close-on-content-click="false"
  113 + v-model="menuEndDate"
  114 + :nudge-right="40"
  115 + lazy
  116 + transition="scale-transition"
  117 + offset-y
  118 + full-width
  119 + min-width="290px"
  120 + >
  121 + <v-text-field
  122 + slot="activator"
  123 + v-model="editedItem.endingDate"
  124 + placeholder="Select date"
  125 + ></v-text-field>
  126 + <v-date-picker
  127 + color="info"
  128 + ref="picker"
  129 + v-model="editedItem.endingDate"
  130 + @input="$refs.menuEndDate.save(editedItem.endingDate)"
  131 + ></v-date-picker>
  132 + </v-menu>
  133 + </v-flex>
  134 + </v-layout>
  135 + </v-flex>
  136 + <v-layout>
  137 + <v-flex xs12 sm10 offset-sm1>
  138 + <v-card-actions>
  139 + <v-btn round dark @click.native="close">Cancel</v-btn>
  140 + <v-spacer></v-spacer>
  141 + <v-btn round dark @click="save">Save</v-btn>
  142 + </v-card-actions>
  143 + </v-flex>
  144 + </v-layout>
  145 + </v-container>
  146 + </v-card>
  147 + </v-flex>
  148 + </v-dialog>
  149 +
  150 + <!-- ****** PROFILE ACADEMIC YEAR DEATILS ****** -->
  151 +
  152 + <v-dialog v-model="dialog1" max-width="700px">
  153 + <v-toolbar color="white">
  154 + <v-spacer></v-spacer>
  155 + <v-toolbar-title>
  156 + <h3>Academic Year</h3>
  157 + </v-toolbar-title>
  158 + <v-spacer></v-spacer>
  159 + <v-icon @click="close1">close</v-icon>
  160 + </v-toolbar>
  161 + <v-card>
  162 + <v-card-text>
  163 + <v-container grid-list-md>
  164 + <v-layout wrap>
  165 + <v-flex>
  166 + <v-layout>
  167 + <v-flex xs5 sm6>
  168 + <h5 class="right my-1">
  169 + <b>Title:</b>
  170 + </h5>
  171 + </v-flex>
  172 + <v-flex sm6 xs8>
  173 + <h5 class="my-1">{{ editedItem.year }}</h5>
  174 + </v-flex>
  175 + </v-layout>
  176 + <v-layout>
  177 + <v-flex xs5 sm6>
  178 + <h5 class="right my-1">
  179 + <b>Date:</b>
  180 + </h5>
  181 + </v-flex>
  182 + <v-flex sm6 xs8>
  183 + <h5 class="my-1">{{ dates(editedItem.dateOfEvent) }}</h5>
  184 + </v-flex>
  185 + </v-layout>
  186 + <v-layout>
  187 + <v-flex xs5 sm6>
  188 + <h5 class="right my-1">
  189 + <b>Description:</b>
  190 + </h5>
  191 + </v-flex>
  192 + <v-flex sm6 xs8>
  193 + <h5 class="my-1">{{ editedItem.yearTitle }}</h5>
  194 + </v-flex>
  195 + </v-layout>
  196 + </v-flex>
  197 + </v-layout>
  198 + </v-container>
  199 + </v-card-text>
  200 + </v-card>
  201 + </v-dialog>
  202 + <v-snackbar
  203 + :timeout="timeout"
  204 + :top="y === 'top'"
  205 + :right="x === 'right'"
  206 + :vertical="mode === 'vertical'"
  207 + v-model="snackbar"
  208 + color="success"
  209 + >{{ text }}</v-snackbar>
  210 +
  211 + <!-- ****** EXISTING ACADEMIC YEAR TABLE ****** -->
  212 +
  213 + <v-data-table
  214 + :headers="headers"
  215 + :items="getAcademicYearList"
  216 + :pagination.sync="pagination"
  217 + :search="search"
  218 + >
  219 + <template slot="items" slot-scope="props">
  220 + <td id="td" class="text-xs-center">{{ props.index + 1}}</td>
  221 + <td id="td" class="text-xs-center">{{ props.item.year}}</td>
  222 + <td id="td" class="text-xs-center">{{ props.item.yearTitle}}</td>
  223 + <td id="td" class="text-xs-center">{{ dates(props.item.startingDate)}}</td>
  224 + <td id="td" class="text-xs-center">{{ dates(props.item.endingDate)}}</td>
  225 + <td id="td" class="text-xs-center">
  226 + <span>
  227 + <img
  228 + style="cursor:pointer; width:25px; height:18px; "
  229 + class="mr-5"
  230 + @click="profile(props.item)"
  231 + src="/static/icon/eye1.png"
  232 + />
  233 + <img
  234 + style="cursor:pointer; width:20px; height:18px; "
  235 + class="mr-5"
  236 + @click="editItem(props.item)"
  237 + src="/static/icon/edit1.png"
  238 + />
  239 + <img
  240 + style="cursor:pointer;width:20px; height:20px; "
  241 + class="mr-5"
  242 + @click="deleteItem(props.item)"
  243 + src="/static/icon/delete1.png"
  244 + />
  245 + </span>
  246 + </td>
  247 + </template>
  248 + <v-alert
  249 + slot="no-results"
  250 + :value="true"
  251 + color="error"
  252 + icon="warning"
  253 + >Your search for "{{ search }}" found no results.</v-alert>
  254 + </v-data-table>
  255 + </v-tab-item>
  256 +
  257 + <!-- ****** ADD ACADEMIC YEAR ****** -->
  258 +
  259 + <v-tab-item>
  260 + <v-container>
  261 + <v-snackbar
  262 + :timeout="timeout"
  263 + :top="y === 'top'"
  264 + :right="x === 'right'"
  265 + :vertical="mode === 'vertical'"
  266 + v-model="snackbar"
  267 + color="success"
  268 + >{{ text }}</v-snackbar>
  269 + <v-flex xs12 sm12 md8 offset-md2 class="top">
  270 + <v-card flat>
  271 + <v-form ref="form" v-model="valid" lazy-validation>
  272 + <v-container fluid>
  273 + <v-flex xs12>
  274 + <v-layout>
  275 + <v-flex xs5 sm4 class="pt-4 subheading">
  276 + <label class="right">Year:</label>
  277 + </v-flex>
  278 + <v-flex xs7 sm6 class="ml-3">
  279 + <v-text-field
  280 + v-model="addAcademicYear.year"
  281 + placeholder="fill Year (2019-2020)"
  282 + type="text"
  283 + :rules="yearRules"
  284 + required
  285 + ></v-text-field>
  286 + </v-flex>
  287 + </v-layout>
  288 + </v-flex>
  289 + <v-flex xs12>
  290 + <v-layout>
  291 + <v-flex xs5 sm4 class="pt-4 subheading">
  292 + <label class="right">Year Title:</label>
  293 + </v-flex>
  294 + <v-flex xs7 sm6 class="ml-3">
  295 + <v-text-field
  296 + placeholder="fill your Year Title"
  297 + :rules="yearTitleRules"
  298 + v-model="addAcademicYear.yearTitle"
  299 + type="text"
  300 + required
  301 + ></v-text-field>
  302 + </v-flex>
  303 + </v-layout>
  304 + </v-flex>
  305 + <v-flex xs12>
  306 + <v-layout>
  307 + <v-flex xs5 sm4 class="pt-4 subheading">
  308 + <label class="right">Starting Date:</label>
  309 + </v-flex>
  310 + <v-flex xs7 sm6 class="ml-3">
  311 + <v-menu
  312 + ref="menuStart"
  313 + :close-on-content-click="false"
  314 + v-model="menuStart"
  315 + :nudge-right="40"
  316 + :return-value.sync="addAcademicYear.startingDate"
  317 + app
  318 + lazy
  319 + transition="scale-transition"
  320 + offset-y
  321 + full-width
  322 + min-width="290px"
  323 + >
  324 + <v-text-field
  325 + slot="activator"
  326 + :rules="startDateRules"
  327 + v-model="addAcademicYear.startingDate"
  328 + append-icon="event"
  329 + placeholder="Select starting date"
  330 + ></v-text-field>
  331 + <v-date-picker
  332 + color="info"
  333 + v-model="addAcademicYear.startingDate"
  334 + @input="$refs.menuStart.save(addAcademicYear.startingDate)"
  335 + ></v-date-picker>
  336 + </v-menu>
  337 + </v-flex>
  338 + </v-layout>
  339 + </v-flex>
  340 + <v-flex xs12>
  341 + <v-layout>
  342 + <v-flex xs5 sm4 class="pt-4 subheading">
  343 + <label class="right">Ending Date:</label>
  344 + </v-flex>
  345 + <v-flex xs7 sm6 class="ml-3">
  346 + <v-menu
  347 + ref="menu1"
  348 + :close-on-content-click="false"
  349 + v-model="menu1"
  350 + :nudge-right="40"
  351 + :return-value.sync="addAcademicYear.endingDate"
  352 + app
  353 + lazy
  354 + transition="scale-transition"
  355 + offset-y
  356 + full-width
  357 + min-width="290px"
  358 + >
  359 + <v-text-field
  360 + slot="activator"
  361 + :rules="endDateRules"
  362 + v-model="addAcademicYear.endingDate"
  363 + append-icon="event"
  364 + placeholder="Select ending date"
  365 + ></v-text-field>
  366 + <v-date-picker
  367 + color="info"
  368 + v-model="addAcademicYear.endingDate"
  369 + @input="$refs.menu1.save(addAcademicYear.endingDate)"
  370 + ></v-date-picker>
  371 + </v-menu>
  372 + </v-flex>
  373 + </v-layout>
  374 + </v-flex>
  375 + <v-layout>
  376 + <v-flex xs12 sm9 offset-sm2>
  377 + <v-layout>
  378 + <v-flex xs6>
  379 + <v-btn @click="clear" round class="ml-3" dark>clear</v-btn>
  380 + </v-flex>
  381 + <v-flex xs6>
  382 + <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn>
  383 + </v-flex>
  384 + </v-layout>
  385 + </v-flex>
  386 + </v-layout>
  387 + </v-container>
  388 + </v-form>
  389 + </v-card>
  390 + </v-flex>
  391 + </v-container>
  392 + </v-tab-item>
  393 + </v-tabs>
  394 + <div class="loader" v-if="showLoader">
  395 + <v-progress-circular indeterminate color="white"></v-progress-circular>
  396 + </div>
  397 + </v-app>
  398 +</template>
  399 +
  400 +<script>
  401 +import http from "@/Services/http.js";
  402 +import Util from "@/util";
  403 +import moment from "moment";
  404 +
  405 +export default {
  406 + data: () => ({
  407 + snackbar: false,
  408 + y: "top",
  409 + x: "right",
  410 + mode: "",
  411 + timeout: 3000,
  412 + text: "",
  413 + loading: false,
  414 + date: null,
  415 + search: "",
  416 + showLoader: false,
  417 + dialog: false,
  418 + dialog1: false,
  419 + valid: true,
  420 + isActive: true,
  421 + newActive: false,
  422 + pagination: {
  423 + rowsPerPage: 15
  424 + },
  425 + date: null,
  426 + menu1: false,
  427 + menu: false,
  428 + menuStart: false,
  429 + menuEndDate: false,
  430 + yearRules: [v => !!v || "Year is required"],
  431 + yearTitleRules: [v => !!v || "Year Title is required"],
  432 + startDateRules: [v => !!v || "startDate is required"],
  433 + endDateRules: [v => !!v || "endDate is required"],
  434 + headers: [
  435 + {
  436 + text: "No",
  437 + align: "center",
  438 + sortable: false,
  439 + value: "No"
  440 + },
  441 + { text: "Year", value: "year", sortable: false, align: "center" },
  442 + {
  443 + text: "Year Title",
  444 + value: "yearTitle",
  445 + sortable: false,
  446 + align: "center"
  447 + },
  448 +
  449 + {
  450 + text: "Starting Date",
  451 + value: "startingDate",
  452 + sortable: false,
  453 + align: "center"
  454 + },
  455 + {
  456 + text: "Ending Date",
  457 + value: "endingDate",
  458 + sortable: false,
  459 + align: "center"
  460 + },
  461 + { text: "Action", value: "", sortable: false, align: "center" }
  462 + ],
  463 + getAcademicYearList: [],
  464 + editedIndex: -1,
  465 + addAcademicYear: {},
  466 + editedItem: {},
  467 + token: ""
  468 + }),
  469 + methods: {
  470 + dates: function(date) {
  471 + return moment(date).format("MMMM DD, YYYY");
  472 + },
  473 + getAcademicYear() {
  474 + this.showLoader = true;
  475 + http()
  476 + .get("/getAcademicsList", {
  477 + headers: { Authorization: "Bearer " + this.token }
  478 + })
  479 + .then(response => {
  480 + this.getAcademicYearList = response.data.data;
  481 + this.showLoader = false;
  482 + })
  483 + .catch(error => {
  484 + this.showLoader = false;
  485 + if (error.response.status === 401) {
  486 + this.$router.replace({ path: "/" });
  487 + this.$store.dispatch("setToken", null);
  488 + this.$store.dispatch("Id", null);
  489 + }
  490 + });
  491 + },
  492 + editItem(item) {
  493 + this.editedIndex = this.getAcademicYearList.indexOf(item);
  494 + this.editedItem = Object.assign({}, item);
  495 + this.editedItem.schoolEventId = item._id;
  496 + this.dialog = true;
  497 + },
  498 + profile(item) {
  499 + this.editedIndex = this.getAcademicYearList.indexOf(item);
  500 + this.editedItem = Object.assign({}, item);
  501 + this.dialog1 = true;
  502 + },
  503 +
  504 + deleteItem(item) {
  505 + let deleteAcademic = {
  506 + academicId: item._id
  507 + };
  508 + http()
  509 + .delete(
  510 + "/deleteAcademic",
  511 + confirm("Are you sure you want to delete this?") && {
  512 + params: deleteAcademic
  513 + }
  514 + )
  515 + .then(response => {
  516 + this.snackbar = true;
  517 + this.text = response.data.message;
  518 + this.getAcademicYear();
  519 + })
  520 + .catch(error => {
  521 + console.log(error);
  522 + });
  523 + },
  524 + activeTab(type) {
  525 + switch (type) {
  526 + case "existing":
  527 + this.newActive = false;
  528 + this.isActive = true;
  529 + break;
  530 +
  531 + default:
  532 + this.newActive = true;
  533 + this.isActive = false;
  534 + break;
  535 + }
  536 + },
  537 + close() {
  538 + this.dialog = false;
  539 + setTimeout(() => {
  540 + this.editedItem = Object.assign({}, this.defaultItem);
  541 + this.editedIndex = -1;
  542 + }, 300);
  543 + },
  544 + close1() {
  545 + this.dialog1 = false;
  546 + },
  547 + submit() {
  548 + if (this.$refs.form.validate()) {
  549 + this.loading = true;
  550 + http()
  551 + .post("/createAcademic", this.addAcademicYear)
  552 + .then(response => {
  553 + if ((this.snackbar = true)) {
  554 + this.text = response.data.message;
  555 + }
  556 + this.getAcademicYear();
  557 + this.clear();
  558 + this.loading = false;
  559 + })
  560 + .catch(error => {
  561 + if ((this.snackbar = true)) {
  562 + this.text = error.response.data.message;
  563 + }
  564 + this.loading = false;
  565 + });
  566 + }
  567 + },
  568 + clear() {
  569 + this.$refs.form.reset();
  570 + },
  571 + save() {
  572 + this.editedItem.academicId = this.editedItem._id;
  573 + http()
  574 + .put("/updateAcademic", this.editedItem, {
  575 + headers: { Authorization: "Bearer " + this.token }
  576 + })
  577 + .then(response => {
  578 + this.snackbar = true;
  579 + this.text = response.data.message;
  580 + this.getAcademicYear();
  581 + this.close();
  582 + })
  583 + .catch(error => {
  584 + console.log(error);
  585 + });
  586 + }
  587 + },
  588 + mounted() {
  589 + this.token = this.$store.state.token;
  590 + this.getAcademicYear();
  591 + },
  592 + created() {
  593 + this.$root.$on("app:search", search => {
  594 + this.search = search;
  595 + });
  596 + },
  597 + beforeDestroy() {
  598 + // dont forget to remove the listener
  599 + this.$root.$off("app:search");
  600 + }
  601 +};
  602 +</script>
  603 +<style scoped>
  604 +#td {
  605 + max-width: 200px;
  606 +}
  607 +.active {
  608 + background-color: gray;
  609 + color: white !important;
  610 +}
  611 +.activebtn {
  612 + color: black !important;
  613 +}
  614 +</style>
0 615 \ No newline at end of file
... ...
src/pages/Administrator/resetPassword.vue
... ... @@ -0,0 +1,135 @@
  1 +<template>
  2 + <v-app id="login">
  3 + <v-container fluid fill-height>
  4 + <v-layout>
  5 + <v-flex xs12 sm8 md8 lg5 offset-sm2 offset-lg3 class="mt-5">
  6 + <v-toolbar class="fixcolors mt-5" dark>
  7 + <v-spacer></v-spacer>
  8 + <v-toolbar-title>Reset Password</v-toolbar-title>
  9 + <v-spacer></v-spacer>
  10 + </v-toolbar>
  11 + <v-card class="elevation-1 pa-3" id="form">
  12 + <v-card-text>
  13 + <v-flex xs12 sm8 md8 lg8 offset-sm2>
  14 + <v-form class="mt-3">
  15 + <v-select :rules="[rules.required]" label="Select Users" :tems="users"></v-select>
  16 + <v-select :rules="[rules.required]" label="Select Users Name" :tems="usersName"></v-select>
  17 + <v-text-field
  18 + :rules="[rules.required]"
  19 + v-model="user.oldPassword"
  20 + label="New Password"
  21 + ></v-text-field>
  22 + <v-text-field
  23 + v-model="user.newPassword"
  24 + :rules="[rules.required]"
  25 + label="Re-Password"
  26 + ></v-text-field>
  27 + </v-form>
  28 + </v-flex>
  29 + </v-card-text>
  30 + <v-card-actions>
  31 + <v-flex text-xs-center>
  32 + <v-btn
  33 + class="mt-3"
  34 + round
  35 + color="black"
  36 + dark
  37 + large
  38 + :loading="loading"
  39 + @click="reset"
  40 + >Reset Password</v-btn>
  41 + </v-flex>
  42 + </v-card-actions>
  43 + <v-snackbar
  44 + :timeout="timeout"
  45 + :top="y === 'top'"
  46 + :right="x === 'right'"
  47 + :vertical="mode === 'vertical'"
  48 + v-model="snackbar"
  49 + :color="color"
  50 + >{{ text }}</v-snackbar>
  51 + </v-card>
  52 + </v-flex>
  53 + </v-layout>
  54 + </v-container>
  55 + </v-app>
  56 +</template>
  57 +<script>
  58 +import http from "@/Services/http.js";
  59 +
  60 +export default {
  61 + data() {
  62 + return {
  63 + snackbar: false,
  64 + y: "top",
  65 + x: "right",
  66 + mode: "",
  67 + timeout: 4000,
  68 + text: "",
  69 + user: {},
  70 + users: [],
  71 + usersName: [],
  72 + e1: true,
  73 + e2: true,
  74 + e3: true,
  75 + loading: false,
  76 + valid: false,
  77 + text: "Password Changed",
  78 + currentPassword: "",
  79 + newPassword: "",
  80 + confirmPassword: "",
  81 + rules: {
  82 + required: value => !!value || "This password field is Required."
  83 + // min: v => (/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 || 'Min 8 characters upper case lower case symbol required'
  84 + }
  85 + };
  86 + },
  87 + methods: {
  88 + reset() {
  89 + var token = this.$store.state.token;
  90 + http()
  91 + .put("/schoolChangePassword", {
  92 + headers: { Authorization: "Bearer " + token }
  93 + })
  94 + .then(response => {
  95 + this.loading = true;
  96 + if ((this.snackbar = true)) {
  97 + this.text = "Successfully changed password !!";
  98 + console.log("snackbar", response.data.message);
  99 + }
  100 + setTimeout(() => {
  101 + this.$router.push("/dashboard");
  102 + }, 2000);
  103 + })
  104 + .catch(err => {
  105 + // console.log("err====>",err);
  106 + this.text = "User Not Found or Incorrect currentPassword";
  107 + this.snackbar = true;
  108 + this.loading = false;
  109 + });
  110 + }
  111 + },
  112 + computed: {
  113 + color() {
  114 + return this.loading ? "success" : "error";
  115 + }
  116 + }
  117 +};
  118 +</script>
  119 +<style scoped>
  120 +img {
  121 + position: absolute;
  122 + top: 13px;
  123 + left: 50px;
  124 +}
  125 +.v-btn--large {
  126 + padding: 0px 74px;
  127 +}
  128 +@media screen and (max-width: 769px) {
  129 + .v-btn--large {
  130 + font-size: 14px;
  131 + height: 44px;
  132 + padding: 0 32px;
  133 + }
  134 +}
  135 +</style>
... ...
src/pages/Administrator/role.vue
... ... @@ -0,0 +1,340 @@
  1 +=<template>
  2 + <v-app id="pages-dasboard">
  3 + <v-tabs grow slider-color="gray">
  4 + <v-tab
  5 + ripple
  6 + @click="activeTab('existing')"
  7 + v-bind:class="{ active: isActive }"
  8 + id="tab"
  9 + class="subheading"
  10 + >Existing Role</v-tab>
  11 + <v-tab
  12 + ripple
  13 + @click="activeTab('new')"
  14 + v-bind:class="{ active: newActive }"
  15 + id="tab1"
  16 + User
  17 + class="subheading"
  18 + >Add New Role</v-tab>
  19 +
  20 + <!-- ****** EDITS Role Distribution DETAILS ****** -->
  21 +
  22 + <v-tab-item>
  23 + <v-snackbar
  24 + :timeout="timeout"
  25 + :top="y === 'top'"
  26 + :right="x === 'right'"
  27 + :vertical="mode === 'vertical'"
  28 + v-model="snackbar"
  29 + color="success"
  30 + >{{ text }}</v-snackbar>
  31 + <v-dialog v-model="dialog" max-width="600px">
  32 + <v-flex xs12 sm12>
  33 + <v-toolbar color="v-toolbar">
  34 + <v-spacer></v-spacer>
  35 + <v-toolbar-title>
  36 + <h3>Edit Role</h3>
  37 + </v-toolbar-title>
  38 + <v-spacer></v-spacer>
  39 + </v-toolbar>
  40 + <v-card flat>
  41 + <v-form ref="form">
  42 + <v-container fluid>
  43 + <v-flex xs12 sm12>
  44 + <v-layout>
  45 + <v-flex xs4 class="pt-4 subheading">
  46 + <label class="right">Role:</label>
  47 + </v-flex>
  48 + <v-flex xs8 sm6 class="ml-3">
  49 + <v-text-field v-model="editedItem.name" placeholder="fill your Role"></v-text-field>
  50 + </v-flex>
  51 + </v-layout>
  52 + </v-flex>
  53 + <v-layout>
  54 + <v-flex xs12 sm10 offset-sm1>
  55 + <v-card-actions>
  56 + <v-btn round dark @click.native="close">Cancel</v-btn>
  57 + <v-spacer></v-spacer>
  58 + <v-btn round dark @click="save">Save</v-btn>
  59 + </v-card-actions>
  60 + </v-flex>
  61 + </v-layout>
  62 + </v-container>
  63 + </v-form>
  64 + </v-card>
  65 + </v-flex>
  66 + </v-dialog>
  67 +
  68 + <!-- ****** EXISTING-USERS REMINDER TABLE ****** -->
  69 +
  70 + <v-data-table
  71 + :headers="headers"
  72 + :items="getRole"
  73 + :pagination.sync="pagination"
  74 + :search="search"
  75 + >
  76 + <template slot="items" slot-scope="props">
  77 + <td id="tabeleData" class="text-xs-center">{{ props.index + 1}}</td>
  78 + <td id="tabeleData" class="text-xs-center">{{ props.item.name}}</td>
  79 + <td id="tabeleData" class="text-xs-center">
  80 + <span>
  81 + <img
  82 + style="cursor:pointer; width:20px; height:18px; "
  83 + class="mr-5"
  84 + @click="editItem(props.item)"
  85 + src="/static/icon/edit1.png"
  86 + />
  87 + <img
  88 + style="cursor:pointer;width:20px; height:20px; "
  89 + class="mr-5"
  90 + @click="deleteItem(props.item)"
  91 + src="/static/icon/delete1.png"
  92 + />
  93 + </span>
  94 + </td>
  95 + </template>
  96 + <v-alert
  97 + slot="no-results"
  98 + :value="true"
  99 + color="error"
  100 + icon="warning"
  101 + >Your search for "{{ search }}" found no results.</v-alert>
  102 + </v-data-table>
  103 + </v-tab-item>
  104 +
  105 + <!-- ****** ADD ROLE ****** -->
  106 +
  107 + <v-tab-item>
  108 + <v-container>
  109 + <v-snackbar
  110 + :timeout="timeout"
  111 + :top="y === 'top'"
  112 + :right="x === 'right'"
  113 + :vertical="mode === 'vertical'"
  114 + v-model="snackbar"
  115 + color="success"
  116 + >{{ text }}</v-snackbar>
  117 + <v-flex xs12 sm8 class="top" offset-sm2>
  118 + <v-card flat>
  119 + <v-form ref="form" v-model="valid" lazy-validation>
  120 + <v-container fluid>
  121 + <v-flex xs12>
  122 + <v-layout>
  123 + <v-flex xs4 class="pt-4 subheading">
  124 + <label class="right">Role:</label>
  125 + </v-flex>
  126 + <v-flex xs8 sm4 class="ml-3">
  127 + <v-text-field
  128 + v-model="addrole.name"
  129 + placeholder="fill your Role"
  130 + :rules="roleRules"
  131 + ></v-text-field>
  132 + </v-flex>
  133 + </v-layout>
  134 + </v-flex>
  135 + <v-layout>
  136 + <v-flex xs12 sm12>
  137 + <v-layout>
  138 + <v-flex xs5>
  139 + <v-btn @click="clear" round class="right" dark>clear</v-btn>
  140 + </v-flex>
  141 + <v-flex xs8 sm4>
  142 + <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn>
  143 + </v-flex>
  144 + </v-layout>
  145 + </v-flex>
  146 + </v-layout>
  147 + </v-container>
  148 + </v-form>
  149 + </v-card>
  150 + </v-flex>
  151 + </v-container>
  152 + </v-tab-item>
  153 + </v-tabs>
  154 + <div class="loader" v-if="showLoader">
  155 + <v-progress-circular indeterminate color="white"></v-progress-circular>
  156 + </div>
  157 + </v-app>
  158 +</template>
  159 +
  160 +<script>
  161 +import http from "@/Services/http.js";
  162 +import Util from "@/util";
  163 +
  164 +export default {
  165 + data: () => ({
  166 + snackbar: false,
  167 + y: "top",
  168 + x: "right",
  169 + mode: "",
  170 + timeout: 3000,
  171 + text: "",
  172 + loading: false,
  173 + search: "",
  174 + showLoader: false,
  175 + dialog: false,
  176 + valid: true,
  177 + isActive: true,
  178 + newActive: false,
  179 + pagination: {
  180 + rowsPerPage: 15
  181 + },
  182 + roleRules: [v => !!v || "Role is required"],
  183 + headers: [
  184 + {
  185 + text: "No",
  186 + align: "center",
  187 + sortable: false,
  188 + value: "No"
  189 + },
  190 + { text: "Role", value: "role", sortable: false, align: "center" },
  191 + { text: "Action", value: "", sortable: false, align: "center" }
  192 + ],
  193 + getRole: [],
  194 + editedIndex: -1,
  195 + token: "",
  196 + addrole: {},
  197 + editedItem: {}
  198 + }),
  199 + methods: {
  200 + getRole() {
  201 + this.showLoader = true;
  202 + http()
  203 + .get("/getRolesList", {
  204 + headers: { Authorization: "Bearer " + this.token }
  205 + })
  206 + .then(response => {
  207 + this.getRole = response.data.data;
  208 + this.showLoader = false;
  209 + })
  210 + .catch(error => {
  211 + this.showLoader = false;
  212 + if (error.response.status === 401) {
  213 + this.$router.replace({ path: "/" });
  214 + this.$store.dispatch("setToken", null);
  215 + this.$store.dispatch("Id", null);
  216 + }
  217 + });
  218 + },
  219 + editItem(item) {
  220 + this.editedIndex = this.getRole.indexOf(item);
  221 + this.editedItem = Object.assign({}, item);
  222 + this.dialog = true;
  223 + },
  224 + deleteItem(item) {
  225 + let deleteRoleId = {
  226 + roleId: item._id
  227 + };
  228 + http()
  229 + .delete(
  230 + "/deleteRole",
  231 + confirm("Are you sure you want to delete this?") && {
  232 + params: deleteRoleId
  233 + },
  234 + {
  235 + headers: {
  236 + Authorization: "Bearer " + this.token
  237 + }
  238 + }
  239 + )
  240 + .then(response => {
  241 + this.text = response.data.message;
  242 + this.getRole();
  243 + })
  244 + .catch(error => {
  245 + console.log(error);
  246 + });
  247 + },
  248 + activeTab(type) {
  249 + switch (type) {
  250 + case "existing":
  251 + this.newActive = false;
  252 + this.isActive = true;
  253 + break;
  254 +
  255 + default:
  256 + this.newActive = true;
  257 + this.isActive = false;
  258 + break;
  259 + }
  260 + },
  261 + close() {
  262 + this.dialog = false;
  263 + setTimeout(() => {
  264 + this.editedItem = Object.assign({}, this.defaultItem);
  265 + this.editedIndex = -1;
  266 + }, 300);
  267 + },
  268 + // close1() {
  269 + // this.dialog1 = false;
  270 + // },
  271 + submit() {
  272 + if (this.$refs.form.validate()) {
  273 + this.loading = true;
  274 + http()
  275 + .post("/createRole", this.addrole)
  276 + .then(response => {
  277 + this.snackbar = true;
  278 + this.text = response.data.message;
  279 + // this.getRole();
  280 + this.clear();
  281 + this.loading = false;
  282 + })
  283 + .catch(error => {
  284 + this.snackbar = true;
  285 + this.text = error.response.data.message;
  286 + this.loading = false;
  287 + });
  288 + }
  289 + },
  290 + clear() {
  291 + this.$refs.form.reset();
  292 + },
  293 + save() {
  294 + (this.editedItem.roleId = this.editedItem._id),
  295 + http()
  296 + .put("/updateRole", this.editedItem, {
  297 + headers: {
  298 + Authorization: "Bearer " + this.token
  299 + }
  300 + })
  301 + .then(response => {
  302 + this.text = "Successfully Edit Notification";
  303 + this.getRole();
  304 + this.close();
  305 + })
  306 + .catch(error => {
  307 + console.log(error);
  308 + });
  309 + }
  310 + },
  311 + mounted() {
  312 + this.token = this.$store.state.token;
  313 + this.getRole();
  314 + },
  315 + created() {
  316 + this.$root.$on("app:search", search => {
  317 + this.search = search;
  318 + });
  319 + },
  320 + beforeDestroy() {
  321 + // dont forget to remove the listener
  322 + this.$root.$off("app:search");
  323 + }
  324 +};
  325 +</script>
  326 +<style scoped>
  327 +#tabeleData {
  328 + border: 1px solid #dddddd;
  329 + text-align: left;
  330 + padding: 8px 0px;
  331 + max-width: 200px !important;
  332 +}
  333 +.active {
  334 + background-color: gray;
  335 + color: white !important;
  336 +}
  337 +.activebtn {
  338 + color: black !important;
  339 +}
  340 +</style>
0 341 \ No newline at end of file
... ...
src/pages/Administrator/systemAdmin.vue
... ... @@ -0,0 +1,1189 @@
  1 +<template>
  2 + <v-app id="pages-dasboard">
  3 + <v-tabs grow slider-color="gray">
  4 + <v-tab
  5 + ripple
  6 + @click="activeTab('existing')"
  7 + v-bind:class="{ active: isActive }"
  8 + id="tab"
  9 + class="subheading"
  10 + >Existing System Admin</v-tab>
  11 + <v-tab
  12 + ripple
  13 + @click="activeTab('new')"
  14 + v-bind:class="{ active: newActive }"
  15 + id="tab1"
  16 + User
  17 + class="subheading"
  18 + >Add New System Admin</v-tab>
  19 + <!-- ****** EDIT System Admin DETAILS ****** -->
  20 + <v-tab-item>
  21 + <v-snackbar
  22 + :timeout="timeout"
  23 + :top="y === 'top'"
  24 + :right="x === 'right'"
  25 + :vertical="mode === 'vertical'"
  26 + v-model="snackbar"
  27 + color="success"
  28 + >{{ text }}</v-snackbar>
  29 + <v-dialog v-model="dialog" max-width="1100px" scrollable>
  30 + <v-card flat>
  31 + <v-toolbar color="grey lighten-2" flat>
  32 + <v-spacer></v-spacer>
  33 + <v-toolbar-title>Edit System Admin Profile</v-toolbar-title>
  34 + <v-spacer></v-spacer>
  35 + </v-toolbar>
  36 + <v-card-text style="height: 800px;">
  37 + <v-layout>
  38 + <v-flex
  39 + xs12
  40 + class="text-xs-center text-sm-center text-md-center text-lg-center my-4"
  41 + >
  42 + <v-avatar size="160px">
  43 + <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl && !imageUrl" />
  44 + <img
  45 + :src="editedItem.profilePicUrl"
  46 + v-else-if="editedItem.profilePicUrl && !imageUrl"
  47 + />
  48 + <img
  49 + v-if="imageUrl"
  50 + :src="imageUrl"
  51 + height="150"
  52 + style="border-radius:50%; width:200px"
  53 + />
  54 + </v-avatar>
  55 + <input
  56 + type="file"
  57 + style="display:none"
  58 + ref="image"
  59 + accept="image/*"
  60 + @change="onFilePicked"
  61 + />
  62 + </v-flex>
  63 + </v-layout>
  64 + <v-layout wrap>
  65 + <v-flex xs12 sm6>
  66 + <v-layout>
  67 + <v-flex xs4 sm4 class="pt-4 subheading">
  68 + <label class="right hidden-xs-only hidden-sm-only">Full Name:</label>
  69 + <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label>
  70 + </v-flex>
  71 + <v-flex xs8 sm6 class="ml-3">
  72 + <v-text-field
  73 + v-model="editedItem.name"
  74 + placeholder="fill your full Name"
  75 + type="text"
  76 + required
  77 + ></v-text-field>
  78 + </v-flex>
  79 + </v-layout>
  80 + </v-flex>
  81 + <v-flex xs12 sm6>
  82 + <v-layout>
  83 + <v-flex xs4 sm4 class="pt-4 subheading">
  84 + <label class="right">Email ID:</label>
  85 + </v-flex>
  86 + <v-flex xs8 sm6 class="ml-3">
  87 + <v-text-field
  88 + placeholder="fill your email"
  89 + v-model="editedItem.email"
  90 + type="text"
  91 + required
  92 + ></v-text-field>
  93 + </v-flex>
  94 + </v-layout>
  95 + </v-flex>
  96 + </v-layout>
  97 + <v-layout wrap>
  98 + <v-flex xs12 sm6>
  99 + <v-layout>
  100 + <v-flex xs4 sm4 class="pt-4 subheading">
  101 + <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label>
  102 + <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label>
  103 + </v-flex>
  104 + <v-flex xs8 sm6 class="ml-3">
  105 + <v-menu
  106 + ref="menu"
  107 + :close-on-content-click="false"
  108 + v-model="menu2"
  109 + :nudge-right="40"
  110 + lazy
  111 + transition="scale-transition"
  112 + offset-y
  113 + full-width
  114 + min-width="290px"
  115 + >
  116 + <v-text-field
  117 + slot="activator"
  118 + v-model="editedItem.dob"
  119 + placeholder="Select date"
  120 + ></v-text-field>
  121 + <v-date-picker
  122 + ref="picker"
  123 + v-model="editedItem.dob"
  124 + :max="new Date().toISOString().substr(0, 10)"
  125 + min="1950-01-01"
  126 + @input="menu2 = false"
  127 + ></v-date-picker>
  128 + </v-menu>
  129 + </v-flex>
  130 + </v-layout>
  131 + </v-flex>
  132 + <v-flex xs12 sm6>
  133 + <v-layout>
  134 + <v-flex xs4 class="pt-4 subheading">
  135 + <label class="right">City:</label>
  136 + </v-flex>
  137 + <v-flex xs8 sm6 class="ml-3">
  138 + <v-text-field
  139 + v-model="editedItem.city"
  140 + placeholder="fill your City Name"
  141 + type="text"
  142 + required
  143 + ></v-text-field>
  144 + </v-flex>
  145 + </v-layout>
  146 + </v-flex>
  147 + </v-layout>
  148 + <v-layout wrap>
  149 + <v-flex xs12 sm6>
  150 + <v-layout>
  151 + <v-flex xs4 class="pt-4 subheading">
  152 + <label class="right">State:</label>
  153 + </v-flex>
  154 + <v-flex xs8 sm6 class="ml-3">
  155 + <v-text-field
  156 + v-model="editedItem.state"
  157 + placeholder="fill your State Name"
  158 + type="text"
  159 + required
  160 + ></v-text-field>
  161 + </v-flex>
  162 + </v-layout>
  163 + </v-flex>
  164 + <v-flex xs12 sm6>
  165 + <v-layout>
  166 + <v-flex xs4 class="pt-4 subheading">
  167 + <label class="right">PinCode:</label>
  168 + </v-flex>
  169 + <v-flex xs8 sm6 class="ml-3">
  170 + <v-text-field
  171 + v-model="editedItem.pincode"
  172 + placeholder="fill your pincode"
  173 + type="number"
  174 + required
  175 + ></v-text-field>
  176 + </v-flex>
  177 + </v-layout>
  178 + </v-flex>
  179 + </v-layout>
  180 + <v-layout wrap>
  181 + <v-flex xs12 sm6>
  182 + <v-layout>
  183 + <v-flex xs4 class="pt-4 subheading">
  184 + <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
  185 + <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label>
  186 + </v-flex>
  187 + <v-flex xs8 sm6 class="ml-3">
  188 + <v-text-field
  189 + v-model="editedItem.mobileNo"
  190 + placeholder="fill your MobileNo"
  191 + type="number"
  192 + required
  193 + ></v-text-field>
  194 + </v-flex>
  195 + </v-layout>
  196 + </v-flex>
  197 + <v-flex xs12 sm6>
  198 + <v-layout>
  199 + <v-flex xs4 class="pt-4 subheading">
  200 + <label class="right hidden-xs-only hidden-sm-only">Select Country:</label>
  201 + <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label>
  202 + </v-flex>
  203 + <v-flex xs8 sm6 class="ml-3">
  204 + <v-autocomplete
  205 + v-model="editedItem.country"
  206 + :items="countries"
  207 + placeholder="Select Country Name"
  208 + required
  209 + ></v-autocomplete>
  210 + </v-flex>
  211 + </v-layout>
  212 + </v-flex>
  213 + </v-layout>
  214 + <v-layout wrap>
  215 + <v-flex xs12 sm6>
  216 + <v-layout>
  217 + <v-flex xs4 class="pt-4 subheading">
  218 + <label class="right">Join Date:</label>
  219 + </v-flex>
  220 + <v-flex xs8 sm6 class="ml-3">
  221 + <v-menu
  222 + ref="menu"
  223 + :close-on-content-click="false"
  224 + v-model="menu3"
  225 + :nudge-right="40"
  226 + lazy
  227 + transition="scale-transition"
  228 + offset-y
  229 + full-width
  230 + min-width="290px"
  231 + >
  232 + <v-text-field
  233 + slot="activator"
  234 + v-model="editedItem.joinDate"
  235 + placeholder="Select date"
  236 + ></v-text-field>
  237 + <v-date-picker
  238 + ref="picker"
  239 + v-model="editedItem.joinDate"
  240 + :max="new Date().toISOString().substr(0, 10)"
  241 + min="1950-01-01"
  242 + @input="menu3 = false"
  243 + ></v-date-picker>
  244 + </v-menu>
  245 + </v-flex>
  246 + </v-layout>
  247 + </v-flex>
  248 + <v-flex xs12 sm6>
  249 + <v-layout>
  250 + <v-flex xs4 class="pt-4 subheading">
  251 + <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
  252 + <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label>
  253 + </v-flex>
  254 + <v-flex xs8 sm6 class="ml-3">
  255 + <v-text-field
  256 + label="Select Image"
  257 + @click="pickFile"
  258 + v-model="imageName"
  259 + append-icon="attach_file"
  260 + ></v-text-field>
  261 + </v-flex>
  262 + </v-layout>
  263 + </v-flex>
  264 + </v-layout>
  265 + <v-layout class="hidden-xs-only hidden-sm-only" wrap>
  266 + <v-flex xs12 sm12>
  267 + <v-layout>
  268 + <v-flex xs4 sm2 class="pt-4 subheading ml-5">
  269 + <label class="right pr-2">Present Address:</label>
  270 + </v-flex>
  271 + <v-flex xs8 sm10>
  272 + <v-text-field
  273 + name="input-4-3"
  274 + v-model="editedItem.presentAddress"
  275 + placeholder="fill Your present Address"
  276 + required
  277 + ></v-text-field>
  278 + </v-flex>
  279 + </v-layout>
  280 + </v-flex>
  281 + <v-flex xs12 sm12>
  282 + <v-layout>
  283 + <v-flex xs4 sm2 class="pt-4 subheading ml-5 addressForm">
  284 + <label class="pr-2">Permanent Address:</label>
  285 + </v-flex>
  286 + <v-flex xs12 sm10>
  287 + <v-text-field
  288 + name="input-4-3"
  289 + v-model="editedItem.permanentAddress"
  290 + placeholder="fill Your Permanent Address"
  291 + required
  292 + ></v-text-field>
  293 + </v-flex>
  294 + </v-layout>
  295 + </v-flex>
  296 + </v-layout>
  297 + <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap>
  298 + <v-flex xs12 sm12>
  299 + <v-layout>
  300 + <v-flex xs12 sm3 class="pt-4 subheading text-xs-center">
  301 + <label class>Present Address:</label>
  302 + </v-flex>
  303 + </v-layout>
  304 + <v-layout>
  305 + <v-flex xs12 sm12>
  306 + <v-textarea
  307 + name="input-4-3"
  308 + v-model="editedItem.presentAddress"
  309 + placeholder="fill Your present Address"
  310 + required
  311 + ></v-textarea>
  312 + </v-flex>
  313 + </v-layout>
  314 + </v-flex>
  315 + <v-flex xs12 sm12>
  316 + <v-layout>
  317 + <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm">
  318 + <label>Permanent Address:</label>
  319 + </v-flex>
  320 + </v-layout>
  321 + <v-layout>
  322 + <v-flex xs12 sm12>
  323 + <v-textarea
  324 + name="input-4-3"
  325 + v-model="editedItem.permanentAddress"
  326 + placeholder="fill Your Permanent Address"
  327 + required
  328 + ></v-textarea>
  329 + </v-flex>
  330 + </v-layout>
  331 + </v-flex>
  332 + </v-layout>
  333 + <v-layout>
  334 + <v-flex xs12 sm12>
  335 + <v-layout>
  336 + <v-flex xs6>
  337 + <v-btn round dark @click.native="close">Cancel</v-btn>
  338 + </v-flex>
  339 + <v-flex xs6>
  340 + <v-btn @click="save" round dark :loading="loading" class="right">Save</v-btn>
  341 + </v-flex>
  342 + </v-layout>
  343 + </v-flex>
  344 + </v-layout>
  345 + </v-card-text>
  346 + </v-card>
  347 + </v-dialog>
  348 +
  349 + <!-- ****** PROFILE VIEW System Admin DETAILS ****** -->
  350 +
  351 + <v-dialog v-model="dialog1" max-width="600px" scrollable>
  352 + <v-card>
  353 + <v-toolbar color="grey lighten-2" flat>
  354 + <v-spacer></v-spacer>
  355 + <v-toolbar-title>
  356 + <h3> System Admin</h3>
  357 + </v-toolbar-title>
  358 + <v-spacer></v-spacer>
  359 + <v-icon @click="close1">close</v-icon>
  360 + </v-toolbar>
  361 + <v-card-text style="height: 700px;">
  362 + <v-container grid-list-md>
  363 + <v-layout wrap>
  364 + <v-flex>
  365 + <v-flex align-center justify-center layout text-xs-center>
  366 + <v-avatar size="160px">
  367 + <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" />
  368 + <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" />
  369 + </v-avatar>
  370 + </v-flex>
  371 + <v-layout>
  372 + <v-flex xs5 sm6>
  373 + <h5 class="right my-1">
  374 + <b>Full Name:</b>
  375 + </h5>
  376 + </v-flex>
  377 + <v-flex sm6 xs8>
  378 + <h5 class="my-1">{{ editedItem.name }}</h5>
  379 + </v-flex>
  380 + </v-layout>
  381 + <v-layout>
  382 + <v-flex xs5 sm6>
  383 + <h5 class="right my-1">
  384 + <b>Email:</b>
  385 + </h5>
  386 + </v-flex>
  387 + <v-flex sm6 xs8>
  388 + <h5 class="my-1">{{ editedItem.email }}</h5>
  389 + </v-flex>
  390 + </v-layout>
  391 + <v-layout>
  392 + <v-flex xs5 sm6>
  393 + <h5 class="right my-1">
  394 + <b>City:</b>
  395 + </h5>
  396 + </v-flex>
  397 + <v-flex sm6 xs8>
  398 + <h5 class="my-1">{{ editedItem.city }}</h5>
  399 + </v-flex>
  400 + </v-layout>
  401 + <v-layout>
  402 + <v-flex xs5 sm6>
  403 + <h5 class="right my-1">
  404 + <b>State:</b>
  405 + </h5>
  406 + </v-flex>
  407 + <v-flex sm6 xs8>
  408 + <h5 class="my-1">{{ editedItem.state }}</h5>
  409 + </v-flex>
  410 + </v-layout>
  411 + <v-layout>
  412 + <v-flex xs5 sm6>
  413 + <h5 class="right my-1">
  414 + <b>Country:</b>
  415 + </h5>
  416 + </v-flex>
  417 + <v-flex sm6 xs8>
  418 + <h5 class="my-1">{{ editedItem.country }}</h5>
  419 + </v-flex>
  420 + </v-layout>
  421 + <v-layout>
  422 + <v-flex xs5 sm6>
  423 + <h5 class="right my-1">
  424 + <b>Pincode:</b>
  425 + </h5>
  426 + </v-flex>
  427 + <v-flex sm6 xs8>
  428 + <h5 class="my-1">{{ editedItem.pincode }}</h5>
  429 + </v-flex>
  430 + </v-layout>
  431 + <v-layout>
  432 + <v-flex xs5 sm6>
  433 + <h5 class="right my-1">
  434 + <b>Mobile No:</b>
  435 + </h5>
  436 + </v-flex>
  437 + <v-flex sm6 xs8>
  438 + <h5 class="my-1">{{ editedItem.mobileNo }}</h5>
  439 + </v-flex>
  440 + </v-layout>
  441 + <v-layout>
  442 + <v-flex xs5 sm6>
  443 + <h5 class="right my-1">
  444 + <b>Join Date:</b>
  445 + </h5>
  446 + </v-flex>
  447 + <v-flex sm6 xs8>
  448 + <h5 class="my-1">{{ dates(editedItem.joinDate) }}</h5>
  449 + </v-flex>
  450 + </v-layout>
  451 + <v-layout>
  452 + <v-flex xs5 sm6>
  453 + <h5 class="right my-1">
  454 + <b>D.O.B :</b>
  455 + </h5>
  456 + </v-flex>
  457 + <v-flex sm6 xs8>
  458 + <h5 class="my-1">{{ dates(editedItem.dob) }}</h5>
  459 + </v-flex>
  460 + </v-layout>
  461 + <v-layout>
  462 + <v-flex xs6 sm6>
  463 + <h5 class="right my-1">
  464 + <b>Permanent Address:</b>
  465 + </h5>
  466 + </v-flex>
  467 + <v-flex sm6 xs8>
  468 + <h5 class="my-1">{{ editedItem.permanentAddress }}</h5>
  469 + </v-flex>
  470 + </v-layout>
  471 + <v-layout>
  472 + <v-flex xs6 sm6>
  473 + <h5 class="right my-1">
  474 + <b>present Address:</b>
  475 + </h5>
  476 + </v-flex>
  477 + <v-flex sm6 xs8>
  478 + <h5 class="my-1">{{ editedItem.presentAddress }}</h5>
  479 + </v-flex>
  480 + </v-layout>
  481 + </v-flex>
  482 + </v-layout>
  483 + </v-container>
  484 + </v-card-text>
  485 + </v-card>
  486 + </v-dialog>
  487 + <v-snackbar
  488 + :timeout="timeout"
  489 + :top="y === 'top'"
  490 + :right="x === 'right'"
  491 + :vertical="mode === 'vertical'"
  492 + v-model="snackbar"
  493 + color="success"
  494 + >{{ text }}</v-snackbar>
  495 +
  496 + <!-- ****** EXISTING System Admin TABLE ****** -->
  497 +
  498 + <v-data-table
  499 + :headers="headers"
  500 + :items="desserts"
  501 + :pagination.sync="pagination"
  502 + :search="search"
  503 + >
  504 + <template slot="items" slot-scope="props">
  505 + <td id="td" class="text-xs-center">{{ props.index + 1}}</td>
  506 + <td id="td" class="text-xs-center">
  507 + <v-avatar>
  508 + <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
  509 + <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
  510 + </v-avatar>
  511 + </td>
  512 + <td id="td" class="text-xs-center">{{ props.item.name}}</td>
  513 + <td id="td" class="text-xs-center">{{ props.item.email }}</td>
  514 + <td id="td" class="text-xs-center">{{ props.item.role }}</td>
  515 + <td id="td" class="text-xs-center">{{ props.item.status }}</td>
  516 + <!-- <td id="td" class="text-xs-center">{{ props.item.mobileNo }}</td> -->
  517 + <td class="text-xs-center">
  518 + <span>
  519 + <img
  520 + style="cursor:pointer; width:25px; height:18px; "
  521 + class="mr-5"
  522 + @click="profile(props.item)"
  523 + src="/static/icon/eye1.png"
  524 + />
  525 + <img
  526 + style="cursor:pointer; width:20px; height:18px; "
  527 + class="mr-5"
  528 + @click="editItem(props.item)"
  529 + src="/static/icon/edit1.png"
  530 + />
  531 + <img
  532 + style="cursor:pointer;width:20px; height:20px; "
  533 + class="mr-5"
  534 + @click="deleteItem(props.item)"
  535 + src="/static/icon/delete1.png"
  536 + />
  537 + </span>
  538 + </td>
  539 + </template>
  540 + <v-alert
  541 + slot="no-results"
  542 + :value="true"
  543 + color="error"
  544 + icon="warning"
  545 + >Your search for "{{ search }}" found no results.</v-alert>
  546 + </v-data-table>
  547 + </v-tab-item>
  548 +
  549 + <!-- ****** Add System Admin Data****** -->
  550 + <v-tab-item>
  551 + <v-container fluid>
  552 + <v-snackbar
  553 + :timeout="timeout"
  554 + :top="y === 'top'"
  555 + :right="x === 'right'"
  556 + :vertical="mode === 'vertical'"
  557 + v-model="snackbar"
  558 + color="success"
  559 + >{{ text }}</v-snackbar>
  560 + <v-flex xs12 sm12 class="my-4">
  561 + <v-card flat>
  562 + <v-form ref="form" v-model="valid" lazy-validation>
  563 + <v-container fluid>
  564 + <v-layout>
  565 + <v-flex
  566 + xs12
  567 + class="text-xs-center text-sm-center text-md-center text-lg-center my-4"
  568 + >
  569 + <v-avatar size="100px">
  570 + <img src="/static/icon/user.png" v-if="!imageUrl" />
  571 + </v-avatar>
  572 + <img
  573 + :src="imageUrl"
  574 + height="150"
  575 + v-if="imageUrl"
  576 + style="border-radius:50%; width:200px"
  577 + />
  578 + </v-flex>
  579 + </v-layout>
  580 + <v-layout>
  581 + <v-flex xs12 sm6>
  582 + <v-layout>
  583 + <v-flex xs4 class="pt-4 subheading">
  584 + <label class="right hidden-sm-only hidden-xs-only">Name:</label>
  585 + <label
  586 + class="right hidden-lg-only hidden-xl-only hidden-md-only"
  587 + >Name</label>
  588 + </v-flex>
  589 + <v-flex xs8 class="ml-3">
  590 + <v-text-field
  591 + v-model="addSystemAdmin.name"
  592 + placeholder="fill your full Name"
  593 + name="name"
  594 + type="text"
  595 + :rules="nameRules"
  596 + required
  597 + ></v-text-field>
  598 + </v-flex>
  599 + </v-layout>
  600 + </v-flex>
  601 + <v-flex xs12 sm6>
  602 + <v-layout>
  603 + <v-flex xs4 class="pt-4 subheading">
  604 + <label class="right">Email ID:</label>
  605 + </v-flex>
  606 + <v-flex xs8 class="ml-3">
  607 + <v-text-field
  608 + placeholder="fill your email"
  609 + :rules="emailRules"
  610 + v-model="addSystemAdmin.email"
  611 + type="text"
  612 + name="email"
  613 + required
  614 + ></v-text-field>
  615 + </v-flex>
  616 + </v-layout>
  617 + </v-flex>
  618 + </v-layout>
  619 + <v-layout>
  620 + <v-flex xs12 sm6>
  621 + <v-layout>
  622 + <v-flex xs4 sm4 class="pt-4 subheading">
  623 + <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label>
  624 + <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label>
  625 + </v-flex>
  626 + <v-flex xs8 class="ml-3">
  627 + <v-menu
  628 + ref="menu"
  629 + :close-on-content-click="false"
  630 + v-model="menu"
  631 + :nudge-right="40"
  632 + lazy
  633 + transition="scale-transition"
  634 + offset-y
  635 + full-width
  636 + min-width="290px"
  637 + >
  638 + <v-text-field
  639 + slot="activator"
  640 + :rules="dateRules"
  641 + v-model="addSystemAdmin.date"
  642 + placeholder="Select date"
  643 + ></v-text-field>
  644 + <v-date-picker
  645 + ref="picker"
  646 + v-model="addSystemAdmin.date"
  647 + :max="new Date().toISOString().substr(0, 10)"
  648 + min="1950-01-01"
  649 + @input="menu = false"
  650 + ></v-date-picker>
  651 + </v-menu>
  652 + </v-flex>
  653 + </v-layout>
  654 + </v-flex>
  655 + <v-flex xs12 sm6>
  656 + <v-layout>
  657 + <v-flex xs4 class="pt-4 subheading">
  658 + <label class="right">Gender:</label>
  659 + </v-flex>
  660 + <v-flex xs8 class="ml-3">
  661 + <v-select
  662 + v-model="addSystemAdmin.gender"
  663 + :items="gender"
  664 + label="Select your City Name"
  665 + :rules="cityRules"
  666 + required
  667 + ></v-select>
  668 + </v-flex>
  669 + </v-layout>
  670 + </v-flex>
  671 + </v-layout>
  672 + <v-layout>
  673 + <v-flex xs12 sm6>
  674 + <v-layout>
  675 + <v-flex xs4 class="pt-4 subheading">
  676 + <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
  677 + <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label>
  678 + </v-flex>
  679 + <v-flex xs8 class="ml-3">
  680 + <v-text-field
  681 + v-model="addSystemAdmin.mobileNo"
  682 + placeholder="fill your Mobile No."
  683 + name="mobileNo"
  684 + type="number"
  685 + :rules="mobileNoRules"
  686 + required
  687 + ></v-text-field>
  688 + </v-flex>
  689 + </v-layout>
  690 + </v-flex>
  691 + <v-flex xs12 sm6>
  692 + <v-layout>
  693 + <v-flex xs4 class="pt-4 subheading">
  694 + <label class="right hidden-xs-only hidden-sm-only">Religion:</label>
  695 + <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Religion:</label>
  696 + </v-flex>
  697 + <v-flex xs8 class="ml-3">
  698 + <v-text-field
  699 + v-model="addSystemAdmin.religion"
  700 + :rules="religion"
  701 + placeholder="fill your Religion"
  702 + required
  703 + ></v-text-field>
  704 + </v-flex>
  705 + </v-layout>
  706 + </v-flex>
  707 + </v-layout>
  708 + <v-layout>
  709 + <v-flex xs12 sm6>
  710 + <v-layout>
  711 + <v-flex xs4 class="pt-4 subheading">
  712 + <label class="right">Join Date:</label>
  713 + </v-flex>
  714 + <v-flex xs8 class="ml-3">
  715 + <v-menu
  716 + ref="menu1"
  717 + :close-on-content-click="false"
  718 + v-model="menu1"
  719 + :nudge-right="40"
  720 + lazy
  721 + transition="scale-transition"
  722 + offset-y
  723 + full-width
  724 + min-width="290px"
  725 + >
  726 + <v-text-field
  727 + slot="activator"
  728 + :rules="joinDateRules"
  729 + v-model="addSystemAdmin.joinDate"
  730 + placeholder="Select date"
  731 + ></v-text-field>
  732 + <v-date-picker
  733 + ref="picker"
  734 + v-model="addSystemAdmin.joinDate"
  735 + :max="new Date().toISOString().substr(0, 10)"
  736 + min="1950-01-01"
  737 + @input="menu1 = false"
  738 + ></v-date-picker>
  739 + </v-menu>
  740 + </v-flex>
  741 + </v-layout>
  742 + </v-flex>
  743 + <v-flex xs12 sm6>
  744 + <v-layout>
  745 + <v-flex xs4 class="pt-4 subheading">
  746 + <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
  747 + <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label>
  748 + </v-flex>
  749 + <v-flex xs8 class="ml-3">
  750 + <v-text-field
  751 + label="Select Image"
  752 + @click="pickFile"
  753 + v-model="imageName"
  754 + append-icon="attach_file"
  755 + ></v-text-field>
  756 + <input
  757 + type="file"
  758 + style="display:none"
  759 + ref="image"
  760 + accept="image/*"
  761 + @change="onFilePicked"
  762 + />
  763 + </v-flex>
  764 + </v-layout>
  765 + </v-flex>
  766 + </v-layout>
  767 + <v-layout>
  768 + <v-flex xs12 sm6>
  769 + <v-layout>
  770 + <v-flex xs4 class="pt-4 subheading">
  771 + <label class="right">Username:</label>
  772 + </v-flex>
  773 + <v-flex xs8 class="ml-3">
  774 + <v-text-field
  775 + v-model="addSystemAdmin.username"
  776 + placeholder="fill your Username"
  777 + name="state"
  778 + :rules="userNameRules"
  779 + required
  780 + ></v-text-field>
  781 + </v-flex>
  782 + </v-layout>
  783 + </v-flex>
  784 + <v-flex xs12 sm6>
  785 + <v-layout>
  786 + <v-flex xs4 class="pt-4 subheading">
  787 + <label class="right">Password:</label>
  788 + </v-flex>
  789 + <v-flex xs8 class="ml-3">
  790 + <v-text-field
  791 + v-model="addSystemAdmin.Password"
  792 + placeholder="fill your Password"
  793 + :rules="password"
  794 + required
  795 + ></v-text-field>
  796 + </v-flex>
  797 + </v-layout>
  798 + </v-flex>
  799 + </v-layout>
  800 + <v-layout class="hidden-xs-only hidden-sm-only">
  801 + <v-flex xs12 sm6>
  802 + <v-layout>
  803 + <v-flex xs4 md4 class="pt-4 subheading">
  804 + <label class="right">Address:</label>
  805 + </v-flex>
  806 + <v-flex xs8 md8 class="ml-3">
  807 + <v-text-field
  808 + name="input-4-3"
  809 + v-model="addSystemAdmin.address"
  810 + :rules="address"
  811 + placeholder="fill Your Address"
  812 + required
  813 + ></v-text-field>
  814 + </v-flex>
  815 + </v-layout>
  816 + </v-flex>
  817 + </v-layout>
  818 + <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only">
  819 + <v-flex xs12 sm12>
  820 + <v-layout>
  821 + <v-flex xs12 sm12 class="pt-4 subheading text-xs-center">
  822 + <label class>Addres:</label>
  823 + </v-flex>
  824 + </v-layout>
  825 + <v-layout>
  826 + <v-flex xs12 sm12>
  827 + <v-textarea
  828 + name="input-4-3"
  829 + v-model="addSystemAdmin.address"
  830 + :rules="address"
  831 + placeholder="fill Your present Address"
  832 + required
  833 + ></v-textarea>
  834 + </v-flex>
  835 + </v-layout>
  836 + </v-flex>
  837 + <!-- <v-flex xs12 sm12>
  838 + <v-layout>
  839 + <v-flex xs12 sm12 class="pt-4 pr-4 subheading text-xs-center addressForm">
  840 + <label>Permanent Address:</label>
  841 + </v-flex>
  842 + </v-layout>
  843 + <v-layout>
  844 + <v-flex xs12 sm12>
  845 + <v-textarea
  846 + name="input-4-3"
  847 + v-model="addSystemAdmin.permanentAddress"
  848 + :rules="permanentAddress"
  849 + placeholder="fill Your Permanent Address"
  850 + required
  851 + ></v-textarea>
  852 + </v-flex>
  853 + </v-layout>
  854 + </v-flex> -->
  855 + </v-layout>
  856 + <v-layout class="mx-2">
  857 + <v-flex xs12 sm12>
  858 + <v-layout>
  859 + <v-flex xs6>
  860 + <v-btn @click="clear" round dark>clear</v-btn>
  861 + </v-flex>
  862 + <v-flex xs6>
  863 + <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn>
  864 + </v-flex>
  865 + </v-layout>
  866 + </v-flex>
  867 + </v-layout>
  868 + </v-container>
  869 + </v-form>
  870 + </v-card>
  871 + </v-flex>
  872 + </v-container>
  873 + </v-tab-item>
  874 + </v-tabs>
  875 + <div class="loader" v-if="showLoader">
  876 + <v-progress-circular indeterminate color="white"></v-progress-circular>
  877 + </div>
  878 + </v-app>
  879 +</template>
  880 +
  881 +<script>
  882 +import http from "@/Services/http.js";
  883 +import moment from "moment";
  884 +
  885 +export default {
  886 + data: () => ({
  887 + component: "report-generate",
  888 + snackbar: false,
  889 + y: "top",
  890 + x: "right",
  891 + mode: "",
  892 + timeout: 3000,
  893 + text: "",
  894 + showLoader: false,
  895 + loading: false,
  896 + date: null,
  897 + search: "",
  898 + menu: false,
  899 + menu1: false,
  900 + menu2: false,
  901 + menu3: false,
  902 + dialog: false,
  903 + dialog1: false,
  904 + valid: true,
  905 + isActive: true,
  906 + newActive: false,
  907 + pagination: {
  908 + rowsPerPage: 15
  909 + },
  910 + imageData: {},
  911 + imageName: "",
  912 + imageUrl: "",
  913 + imageFile: "",
  914 + nameRules: [v => !!v || " Full Name is required"],
  915 + dateRules: [v => !!v || " DOB is required"],
  916 + cityRules: [v => !!v || " City Name is required"],
  917 + password: [v => !!v || " Password is required"],
  918 + religion: [v => !!v || "Religion Name is required"],
  919 + permanentAddress: [v => !!v || " Permanent Address is required"],
  920 + address: [v => !!v || "Address is required"],
  921 + mobileNoRules: [v => !!v || "Mobile Number is required"],
  922 + userNameRules: [v => !!v || "Username Name is required"],
  923 + joinDateRules: [v => !!v || " Join Date is required"],
  924 + errorMessages: "",
  925 + emailRules: [
  926 + v => !!v || "E-mail is required",
  927 + v =>
  928 + /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) ||
  929 + "E-mail must be valid"
  930 + ],
  931 + countries: [],
  932 + headers: [
  933 + {
  934 + text: "No",
  935 + align: "center",
  936 + sortable: false,
  937 + value: "No"
  938 + },
  939 + {
  940 + text: "Profile Pic",
  941 + value: "profilePicUrl",
  942 + sortable: false,
  943 + align: "center"
  944 + },
  945 + { text: "Name", value: "name", sortable: false, align: "center" },
  946 + { text: "Email", value: "email", sortable: false, align: "center" },
  947 + { text: "Role", value: "role", sortable: false, align: "center" },
  948 + {
  949 + text: "Status",
  950 + value: "status",
  951 + sortable: false,
  952 + align: "center"
  953 + },
  954 + { text: "Action", value: "", sortable: false, align: "center" }
  955 + ],
  956 + gender:['Male','Female'],
  957 + desserts: [],
  958 + editedIndex: -1,
  959 + upload: "",
  960 + editedItem: {},
  961 + addSystemAdmin: {},
  962 + }),
  963 + watch: {
  964 + menu(val) {
  965 + val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
  966 + },
  967 + menu1(val) {
  968 + val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
  969 + }
  970 + },
  971 + methods: {
  972 + save(date) {
  973 + this.$refs.menu.save(date);
  974 + },
  975 + save(date) {
  976 + this.$refs.menu1.save(date);
  977 + },
  978 + pickFile() {
  979 + this.$refs.image.click();
  980 + },
  981 + onFilePicked(e) {
  982 + // console.log(e)
  983 + const files = e.target.files;
  984 + this.upload = e.target.files[0];
  985 + console.log("imageData-upload========>", this.upload);
  986 + if (files[0] !== undefined) {
  987 + this.imageName = files[0].name;
  988 + if (this.imageName.lastIndexOf(".") <= 0) {
  989 + return;
  990 + }
  991 + const fr = new FileReader();
  992 + fr.readAsDataURL(files[0]);
  993 + fr.addEventListener("load", () => {
  994 + this.imageUrl = fr.result;
  995 + this.imageFile = files[0]; // this is an image file that can be sent to server...
  996 + // this.imageData.imageUrl = URL.createObjectURL(this.imageFile);
  997 + // console.log("upload=======>", this.imageData.imageUrl);
  998 + console.log("imageFile", this.imageUrl);
  999 + });
  1000 + } else {
  1001 + this.imageName = "";
  1002 + this.imageFile = "";
  1003 + this.imageUrl = "";
  1004 + }
  1005 + },
  1006 + dates: function(date) {
  1007 + return moment(date).format("MMMM DD, YYYY");
  1008 + },
  1009 + getSystemAdminList() {
  1010 + this.showLoader = true;
  1011 + var token = this.$store.state.token;
  1012 + http()
  1013 + .get("/getTeachersList", {
  1014 + headers: { Authorization: "Bearer " + token }
  1015 + })
  1016 + .then(response => {
  1017 + this.desserts = response.data.data;
  1018 + this.showLoader = false;
  1019 + // console.log("getTeacherList=====>",this.desserts)
  1020 + })
  1021 + .catch(error => {
  1022 + this.showLoader = false;
  1023 + if (error.response.status === 401) {
  1024 + this.$router.replace({ path: "/" });
  1025 + this.$store.dispatch("setToken", null);
  1026 + this.$store.dispatch("Id", null);
  1027 + }
  1028 + });
  1029 + },
  1030 + editItem(item) {
  1031 + this.editedIndex = this.desserts.indexOf(item);
  1032 + this.editedItem = Object.assign({}, item);
  1033 + this.editedItem.dob =
  1034 + this.editedItem.dob != undefined
  1035 + ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10))
  1036 + : (this.editedItem.dob = "");
  1037 + this.editedItem.joinDate =
  1038 + this.editedItem.joinDate != undefined
  1039 + ? (this.editedItem.joinDate = this.editedItem.joinDate.substring(
  1040 + 0,
  1041 + 10
  1042 + ))
  1043 + : (this.editedItem.joinDate = "");
  1044 +
  1045 + this.dialog = true;
  1046 + },
  1047 + profile(item) {
  1048 + this.editedIndex = this.desserts.indexOf(item);
  1049 + this.editedItem = Object.assign({}, item);
  1050 + this.dialog1 = true;
  1051 + },
  1052 + deleteItem(item) {
  1053 + let deleteTeachers = {
  1054 + teacherId: item._id
  1055 + };
  1056 + // console.log("deleteUers",deleteTeachers)
  1057 + http()
  1058 + .delete(
  1059 + "/deleteTeacher",
  1060 + confirm("Are you sure you want to delete this?") && {
  1061 + params: deleteTeachers
  1062 + }
  1063 + )
  1064 + .then(response => {
  1065 + // console.log("deleteUers",deleteTeachers)
  1066 + if ((this.snackbar = true)) {
  1067 + this.text = "Successfully delete Existing Teacher";
  1068 + }
  1069 + this.getSystemAdminList();
  1070 + })
  1071 + .catch(error => {
  1072 + console.log(error);
  1073 + });
  1074 + },
  1075 + activeTab(type) {
  1076 + switch (type) {
  1077 + case "existing":
  1078 + this.newActive = false;
  1079 + this.isActive = true;
  1080 + break;
  1081 +
  1082 + default:
  1083 + this.newActive = true;
  1084 + this.isActive = false;
  1085 + break;
  1086 + }
  1087 + },
  1088 + close() {
  1089 + this.dialog = false;
  1090 + setTimeout(() => {
  1091 + this.editedItem = Object.assign({}, this.defaultItem);
  1092 + this.editedIndex = -1;
  1093 + }, 300);
  1094 + },
  1095 + close1() {
  1096 + this.dialog1 = false;
  1097 + },
  1098 + submit() {
  1099 + if (this.$refs.form.validate()) {
  1100 + let addTeacher = {
  1101 + // name: this.addTeachers.name,
  1102 + // email: this.addTeachers.email,
  1103 + // role: this.addTeachers.role,
  1104 + // dob: this.addTeachers.date,
  1105 + // city: this.addTeachers.city,
  1106 + // pincode: this.addTeachers.pincode,
  1107 + // country: this.addTeachers.country,
  1108 + // permanentAddress: this.addTeachers.permanentAddress,
  1109 + // presentAddress: this.addTeachers.presentAddress,
  1110 + // mobileNo: this.addTeachers.mobileNo,
  1111 + // state: this.addTeachers.state,
  1112 + // joinDate: this.addTeachers.joinDate
  1113 + };
  1114 + if (this.imageUrl) {
  1115 + var str = this.imageUrl;
  1116 + const [baseUrl, imageUrl] = str.split(/,/);
  1117 + addTeacher.upload = imageUrl;
  1118 + }
  1119 + this.loading = true;
  1120 + http()
  1121 + .post("/createTeacher", addTeacher)
  1122 + .then(response => {
  1123 + this.imageUrl = "";
  1124 + this.getTeacherList();
  1125 + this.snackbar = true;
  1126 + this.text = "New Teacher added successfully";
  1127 + this.clear();
  1128 + this.loading = false;
  1129 + })
  1130 + .catch(error => {
  1131 + // console.log(error);
  1132 + if ((this.snackbar = true)) {
  1133 + this.text = error.response.data.message;
  1134 + }
  1135 + this.loading = false;
  1136 + });
  1137 + }
  1138 + },
  1139 + clear() {
  1140 + this.$refs.form.reset();
  1141 + this.imageUrl = "";
  1142 + },
  1143 + save() {
  1144 + this.loading = true;
  1145 + let editTeacher = {};
  1146 + if (this.imageUrl) {
  1147 + var str = this.imageUrl;
  1148 + const [baseUrl, imageUrl] = str.split(/,/);
  1149 + editTeacher.upload = imageUrl;
  1150 + }
  1151 + http()
  1152 + .put("/updateTeacher", editTeacher)
  1153 + .then(response => {
  1154 + console.log("editTeacher", editTeacher);
  1155 + this.snackbar = true;
  1156 + this.text = "Successfully Edit Existing Teacher";
  1157 + this.loading = false;
  1158 + this.getTeacherList();
  1159 + this.close();
  1160 + })
  1161 + .catch(error => {
  1162 + console.log(error);
  1163 + this.loading = false;
  1164 + });
  1165 + }
  1166 + },
  1167 + mounted() {
  1168 + // this.getSystemAdminList();
  1169 + },
  1170 + created() {
  1171 + this.$root.$on("app:search", search => {
  1172 + this.search = search;
  1173 + });
  1174 + },
  1175 + beforeDestroy() {
  1176 + // dont forget to remove the listener
  1177 + this.$root.$off("app:search");
  1178 + }
  1179 +};
  1180 +</script>
  1181 +<style scoped>
  1182 +.active {
  1183 + background-color: gray;
  1184 + color: white !important;
  1185 +}
  1186 +.activebtn {
  1187 + color: black !important;
  1188 +}
  1189 +</style>
0 1190 \ No newline at end of file
... ...
src/pages/Exam/examSchedule.vue
... ... @@ -71,7 +71,6 @@
71 71 :items="classList"
72 72 item-text="classNum"
73 73 item-value="_id"
74   - :rules="classRules"
75 74 @change="getSections(editedItem.classId)"
76 75 required
77 76 ></v-select>
... ... @@ -91,7 +90,6 @@
91 90 item-text="name"
92 91 item-value="_id"
93 92 name="Select Section"
94   - :rules="sectionRules"
95 93 required
96 94 ></v-select>
97 95 </v-flex>
... ... @@ -110,7 +108,6 @@
110 108 item-text="subjectName"
111 109 item-value="subjectName"
112 110 name="Select Section"
113   - :rules="sectionRules"
114 111 required
115 112 ></v-select>
116 113 </v-flex>
... ... @@ -170,7 +167,6 @@
170 167 v-model="editedItem.timeFrom"
171 168 label="Select your time From"
172 169 append-icon="access_time"
173   - :rules="timeInRules"
174 170 ></v-text-field>
175 171 <v-time-picker
176 172 v-model="editedItem.timeIn"
... ... @@ -204,7 +200,6 @@
204 200 v-model="editedItem.timeTo"
205 201 label="Select your Time To"
206 202 append-icon="access_time"
207   - :rules="timeOutRules"
208 203 ></v-text-field>
209 204 <v-time-picker
210 205 v-model="editedItem.timeTo"
... ... @@ -372,7 +367,6 @@
372 367 :items="classList"
373 368 item-text="classNum"
374 369 item-value="_id"
375   - :rules="classRules"
376 370 @change="getSchedulesList()"
377 371 required
378 372 ></v-select>
... ... @@ -509,12 +503,12 @@
509 503 <v-flex xs7 sm4 class="ml-3">
510 504 <v-select
511 505 :items="subjects"
512   - label="Select Section"
  506 + label="Select Subject"
513 507 v-model="addSchedule.subjectName"
514 508 item-text="subjectName"
515 509 item-value="subjectName"
516 510 name="Select Section"
517   - :rules="sectionRules"
  511 + :rules="subjectRules"
518 512 required
519 513 ></v-select>
520 514 </v-flex>
... ... @@ -694,6 +688,7 @@ export default {
694 688 examNameRules: [v => !!v || "Exam Name is required"],
695 689 classRules: [v => !!v || "Class Name is required"],
696 690 sectionRules: [v => !!v || "section is required"],
  691 + subjectRules: [v => !!v || "Subject is required"],
697 692 timeInRules: [v => !!v || "Time In is required"],
698 693 timeOutRules: [v => !!v || "time Out s is required"],
699 694 roomRules: [v => !!v || "Room is required"],
... ...
src/pages/Library/eBook.vue
... ... @@ -704,7 +704,7 @@ export default {
704 704 this.token = this.$store.state.token;
705 705 this.getEBooksList();
706 706 this.getAllClass();
707   - this.getBookData();
  707 + // this.getBookData();
708 708 // this.editItem;
709 709 },
710 710 created() {
... ...
src/pages/Mark/mark.vue
... ... @@ -0,0 +1,944 @@
  1 + <template>
  2 + <v-app id="pages-dasboard">
  3 + <v-tabs grow slider-color="gray">
  4 + <v-tab
  5 + ripple
  6 + @click="activeTab('existing')"
  7 + v-bind:class="{ active: isActive }"
  8 + id="tab"
  9 + class="subheading"
  10 + >Existing Mark</v-tab>
  11 + <v-tab
  12 + ripple
  13 + @click="activeTab('new')"
  14 + v-bind:class="{ active: newActive }"
  15 + id="tab1"
  16 + User
  17 + class="subheading"
  18 + >Add Mark</v-tab>
  19 +
  20 + <!-- ****** Edit Mark ****** -->
  21 +
  22 + <v-tab-item>
  23 + <!-- <v-snackbar
  24 + :timeout="timeout"
  25 + :top="y === 'top'"
  26 + :right="x === 'right'"
  27 + :vertical="mode === 'vertical'"
  28 + v-model="snackbar"
  29 + color="success"
  30 + >{{ text }}</v-snackbar>
  31 + <v-dialog v-model="dialog" max-width="800px" scrollable>
  32 + <v-card flat>
  33 + <v-toolbar class="grey lighten-2" flat>
  34 + <v-spacer></v-spacer>
  35 + <v-toolbar-title>
  36 + <h3>Edit Mark</h3>
  37 + </v-toolbar-title>
  38 + <v-spacer></v-spacer>
  39 + </v-toolbar>
  40 + <v-card-text style="height:670px;">
  41 + <v-form ref="form">
  42 + <v-container fluid>
  43 + <v-layout>
  44 + <v-flex xs12 sm12>
  45 + <v-layout>
  46 + <v-flex xs4 class="pt-4 subheading">
  47 + <label class="right">Exam Name:</label>
  48 + </v-flex>
  49 + <v-flex xs5 class="ml-3">
  50 + <v-select
  51 + :rules="examNameRules"
  52 + :items="examList"
  53 + v-model="editedItem.examName"
  54 + label="Select your Exam Name"
  55 + item-text="examName"
  56 + item-value="examName"
  57 + ></v-select>
  58 + </v-flex>
  59 + </v-layout>
  60 + </v-flex>
  61 + <v-flex xs12 sm12>
  62 + <v-layout>
  63 + <v-flex xs4 class="pt-4 subheading">
  64 + <label class="right">Class:</label>
  65 + </v-flex>
  66 + <v-flex xs5 class="ml-3">
  67 + <v-select
  68 + v-model="editedItem.classId"
  69 + label="Select your Class"
  70 + type="text"
  71 + :items="classList"
  72 + item-text="classNum"
  73 + item-value="_id"
  74 + @change="getSections(editedItem.classId)"
  75 + required
  76 + ></v-select>
  77 + </v-flex>
  78 + </v-layout>
  79 + </v-flex>
  80 + <v-flex xs12 sm12>
  81 + <v-layout>
  82 + <v-flex xs4 class="pt-4 subheading">
  83 + <label class="right">Section:</label>
  84 + </v-flex>
  85 + <v-flex xs5 class="ml-3">
  86 + <v-select
  87 + :items="addSection"
  88 + label="Select your section"
  89 + v-model="editedItem.sectionId"
  90 + item-text="name"
  91 + item-value="_id"
  92 + name="Select Section"
  93 + :rules="sectionRules"
  94 + required
  95 + ></v-select>
  96 + </v-flex>
  97 + </v-layout>
  98 + </v-flex>
  99 + <v-flex xs12 sm12>
  100 + <v-layout>
  101 + <v-flex xs4 class="pt-4 subheading">
  102 + <label class="right">Subject Name:</label>
  103 + </v-flex>
  104 + <v-flex xs5 class="ml-3">
  105 + <v-select
  106 + :items="subjects"
  107 + label="Select your Subject Name"
  108 + v-model="editedItem.subjectName"
  109 + item-text="subjectName"
  110 + item-value="subjectName"
  111 + name="Select Section"
  112 + :rules="sectionRules"
  113 + required
  114 + ></v-select>
  115 + </v-flex>
  116 + </v-layout>
  117 + </v-flex>
  118 + </v-layout>
  119 + <v-layout>
  120 + <v-flex xs12 sm8 offset-sm2>
  121 + <v-card-actions>
  122 + <v-btn round dark @click.native="close">Close</v-btn>
  123 + <v-spacer></v-spacer>
  124 + <v-btn round dark @click="save">Save</v-btn>
  125 + </v-card-actions>
  126 + </v-flex>
  127 + </v-layout>
  128 + </v-container>
  129 + </v-form>
  130 + </v-card-text>
  131 + </v-card>
  132 + </v-dialog>-->
  133 +
  134 + <!-- ****** PROFILE VIEW Exam ****** -->
  135 +
  136 + <!-- <v-dialog v-model="dialog1" max-width="600px">
  137 + <v-card>
  138 + <v-toolbar color="grey lighten-2" flat>
  139 + <v-spacer></v-spacer>
  140 + <v-toolbar-title>
  141 + <h3>Mark</h3>
  142 + </v-toolbar-title>
  143 + <v-spacer></v-spacer>
  144 + <v-icon @click="close1">close</v-icon>
  145 + </v-toolbar>
  146 + <v-card-text>
  147 + <v-container grid-list-md>
  148 + <v-layout wrap>
  149 + <v-flex>
  150 + <v-layout>
  151 + <v-flex xs5 sm6>
  152 + <h5 class="right my-1">
  153 + <b>Exam Name:</b>
  154 + </h5>
  155 + </v-flex>
  156 + <v-flex sm6 xs8>
  157 + <h5 class="my-1">{{ editedItem.examName }}</h5>
  158 + </v-flex>
  159 + </v-layout>
  160 + <v-layout>
  161 + <v-flex xs5 sm6>
  162 + <h5 class="right my-1">
  163 + <b>Class:</b>
  164 + </h5>
  165 + </v-flex>
  166 + <v-flex sm6 xs8>
  167 + <h5 class="my-1">{{ editedItem.classId }}</h5>
  168 + </v-flex>
  169 + </v-layout>
  170 + <v-layout>
  171 + <v-flex xs5 sm6>
  172 + <h5 class="right my-1">
  173 + <b>Section:</b>
  174 + </h5>
  175 + </v-flex>
  176 + <v-flex sm6 xs8>
  177 + <h5 class="my-1">{{ editedItem.sectionId }}</h5>
  178 + </v-flex>
  179 + </v-layout>
  180 + <v-layout>
  181 + <v-flex xs5 sm6>
  182 + <h5 class="right my-1">
  183 + <b>Subject Name:</b>
  184 + </h5>
  185 + </v-flex>
  186 + <v-flex sm6 xs8>
  187 + <h5 class="my-1">{{ editedItem.subjectName }}</h5>
  188 + </v-flex>
  189 + </v-layout>
  190 + <v-layout>
  191 + <v-flex xs5 sm6>
  192 + <h5 class="right my-1">
  193 + <b>Date:</b>
  194 + </h5>
  195 + </v-flex>
  196 + <v-flex sm6 xs8>
  197 + <h5 class="my-1">{{ dates(editedItem.date) }}</h5>
  198 + </v-flex>
  199 + </v-layout>
  200 + <v-layout>
  201 + <v-flex xs5 sm6>
  202 + <h5 class="right my-1">
  203 + <b>Time From:</b>
  204 + </h5>
  205 + </v-flex>
  206 + <v-flex sm6 xs8>
  207 + <h5 class="my-1">{{ editedItem.timeFrom }}</h5>
  208 + </v-flex>
  209 + </v-layout>
  210 + <v-layout>
  211 + <v-flex xs5 sm6>
  212 + <h5 class="right my-1">
  213 + <b>Time To:</b>
  214 + </h5>
  215 + </v-flex>
  216 + <v-flex sm6 xs8>
  217 + <h5 class="my-1">{{ editedItem.timeTo }}</h5>
  218 + </v-flex>
  219 + </v-layout>
  220 + <v-layout>
  221 + <v-flex xs5 sm6>
  222 + <h5 class="right my-1">
  223 + <b>Room:</b>
  224 + </h5>
  225 + </v-flex>
  226 + <v-flex sm6 xs8>
  227 + <h5 class="my-1">{{ editedItem.room }}</h5>
  228 + </v-flex>
  229 + </v-layout>
  230 + </v-flex>
  231 + </v-layout>
  232 + </v-container>
  233 + </v-card-text>
  234 + </v-card>
  235 + </v-dialog>-->
  236 +
  237 + <v-snackbar
  238 + :timeout="timeout"
  239 + :top="y === 'top'"
  240 + :right="x === 'right'"
  241 + :vertical="mode === 'vertical'"
  242 + v-model="snackbar"
  243 + color="success"
  244 + >{{ text }}</v-snackbar>
  245 +
  246 + <!-- ****** EXISTING MARK TABLE ****** -->
  247 +
  248 + <v-card flat>
  249 + <v-flex xs12 sm12 lg12>
  250 + <v-layout wrap>
  251 + <v-flex xs12 sm12 lg3>
  252 + <v-layout>
  253 + <v-flex xs3 sm6 lg2 class="subheading mt-4">
  254 + <label class="right">Class:</label>
  255 + </v-flex>
  256 + <v-flex xs12 sm12 lg8 class="ml-2">
  257 + <v-select
  258 + v-model="getMark.classId"
  259 + label="Select your class"
  260 + type="text"
  261 + :items="classList"
  262 + item-text="classNum"
  263 + item-value="_id"
  264 + @change="getSections(getMark.classId)"
  265 + required
  266 + ></v-select>
  267 + </v-flex>
  268 + </v-layout>
  269 + </v-flex>
  270 + <v-flex xs12 sm12 lg3>
  271 + <v-layout>
  272 + <v-flex xs3 sm6 lg2 class="subheading mt-4">
  273 + <label class="right">Section:</label>
  274 + </v-flex>
  275 + <v-flex xs12 sm12 lg8 class="ml-2">
  276 + <v-select
  277 + :items="addSection"
  278 + label="Select your Section"
  279 + v-model="getMark.sectionId"
  280 + item-text="name"
  281 + item-value="_id"
  282 + name="Select Section"
  283 + required
  284 + ></v-select>
  285 + </v-flex>
  286 + </v-layout>
  287 + </v-flex>
  288 + <v-flex xs12 sm12 lg6>
  289 + <v-btn @click="getStudents" round dark :loading="loading" class="right mt-4">Mark</v-btn>
  290 + </v-flex>
  291 + </v-layout>
  292 + </v-flex>
  293 + </v-card>
  294 + <v-data-table
  295 + :headers="headers"
  296 + :items="getStudentsList"
  297 + :pagination.sync="pagination"
  298 + :search="search"
  299 + >
  300 + <template slot="items" slot-scope="props">
  301 + <td class="text-xs-center">{{ props.index + 1}}</td>
  302 + <td id="td" class="text-xs-center">
  303 + <v-avatar>
  304 + <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
  305 + <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
  306 + </v-avatar>
  307 + </td>
  308 + <td id="td" class="text-xs-center">{{ props.item.name}}</td>
  309 + <td id="td" class="text-xs-center">{{ props.item.rollNo }}</td>
  310 + <td id="td" class="text-xs-center">{{ props.item.email }}</td>
  311 + <td class="text-xs-center">
  312 + <span>
  313 + <!-- <img
  314 + style="cursor:pointer; width:25px; height:18px; "
  315 + class="mr-5"
  316 + @click="profile(props.item)"
  317 + src="/static/icon/eye1.png"
  318 + />-->
  319 + <router-link :to="{ name:'viewMark',params: { markId:props.item._id } }">
  320 + <img
  321 + style="cursor:pointer; width:20px; height:18px; "
  322 + class="mr-5"
  323 + src="/static/icon/edit1.png"
  324 + />
  325 + </router-link>
  326 + <!-- <img
  327 + style="cursor:pointer;width:20px; height:20px; "
  328 + class="mr-5"
  329 + @click="deleteSchedule(props.item)"
  330 + src="/static/icon/delete1.png"
  331 + />-->
  332 + </span>
  333 + </td>
  334 + </template>
  335 + <v-alert
  336 + slot="no-results"
  337 + :value="true"
  338 + color="error"
  339 + icon="warning"
  340 + >Your search for "{{ search }}" found no results.</v-alert>
  341 + </v-data-table>
  342 + </v-tab-item>
  343 +
  344 + <!-- ****** ADD Mark Schedule ****** -->
  345 +
  346 + <v-tab-item>
  347 + <v-snackbar
  348 + :timeout="timeout"
  349 + :top="y === 'top'"
  350 + :right="x === 'right'"
  351 + :vertical="mode === 'vertical'"
  352 + v-model="snackbar"
  353 + :color="color"
  354 + >{{ text }}</v-snackbar>
  355 + <v-form ref="form" v-model="valid" lazy-validation>
  356 + <v-container fluid>
  357 + <v-flex xs12 sm12 lg12>
  358 + <v-layout wrap>
  359 + <v-flex xs12 sm12 lg10>
  360 + <v-layout wrap>
  361 + <v-flex xs12 sm12 lg3>
  362 + <v-flex xs3 sm2 lg2 class="subheading">
  363 + <label>Exam:</label>
  364 + </v-flex>
  365 + <v-flex xs12 sm12 lg10>
  366 + <v-select
  367 + label="Select your Exam Name"
  368 + :items="examList"
  369 + v-model="addMark.examId"
  370 + :rules="examRules"
  371 + item-text="examName"
  372 + item-value="_id"
  373 + ></v-select>
  374 + </v-flex>
  375 + </v-flex>
  376 + <v-flex xs12 sm12 lg3>
  377 + <v-flex xs3 sm6 lg2 class="subheading">
  378 + <label>Class:</label>
  379 + </v-flex>
  380 + <v-flex xs12 sm12 lg10 class>
  381 + <v-select
  382 + v-model="addMark.classId"
  383 + label="Select your class"
  384 + type="text"
  385 + :items="classList"
  386 + item-text="classNum"
  387 + item-value="_id"
  388 + :rules="classRules"
  389 + @change="getSections(addMark.classId)"
  390 + required
  391 + ></v-select>
  392 + </v-flex>
  393 + </v-flex>
  394 + <v-flex xs12 sm12 lg3>
  395 + <v-flex xs3 sm6 lg2 class="subheading">
  396 + <label>Section:</label>
  397 + </v-flex>
  398 + <v-flex xs12 sm12 lg10 class>
  399 + <v-select
  400 + :items="addSection"
  401 + label="Select your Section"
  402 + v-model="addMark.sectionId"
  403 + item-text="name"
  404 + item-value="_id"
  405 + name="Select Section"
  406 + :rules="sectionRules"
  407 + required
  408 + ></v-select>
  409 + </v-flex>
  410 + </v-flex>
  411 + <v-flex xs12 sm12 lg3>
  412 + <v-flex xs3 sm6 lg2 class="subheading">
  413 + <label>Subject:</label>
  414 + </v-flex>
  415 + <v-flex xs12 sm12 lg10 class>
  416 + <v-select
  417 + :items="subjects"
  418 + label="Select your Subject"
  419 + v-model="addMark.subjectId"
  420 + item-text="subjectName"
  421 + item-value="_id"
  422 + name="Select Section"
  423 + :rules="subjectRules"
  424 + required
  425 + ></v-select>
  426 + </v-flex>
  427 + </v-flex>
  428 + </v-layout>
  429 + </v-flex>
  430 + <v-flex xs12 sm12 lg2>
  431 + <v-flex xs12 sm12 lg12>
  432 + <v-btn
  433 + @click="findStudents"
  434 + round
  435 + dark
  436 + :loading="loading"
  437 + class="right mt-4"
  438 + >Mark</v-btn>
  439 + </v-flex>
  440 + </v-flex>
  441 + </v-layout>
  442 + </v-flex>
  443 + <v-card class="mt-4">
  444 + <v-data-table
  445 + :headers="headerOfMark"
  446 + :items="getStudentData"
  447 + :pagination.sync="pagination"
  448 + :search="search"
  449 + >
  450 + <template slot="items" slot-scope="props">
  451 + <td class="text-xs-center">{{ props.index + 1}}</td>
  452 + <td id="td" class="text-xs-center">
  453 + <v-avatar>
  454 + <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
  455 + <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
  456 + </v-avatar>
  457 + </td>
  458 + <td id="td" class="text-xs-center">{{ props.item.name}}</td>
  459 + <td id="td" class="text-xs-center">{{ props.item.rollNo }}</td>
  460 + <td
  461 + id="td"
  462 + class="text-xs-center markTable"
  463 + v-for="marks in props.item.marksObtained"
  464 + >
  465 + <v-text-field v-model="marks.marksScored"></v-text-field>
  466 + </td>
  467 + </template>
  468 + <v-alert
  469 + slot="no-results"
  470 + :value="true"
  471 + color="error"
  472 + icon="warning"
  473 + >Your search for "{{ search }}" found no results.</v-alert>
  474 + </v-data-table>
  475 + </v-card>
  476 + <v-layout class="mt-2">
  477 + <v-flex xs12 sm12>
  478 + <v-layout>
  479 + <v-flex xs12>
  480 + <v-btn @click="submit" round dark :loading="loading" class="right">Add Mark</v-btn>
  481 + </v-flex>
  482 + </v-layout>
  483 + </v-flex>
  484 + </v-layout>
  485 + </v-container>
  486 + </v-form>
  487 + </v-tab-item>
  488 + </v-tabs>
  489 + <div class="loader" v-if="showLoader">
  490 + <v-progress-circular indeterminate color="white"></v-progress-circular>
  491 + </div>
  492 + </v-app>
  493 +</template>
  494 +
  495 +<script>
  496 +import http from "@/Services/http.js";
  497 +import moment from "moment";
  498 +
  499 +export default {
  500 + data: () => ({
  501 + snackbar: false,
  502 + date: null,
  503 + // editDate: false,
  504 + // menu1: false,
  505 + // menuB: false,
  506 + // menu2: false,
  507 + // menuEdit: false,
  508 + // timeToEdit: false,
  509 + color: "",
  510 + y: "top",
  511 + x: "right",
  512 + mode: "",
  513 + timeout: 10000,
  514 + text: "",
  515 + loading: false,
  516 + // date: null,
  517 + search: "",
  518 + showLoader: false,
  519 + dialog: false,
  520 + dialog1: false,
  521 + valid: true,
  522 + isActive: true,
  523 + newActive: false,
  524 + addSection: [],
  525 + pagination: {
  526 + rowsPerPage: 15
  527 + },
  528 + classRules: [v => !!v || "Class is required"],
  529 + sectionRules: [v => !!v || "section is required"],
  530 + subjectRules: [v => !!v || "Subject is required"],
  531 + examRules: [v => !!v || "Exam is required"],
  532 +
  533 + headerOfMark: [
  534 + // {
  535 + // align: "justify-center",
  536 + // text: "#",
  537 + // sortable: false,
  538 + // value: "index"
  539 + // },
  540 + {
  541 + align: "justify-center",
  542 + text: "No",
  543 + sortable: false,
  544 + value: "No"
  545 + },
  546 + {
  547 + text: "Profile Pic",
  548 + vaue: "profilePicUrl",
  549 + sortable: false,
  550 + align: "center"
  551 + },
  552 + {
  553 + text: "Name",
  554 + vaue: "name",
  555 + sortable: false,
  556 + align: "center"
  557 + },
  558 + {
  559 + text: "Roll No.",
  560 + value: "rollNo",
  561 + sortable: false,
  562 + align: "center"
  563 + }
  564 + // {
  565 + // text: "Distribution Type",
  566 + // value: "distributionType",
  567 + // sortable: false,
  568 + // align: "center"
  569 + // },
  570 + // { text: "markValue", value: "markValue", sortable: false, align: "center" },
  571 + // {
  572 + // text: "Roll No.",
  573 + // align: "center",
  574 + // sortable: false,
  575 + // value: "rollNo"
  576 + // },
  577 + // { text: "Exam", value: "exam", sortable: false, align: "center" },
  578 + // {
  579 + // text: "ASSIGNMENT",
  580 + // value: "assignment",
  581 + // sortable: false,
  582 + // align: "center"
  583 + // }
  584 + ],
  585 + headers: [
  586 + {
  587 + align: "justify-center",
  588 + text: "No",
  589 + sortable: false,
  590 + value: "No"
  591 + },
  592 + {
  593 + text: "Profile Pic",
  594 + vaue: "profilePicUrl",
  595 + sortable: false,
  596 + align: "center"
  597 + },
  598 + {
  599 + text: "Name",
  600 + vaue: "name",
  601 + sortable: false,
  602 + align: "center"
  603 + },
  604 + {
  605 + text: "Roll No.",
  606 + value: "rollNo",
  607 + sortable: false,
  608 + align: "center"
  609 + },
  610 + {
  611 + text: "Email",
  612 + value: "email",
  613 + sortable: false,
  614 + align: "center"
  615 + },
  616 + { text: "Action", value: "", sortable: false, align: "center" }
  617 + ],
  618 + classList: [],
  619 + examList: [],
  620 + subjects: [],
  621 + addMark: {},
  622 + getMark: {},
  623 + // editedItem: {},
  624 + getScheduleData: {},
  625 + markData: [],
  626 + getStudentData: [],
  627 + getStudentsList: [],
  628 + token: ""
  629 + }),
  630 + methods: {
  631 + // dates: function(date) {
  632 + // return moment(date).format("MMMM DD, YYYY");
  633 + // },
  634 + // pickFile() {
  635 + // this.$refs.image.click();
  636 + // },
  637 + // getStudentsList() {
  638 + // this.showLoader = true;
  639 + // http()
  640 + // .get("/getStudentsList", {
  641 + // params: { classId: this.getScheduleData.classId },
  642 + // headers: { Authorization: "Bearer " + this.token }
  643 + // })
  644 + // .then(response => {
  645 + // this.getStudentsList = response.data.data;
  646 + // this.showLoader = false;
  647 + // })
  648 + // .catch(error => {
  649 + // // console.log("err====>", err);
  650 + // this.showLoader = false;
  651 + // this.loadingSearch = false;
  652 + // this.snackbar = true;
  653 + // this.text = error.response.data.message;
  654 + // if (error.response.status === 401) {
  655 + // this.$router.replace({ path: "/" });
  656 + // this.$store.dispatch("setToken", null);
  657 + // this.$store.dispatch("Id", null);
  658 + // }
  659 + // });
  660 + // },
  661 + // editItem(item) {
  662 + // console.log("item", item);
  663 + // this.editedIndex = this.ScheduleData.indexOf(item);
  664 + // this.editedItem = Object.assign({}, item);
  665 + // this.editedItem.classId = this.editedItem.classId._id;
  666 + // this.editedItem.sectionId = this.editedItem.sectionId._id;
  667 + // this.editedItem.date =
  668 + // this.editedItem.date != undefined
  669 + // ? (this.editedItem.date = this.editedItem.date.substring(0, 10))
  670 + // : (this.editedItem.date = "");
  671 + // this.dialog = true;
  672 + // },
  673 + // profile(item) {
  674 + // this.editedIndex = this.ScheduleData.indexOf(item);
  675 + // this.editedItem = Object.assign({}, item);
  676 + // this.editedItem.classId = this.editedItem.classId.classNum;
  677 + // this.editedItem.sectionId = this.editedItem.sectionId.name;
  678 + // this.dialog1 = true;
  679 + // },
  680 + // deleteSchedule(item) {
  681 + // let deleteSchedule = {
  682 + // scheduleId: item._id
  683 + // };
  684 + // http()
  685 + // .delete(
  686 + // "/deleteSchedule",
  687 + // confirm("Are you sure you want to Delete this?") && {
  688 + // params: deleteSchedule
  689 + // }
  690 + // )
  691 + // .then(response => {
  692 + // this.snackbar = true;
  693 + // this.text = "Successfully Delete Schedule ";
  694 + // this.getStudentsList();
  695 + // })
  696 + // .catch(error => {
  697 + // // console.log(error);
  698 + // });
  699 + // },
  700 + activeTab(type) {
  701 + switch (type) {
  702 + case "existing":
  703 + this.newActive = false;
  704 + this.isActive = true;
  705 + break;
  706 +
  707 + default:
  708 + this.newActive = true;
  709 + this.isActive = false;
  710 + break;
  711 + }
  712 + },
  713 + // close() {
  714 + // this.dialog = false;
  715 + // },
  716 + // close1() {
  717 + // this.dialog1 = false;
  718 + // },
  719 + // clear() {
  720 + // this.$refs.form.reset();
  721 + // this.disable = false;
  722 + // this.loading = false;
  723 + // },
  724 + // save() {
  725 + // this.editedItem.scheduleId = this.editedItem._id;
  726 + // http()
  727 + // .put("/updateSchedule", this.editedItem)
  728 + // .then(response => {
  729 + // this.snackbar = true;
  730 + // this.text = "Successfully Edit Exam Schedule";
  731 + // this.color = "green";
  732 + // this.getSchedulesList();
  733 + // this.close();
  734 + // })
  735 + // .catch(error => {
  736 + // this.snackbar = true;
  737 + // this.text = error.response.data.message;
  738 + // this.color = "red";
  739 + // });
  740 + // },
  741 + getClass() {
  742 + this.showLoader = true;
  743 + http()
  744 + .get("/getClassesList", {
  745 + headers: { Authorization: "Bearer " + this.token }
  746 + })
  747 + .then(response => {
  748 + this.classList = response.data.data;
  749 + this.showLoader = false;
  750 + // console.log("getClassesList=====>",this.addclass)
  751 + })
  752 + .catch(err => {
  753 + // console.log("err====>", err);
  754 + this.showLoader = false;
  755 + });
  756 + },
  757 + getSections(_id) {
  758 + this.showLoader = true;
  759 + for (let i = 0; i < this.classList.length; i++) {
  760 + if (_id == this.classList[i]._id) {
  761 + // console.log(this.classList[i].subjects);
  762 + this.subjects = this.classList[i].subjects;
  763 + }
  764 + }
  765 + http()
  766 + .get(
  767 + "/getSectionsList",
  768 + { params: { classId: _id } },
  769 + {
  770 + headers: { Authorization: "Bearer " + this.token }
  771 + }
  772 + )
  773 + .then(response => {
  774 + this.addSection = response.data.data;
  775 + this.showLoader = false;
  776 + })
  777 + .catch(err => {
  778 + // console.log("err====>", err);
  779 + });
  780 + },
  781 + getExamList() {
  782 + this.showLoader = true;
  783 + this.loadingSearch = true;
  784 + http()
  785 + .get("/getExamsList", {
  786 + headers: { Authorization: "Bearer " + this.token }
  787 + })
  788 + .then(response => {
  789 + this.examList = response.data.data;
  790 + this.showLoader = false;
  791 + this.loadingSearch = false;
  792 + })
  793 + .catch(error => {
  794 + // console.log("err====>", err);
  795 + this.showLoader = false;
  796 + this.loadingSearch = false;
  797 + this.snackbar = true;
  798 + this.text = error.response.data.message;
  799 + if (error.response.status === 401) {
  800 + this.$router.replace({ path: "/" });
  801 + this.$store.dispatch("setToken", null);
  802 + this.$store.dispatch("Id", null);
  803 + }
  804 + });
  805 + },
  806 + findStudents() {
  807 + if (this.$refs.form.validate()) {
  808 + this.showLoader = true;
  809 + http()
  810 + .get("/getStudentWithClass", {
  811 + params: {
  812 + classId: this.addMark.classId,
  813 + sectionId: this.addMark.sectionId
  814 + }
  815 + })
  816 + .then(response => {
  817 + this.getStudentData = response.data.data;
  818 + this.showLoader = false;
  819 + // console.log("getSectionsList=====>", response.data.data);
  820 + this.showLoader = true;
  821 + http()
  822 + .get("/getMarkDistributionsList", {
  823 + params: this.addMark
  824 + })
  825 + .then(response => {
  826 + this.showLoader = false;
  827 + // console.log("getSectionsList=====>", response.data.data);
  828 + for (var i = 0; i < response.data.data.length; i++) {
  829 + this.headerOfMark.push({
  830 + text:
  831 + response.data.data[i].distributionType +
  832 + " (" +
  833 + response.data.data[i].markValue +
  834 + ")",
  835 + sortable: false,
  836 + align: "center"
  837 + });
  838 + }
  839 + for (var i = 0; i < this.getStudentData.length; i++) {
  840 + this.getStudentData[i].marksObtained = [];
  841 + for (var j = 0; j < response.data.data.length; j++) {
  842 + this.getStudentData[i].marksObtained.push({
  843 + markDistributionId: response.data.data[j]._id,
  844 + marksScored: 0
  845 + });
  846 + }
  847 + }
  848 + console.log("this.getStudentData", this.getStudentData);
  849 + })
  850 + .catch(error => {
  851 + console.log("err====>", error);
  852 + this.showLoader = false;
  853 + });
  854 + })
  855 + .catch(error => {
  856 + console.log("err====>", error);
  857 + this.showLoader = false;
  858 + });
  859 + }
  860 + },
  861 + submit() {
  862 + let studentsMarks = [];
  863 + for (var j = 0; j < this.getStudentData.length; j++) {
  864 + studentsMarks.push({
  865 + studentId: this.getStudentData[j]._id,
  866 + marksObtained: this.getStudentData[j].marksObtained
  867 + });
  868 + }
  869 + // console.log("marksObtaine----marksObtained", studentsMarks);
  870 + let markData = {
  871 + examId: this.addMark.examId,
  872 + classId: this.addMark.classId,
  873 + sectionId: this.addMark.sectionId,
  874 + subjectId: this.addMark.subjectId,
  875 + studentsMarks: studentsMarks
  876 + };
  877 + console.log("markData", markData);
  878 + if (this.$refs.form.validate()) {
  879 + http()
  880 + .post("/createMark", markData)
  881 + .then(response => {
  882 + this.snackbar = true;
  883 + this.text = response.data.message;
  884 + this.color = "green";
  885 + this.loading = false;
  886 + this.clear();
  887 + })
  888 + .catch(error => {
  889 + if ((this.snackbar = true)) {
  890 + this.text = error.response.data.message;
  891 + this.color = "red";
  892 + }
  893 + });
  894 + }
  895 + },
  896 + getStudents() {
  897 + this.showLoader = true;
  898 + http()
  899 + .get("/getStudentWithClass", {
  900 + params: {
  901 + classId: this.getMark.classId,
  902 + sectionId: this.getMark.sectionId
  903 + }
  904 + })
  905 + .then(response => {
  906 + this.getStudentsList = response.data.data;
  907 + this.showLoader = false;
  908 + // console.log("getSectionsList=====>", response.data.data);
  909 + })
  910 + .catch(error => {
  911 + console.log("err====>", error);
  912 + this.showLoader = false;
  913 + });
  914 + }
  915 + },
  916 + mounted() {
  917 + this.token = this.$store.state.token;
  918 + // this.getSchedulesList();
  919 + this.getClass();
  920 + this.getExamList();
  921 + },
  922 + created() {
  923 + this.$root.$on("app:search", search => {
  924 + this.search = search;
  925 + });
  926 + },
  927 + beforeDestroy() {
  928 + // dont forget to remove the listener
  929 + this.$root.$off("app:search");
  930 + }
  931 +};
  932 +</script>
  933 +<style scoped>
  934 +.active {
  935 + background-color: gray;
  936 + color: white !important;
  937 +}
  938 +.activebtn {
  939 + color: black !important;
  940 +}
  941 +.markTable {
  942 + max-width: 80px !important;
  943 +}
  944 +</style>
0 945 \ No newline at end of file
... ...
src/pages/Mark/markDistribution.vue
... ... @@ -0,0 +1,382 @@
  1 +<template>
  2 + <v-app id="pages-dasboard">
  3 + <v-tabs grow slider-color="gray">
  4 + <v-tab
  5 + ripple
  6 + @click="activeTab('existing')"
  7 + v-bind:class="{ active: isActive }"
  8 + id="tab"
  9 + class="subheading"
  10 + >Existing Mark Distribution</v-tab>
  11 + <v-tab
  12 + ripple
  13 + @click="activeTab('new')"
  14 + v-bind:class="{ active: newActive }"
  15 + id="tab1"
  16 + User
  17 + class="subheading"
  18 + >Add New Mark Distribution</v-tab>
  19 +
  20 + <!-- ****** EDIT Mark Distribution ****** -->
  21 +
  22 + <v-tab-item>
  23 + <v-snackbar
  24 + :timeout="timeout"
  25 + :top="y === 'top'"
  26 + :right="x === 'right'"
  27 + :vertical="mode === 'vertical'"
  28 + v-model="snackbar"
  29 + color="success"
  30 + >{{ text }}</v-snackbar>
  31 + <v-dialog v-model="dialog" max-width="600px">
  32 + <v-flex xs12 sm12>
  33 + <v-toolbar color="v-toolbar">
  34 + <v-spacer></v-spacer>
  35 + <v-toolbar-title>
  36 + <h3>Edit Mark Distribution</h3>
  37 + </v-toolbar-title>
  38 + <v-spacer></v-spacer>
  39 + </v-toolbar>
  40 + <v-card flat>
  41 + <v-form ref="form">
  42 + <v-container fluid>
  43 + <v-flex xs12 sm12>
  44 + <v-layout>
  45 + <v-flex xs4 class="pt-4 subheading">
  46 + <label class="right">Mark Distribution:</label>
  47 + </v-flex>
  48 + <v-flex xs8 sm6 class="ml-3">
  49 + <v-text-field
  50 + v-model="editedItem.distributionType"
  51 + placeholder="fill your Distribution Type"
  52 + ></v-text-field>
  53 + </v-flex>
  54 + </v-layout>
  55 + </v-flex>
  56 + <v-flex xs12 sm12>
  57 + <v-layout>
  58 + <v-flex xs4 class="pt-4 subheading">
  59 + <label class="right">Mark Value:</label>
  60 + </v-flex>
  61 + <v-flex xs8 sm6 class="ml-3">
  62 + <v-text-field
  63 + placeholder="fill your Mark Value"
  64 + v-model="editedItem.markValue"
  65 + ></v-text-field>
  66 + </v-flex>
  67 + </v-layout>
  68 + </v-flex>
  69 + <v-layout>
  70 + <v-flex xs12 sm10 offset-sm1>
  71 + <v-card-actions>
  72 + <v-btn round dark @click.native="close">Cancel</v-btn>
  73 + <v-spacer></v-spacer>
  74 + <v-btn round dark @click="save">Save</v-btn>
  75 + </v-card-actions>
  76 + </v-flex>
  77 + </v-layout>
  78 + </v-container>
  79 + </v-form>
  80 + </v-card>
  81 + </v-flex>
  82 + </v-dialog>
  83 + <!-- ****** EXISTING MARK DISTRIBUTATION TABLE ****** -->
  84 + <v-data-table
  85 + :headers="headers"
  86 + :items="markList"
  87 + :pagination.sync="pagination"
  88 + :search="search"
  89 + >
  90 + <template slot="items" slot-scope="props">
  91 + <td id="tabeleData" class="text-xs-center">{{ props.index + 1 }}</td>
  92 + <td id="tabeleData" class="text-xs-center">{{ props.item.distributionType}}</td>
  93 + <td id="tabeleData" class="text-xs-center linkCover">{{ props.item.markValue}}</td>
  94 +
  95 + <td id="tabeleData" class="text-xs-center">
  96 + <span>
  97 + <img
  98 + style="cursor:pointer; width:20px; height:18px; "
  99 + class="mr-5"
  100 + @click="editItem(props.item)"
  101 + src="/static/icon/edit1.png"
  102 + />
  103 + <img
  104 + style="cursor:pointer;width:20px; height:20px; "
  105 + class="mr-5"
  106 + @click="deleteItem(props.item)"
  107 + src="/static/icon/delete1.png"
  108 + />
  109 + </span>
  110 + </td>
  111 + </template>
  112 + <v-alert
  113 + slot="no-results"
  114 + :value="true"
  115 + color="error"
  116 + icon="warning"
  117 + >Your search for "{{ search }}" found no results.</v-alert>
  118 + </v-data-table>
  119 + </v-tab-item>
  120 +
  121 + <!-- ****** ADD MULTIPLE REMINDER ****** -->
  122 +
  123 + <v-tab-item>
  124 + <v-container>
  125 + <v-snackbar
  126 + :timeout="timeout"
  127 + :top="y === 'top'"
  128 + :right="x === 'right'"
  129 + :vertical="mode === 'vertical'"
  130 + v-model="snackbar"
  131 + color="success"
  132 + >{{ text }}</v-snackbar>
  133 + <v-flex xs12 sm8 class="top" offset-sm2>
  134 + <v-card flat>
  135 + <v-form ref="form" v-model="valid" lazy-validation>
  136 + <v-container fluid>
  137 + <v-flex xs12>
  138 + <v-layout>
  139 + <v-flex xs4 class="pt-4 subheading">
  140 + <label class="right">Mark Distribution:</label>
  141 + </v-flex>
  142 + <v-flex xs8 sm4 class="ml-3">
  143 + <v-text-field
  144 + v-model="mark.distributionType"
  145 + placeholder="fill your Mark Distribution"
  146 + :rules="markDistributionRules"
  147 + ></v-text-field>
  148 + </v-flex>
  149 + </v-layout>
  150 + </v-flex>
  151 + <v-flex xs12>
  152 + <v-layout>
  153 + <v-flex xs4 class="pt-4 subheading">
  154 + <label class="right">Mark Value:</label>
  155 + </v-flex>
  156 + <v-flex xs8 sm4 class="ml-3">
  157 + <v-text-field
  158 + placeholder="fill your Mark Value"
  159 + :rules="markValueRules"
  160 + v-model="mark.markValue"
  161 + type="text"
  162 + required
  163 + ></v-text-field>
  164 + </v-flex>
  165 + </v-layout>
  166 + </v-flex>
  167 + <v-layout>
  168 + <v-flex xs12 sm12>
  169 + <v-layout>
  170 + <v-flex xs4>
  171 + <v-btn @click="clear" round class="right" dark>clear</v-btn>
  172 + </v-flex>
  173 + <v-flex xs8 sm4>
  174 + <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn>
  175 + </v-flex>
  176 + </v-layout>
  177 + </v-flex>
  178 + </v-layout>
  179 + </v-container>
  180 + </v-form>
  181 + </v-card>
  182 + </v-flex>
  183 + </v-container>
  184 + </v-tab-item>
  185 + </v-tabs>
  186 + <v-snackbar
  187 + :timeout="timeout"
  188 + :top="y === 'top'"
  189 + :right="x === 'right'"
  190 + :vertical="mode === 'vertical'"
  191 + v-model="snackbar"
  192 + color="success"
  193 + >{{ text }}</v-snackbar>
  194 + <div class="loader" v-if="showLoader">
  195 + <v-progress-circular indeterminate color="white"></v-progress-circular>
  196 + </div>
  197 + </v-app>
  198 +</template>
  199 +
  200 +<script>
  201 +import http from "@/Services/http.js";
  202 +import Util from "@/util";
  203 +
  204 +export default {
  205 + data: () => ({
  206 + snackbar: false,
  207 + y: "top",
  208 + x: "right",
  209 + mode: "",
  210 + timeout: 3000,
  211 + text: "",
  212 + loading: false,
  213 + search: "",
  214 + showLoader: false,
  215 + dialog: false,
  216 + valid: true,
  217 + isActive: true,
  218 + newActive: false,
  219 + pagination: {
  220 + rowsPerPage: 15
  221 + },
  222 + markDistributionRules: [v => !!v || " Mark Distribution type is required"],
  223 + markValueRules: [v => !!v || "Mark Value is required"],
  224 + headers: [
  225 + {
  226 + text: "No",
  227 + align: "center",
  228 + sortable: false,
  229 + value: "No"
  230 + },
  231 + {
  232 + text: " Mark Distribution Type",
  233 + value: " distributionType",
  234 + sortable: false,
  235 + align: "center"
  236 + },
  237 + {
  238 + text: " Mark Value",
  239 + value: "markValue",
  240 + sortable: false,
  241 + align: "center"
  242 + },
  243 + { text: "Action", value: "", sortable: false, align: "center" }
  244 + ],
  245 + markList: [],
  246 + editedIndex: -1,
  247 + mark: {},
  248 + editedItem: {},
  249 + token: ""
  250 + }),
  251 + methods: {
  252 + getMarkDistributions() {
  253 + this.showLoader = true;
  254 + http()
  255 + .get("/getMarkDistributionsList", {
  256 + headers: { Authorization: "Bearer " + this.token }
  257 + })
  258 + .then(response => {
  259 + this.markList = response.data.data;
  260 + this.showLoader = false;
  261 + })
  262 + .catch(error => {
  263 + this.showLoader = false;
  264 + // if (error.response.status === 401) {
  265 + // this.$router.replace({ path: "/" });
  266 + // this.$store.dispatch("setToken", null);
  267 + // this.$store.dispatch("Id", null);
  268 + // }
  269 + });
  270 + },
  271 + editItem(item) {
  272 + this.editedIndex = this.markList.indexOf(item);
  273 + this.editedItem = Object.assign({}, item);
  274 + this.dialog = true;
  275 + },
  276 + deleteItem(item) {
  277 + let deleteParticularMark = {
  278 + markDistributionId: item._id
  279 + };
  280 + http()
  281 + .delete(
  282 + "/deleteMarkDistribution",
  283 + confirm("Are you sure you want to delete this?") && {
  284 + params: deleteParticularMark
  285 + }
  286 + )
  287 + .then(response => {
  288 + this.snackbar = true;
  289 + this.text = response.data.message;
  290 + this.getMarkDistributions();
  291 + })
  292 + .catch(error => {
  293 + console.log(error);
  294 + });
  295 + },
  296 + activeTab(type) {
  297 + switch (type) {
  298 + case "existing":
  299 + this.newActive = false;
  300 + this.isActive = true;
  301 + break;
  302 +
  303 + default:
  304 + this.newActive = true;
  305 + this.isActive = false;
  306 + break;
  307 + }
  308 + },
  309 + close() {
  310 + this.dialog = false;
  311 + setTimeout(() => {
  312 + this.editedItem = Object.assign({}, this.defaultItem);
  313 + this.editedIndex = -1;
  314 + }, 300);
  315 + },
  316 + submit() {
  317 + if (this.$refs.form.validate()) {
  318 + this.loading = true;
  319 + http()
  320 + .post("/createMarkDistribution", this.mark)
  321 + .then(response => {
  322 + this.snackbar = true;
  323 + this.text = response.data.message;
  324 + this.getMarkDistributions();
  325 + this.clear();
  326 + this.loading = false;
  327 + })
  328 + .catch(error => {
  329 + this.snackbar = true;
  330 + this.text = error.response.data.message;
  331 + this.loading = false;
  332 + });
  333 + }
  334 + },
  335 + clear() {
  336 + this.$refs.form.reset();
  337 + },
  338 + save() {
  339 + (this.editedItem.markDistributionId = this.editedItem._id),
  340 + http()
  341 + .put("/updateMarkDistribution", this.editedItem)
  342 + .then(response => {
  343 + this.snackbar = true;
  344 + this.text = "Successfully Edit Notification";
  345 + this.getMarkDistributions();
  346 + this.close();
  347 + })
  348 + .catch(error => {
  349 + console.log(error);
  350 + });
  351 + }
  352 + },
  353 + mounted() {
  354 + this.token = this.$store.state.token;
  355 + this.getMarkDistributions();
  356 + },
  357 + created() {
  358 + this.$root.$on("app:search", search => {
  359 + this.search = search;
  360 + });
  361 + },
  362 + beforeDestroy() {
  363 + // dont forget to remove the listener
  364 + this.$root.$off("app:search");
  365 + }
  366 +};
  367 +</script>
  368 +<style scoped>
  369 +#tabeleData {
  370 + border: 1px solid #dddddd;
  371 + text-align: left;
  372 + padding: 8px 0px;
  373 + max-width: 200px !important;
  374 +}
  375 +.active {
  376 + background-color: gray;
  377 + color: white !important;
  378 +}
  379 +.activebtn {
  380 + color: black !important;
  381 +}
  382 +</style>
0 383 \ No newline at end of file
... ...
src/pages/Mark/promotion.vue
... ... @@ -0,0 +1,182 @@
  1 +<template>
  2 + <v-app id="login">
  3 + <v-container fluid>
  4 + <v-card class="px-3 grey lighten-2" flat>
  5 + <v-flex xs12>
  6 + <v-layout wrap>
  7 + <v-flex xs12 sm12 md3>
  8 + <!-- <v-layout> -->
  9 + <v-flex md12 class="mt-4 body-1">
  10 + <label>Academic Year :</label>
  11 + </v-flex>
  12 + <v-flex md10>
  13 + <v-select :items="acedemicYear" label="Select Academic Year"></v-select>
  14 + </v-flex>
  15 + <!-- </v-layout> -->
  16 + </v-flex>
  17 + <v-flex xs12 sm12 md3>
  18 + <!-- <v-layout> -->
  19 + <v-flex md12 class="mt-4 body-1">
  20 + <label class>Class :</label>
  21 + </v-flex>
  22 + <v-flex md10 class="ml-2">
  23 + <v-select :items="acedemicYear" label="Select Academic Year"></v-select>
  24 + </v-flex>
  25 + <!-- </v-layout> -->
  26 + </v-flex>
  27 + <v-flex xs12 sm12 md3>
  28 + <v-flex md12 class="mt-4 body-1">
  29 + <label>Promotion Academic Year :</label>
  30 + </v-flex>
  31 + <v-flex md10>
  32 + <v-select :items="acedemicYear" label="Select Promotion Academic Year"></v-select>
  33 + </v-flex>
  34 + </v-flex>
  35 + <v-flex xs12 sm12 md3>
  36 + <v-flex md12 class="mt-4 body-1">
  37 + <label class>Promotion Class :</label>
  38 + </v-flex>
  39 + <v-flex md10 class="ml-2">
  40 + <v-select :items="acedemicYear" label="Select Promotion Class"></v-select>
  41 + </v-flex>
  42 + </v-flex>
  43 + </v-layout>
  44 + </v-flex>
  45 + </v-card>
  46 + <v-container class="pb-0 pt-5">
  47 + <v-card class="px-3 grey lighten-2" flat>
  48 + <v-flex xs12>
  49 + <v-layout>
  50 + <v-flex xs12 sm12 md12>
  51 + <v-layout>
  52 + <!-- <p>{{ radios || 'null' }}</p> -->
  53 + <v-radio-group v-model="radios" :mandatory="false">
  54 + <v-layout>
  55 + <v-flex xs12 sm12 md6>
  56 + <v-layout>
  57 + <v-radio label="Normal" value="radio-1" class="mx-auto"></v-radio>
  58 + </v-layout>
  59 + </v-flex>
  60 + <v-flex xs12 sm12 md6>
  61 + <v-layout>
  62 + <v-radio label="Advance" value="radio-2" class="mx-auto"></v-radio>
  63 + </v-layout>
  64 + </v-flex>
  65 + </v-layout>
  66 + </v-radio-group>
  67 + </v-layout>
  68 + </v-flex>
  69 + </v-layout>
  70 + </v-flex>
  71 + </v-card>
  72 + </v-container>
  73 + <v-container fluid>
  74 + <!-- <v-flex xs12> -->
  75 + <v-layout wrap>
  76 + <v-flex xs12 sm12 md6>
  77 + <v-layout>
  78 + <v-flex xs12 sm12 md11>
  79 + <v-card class="px-3 grey lighten-2" flat>
  80 + <v-layout wrap>
  81 + <v-flex xs12 sm12 md5 class="mt-4 body-1">
  82 + <label>Exam</label>
  83 + </v-flex>
  84 + <v-flex sm12 xs12 md7>
  85 + <!-- <p>{{ selected }}</p> -->
  86 + <v-checkbox v-model="selected" label="FIRST TERMINAL" value="John"></v-checkbox>
  87 + <v-checkbox
  88 + v-model="selected"
  89 + label="SECOND TERMINAL"
  90 + value="Jacob"
  91 + class="mt-0"
  92 + ></v-checkbox>
  93 + <v-checkbox v-model="selected" label="Test07" value="Jacob" class="mt-0"></v-checkbox>
  94 + </v-flex>
  95 + </v-layout>
  96 + </v-card>
  97 + </v-flex>
  98 + </v-layout>
  99 + </v-flex>
  100 + <v-flex xs12 sm12 md6>
  101 + <v-layout wrap>
  102 + <v-flex xs12 sm12 md12>
  103 + <v-card class="px-3 grey lighten-2" flat height="160">
  104 + <v-layout wrap>
  105 + <v-flex xs12 sm12 md5 class="mt-4 body-1">
  106 + <label>Mark Percentage</label>
  107 + </v-flex>
  108 + <v-flex xs12 sm12 md7>
  109 + <!-- <p>{{ selected }}</p> -->
  110 + <v-checkbox v-model="selected" label="Exam " value="John"></v-checkbox>
  111 + <v-checkbox v-model="selected" label="ASSIGNMENT" value="Jacob" class="mt-0"></v-checkbox>
  112 + </v-flex>
  113 + </v-layout>
  114 + </v-card>
  115 + </v-flex>
  116 + </v-layout>
  117 + </v-flex>
  118 + </v-layout>
  119 + </v-container>
  120 + <v-card class="px-3 grey lighten-2" flat>
  121 + <v-flex xs12>
  122 + <v-layout wrap>
  123 + <v-flex xs12 sm12 md3>
  124 + <v-flex md12 class="mt-4 body-1">
  125 + <label>HINDI Pass Mark :</label>
  126 + </v-flex>
  127 + <v-flex md10>
  128 + <v-text-field v-model="passmark.hindi" placeholder="fill Hindi Pass Mark"></v-text-field>
  129 + </v-flex>
  130 + </v-flex>
  131 + <v-flex xs12 sm12 md3>
  132 + <v-flex md12 class="mt-4 body-1">
  133 + <label class>ENGLISH Pass Mark :</label>
  134 + </v-flex>
  135 + <v-flex md10 class="ml-2">
  136 + <v-text-field v-model="passmark.english" placeholder="fill English Pass Mark"></v-text-field>
  137 + </v-flex>
  138 + </v-flex>
  139 + <v-flex xs12 sm12 md3>
  140 + <v-flex md12 class="mt-4 body-1">
  141 + <label>MATHEMATICS Pass Mark :</label>
  142 + </v-flex>
  143 + <v-flex md10>
  144 + <v-text-field v-model="passmark.mathematics" placeholder="fill Mathematics Pass Mark"></v-text-field>
  145 + </v-flex>
  146 + </v-flex>
  147 + <!-- <v-flex xs12 sm12 md3>
  148 + <v-flex md12 class="mt-4 body-1">
  149 + <label class>Promotion Class :</label>
  150 + </v-flex>
  151 + <v-flex md10 class="ml-2">
  152 + <v-select :items="acedemicYear" label="Select Promotion Class"></v-select>
  153 + </v-flex>
  154 + </v-flex>-->
  155 + </v-layout>
  156 + </v-flex>
  157 + </v-card>
  158 + <v-layout>
  159 + <v-flex xs10 sm10 md4 class="mx-auto mt-4">
  160 + <v-btn class="black" dark block round>Promotion Mark Setting</v-btn>
  161 + </v-flex>
  162 + </v-layout>
  163 + </v-container>
  164 + </v-app>
  165 +</template>
  166 +
  167 +<script>
  168 +export default {
  169 + data() {
  170 + return {
  171 + radios: "radio-1",
  172 + acedemicYear: [],
  173 + passmark: {
  174 + hindi: "40",
  175 + english: "40",
  176 + mathematics: "40"
  177 + },
  178 + selected: ["John"]
  179 + };
  180 + }
  181 +};
  182 +</script>
0 183 \ No newline at end of file
... ...
src/pages/Mark/viewMark.vue
... ... @@ -0,0 +1,272 @@
  1 +<template>
  2 + <v-app id="pages-dasboard">
  3 + <!-- ****** Edit multiple INVOICE ****** -->
  4 + <v-container fluid grid-list-md>
  5 + <v-flex xs12 sm12>
  6 + <v-container fluid>
  7 + <v-layout wrap>
  8 + <v-flex xs12 sm12 md3 class="mt-4">
  9 + <v-card flat>
  10 + <v-toolbar dark class="fixcolors" flat>
  11 + <v-spacer></v-spacer>
  12 + <v-toolbar-title>
  13 + <h3>Profile</h3>
  14 + </v-toolbar-title>
  15 + <v-spacer></v-spacer>
  16 + </v-toolbar>
  17 + <v-card-text>
  18 + <v-container>
  19 + <v-layout wrap v-for="(mark,i) in markData" :key="i">
  20 + <v-flex xs12>
  21 + <v-layout>
  22 + <v-flex
  23 + xs12
  24 + class="text-xs-center text-sm-center text-md-center text-lg-center"
  25 + >
  26 + <v-avatar size="100px">
  27 + <img
  28 + src="/static/icon/user.png"
  29 + v-if="!mark.studentsMarks[0].studentId.profilePicUrl"
  30 + />
  31 + <img
  32 + :src="mark.studentsMarks[0].studentId.profilePicUrl"
  33 + v-else-if="mark.studentsMarks[0].studentId.profilePicUrl"
  34 + />
  35 + </v-avatar>
  36 + </v-flex>
  37 + </v-layout>
  38 + <v-layout>
  39 + <v-flex xs12 sm12>
  40 + <h3 class="text-xs-center">
  41 + <b>{{ mark.studentsMarks[0].studentId.name }}</b>
  42 + </h3>
  43 + <p class="text-xs-center grey--text">Student</p>
  44 + </v-flex>
  45 + </v-layout>
  46 + <v-layout style="border: 1px solid lightgrey;">
  47 + <v-flex xs6 sm6 class="py-0">
  48 + <h4 class="right">
  49 + <b>Roll No :</b>
  50 + </h4>
  51 + </v-flex>
  52 + <v-flex sm6 xs6 class="py-0">
  53 + <h4>{{ mark.studentsMarks[0].studentId.rollNo }}</h4>
  54 + </v-flex>
  55 + </v-layout>
  56 + <v-layout style="border: 1px solid lightgrey;">
  57 + <v-flex xs6 sm6 class="py-0">
  58 + <h4 class="right">
  59 + <b>Class :</b>
  60 + </h4>
  61 + </v-flex>
  62 + <v-flex sm6 xs6 class="right py-0">
  63 + <h4>{{ mark.classId.classNum }}</h4>
  64 + </v-flex>
  65 + </v-layout>
  66 + <v-layout style="border: 1px solid lightgrey;">
  67 + <v-flex xs6 sm6 class="right py-0">
  68 + <h4 class="right">
  69 + <b>Section :</b>
  70 + </h4>
  71 + </v-flex>
  72 + <v-flex sm6 xs6 class="right py-0">
  73 + <h4>{{ mark.sectionId.name}}</h4>
  74 + </v-flex>
  75 + </v-layout>
  76 + </v-flex>
  77 + </v-layout>
  78 + </v-container>
  79 + </v-card-text>
  80 + </v-card>
  81 + </v-flex>
  82 + <v-flex xs12 sm12 md9 class="mt-4">
  83 + <v-card>
  84 + <v-toolbar dark class="fixcolors" flat>
  85 + <v-spacer></v-spacer>
  86 + <v-toolbar-title>
  87 + <h3>Mark</h3>
  88 + </v-toolbar-title>
  89 + <v-spacer></v-spacer>
  90 + </v-toolbar>
  91 + <v-card-title
  92 + v-for="(markList,i) in markData"
  93 + :key="i"
  94 + class="subheading"
  95 + >{{ markList.examId.examName }}</v-card-title>
  96 + <table class="feeTypeTable tableRsponsive">
  97 + <tr class="info white--text">
  98 + <th rowspan="2">Subject</th>
  99 + <th
  100 + colspan="2"
  101 + v-for="(markDistribution,i) in markDistributions"
  102 + :key="i "
  103 + >{{ markDistribution.markDistributionId.distributionType}}</th>
  104 + <!-- <th colspan="2">ASSIGNMENT</th> -->
  105 + <th colspan="3">Total</th>
  106 + </tr>
  107 + <tr class="info white--text">
  108 + <th
  109 + class="bg-sky"
  110 + v-for="(markDistribution,i) in markDistributions"
  111 + :key="i"
  112 + >{{i === 0 ? 'Mark' : 'Highest Mark'}}</th>
  113 + <th
  114 + class="bg-sky-light"
  115 + v-for="(markDistribution,i) in markDistributions"
  116 + :key="i"
  117 + >{{i === 0 ? 'Mark' : 'Highest Mark'}}</th>
  118 + <th class="bg-sky">Mark</th>
  119 + <th class="bg-purple">Point</th>
  120 + <th class="bg-skyDark">Grade</th>
  121 + </tr>
  122 + <!-- </tr> -->
  123 + <tr v-for="(mark,i) in markData" :key="i">
  124 + <td>{{mark.classId.subjects[0].subjectName}}</td>
  125 + <td
  126 + v-for="(markDistribution,i) in markParticularDistributionData"
  127 + :key="i"
  128 + >{{ markDistribution }}</td>
  129 + <!-- <td>
  130 + 10
  131 + </td>
  132 + <td>
  133 + 10
  134 + </td>
  135 + <td>
  136 + 83
  137 + </td>
  138 + <td>
  139 + 8
  140 + </td>
  141 + <td>B
  142 + </td>-->
  143 + </tr>
  144 + <!-- <tfoot>
  145 + <tr>
  146 + <td colspan="2">Total:</td>
  147 + <td></td>
  148 + <td></td>
  149 + <td></td>
  150 + <td></td>
  151 + </tr>
  152 + </tfoot>-->
  153 + </table>
  154 + </v-card>
  155 + </v-flex>
  156 + </v-layout>
  157 + </v-container>
  158 + </v-flex>
  159 + </v-container>
  160 + <div class="loader" v-if="showLoader">
  161 + <v-progress-circular indeterminate color="white"></v-progress-circular>
  162 + </div>
  163 + </v-app>
  164 +</template>
  165 +
  166 +<script>
  167 +import http from "@/Services/http.js";
  168 +import moment from "moment";
  169 +
  170 +export default {
  171 + data: () => ({
  172 + showLoader: false,
  173 + markData: [],
  174 + token: "",
  175 + markDistributions: [],
  176 + markParticularDistributionData: []
  177 + }),
  178 + mounted() {
  179 + this.token = this.$store.state.token;
  180 + this.getMarkList();
  181 + },
  182 + methods: {
  183 + getMarkList() {
  184 + this.showLoader = true;
  185 + http()
  186 + .get("/getParticularMark", {
  187 + params: { studentId: this.$route.params.markId },
  188 + headers: { Authorization: "Bearer " + this.token }
  189 + })
  190 + .then(response => {
  191 + this.markData = response.data.data;
  192 + for (let i = 0; i < this.markData.length; i++) {
  193 + for (let j = 0; j < this.markData[i].studentsMarks.length; j++) {
  194 + // console.log("this.studentsMarksSSSSSSSSSSSSS",this.markData[i].studentsMarks[j].marksObtained)
  195 +
  196 + this.markDistributions = this.markData[i].studentsMarks[
  197 + j
  198 + ].marksObtained;
  199 + for (
  200 + let k = 0;
  201 + k < this.markData[i].studentsMarks[j].marksObtained.length;
  202 + k++
  203 + ) {
  204 + this.markParticularDistributionData.push(
  205 + this.markData[i].studentsMarks[j].marksObtained[k]
  206 + .marksScored
  207 + );
  208 + this.markParticularDistributionData.push(
  209 + this.markData[i].studentsMarks[j].marksObtained[k]
  210 + .markDistributionId.markValue,
  211 + );
  212 + console.log(
  213 + "this.markParticularDistributionData",
  214 + this.markParticularDistributionData
  215 + );
  216 + }
  217 + }
  218 + }
  219 + this.showLoader = false;
  220 + })
  221 + .catch(error => {
  222 + // console.log("err====>", err);
  223 + this.showLoader = false;
  224 + this.snackbar = true;
  225 + this.text = error.response.data.message;
  226 + if (error.response.status === 401) {
  227 + this.$router.replace({ path: "/" });
  228 + this.$store.dispatch("setToken", null);
  229 + this.$store.dispatch("Id", null);
  230 + }
  231 + });
  232 + }
  233 + }
  234 +};
  235 +</script>
  236 +
  237 +<style scoped>
  238 +table {
  239 + border-collapse: collapse;
  240 + border: 1px solid #e2e7eb;
  241 +}
  242 +
  243 +th,
  244 +td {
  245 + border: 1px solid #e2e7eb;
  246 + padding: 10px;
  247 + text-align: center;
  248 +}
  249 +table.feeTypeTable {
  250 + table-layout: auto !important;
  251 + width: 100% !important;
  252 +}
  253 +.bg-sky {
  254 + background-color: #98b2cc !important;
  255 +}
  256 +.bg-sky-light {
  257 + background-color: #89a0b8;
  258 +}
  259 +.bg-purple {
  260 + background-color: #9583ac;
  261 +}
  262 +.bg-skyDark {
  263 + background-color: #956785;
  264 +}
  265 +@media screen and (max-width: 380px) {
  266 + .tableRsponsive {
  267 + display: block;
  268 + position: relative;
  269 + overflow: scroll;
  270 + }
  271 +}
  272 +</style>
0 273 \ No newline at end of file
... ...
src/pages/Report/markSheetReport.vue
... ... @@ -0,0 +1,301 @@
  1 +<template>
  2 + <v-app id="pages-dasboard">
  3 + <v-snackbar
  4 + :timeout="timeout"
  5 + :top="y === 'top'"
  6 + :right="x === 'right'"
  7 + :vertical="mode === 'vertical'"
  8 + v-model="snackbar"
  9 + color="success"
  10 + >{{ text }}</v-snackbar>
  11 +
  12 + <!-- ****** Mark Sheet Report TABLE****** -->
  13 + <v-card flat>
  14 + <v-card-actions>
  15 + <v-layout>
  16 + <h4 class="right mt-2 ml-2">Mark Sheet Report</h4>
  17 + </v-layout>
  18 + <v-spacer></v-spacer>
  19 + </v-card-actions>
  20 + </v-card>
  21 + <v-card flat>
  22 + <v-flex xs12 sm12 lg12>
  23 + <v-layout wrap>
  24 + <v-flex xs12 sm12 lg3>
  25 + <v-layout>
  26 + <v-flex xs3 sm6 lg2 class="subheading mt-4">
  27 + <label class="right">Exam:</label>
  28 + </v-flex>
  29 + <v-flex xs12 sm12 lg8 class="ml-2">
  30 + <v-select
  31 + v-model="getMark.exam"
  32 + label="Select your Exam"
  33 + type="text"
  34 + :items="examList"
  35 + item-text="classNum"
  36 + item-value="_id"
  37 + @change="getSections(getMark.classId)"
  38 + required
  39 + ></v-select>
  40 + </v-flex>
  41 + </v-layout>
  42 + </v-flex>
  43 + <v-flex xs12 sm12 lg3>
  44 + <v-layout>
  45 + <v-flex xs3 sm6 lg2 class="subheading mt-4">
  46 + <label class="right">Class:</label>
  47 + </v-flex>
  48 + <v-flex xs12 sm12 lg8 class="ml-2">
  49 + <v-select
  50 + v-model="getMark.classId"
  51 + label="Select your class"
  52 + type="text"
  53 + :items="classList"
  54 + item-text="classNum"
  55 + item-value="_id"
  56 + @change="getSections(getMark.classId)"
  57 + required
  58 + ></v-select>
  59 + </v-flex>
  60 + </v-layout>
  61 + </v-flex>
  62 + <v-flex xs12 sm12 lg3>
  63 + <v-layout>
  64 + <v-flex xs3 sm6 lg2 class="subheading mt-4">
  65 + <label class="right">Section:</label>
  66 + </v-flex>
  67 + <v-flex xs12 sm12 lg8 class="ml-2">
  68 + <v-select
  69 + :items="addSection"
  70 + label="Select your Section"
  71 + v-model="getMark.sectionId"
  72 + item-text="name"
  73 + item-value="_id"
  74 + name="Select Section"
  75 + required
  76 + ></v-select>
  77 + </v-flex>
  78 + </v-layout>
  79 + </v-flex>
  80 + <v-flex xs12 sm12 lg3>
  81 + <v-btn @click="getStudents" round dark :loading="loading" class="right mt-3">Get Report</v-btn>
  82 + </v-flex>
  83 + </v-layout>
  84 + </v-flex>
  85 + </v-card>
  86 + <v-data-table
  87 + :headers="headers"
  88 + :items="getStudentsList"
  89 + :pagination.sync="pagination"
  90 + :search="search"
  91 + >
  92 + <template slot="items" slot-scope="props">
  93 + <td class="text-xs-center">{{ props.index + 1}}</td>
  94 + <td id="td" class="text-xs-center">
  95 + <v-avatar>
  96 + <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
  97 + <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
  98 + </v-avatar>
  99 + </td>
  100 + <td id="td" class="text-xs-center">{{ props.item.name}}</td>
  101 + <td id="td" class="text-xs-center">{{ props.item.rollNo }}</td>
  102 + <td id="td" class="text-xs-center">{{ props.item.email }}</td>
  103 + <td class="text-xs-center">
  104 + <span>
  105 + <!-- <img
  106 + style="cursor:pointer; width:25px; height:18px; "
  107 + class="mr-5"
  108 + @click="profile(props.item)"
  109 + src="/static/icon/eye1.png"
  110 + />-->
  111 + <router-link :to="{ name:'viewMark',params: { markId:props.item._id } }">
  112 + <img
  113 + style="cursor:pointer; width:20px; height:18px; "
  114 + class="mr-5"
  115 + src="/static/icon/edit1.png"
  116 + />
  117 + </router-link>
  118 + <!-- <img
  119 + style="cursor:pointer;width:20px; height:20px; "
  120 + class="mr-5"
  121 + @click="deleteSchedule(props.item)"
  122 + src="/static/icon/delete1.png"
  123 + />-->
  124 + </span>
  125 + </td>
  126 + </template>
  127 + <v-alert
  128 + slot="no-results"
  129 + :value="true"
  130 + color="error"
  131 + icon="warning"
  132 + >Your search for "{{ search }}" found no results.</v-alert>
  133 + </v-data-table>
  134 + <div class="loader" v-if="showLoader">
  135 + <v-progress-circular indeterminate color="white"></v-progress-circular>
  136 + </div>
  137 + </v-app>
  138 +</template>
  139 +
  140 +<script>
  141 +import http from "@/Services/http.js";
  142 +import moment from "moment";
  143 +
  144 +export default {
  145 + data: () => ({
  146 + snackbar: false,
  147 + color: "",
  148 + y: "top",
  149 + x: "right",
  150 + mode: "",
  151 + timeout: 10000,
  152 + text: "",
  153 + loading: false,
  154 + search: "",
  155 + showLoader: false,
  156 + addSection: [],
  157 + pagination: {
  158 + rowsPerPage: 15
  159 + },
  160 + headers: [
  161 + {
  162 + align: "justify-center",
  163 + text: "No",
  164 + sortable: false,
  165 + value: "No"
  166 + },
  167 + {
  168 + text: "Profile Pic",
  169 + vaue: "profilePicUrl",
  170 + sortable: false,
  171 + align: "center"
  172 + },
  173 + {
  174 + text: "Name",
  175 + vaue: "name",
  176 + sortable: false,
  177 + align: "center"
  178 + },
  179 + {
  180 + text: "Roll No.",
  181 + value: "rollNo",
  182 + sortable: false,
  183 + align: "center"
  184 + },
  185 + {
  186 + text: "Email",
  187 + value: "email",
  188 + sortable: false,
  189 + align: "center"
  190 + },
  191 + { text: "Action", value: "", sortable: false, align: "center" }
  192 + ],
  193 + classList: [],
  194 + getMark: {},
  195 + markData: [],
  196 + examList: [],
  197 + getStudentsList: [],
  198 + token: ""
  199 + }),
  200 + methods: {
  201 + getClass() {
  202 + http()
  203 + .get("/getClassesList", {
  204 + headers: { Authorization: "Bearer " + this.token }
  205 + })
  206 + .then(response => {
  207 + this.classList = response.data.data;
  208 + })
  209 + .catch(err => {
  210 + // console.log("err====>", err);
  211 + });
  212 + },
  213 + getSections(_id) {
  214 + console.log(_id);
  215 + for (let i = 0; i < this.classList.length; i++) {
  216 + if (_id == this.classList[i]._id) {
  217 + this.subjects = this.classList[i].subjects;
  218 + }
  219 + }
  220 + http()
  221 + .get(
  222 + "/getSectionsList",
  223 + { params: { classId: _id } },
  224 + {
  225 + headers: { Authorization: "Bearer " + this.token }
  226 + }
  227 + )
  228 + .then(response => {
  229 + this.addSection = response.data.data;
  230 + })
  231 + .catch(err => {
  232 + // console.log("err====>", err);
  233 + });
  234 + },
  235 + getStudents() {
  236 + this.showLoader = true;
  237 + http()
  238 + .get("/getStudentWithClass", {
  239 + params: {
  240 + classId: this.getMark.classId,
  241 + sectionId: this.getMark.sectionId
  242 + }
  243 + })
  244 + .then(response => {
  245 + this.getStudentsList = response.data.data;
  246 + this.showLoader = false;
  247 + console.log("getSectionsList=====>", response.data.data);
  248 + })
  249 + .catch(error => {
  250 + console.log("err====>", error);
  251 + this.showLoader = false;
  252 + });
  253 + },
  254 + getExamList() {
  255 + this.showLoader = true;
  256 + http()
  257 + .get("/getExamsList", {
  258 + headers: { Authorization: "Bearer " + this.token }
  259 + })
  260 + .then(response => {
  261 + this.examList = response.data.data;
  262 + this.showLoader = false;
  263 + })
  264 + .catch(error => {
  265 + // console.log("err====>", err);
  266 + this.showLoader = false;
  267 + this.snackbar = true;
  268 + this.text = error.response.data.message;
  269 + if (error.response.status === 401) {
  270 + this.$router.replace({ path: "/" });
  271 + this.$store.dispatch("setToken", null);
  272 + this.$store.dispatch("Id", null);
  273 + }
  274 + });
  275 + }
  276 + },
  277 + mounted() {
  278 + this.token = this.$store.state.token;
  279 + this.getExamList();
  280 + this.getClass();
  281 + },
  282 + created() {
  283 + this.$root.$on("app:search", search => {
  284 + this.search = search;
  285 + });
  286 + },
  287 + beforeDestroy() {
  288 + // dont forget to remove the listener
  289 + this.$root.$off("app:search");
  290 + }
  291 +};
  292 +</script>
  293 +<style scoped>
  294 +.active {
  295 + background-color: gray;
  296 + color: white !important;
  297 +}
  298 +.activebtn {
  299 + color: black !important;
  300 +}
  301 +</style>s
0 302 \ No newline at end of file
... ...
src/pages/Report/studentReport.vue
... ... @@ -0,0 +1,498 @@
  1 +<template>
  2 + <v-app id="pages-dasboard">
  3 + <v-snackbar
  4 + :timeout="timeout"
  5 + :top="y === 'top'"
  6 + :right="x === 'right'"
  7 + :vertical="mode === 'vertical'"
  8 + v-model="snackbar"
  9 + color="success"
  10 + >{{ text }}</v-snackbar>
  11 +
  12 + <!-- ****** Student Report TABLE****** -->
  13 + <v-card flat>
  14 + <v-card-actions>
  15 + <v-layout>
  16 + <h4 class="right mt-2 ml-2">Student Report</h4>
  17 + </v-layout>
  18 + <v-spacer></v-spacer>
  19 + </v-card-actions>
  20 + </v-card>
  21 + <v-card flat>
  22 + <v-form ref="form" v-model="valid" lazy-validation>
  23 + <v-flex xs12 sm12 lg12>
  24 + <v-layout wrap>
  25 + <v-flex xs12 sm12 lg4>
  26 + <v-layout>
  27 + <v-flex xs3 sm6 lg3 class="subheading mt-4">
  28 + <label class="right">Report For :</label>
  29 + </v-flex>
  30 + <v-flex xs12 sm12 lg8 class="ml-2">
  31 + <v-select
  32 + v-model="report.form"
  33 + label="Select your report for"
  34 + :items="formList"
  35 + item-text="name"
  36 + item-value="value"
  37 + @change="getReport(report.form)"
  38 + :rules="formRules"
  39 + required
  40 + ></v-select>
  41 + </v-flex>
  42 + </v-layout>
  43 + </v-flex>
  44 + <v-flex xs12 sm12 lg4 v-if="bloodGroup">
  45 + <v-layout>
  46 + <v-flex xs3 sm6 lg4 class="subheading mt-4">
  47 + <label class="right">Blood Group :</label>
  48 + </v-flex>
  49 + <v-flex xs12 sm12 lg8 class="ml-2">
  50 + <v-select
  51 + v-model="report.bloodGroup"
  52 + label="Select your Blood Group "
  53 + :items="bloodGroupList"
  54 + :rules="bloodGroupRules"
  55 + required
  56 + ></v-select>
  57 + </v-flex>
  58 + </v-layout>
  59 + </v-flex>
  60 + <v-flex xs12 sm12 lg4 v-if="genderShow">
  61 + <v-layout>
  62 + <v-flex xs3 sm6 lg4 class="subheading mt-4">
  63 + <label class="right">Gender:</label>
  64 + </v-flex>
  65 + <v-flex xs12 sm12 lg8 class="ml-2">
  66 + <v-select
  67 + v-model="report.gender"
  68 + label="Select your gender "
  69 + :items="gender"
  70 + :rules="genderRules"
  71 + required
  72 + ></v-select>
  73 + </v-flex>
  74 + </v-layout>
  75 + </v-flex>
  76 + <v-flex xs12 sm12 lg4 v-if="TransportShow">
  77 + <v-layout>
  78 + <v-flex xs3 sm6 lg4 class="subheading mt-4">
  79 + <label class="right">Route:</label>
  80 + </v-flex>
  81 + <v-flex xs12 sm12 lg8 class="ml-2">
  82 + <v-select
  83 + v-model="report.route"
  84 + label="Select your gender "
  85 + :items="route"
  86 + :rules="routeRules"
  87 + required
  88 + ></v-select>
  89 + </v-flex>
  90 + </v-layout>
  91 + </v-flex>
  92 + <v-flex xs12 sm12 lg4 v-if="HostelShow">
  93 + <v-layout>
  94 + <v-flex xs3 sm6 lg4 class="subheading mt-4">
  95 + <label class="right">Hostel:</label>
  96 + </v-flex>
  97 + <v-flex xs12 sm12 lg8 class="ml-2">
  98 + <v-select
  99 + v-model="report.route"
  100 + label="Select your hostel "
  101 + :items="hostelList"
  102 + :rules="hostelRules"
  103 + required
  104 + ></v-select>
  105 + </v-flex>
  106 + </v-layout>
  107 + </v-flex>
  108 + <v-flex xs12 sm12 lg4 v-if="countryShow">
  109 + <v-layout>
  110 + <v-flex xs3 sm6 lg4 class="subheading mt-4">
  111 + <label class="right">Country :</label>
  112 + </v-flex>
  113 + <v-flex xs12 sm12 lg8 class="ml-2">
  114 + <v-select
  115 + v-model="report.country"
  116 + label="Select your Country "
  117 + :items="countryList"
  118 + :rules="countryRules"
  119 + required
  120 + ></v-select>
  121 + </v-flex>
  122 + </v-layout>
  123 + </v-flex>
  124 + <!-- <v-flex xs12 sm12 lg4 v-show="BirthdayShow">
  125 + <v-layout>
  126 + <v-flex xs3 sm6 lg4 class="subheading mt-4">
  127 + <label class="right">Country :</label>
  128 + </v-flex>
  129 + <v-flex xs12 sm12 lg8 class="ml-2">
  130 + <v-select
  131 + v-model="report.country"
  132 + label="Select your Country "
  133 + :items="countryList"
  134 + required
  135 + ></v-select>
  136 + </v-flex>
  137 + </v-layout>
  138 + </v-flex>-->
  139 + <v-flex xs12 sm12 lg4>
  140 + <v-layout>
  141 + <v-flex xs3 sm6 lg3 class="subheading mt-4">
  142 + <label class="right">Class:</label>
  143 + </v-flex>
  144 + <v-flex xs12 sm12 lg8 class="ml-2">
  145 + <v-select
  146 + v-model="report.classId"
  147 + label="Select your class"
  148 + type="text"
  149 + :rules="classRules"
  150 + :items="classList"
  151 + item-text="classNum"
  152 + item-value="_id"
  153 + @change="getSections(report.classId)"
  154 + required
  155 + ></v-select>
  156 + </v-flex>
  157 + </v-layout>
  158 + </v-flex>
  159 + <v-flex xs12 sm12 lg4 v-if="sectionShow">
  160 + <v-layout>
  161 + <v-flex xs3 sm6 lg3 class="subheading mt-4">
  162 + <label class="right">Section:</label>
  163 + </v-flex>
  164 + <v-flex xs12 sm12 lg8 class="ml-2">
  165 + <v-select
  166 + :items="addSection"
  167 + label="Select your Section"
  168 + v-model="report.sectionId"
  169 + :rules="sectionRules"
  170 + item-text="name"
  171 + item-value="_id"
  172 + name="Select Section"
  173 + required
  174 + ></v-select>
  175 + </v-flex>
  176 + </v-layout>
  177 + </v-flex>
  178 + <v-flex xs12 sm12 lg4>
  179 + <v-btn @click="getStudents" round dark :loading="loading" class="mt-3 ml-5">Get Report</v-btn>
  180 + </v-flex>
  181 + </v-layout>
  182 + </v-flex>
  183 + </v-form>
  184 + </v-card>
  185 + <v-card flat v-if="getStudentsReportList">
  186 + <v-card-actions>
  187 + <v-layout>
  188 + <h5 class="right mt-2 ml-2">Student Report</h5>
  189 + <!-- <h5 class="right mt-2 ml-2">: {{ getStudentsReportList[0].classId.classNum }}</h5> -->
  190 + </v-layout>
  191 + <v-spacer></v-spacer>
  192 + <v-layout>
  193 + <h5 class=" mt-2 ml-2">Student Report</h5>
  194 + <!-- <h5 class=" mt-2 ml-2">: {{ getStudentsReportList[0].sectionId.name }}</h5> -->
  195 + </v-layout>
  196 + </v-card-actions>
  197 + </v-card>
  198 + <v-data-table
  199 + :headers="headers"
  200 + :items="getStudentsReportList"
  201 + :pagination.sync="pagination"
  202 + :search="search"
  203 + >
  204 + <template slot="items" slot-scope="props">
  205 + <td class="text-xs-center">{{ props.index + 1}}</td>
  206 + <td id="td" class="text-xs-center">
  207 + <v-avatar>
  208 + <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
  209 + <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
  210 + </v-avatar>
  211 + </td>
  212 + <td id="td" class="text-xs-center">{{ props.item.name}}</td>
  213 + <td id="td" class="text-xs-center">{{ props.item.rollNo }}</td>
  214 + <td id="td" class="text-xs-center">{{ props.item.email }}</td>
  215 + </template>
  216 + <v-alert
  217 + slot="no-results"
  218 + :value="true"
  219 + color="error"
  220 + icon="warning"
  221 + >Your search for "{{ search }}" found no results.</v-alert>
  222 + </v-data-table>
  223 + <div class="loader" v-if="showLoader">
  224 + <v-progress-circular indeterminate color="white"></v-progress-circular>
  225 + </div>
  226 + </v-app>
  227 +</template>
  228 +
  229 +<script>
  230 +import http from "@/Services/http.js";
  231 +import countryList from "@/script/country.js";
  232 +
  233 +import moment from "moment";
  234 +
  235 +export default {
  236 + data: () => ({
  237 + snackbar: false,
  238 + color: "",
  239 + y: "top",
  240 + x: "right",
  241 + mode: "",
  242 + timeout: 10000,
  243 + text: "",
  244 + loading: false,
  245 + valid: true,
  246 + search: "",
  247 + showLoader: false,
  248 + bloodGroup: false,
  249 + genderShow: false,
  250 + countryShow: false,
  251 + TransportShow: false,
  252 + HostelShow: false,
  253 + BirthdayShow: false,
  254 + sectionShow: false,
  255 + showTable: false,
  256 + addSection: [],
  257 + pagination: {
  258 + rowsPerPage: 15
  259 + },
  260 + formRules: [v => !!v || "Form For is required"],
  261 + bloodGroupRules: [v => !!v || "Blood group is required"],
  262 + classRules: [v => !!v || "Class is required"],
  263 + sectionRules: [v => !!v || "Class is required"],
  264 + genderRules: [v => !!v || "Gender is required"],
  265 + routeRules: [v => !!v || "RouteI is required"],
  266 + hostelRules: [v => !!v || "Hostel is required"],
  267 + countryRules: [v => !!v || "Country is required"],
  268 + headers: [
  269 + {
  270 + align: "justify-center",
  271 + text: "No",
  272 + sortable: false,
  273 + value: "No"
  274 + },
  275 + {
  276 + text: "Profile Pic",
  277 + vaue: "profilePicUrl",
  278 + sortable: false,
  279 + align: "center"
  280 + },
  281 + {
  282 + text: "Name",
  283 + vaue: "name",
  284 + sortable: false,
  285 + align: "center"
  286 + },
  287 + {
  288 + text: "Roll No.",
  289 + value: "rollNo",
  290 + sortable: false,
  291 + align: "center"
  292 + },
  293 + {
  294 + text: "Email",
  295 + value: "email",
  296 + sortable: false,
  297 + align: "center"
  298 + }
  299 + ],
  300 + classList: [],
  301 + report: {},
  302 + markData: [],
  303 + formList: [
  304 + {
  305 + name: "Blood Group",
  306 + value: "bloodGroup"
  307 + },
  308 + "Country",
  309 + "Gender",
  310 + "Transport",
  311 + "Hostel"
  312 + // "Birthday"
  313 + ],
  314 + bloodGroupList: ["A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-"],
  315 + gender: ["Male", "female"],
  316 + getStudentsReportList: [],
  317 + studentReort: "",
  318 + countryList: [],
  319 + route: [],
  320 + Hostel: [],
  321 + hostelList: [],
  322 + token: ""
  323 + }),
  324 + methods: {
  325 + clear() {
  326 + this.$refs.form.reset();
  327 + // console.log("this.clear()", this.$refs.form.reset;
  328 + },
  329 + getClass() {
  330 + http()
  331 + .get("/getClassesList", {
  332 + headers: { Authorization: "Bearer " + this.token }
  333 + })
  334 + .then(response => {
  335 + this.classList = response.data.data;
  336 + })
  337 + .catch(err => {
  338 + // console.log("err====>", err);
  339 + });
  340 + },
  341 + getReport() {
  342 + if (this.report.form === "bloodGroup") {
  343 + this.bloodGroup = true;
  344 + this.genderShow = false;
  345 + this.TransportShow = false;
  346 + this.countryShow = false;
  347 + this.BirthdayShow = false;
  348 + this.HostelShow = false;
  349 + }
  350 + if (this.report.form === "Gender") {
  351 + this.genderShow = true;
  352 + this.bloodGroup = false;
  353 + this.TransportShow = false;
  354 + this.BirthdayShow = false;
  355 + this.countryShow = false;
  356 + this.HostelShow = false;
  357 + }
  358 + if (this.report.form === "Transport") {
  359 + this.TransportShow = true;
  360 + this.genderShow = false;
  361 + this.bloodGroup = false;
  362 + this.BirthdayShow = false;
  363 + this.countryShow = false;
  364 + this.HostelShow = false;
  365 + }
  366 + if (this.report.form === "Country") {
  367 + this.countryShow = true;
  368 + this.TransportShow = false;
  369 + this.genderShow = false;
  370 + this.bloodGroup = false;
  371 + this.BirthdayShow = false;
  372 + this.HostelShow = false;
  373 + }
  374 + if (this.report.form === "Hostel") {
  375 + this.HostelShow = true;
  376 + this.TransportShow = false;
  377 + this.genderShow = false;
  378 + this.bloodGroup = false;
  379 + this.countryShow = false;
  380 + this.BirthdayShow = false;
  381 + }
  382 + if (this.report.form === "Birthday") {
  383 + this.BirthdayShow = true;
  384 + this.TransportShow = false;
  385 + this.genderShow = false;
  386 + this.HostelShow = false;
  387 + this.bloodGroup = false;
  388 + this.countryShow = false;
  389 + }
  390 + },
  391 + getStudents() {
  392 + if (this.$refs.form.validate()) {
  393 + this.showLoader = true;
  394 + // for (let i = 0; i < this.classList.length; i++) {
  395 + // if (this.report.classId === this.classList[i]._id) {
  396 + // Number(this.studentReort.className) = this.classList[i].classNum;
  397 + // }
  398 + // }
  399 + // for (let i = 0; i < this.addSection.length; i++) {
  400 + // if (this.report.sectionId === this.addSection[i]._id) {
  401 + // this.studentReort.sectionName = this.addSection[i].name;
  402 + // }
  403 + // }
  404 + http()
  405 + .get("/getStudentReport", {
  406 + params: {
  407 + bloodGroup: this.report.bloodGroup,
  408 + country: this.report.country,
  409 + gender: this.report.gender,
  410 + classId: this.report.classId,
  411 + sectionId: this.report.sectionId
  412 + },
  413 + headers: { Authorization: "Bearer " + this.token }
  414 + })
  415 + .then(response => {
  416 + this.getStudentsReportList = response.data.data;
  417 + this.showTable = true;
  418 + this.showLoader = false;
  419 + this.clear();
  420 + // console.log("getSectionsList=====>", response.data.data);
  421 + })
  422 + .catch(error => {
  423 + console.log("err====>", error);
  424 + this.showLoader = false;
  425 + });
  426 + }
  427 + },
  428 + getSections() {
  429 + this.sectionShow = true;
  430 + this.showLoader = true;
  431 + http()
  432 + .get(
  433 + "/getSectionsList",
  434 + { params: { classId: this.report.classId } },
  435 + {
  436 + headers: { Authorization: "Bearer " + this.token }
  437 + }
  438 + )
  439 + .then(response => {
  440 + this.addSection = response.data.data;
  441 + this.showLoader = false;
  442 + })
  443 + .catch(error => {
  444 + console.log("err====>", error);
  445 + this.showLoader = false;
  446 + });
  447 + }
  448 + // getFormList() {
  449 + // this.showLoader = true;
  450 + // http()
  451 + // .get("/getExamsList", {
  452 + // headers: { Authorization: "Bearer " + this.token }
  453 + // })
  454 + // .then(response => {
  455 + // this.formList = response.data.data;
  456 + // this.showLoader = false;
  457 + // })
  458 + // .catch(error => {
  459 + // // console.log("err====>", err);
  460 + // this.showLoader = false;
  461 + // this.snackbar = true;
  462 + // this.text = error.response.data.message;
  463 + // if (error.response.status === 401) {
  464 + // this.$router.replace({ path: "/" });
  465 + // this.$store.dispatch("setToken", null);
  466 + // this.$store.dispatch("Id", null);
  467 + // }
  468 + // });
  469 + // }
  470 + },
  471 + mounted() {
  472 + this.token = this.$store.state.token;
  473 + const getindustryList = countryList();
  474 + this.countryList = getindustryList;
  475 + // console.log("getindustryList", this.countryList);
  476 + // this.getExamList();
  477 + this.getClass();
  478 + },
  479 + created() {
  480 + this.$root.$on("app:search", search => {
  481 + this.search = search;
  482 + });
  483 + },
  484 + beforeDestroy() {
  485 + // dont forget to remove the listener
  486 + this.$root.$off("app:search");
  487 + }
  488 +};
  489 +</script>
  490 +<style scoped>
  491 +.active {
  492 + background-color: gray;
  493 + color: white !important;
  494 +}
  495 +.activebtn {
  496 + color: black !important;
  497 +}
  498 +</style>s
0 499 \ No newline at end of file
... ...
src/pages/Students/students.vue
... ... @@ -1568,14 +1568,12 @@
1568 1568 </v-flex>
1569 1569 </v-layout>
1570 1570 </v-flex>
1571   - </v-layout>
1572   - <v-layout class="hidden-xs-only hidden-sm-only" wrap>
1573   - <v-flex xs12 sm12>
  1571 + <v-flex xs12 sm6 class="hidden-xs-only hidden-sm-only">
1574 1572 <v-layout>
1575   - <v-flex xs4 sm2 class="pt-4 subheading ml-5">
  1573 + <v-flex xs4 sm4 class="pt-4 subheading">
1576 1574 <label class="right pr-4">Present Address:</label>
1577 1575 </v-flex>
1578   - <v-flex xs8 sm12>
  1576 + <v-flex xs8 sm8 class="ml-3">
1579 1577 <v-text-field
1580 1578 name="input-4-3"
1581 1579 v-model="addStudents.presentAddress"
... ... @@ -1586,12 +1584,14 @@
1586 1584 </v-flex>
1587 1585 </v-layout>
1588 1586 </v-flex>
1589   - <v-flex xs12 sm12>
  1587 + </v-layout>
  1588 + <v-layout class="hidden-xs-only hidden-sm-only" wrap>
  1589 + <v-flex xs12 sm6>
1590 1590 <v-layout>
1591   - <v-flex xs4 sm2 class="pt-4 subheading ml-5 addressForm">
1592   - <label class>Permanent Address:</label>
  1591 + <v-flex xs4 sm4 class="pt-4 subheading addressForm">
  1592 + <label class="right">Permanent Address:</label>
1593 1593 </v-flex>
1594   - <v-flex xs12 sm12>
  1594 + <v-flex xs12 sm8 class="ml-3">
1595 1595 <v-text-field
1596 1596 name="input-4-3"
1597 1597 v-model="addStudents.permanentAddress"
... ... @@ -1606,7 +1606,7 @@
1606 1606 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap>
1607 1607 <v-flex xs12 sm12>
1608 1608 <v-layout>
1609   - <v-flex xs12 sm3 class="pt-4 subheading text-xs-center">
  1609 + <v-flex xs12 sm12 class="pt-4 subheading text-xs-center">
1610 1610 <label class>Present Address :</label>
1611 1611 </v-flex>
1612 1612 </v-layout>
... ... @@ -1626,7 +1626,7 @@
1626 1626 <v-layout>
1627 1627 <v-flex
1628 1628 xs12
1629   - sm3
  1629 + sm12
1630 1630 class="pt-4 pr-4 subheading text-xs-center addressForm"
1631 1631 >
1632 1632 <label>Permanent addr:</label>
... ...
src/pages/Teachers/teachers.vue
... ... @@ -803,12 +803,12 @@
803 803 </v-flex>
804 804 </v-layout>
805 805 <v-layout class="hidden-xs-only hidden-sm-only">
806   - <v-flex xs12 sm12>
  806 + <v-flex xs12 sm6>
807 807 <v-layout>
808   - <v-flex xs4 md2 class="pt-4 subheading ml-5">
809   - <label class="right pr-4">Present Address:</label>
  808 + <v-flex xs4 md4 class="pt-4 subheading">
  809 + <label class="right">Present Address:</label>
810 810 </v-flex>
811   - <v-flex xs8 md10>
  811 + <v-flex xs8 md8 class="ml-3">
812 812 <v-text-field
813 813 name="input-4-3"
814 814 v-model="addTeachers.presentAddress"
... ... @@ -819,12 +819,12 @@
819 819 </v-flex>
820 820 </v-layout>
821 821 </v-flex>
822   - <v-flex xs12 sm12>
  822 + <v-flex xs12 sm6>
823 823 <v-layout>
824   - <v-flex xs4 md2 class="pt-4 subheading ml-5 addressForm">
825   - <label class="right pr-4">Permanent Address:</label>
  824 + <v-flex xs4 md4 class="pt-4 subheading addressForm">
  825 + <label class="right">Permanent Address:</label>
826 826 </v-flex>
827   - <v-flex xs12 md10>
  827 + <v-flex xs12 md8 class="ml-3">
828 828 <v-text-field
829 829 name="input-4-3"
830 830 v-model="addTeachers.permanentAddress"
... ... @@ -875,9 +875,9 @@
875 875 </v-flex>
876 876 </v-layout>
877 877 <v-layout class="mx-2">
878   - <v-flex xs12 sm12>
  878 + <v-flex xs12 sm11 offset-sm1>
879 879 <v-layout>
880   - <v-flex xs6>
  880 + <v-flex xs6 class="">
881 881 <v-btn @click="clear" round dark>clear</v-btn>
882 882 </v-flex>
883 883 <v-flex xs6>
... ...
src/router/paths.js
... ... @@ -489,4 +489,124 @@ export default [{
489 489 `@/pages/Exam/examSchedule.vue`
490 490 )
491 491 },
  492 + {
  493 + path: '/mark',
  494 + meta: {},
  495 + name: 'Mark',
  496 + props: (route) => ({ type: route.query.type }),
  497 + component: () =>
  498 + import (
  499 + /* webpackChunkName: "routes" */
  500 + /* webpackMode: "lazy-once" */
  501 + `@/pages/Mark/mark.vue`
  502 + )
  503 + },
  504 + {
  505 + path: '/viewMark/:markId',
  506 + meta: {},
  507 + name: 'viewMark',
  508 + props: (route) => ({ type: route.query.type }),
  509 + component: () =>
  510 + import (
  511 + /* webpackChunkName: "routes" */
  512 + /* webpackMode: "lazy-once" */
  513 + `@/pages/Mark/viewMark.vue`
  514 + )
  515 + },
  516 + {
  517 + path: '/markDistribution',
  518 + meta: {},
  519 + name: 'markDistribution',
  520 + props: (route) => ({ type: route.query.type }),
  521 + component: () =>
  522 + import (
  523 + /* webpackChunkName: "routes" */
  524 + /* webpackMode: "lazy-once" */
  525 + `@/pages/Mark/markDistribution.vue`
  526 + )
  527 + },
  528 + {
  529 + path: '/promotion',
  530 + meta: {},
  531 + name: 'Promotion',
  532 + props: (route) => ({ type: route.query.type }),
  533 + component: () =>
  534 + import (
  535 + /* webpackChunkName: "routes" */
  536 + /* webpackMode: "lazy-once" */
  537 + `@/pages/Mark/promotion.vue`
  538 + )
  539 + },
  540 + {
  541 + path: '/academicYear',
  542 + meta: {},
  543 + name: 'academicYear',
  544 + props: (route) => ({ type: route.query.type }),
  545 + component: () =>
  546 + import (
  547 + /* webpackChunkName: "routes" */
  548 + /* webpackMode: "lazy-once" */
  549 + `@/pages/Administrator/academicYear.vue`
  550 + )
  551 + },
  552 + {
  553 + path: '/systemAdmin',
  554 + meta: {},
  555 + name: 'systemAdmin',
  556 + props: (route) => ({ type: route.query.type }),
  557 + component: () =>
  558 + import (
  559 + /* webpackChunkName: "routes" */
  560 + /* webpackMode: "lazy-once" */
  561 + `@/pages/Administrator/systemAdmin.vue`
  562 + )
  563 + },
  564 + {
  565 + path: '/resetPassword',
  566 + meta: {},
  567 + name: 'resetPassword',
  568 + props: (route) => ({ type: route.query.type }),
  569 + component: () =>
  570 + import (
  571 + /* webpackChunkName: "routes" */
  572 + /* webpackMode: "lazy-once" */
  573 + `@/pages/Administrator/resetPassword.vue`
  574 + )
  575 + },
  576 + {
  577 + path: '/role',
  578 + meta: {},
  579 + name: 'Role',
  580 + props: (route) => ({ type: route.query.type }),
  581 + component: () =>
  582 + import (
  583 + /* webpackChunkName: "routes" */
  584 + /* webpackMode: "lazy-once" */
  585 + `@/pages/Administrator/role.vue`
  586 + )
  587 + },
  588 + {
  589 + path: '/studentReport',
  590 + meta: {},
  591 + name: 'studentReport',
  592 + props: (route) => ({ type: route.query.type }),
  593 + component: () =>
  594 + import (
  595 + /* webpackChunkName: "routes" */
  596 + /* webpackMode: "lazy-once" */
  597 + `@/pages/Report/studentReport.vue`
  598 + )
  599 + },
  600 + {
  601 + path: '/markSheetReport',
  602 + meta: {},
  603 + name: 'markSheetReport',
  604 + props: (route) => ({ type: route.query.type }),
  605 + component: () =>
  606 + import (
  607 + /* webpackChunkName: "routes" */
  608 + /* webpackMode: "lazy-once" */
  609 + `@/pages/Report/markSheetReport.vue`
  610 + )
  611 + }
492 612 ];
493 613 \ No newline at end of file
... ...
src/script/country.js
... ... @@ -0,0 +1,212 @@
  1 +export default () => {
  2 +
  3 + const countryList = [
  4 + "Afghanistan",
  5 + "Albania",
  6 + "Algeria",
  7 + "Andorra",
  8 + "Angola",
  9 + "Anguilla",
  10 + "Antigua &amp; Barbuda",
  11 + "Argentina",
  12 + "Armenia",
  13 + "Aruba",
  14 + "Australia",
  15 + "Austria",
  16 + "Azerbaijan",
  17 + "Bahamas",
  18 + "Bahrain",
  19 + "Bangladesh",
  20 + "Barbados",
  21 + "Belarus",
  22 + "Belgium",
  23 + "Belize",
  24 + "Benin",
  25 + "Bermuda",
  26 + "Bhutan",
  27 + "Bolivia",
  28 + "Bosnia &amp; Herzegovina",
  29 + "Botswana",
  30 + "Brazil",
  31 + "British Virgin Islands",
  32 + "Brunei",
  33 + "Bulgaria",
  34 + "Burkina Faso",
  35 + "Burundi",
  36 + "Cambodia",
  37 + "Cameroon",
  38 + "Cape Verde",
  39 + "Cayman Islands",
  40 + "Chad",
  41 + "Chile",
  42 + "China",
  43 + "Colombia",
  44 + "Congo",
  45 + "Cook Islands",
  46 + "Costa Rica",
  47 + "Cote D Ivoire",
  48 + "Croatia",
  49 + "Cruise Ship",
  50 + "Cuba",
  51 + "Cyprus",
  52 + "Czech Republic",
  53 + "Denmark",
  54 + "Djibouti",
  55 + "Dominica",
  56 + "Dominican Republic",
  57 + "Ecuador",
  58 + "Egypt",
  59 + "El Salvador",
  60 + "Equatorial Guinea",
  61 + "Estonia",
  62 + "Ethiopia",
  63 + "Falkland Islands",
  64 + "Faroe Islands",
  65 + "Fiji",
  66 + "Finland",
  67 + "France",
  68 + "French Polynesia",
  69 + "French West Indies",
  70 + "Gabon",
  71 + "Gambia",
  72 + "Georgia",
  73 + "Germany",
  74 + "Ghana",
  75 + "Gibraltar",
  76 + "Greece",
  77 + "Greenland",
  78 + "Grenada",
  79 + "Guam",
  80 + "Guatemala",
  81 + "Guernsey",
  82 + "Guinea",
  83 + "Guinea Bissau",
  84 + "Guyana",
  85 + "Haiti",
  86 + "Honduras",
  87 + "Hong Kong",
  88 + "Hungary",
  89 + "Iceland",
  90 + "India",
  91 + "Indonesia",
  92 + "Iran",
  93 + "Iraq",
  94 + "Ireland",
  95 + "Isle of Man",
  96 + "Israel",
  97 + "Italy",
  98 + "Jamaica",
  99 + "Japan",
  100 + "Jersey",
  101 + "Jordan",
  102 + "Kazakhstan",
  103 + "Kenya",
  104 + "Kuwait",
  105 + "Kyrgyz Republic",
  106 + "Laos",
  107 + "Latvia",
  108 + "Lebanon",
  109 + "Lesotho",
  110 + "Liberia",
  111 + "Libya",
  112 + "Liechtenstein",
  113 + "Lithuania",
  114 + "Luxembourg",
  115 + "Macau",
  116 + "Macedonia",
  117 + "Madagascar",
  118 + "Malawi",
  119 + "Malaysia",
  120 + "Maldives",
  121 + "Mali",
  122 + "Malta",
  123 + "Mauritania",
  124 + "Mauritius",
  125 + "Mexico",
  126 + "Moldova",
  127 + "Monaco",
  128 + "Mongolia",
  129 + "Montenegro",
  130 + "Montserrat",
  131 + "Morocco",
  132 + "Mozambique",
  133 + "Namibia",
  134 + "Nepal",
  135 + "Netherlands",
  136 + "Netherlands Antilles",
  137 + "New Caledonia",
  138 + "New Zealand",
  139 + "Nicaragua",
  140 + "Niger",
  141 + "Nigeria",
  142 + "Norway",
  143 + "Oman",
  144 + "Pakistan",
  145 + "Palestine",
  146 + "Panama",
  147 + "Papua New Guinea",
  148 + "Paraguay",
  149 + "Peru",
  150 + "Philippines",
  151 + "Poland",
  152 + "Portugal",
  153 + "Puerto Rico",
  154 + "Qatar",
  155 + "Reunion",
  156 + "Romania",
  157 + "Russia",
  158 + "Rwanda",
  159 + "Saint Pierre &amp; Miquelon",
  160 + "Samoa",
  161 + "San Marino",
  162 + "Satellite",
  163 + "Saudi Arabia",
  164 + "Senegal",
  165 + "Serbia",
  166 + "Seychelles",
  167 + "Sierra Leone",
  168 + "Singapore",
  169 + "Slovakia",
  170 + "Slovenia",
  171 + "South Africa",
  172 + "South Korea",
  173 + "Spain",
  174 + "Sri Lanka",
  175 + "St Kitts &amp; Nevis",
  176 + "St Lucia",
  177 + "St Vincent",
  178 + "St. Lucia",
  179 + "Sudan",
  180 + "Suriname",
  181 + "Swaziland",
  182 + "Sweden",
  183 + "Switzerland",
  184 + "Syria",
  185 + "Taiwan",
  186 + "Tajikistan",
  187 + "Tanzania",
  188 + "Thailand",
  189 + "Timor L'Este",
  190 + "Togo",
  191 + "Tonga",
  192 + "Trinidad &amp; Tobago",
  193 + "Tunisia",
  194 + "Turkey",
  195 + "Turkmenistan",
  196 + "Turks &amp; Caicos",
  197 + "Uganda",
  198 + "Ukraine",
  199 + "United Arab Emirates",
  200 + "United Kingdom",
  201 + "United States",
  202 + "Uruguay",
  203 + "Uzbekistan",
  204 + "Venezuela",
  205 + "Vietnam",
  206 + "Virgin Islands (US)",
  207 + "Yemen",
  208 + "Zambia",
  209 + "Zimbabwe"
  210 + ]
  211 + return countryList;
  212 +}
0 213 \ No newline at end of file
... ...
static/schoolIcons/administrator.png

20.6 KB

static/schoolIcons/marks.png

16 KB

static/schoolIcons/reports.png

17.3 KB

static/schoolIcons/settings.png

16.5 KB