Commit 79583580d998c71221ead5f5e7250293d62ec3e4

Authored by Neeraj Sharma
1 parent 495e4037c6

implement task mark,setting,administrator and report

package-lock.json
... ... @@ -15232,6 +15232,11 @@
15232 15232 }
15233 15233 }
15234 15234 },
  15235 + "underscore": {
  15236 + "version": "1.9.1",
  15237 + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz",
  15238 + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg=="
  15239 + },
15235 15240 "union-value": {
15236 15241 "version": "1.0.0",
15237 15242 "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
... ... @@ -15652,9 +15657,9 @@
15652 15657 "dev": true
15653 15658 },
15654 15659 "vee-validate": {
15655   - "version": "2.0.9",
15656   - "resolved": "https://registry.npmjs.org/vee-validate/-/vee-validate-2.0.9.tgz",
15657   - "integrity": "sha512-0qA3hrpF2jIBoEReWF8YkvG1ukJVS56+oyPTxOtb2OfB5d7iUuQiyboOOpXOvOViREHNXTsIcQ5XIQOMBff/wg=="
  15660 + "version": "2.2.15",
  15661 + "resolved": "https://registry.npmjs.org/vee-validate/-/vee-validate-2.2.15.tgz",
  15662 + "integrity": "sha512-4TOsI8XwVkKVLkg8Nhmy+jyoJrR6XcTRDyxBarzcCvYzU61zamipS1WsB6FlDze8eJQpgglS4NXAS6o4NDPs1g=="
15658 15663 },
15659 15664 "vendors": {
15660 15665 "version": "1.0.1",
... ...
... ... @@ -25,7 +25,8 @@
25 25 "nprogress": "^0.2.0",
26 26 "quill": "^1.3.6",
27 27 "save": "^2.4.0",
28   - "vee-validate": "^2.0.9",
  28 + "underscore": "^1.9.1",
  29 + "vee-validate": "^2.2.15",
29 30 "vue": "^2.5.16",
30 31 "vue-full-calendar": "^2.7.0",
31 32 "vue-html2canvas": "0.0.4",
... ...
src/Services/http.js
... ... @@ -3,7 +3,7 @@ import store from '@/store/store'
3 3  
4 4 export default () => {
5 5 return axios.create({
6   - // baseURL: 'http://192.168.4.220:3002/v1',
  6 + // baseURL: 'http://192.168.2.221:3002/v1',
7 7 baseURL: 'http://13.234.251.173:8001/v1',
8 8 headers: {
9 9 Authorization: `Bearer ${store.state.token}`
... ...
... ... @@ -157,11 +157,6 @@ const Menu = [
157 157 icon: '/static/schoolIcons/Events.png',
158 158 },
159 159 {
160   - title: 'Holiday',
161   - path: '/Holiday',
162   - icon: '/static/schoolIcons/Holidays.png',
163   - },
164   - {
165 160 title: 'Account',
166 161 group: 'Account',
167 162 component: 'Account',
... ... @@ -173,6 +168,16 @@ const Menu = [
173 168 { name: 'Expense', title: 'Expense', component: 'Expense', action: '', },
174 169 { name: 'Income', title: 'Income', component: 'Income', action: '', },
175 170 ]
  171 + },
  172 + {
  173 + title: 'Holiday',
  174 + path: '/Holiday',
  175 + icon: '/static/schoolIcons/Holidays.png',
  176 + },
  177 + {
  178 + title: 'General Setting',
  179 + path: '/generalSetting',
  180 + icon: '/static/schoolIcons/settings.png',
176 181 }
177 182 ];
178 183  
... ...
src/components/pageHeader/AppToolbar.vue
... ... @@ -9,7 +9,7 @@
9 9 xs7
10 10 sm3
11 11 class="userSearch"
12   - v-if="$route.name != 'Dashboard' && $route.name != 'changepassword'"
  12 + v-if="$route.name != 'Dashboard' && $route.name != 'changepassword' && $route.name != 'generalSetting' && $route.name != 'resetPassword'"
13 13 >
14 14 <v-text-field
15 15 flat
... ... @@ -25,9 +25,9 @@
25 25 <v-spacer></v-spacer>
26 26 <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
27 27 <v-btn icon large flat slot="activator">
28   - <v-avatar >
  28 + <v-avatar>
29 29 <!-- <img src="/static/icon/user.png" /> -->
30   - <v-icon dark size="40px">account_circle</v-icon>
  30 + <v-icon dark size="40px">account_circle</v-icon>
31 31 </v-avatar>
32 32 </v-btn>
33 33 <v-list class="pa-0">
... ... @@ -63,7 +63,7 @@ export default {
63 63 items: [
64 64 {
65 65 icon: "account_circle",
66   - href: "/changepassword",
  66 + href: "/resetPassword",
67 67 title: "Change Password",
68 68 click: e => {
69 69 console.log(e);
... ... @@ -111,7 +111,7 @@ export default {
111 111 font-size: 30px;
112 112 }
113 113 .fixcolors {
114   - background: #444B54 !important;
  114 + background: #444b54 !important;
115 115 }
116 116 @media screen and (min-width: 1270px) {
117 117 .hide {
... ...
... ... @@ -27,6 +27,15 @@ Vue.use(FullCalendar);
27 27 // Vue.use(VueAxios, axios);
28 28 Vue.filter('truncate', Truncate);
29 29 Vue.use(VeeValidate, { fieldsBagName: 'formFields' });
  30 +VeeValidate.Validator.localize({
  31 + en: {
  32 + custom: {
  33 + password2: {
  34 + is: 'The passwords do not match'
  35 + }
  36 + }
  37 + }
  38 +})
30 39 Vue.use(Vuetify, {
31 40 // theme: {
32 41 // primary: "f1f1f1", // #E53935
... ...
src/pages/Administrator/academicYear.vue
... ... @@ -44,7 +44,7 @@
44 44 <v-flex xs4 class="pt-4 subheading">
45 45 <label class="right">Year:</label>
46 46 </v-flex>
47   - <v-flex xs8 sm5 class="ml-3">
  47 + <v-flex xs8 sm6 class="ml-3">
48 48 <v-text-field
49 49 v-model="editedItem.year"
50 50 placeholder="fill your Title"
... ... @@ -59,7 +59,7 @@
59 59 <v-flex xs4 class="pt-4 subheading">
60 60 <label class="right">Year Title:</label>
61 61 </v-flex>
62   - <v-flex xs8 sm5 class="ml-3">
  62 + <v-flex xs8 sm6 class="ml-3">
63 63 <v-text-field
64 64 v-model="editedItem.yearTitle"
65 65 placeholder="fill your Year Title"
... ... @@ -74,7 +74,7 @@
74 74 <v-flex xs4 class="pt-4 subheading">
75 75 <label class="right">Date:</label>
76 76 </v-flex>
77   - <v-flex xs8 sm5 class="ml-3">
  77 + <v-flex xs8 sm6 class="ml-3">
78 78 <v-menu
79 79 ref="menu"
80 80 :close-on-content-click="false"
... ... @@ -104,9 +104,9 @@
104 104 <v-flex xs12 sm12>
105 105 <v-layout>
106 106 <v-flex xs4 class="pt-4 subheading">
107   - <label class="right">Date:</label>
  107 + <label class="right">Starting Date:</label>
108 108 </v-flex>
109   - <v-flex xs8 sm5 class="ml-3">
  109 + <v-flex xs8 sm6 class="ml-3">
110 110 <v-menu
111 111 ref="menuEndDate"
112 112 :close-on-content-click="false"
... ... @@ -149,8 +149,8 @@
149 149  
150 150 <!-- ****** PROFILE ACADEMIC YEAR DEATILS ****** -->
151 151  
152   - <v-dialog v-model="dialog1" max-width="700px">
153   - <v-toolbar color="white">
  152 + <v-dialog v-model="dialog1" max-width="500px">
  153 + <v-toolbar color="v-toolbar">
154 154 <v-spacer></v-spacer>
155 155 <v-toolbar-title>
156 156 <h3>Academic Year</h3>
... ... @@ -176,21 +176,31 @@
176 176 <v-layout>
177 177 <v-flex xs5 sm6>
178 178 <h5 class="right my-1">
179   - <b>Date:</b>
  179 + <b>Year Title:</b>
180 180 </h5>
181 181 </v-flex>
182 182 <v-flex sm6 xs8>
183   - <h5 class="my-1">{{ dates(editedItem.dateOfEvent) }}</h5>
  183 + <h5 class="my-1">{{ editedItem.yearTitle }}</h5>
184 184 </v-flex>
185 185 </v-layout>
186 186 <v-layout>
187 187 <v-flex xs5 sm6>
188 188 <h5 class="right my-1">
189   - <b>Description:</b>
  189 + <b>Starting Date:</b>
190 190 </h5>
191 191 </v-flex>
192 192 <v-flex sm6 xs8>
193   - <h5 class="my-1">{{ editedItem.yearTitle }}</h5>
  193 + <h5 class="my-1">{{dates(editedItem.startingDate)}}</h5>
  194 + </v-flex>
  195 + </v-layout>
  196 + <v-layout>
  197 + <v-flex xs5 sm6>
  198 + <h5 class="right my-1">
  199 + <b>Ending Date:</b>
  200 + </h5>
  201 + </v-flex>
  202 + <v-flex sm6 xs8>
  203 + <h5 class="my-1">{{dates(editedItem.endingDate)}}</h5>
194 204 </v-flex>
195 205 </v-layout>
196 206 </v-flex>
... ...
src/pages/Administrator/resetPassword.vue
... ... @@ -11,17 +11,39 @@
11 11 <v-card class="elevation-1 pa-3" id="form">
12 12 <v-card-text>
13 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>
  14 + <v-form class="mt-3" ref="form" v-model="valid" lazy-validation>
  15 + <v-select
  16 + :rules="userRule"
  17 + label="Select User"
  18 + :items="getRoles"
  19 + item-text="name"
  20 + item-value="name"
  21 + v-model="resetPassword.name"
  22 + @change="getUsers(resetPassword.name)"
  23 + ></v-select>
  24 + <v-select
  25 + :rules="userNameRule"
  26 + label="Select User Name"
  27 + :items="getUsersName"
  28 + item-text="email"
  29 + item-value="email"
  30 + v-model="resetPassword.email"
  31 + ></v-select>
17 32 <v-text-field
18   - :rules="[rules.required]"
19   - v-model="user.oldPassword"
  33 + :rules="newPasswordRule"
  34 + v-model="resetPassword.newPassword"
  35 + :error-messages="errors.collect('resetPassword.newPassword')"
  36 + v-validate="'required'"
  37 + data-vv-name="resetPassword.newPassword"
20 38 label="New Password"
21 39 ></v-text-field>
22 40 <v-text-field
23   - v-model="user.newPassword"
24   - :rules="[rules.required]"
  41 + v-model="resetPassword.confirmPassword"
  42 + :rules="rePasswordRule"
  43 + :error-messages="errors.collect('password2')"
  44 + v-validate="{ required: true, is: resetPassword.newPassword }"
  45 + data-vv-name="password2"
  46 + data-vv-as="password"
25 47 label="Re-Password"
26 48 ></v-text-field>
27 49 </v-form>
... ... @@ -66,52 +88,99 @@ export default {
66 88 mode: "",
67 89 timeout: 4000,
68 90 text: "",
69   - user: {},
70   - users: [],
71   - usersName: [],
72   - e1: true,
73   - e2: true,
74   - e3: true,
  91 + color: "",
  92 + password2: "",
  93 + resetPassword: {},
  94 + getUsersName: [],
  95 + getRoles: [],
  96 + valid: true,
75 97 loading: false,
76   - valid: false,
77 98 text: "Password Changed",
78   - currentPassword: "",
79 99 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   - }
  100 + userRule: [v => !!v || "User is required"],
  101 + userNameRule: [v => !!v || "User Name is required"],
  102 + newPasswordRule: [v => !!v || "New Password is required"],
  103 + rePasswordRule: [v => !!v || "Re-Password is required"]
85 104 };
86 105 },
  106 + mounted() {
  107 + this.token = this.$store.state.token;
  108 + this.getRole();
  109 + },
87 110 methods: {
88 111 reset() {
89   - var token = this.$store.state.token;
  112 + if (this.$refs.form.validate()) {
  113 + this.loading = true;
  114 + this.resetPassword.roleName = this.resetPassword.name;
  115 + http()
  116 + .put("/resetPasswordOfUsers", this.resetPassword, {
  117 + headers: { Authorization: "Bearer " + this.token }
  118 + })
  119 + .then(response => {
  120 + this.loading = false;
  121 + this.snackbar = true;
  122 + this.text = "Successfully Restet password !!";
  123 + this.color = "green";
  124 + this.clear();
  125 + })
  126 + .catch(error => {
  127 + // console.log("err====>",err);
  128 + this.snackbar = true;
  129 + this.text = "User Not Found or Incorrect currentPassword";
  130 + this.color = "error";
  131 + this.loading = false;
  132 + });
  133 + }
  134 + },
  135 + getRole() {
  136 + this.showLoader = true;
90 137 http()
91   - .put("/schoolChangePassword", {
92   - headers: { Authorization: "Bearer " + token }
  138 + .get("/getRolesList", {
  139 + headers: { Authorization: "Bearer " + this.token }
93 140 })
94 141 .then(response => {
95   - this.loading = true;
96   - if ((this.snackbar = true)) {
97   - this.text = "Successfully changed password !!";
98   - console.log("snackbar", response.data.message);
  142 + for (let i = 0; i < response.data.data.length; i++) {
  143 + if (
  144 + response.data.data[i].name != "SUPERADMIN" &&
  145 + response.data.data[i].name != "ADMIN"
  146 + ) {
  147 + this.getRoles.push(response.data.data[i]);
  148 + this.showLoader = false;
  149 + }
99 150 }
100   - setTimeout(() => {
101   - this.$router.push("/dashboard");
102   - }, 2000);
103 151 })
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;
  152 + .catch(error => {
  153 + this.showLoader = false;
  154 + if (error.response.status === 401) {
  155 + this.$router.replace({ path: "/" });
  156 + this.$store.dispatch("setToken", null);
  157 + this.$store.dispatch("Id", null);
  158 + }
  159 + });
  160 + },
  161 + clear() {
  162 + this.$refs.form.reset();
  163 + },
  164 + getUsers(roles) {
  165 + this.showLoader = true;
  166 + http()
  167 + .get("/getUserWithRole", {
  168 + params: {
  169 + name: roles
  170 + },
  171 + headers: { Authorization: "Bearer " + this.token }
  172 + })
  173 + .then(response => {
  174 + this.getUsersName = response.data.data;
  175 + })
  176 + .catch(error => {
  177 + this.showLoader = false;
  178 + if (error.response.status === 401) {
  179 + this.$router.replace({ path: "/" });
  180 + this.$store.dispatch("setToken", null);
  181 + this.$store.dispatch("Id", null);
  182 + }
109 183 });
110   - }
111   - },
112   - computed: {
113   - color() {
114   - return this.loading ? "success" : "error";
115 184 }
116 185 }
117 186 };
... ...
src/pages/Administrator/role.vue
... ... @@ -69,7 +69,7 @@
69 69  
70 70 <v-data-table
71 71 :headers="headers"
72   - :items="getRole"
  72 + :items="getRoles"
73 73 :pagination.sync="pagination"
74 74 :search="search"
75 75 >
... ... @@ -198,7 +198,7 @@ export default {
198 198 { text: "Role", value: "role", sortable: false, align: "center" },
199 199 { text: "Action", value: "", sortable: false, align: "center" }
200 200 ],
201   - getRole: [],
  201 + getRoles: [],
202 202 editedIndex: -1,
203 203 token: "",
204 204 addrole: {},
... ... @@ -212,7 +212,7 @@ export default {
212 212 headers: { Authorization: "Bearer " + this.token }
213 213 })
214 214 .then(response => {
215   - this.getRole = response.data.data;
  215 + this.getRoles = response.data.data;
216 216 this.showLoader = false;
217 217 })
218 218 .catch(error => {
... ... @@ -225,7 +225,7 @@ export default {
225 225 });
226 226 },
227 227 editItem(item) {
228   - this.editedIndex = this.getRole.indexOf(item);
  228 + this.editedIndex = this.getRoles.indexOf(item);
229 229 this.editedItem = Object.assign({}, item);
230 230 this.dialog = true;
231 231 },
... ... @@ -284,7 +284,7 @@ export default {
284 284 .then(response => {
285 285 this.snackbar = true;
286 286 this.text = response.data.message;
287   - // this.getRole();
  287 + this.getRole();
288 288 this.clear();
289 289 this.loading = false;
290 290 })
... ...
src/pages/Mark/mark.vue
... ... @@ -20,220 +20,6 @@
20 20 <!-- ****** Edit Mark ****** -->
21 21  
22 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 23 <v-snackbar
238 24 :timeout="timeout"
239 25 :top="y === 'top'"
... ... @@ -310,12 +96,6 @@
310 96 <td id="td" class="text-xs-center">{{ props.item.email }}</td>
311 97 <td class="text-xs-center">
312 98 <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 99 <router-link :to="{ name:'viewMark',params: { markId:props.item._id } }">
320 100 <v-tooltip top>
321 101 <img
... ... @@ -325,14 +105,8 @@
325 105 src="/static/icon/edit1.png"
326 106 />
327 107 <span>Edit</span>
328   - </v-tooltip>
  108 + </v-tooltip>
329 109 </router-link>
330   - <!-- <img
331   - style="cursor:pointer;width:20px; height:20px; "
332   - class="mr-5"
333   - @click="deleteSchedule(props.item)"
334   - src="/static/icon/delete1.png"
335   - />-->
336 110 </span>
337 111 </td>
338 112 </template>
... ... @@ -504,12 +278,6 @@ export default {
504 278 data: () => ({
505 279 snackbar: false,
506 280 date: null,
507   - // editDate: false,
508   - // menu1: false,
509   - // menuB: false,
510   - // menu2: false,
511   - // menuEdit: false,
512   - // timeToEdit: false,
513 281 color: "",
514 282 y: "top",
515 283 x: "right",
... ... @@ -517,7 +285,6 @@ export default {
517 285 timeout: 10000,
518 286 text: "",
519 287 loading: false,
520   - // date: null,
521 288 search: "",
522 289 showLoader: false,
523 290 dialog: false,
... ... @@ -535,12 +302,6 @@ export default {
535 302 examRules: [v => !!v || "Exam is required"],
536 303  
537 304 headerOfMark: [
538   - // {
539   - // align: "justify-center",
540   - // text: "#",
541   - // sortable: false,
542   - // value: "index"
543   - // },
544 305 {
545 306 align: "justify-center",
546 307 text: "No",
... ... @@ -565,26 +326,6 @@ export default {
565 326 sortable: false,
566 327 align: "center"
567 328 }
568   - // {
569   - // text: "Distribution Type",
570   - // value: "distributionType",
571   - // sortable: false,
572   - // align: "center"
573   - // },
574   - // { text: "markValue", value: "markValue", sortable: false, align: "center" },
575   - // {
576   - // text: "Roll No.",
577   - // align: "center",
578   - // sortable: false,
579   - // value: "rollNo"
580   - // },
581   - // { text: "Exam", value: "exam", sortable: false, align: "center" },
582   - // {
583   - // text: "ASSIGNMENT",
584   - // value: "assignment",
585   - // sortable: false,
586   - // align: "center"
587   - // }
588 329 ],
589 330 headers: [
590 331 {
... ... @@ -624,7 +365,6 @@ export default {
624 365 subjects: [],
625 366 addMark: {},
626 367 getMark: {},
627   - // editedItem: {},
628 368 getScheduleData: {},
629 369 markData: [],
630 370 getStudentData: [],
... ... @@ -632,75 +372,6 @@ export default {
632 372 token: ""
633 373 }),
634 374 methods: {
635   - // dates: function(date) {
636   - // return moment(date).format("MMMM DD, YYYY");
637   - // },
638   - // pickFile() {
639   - // this.$refs.image.click();
640   - // },
641   - // getStudentsList() {
642   - // this.showLoader = true;
643   - // http()
644   - // .get("/getStudentsList", {
645   - // params: { classId: this.getScheduleData.classId },
646   - // headers: { Authorization: "Bearer " + this.token }
647   - // })
648   - // .then(response => {
649   - // this.getStudentsList = response.data.data;
650   - // this.showLoader = false;
651   - // })
652   - // .catch(error => {
653   - // // console.log("err====>", err);
654   - // this.showLoader = false;
655   - // this.loadingSearch = false;
656   - // this.snackbar = true;
657   - // this.text = error.response.data.message;
658   - // if (error.response.status === 401) {
659   - // this.$router.replace({ path: "/" });
660   - // this.$store.dispatch("setToken", null);
661   - // this.$store.dispatch("Id", null);
662   - // }
663   - // });
664   - // },
665   - // editItem(item) {
666   - // console.log("item", item);
667   - // this.editedIndex = this.ScheduleData.indexOf(item);
668   - // this.editedItem = Object.assign({}, item);
669   - // this.editedItem.classId = this.editedItem.classId._id;
670   - // this.editedItem.sectionId = this.editedItem.sectionId._id;
671   - // this.editedItem.date =
672   - // this.editedItem.date != undefined
673   - // ? (this.editedItem.date = this.editedItem.date.substring(0, 10))
674   - // : (this.editedItem.date = "");
675   - // this.dialog = true;
676   - // },
677   - // profile(item) {
678   - // this.editedIndex = this.ScheduleData.indexOf(item);
679   - // this.editedItem = Object.assign({}, item);
680   - // this.editedItem.classId = this.editedItem.classId.classNum;
681   - // this.editedItem.sectionId = this.editedItem.sectionId.name;
682   - // this.dialog1 = true;
683   - // },
684   - // deleteSchedule(item) {
685   - // let deleteSchedule = {
686   - // scheduleId: item._id
687   - // };
688   - // http()
689   - // .delete(
690   - // "/deleteSchedule",
691   - // confirm("Are you sure you want to Delete this?") && {
692   - // params: deleteSchedule
693   - // }
694   - // )
695   - // .then(response => {
696   - // this.snackbar = true;
697   - // this.text = "Successfully Delete Schedule ";
698   - // this.getStudentsList();
699   - // })
700   - // .catch(error => {
701   - // // console.log(error);
702   - // });
703   - // },
704 375 activeTab(type) {
705 376 switch (type) {
706 377 case "existing":
... ... @@ -714,34 +385,6 @@ export default {
714 385 break;
715 386 }
716 387 },
717   - // close() {
718   - // this.dialog = false;
719   - // },
720   - // close1() {
721   - // this.dialog1 = false;
722   - // },
723   - // clear() {
724   - // this.$refs.form.reset();
725   - // this.disable = false;
726   - // this.loading = false;
727   - // },
728   - // save() {
729   - // this.editedItem.scheduleId = this.editedItem._id;
730   - // http()
731   - // .put("/updateSchedule", this.editedItem)
732   - // .then(response => {
733   - // this.snackbar = true;
734   - // this.text = "Successfully Edit Exam Schedule";
735   - // this.color = "green";
736   - // this.getSchedulesList();
737   - // this.close();
738   - // })
739   - // .catch(error => {
740   - // this.snackbar = true;
741   - // this.text = error.response.data.message;
742   - // this.color = "red";
743   - // });
744   - // },
745 388 getClass() {
746 389 this.showLoader = true;
747 390 http()
... ... @@ -751,7 +394,6 @@ export default {
751 394 .then(response => {
752 395 this.classList = response.data.data;
753 396 this.showLoader = false;
754   - // console.log("getClassesList=====>",this.addclass)
755 397 })
756 398 .catch(err => {
757 399 // console.log("err====>", err);
... ... @@ -762,7 +404,6 @@ export default {
762 404 this.showLoader = true;
763 405 for (let i = 0; i < this.classList.length; i++) {
764 406 if (_id == this.classList[i]._id) {
765   - // console.log(this.classList[i].subjects);
766 407 this.subjects = this.classList[i].subjects;
767 408 }
768 409 }
... ... @@ -820,7 +461,6 @@ export default {
820 461 .then(response => {
821 462 this.getStudentData = response.data.data;
822 463 this.showLoader = false;
823   - // console.log("getSectionsList=====>", response.data.data);
824 464 this.showLoader = true;
825 465 http()
826 466 .get("/getMarkDistributionsList", {
... ... @@ -849,7 +489,6 @@ export default {
849 489 });
850 490 }
851 491 }
852   - console.log("this.getStudentData", this.getStudentData);
853 492 })
854 493 .catch(error => {
855 494 console.log("err====>", error);
... ... @@ -865,23 +504,16 @@ export default {
865 504 submit() {
866 505 let studentsMarks = [];
867 506 for (var j = 0; j < this.getStudentData.length; j++) {
868   - studentsMarks.push({
  507 + let data = {
  508 + examId: this.addMark.examId,
  509 + classId: this.addMark.classId,
  510 + sectionId: this.addMark.sectionId,
  511 + subjectId: this.addMark.subjectId,
869 512 studentId: this.getStudentData[j]._id,
870   - marksObtained: this.getStudentData[j].marksObtained
871   - });
872   - }
873   - // console.log("marksObtaine----marksObtained", studentsMarks);
874   - let markData = {
875   - examId: this.addMark.examId,
876   - classId: this.addMark.classId,
877   - sectionId: this.addMark.sectionId,
878   - subjectId: this.addMark.subjectId,
879   - studentsMarks: studentsMarks
880   - };
881   - console.log("markData", markData);
882   - if (this.$refs.form.validate()) {
  513 + studentsMarks: this.getStudentData[j].marksObtained
  514 + };
883 515 http()
884   - .post("/createMark", markData)
  516 + .post("/createMark", data)
885 517 .then(response => {
886 518 this.snackbar = true;
887 519 this.text = response.data.message;
... ... @@ -890,10 +522,9 @@ export default {
890 522 this.clear();
891 523 })
892 524 .catch(error => {
893   - if ((this.snackbar = true)) {
894   - this.text = error.response.data.message;
895   - this.color = "red";
896   - }
  525 + this.snackbar = true;
  526 + this.text = error.response.data.message;
  527 + this.color = "red";
897 528 });
898 529 }
899 530 },
... ... @@ -919,7 +550,6 @@ export default {
919 550 },
920 551 mounted() {
921 552 this.token = this.$store.state.token;
922   - // this.getSchedulesList();
923 553 this.getClass();
924 554 this.getExamList();
925 555 },
... ...
src/pages/Mark/promotion.vue
... ... @@ -17,7 +17,13 @@
17 17 <label>Academic Year :</label>
18 18 </v-flex>
19 19 <v-flex md10>
20   - <v-select :items="acedemicYear" label="Select Academic Year"></v-select>
  20 + <v-select
  21 + :items="acedemicYear"
  22 + v-model="promotion.year"
  23 + item-value="year"
  24 + item-text="year"
  25 + label="promotion.year"
  26 + ></v-select>
21 27 </v-flex>
22 28 </v-flex>
23 29 <v-flex xs12 sm12 md3>
... ... @@ -26,10 +32,9 @@
26 32 </v-flex>
27 33 <v-flex md10 class="ml-2">
28 34 <v-select
29   - v-model="promtion.classId"
  35 + v-model="promotion.classId"
30 36 label="Select your class"
31 37 type="text"
32   - :rules="classRules"
33 38 :items="classList"
34 39 item-text="classNum"
35 40 item-value="_id"
... ... @@ -42,7 +47,12 @@
42 47 <label>Promotion Academic Year :</label>
43 48 </v-flex>
44 49 <v-flex md10>
45   - <v-select :items="acedemicYear" label="Select Promotion Academic Year"></v-select>
  50 + <v-select
  51 + :items="acedemicYear"
  52 + v-model="promotion.year"
  53 + item-text="year"
  54 + label="Select Promotion Academic Year"
  55 + ></v-select>
46 56 </v-flex>
47 57 </v-flex>
48 58 <v-flex xs12 sm12 md3>
... ... @@ -56,7 +66,7 @@
56 66 </v-layout>
57 67 </v-flex>
58 68 </v-card>
59   - <v-container class="pb-0">
  69 + <!-- <v-container class="pb-0">
60 70 <v-card class="px-3 grey lighten-2" flat>
61 71 <v-flex xs12>
62 72 <v-layout>
... ... @@ -83,7 +93,6 @@
83 93 </v-card>
84 94 </v-container>
85 95 <v-container fluid>
86   - <!-- <v-flex xs12> -->
87 96 <v-layout wrap>
88 97 <v-flex xs12 sm12 md6>
89 98 <v-layout>
... ... @@ -157,17 +166,9 @@
157 166 ></v-text-field>
158 167 </v-flex>
159 168 </v-flex>
160   - <!-- <v-flex xs12 sm12 md3>
161   - <v-flex md12 class="mt-4 body-1">
162   - <label class>Promotion Class :</label>
163   - </v-flex>
164   - <v-flex md10 class="ml-2">
165   - <v-select :items="acedemicYear" label="Select Promotion Class"></v-select>
166   - </v-flex>
167   - </v-flex>-->
168 169 </v-layout>
169 170 </v-flex>
170   - </v-card>
  171 + </v-card>-->
171 172 <v-layout>
172 173 <v-flex xs10 sm10 md4 class="mx-auto mt-4">
173 174 <v-btn class="black" dark block round>Promotion Mark Setting</v-btn>
... ... @@ -186,7 +187,9 @@ export default {
186 187 radios: "radio-1",
187 188 acedemicYear: [],
188 189 classList: [],
189   - promtion: {},
  190 + promotion: {
  191 + // academicYear: ""
  192 + },
190 193 passmark: {
191 194 hindi: "40",
192 195 english: "40",
... ... @@ -197,6 +200,10 @@ export default {
197 200 };
198 201 },
199 202 mounted() {
  203 + var year = new Date().getFullYear() + 1;
  204 + // this.promotion.acedemicYear = new Date().getFullYear() + "-" + year;
  205 + this.acedemicYear.push({ year: new Date().getFullYear() + "-" + year });
  206 + console.log(" this.promotion.acedemicYear ", this.acedemicYear);
200 207 this.token = this.$store.state.token;
201 208 this.getClass();
202 209 },
... ...
src/pages/Mark/viewMark.vue
... ... @@ -17,7 +17,7 @@
17 17 </v-toolbar>
18 18 <v-card-text>
19 19 <v-container>
20   - <v-layout wrap v-for="(mark,i) in markData" :key="i">
  20 + <v-layout wrap v-for="(value, id, index) in filterData" v-if="index == 0">
21 21 <v-flex xs12>
22 22 <v-layout>
23 23 <v-flex
... ... @@ -27,11 +27,11 @@
27 27 <v-avatar size="100px">
28 28 <img
29 29 src="/static/icon/user.png"
30   - v-if="!mark.studentsMarks[0].studentId.profilePicUrl"
  30 + v-if="!value[0].studentId.profilePicUrl"
31 31 />
32 32 <img
33   - :src="mark.studentsMarks[0].studentId.profilePicUrl"
34   - v-else-if="mark.studentsMarks[0].studentId.profilePicUrl"
  33 + :src="value[0].studentId.profilePicUrl"
  34 + v-else-if="value[0].studentId.profilePicUrl"
35 35 />
36 36 </v-avatar>
37 37 </v-flex>
... ... @@ -39,39 +39,39 @@
39 39 <v-layout>
40 40 <v-flex xs12 sm12>
41 41 <h3 class="text-xs-center">
42   - <b>{{ mark.studentsMarks[0].studentId.name }}</b>
  42 + <b>{{ value[0].studentId.name }}</b>
43 43 </h3>
44 44 <p class="text-xs-center grey--text">Student</p>
45 45 </v-flex>
46 46 </v-layout>
47 47 <v-layout style="border: 1px solid lightgrey;">
48   - <v-flex xs6 sm6 class="py-0">
49   - <h4 class="right">
50   - <b>Roll No :</b>
  48 + <v-flex xs6 sm6>
  49 + <h4 class="right py-0">
  50 + <b>Roll No:</b>
51 51 </h4>
52 52 </v-flex>
53   - <v-flex sm6 xs6 class="py-0">
54   - <h4>{{ mark.studentsMarks[0].studentId.rollNo }}</h4>
  53 + <v-flex sm6 xs6>
  54 + <h4 class="py-0">{{ value[0].studentId.rollNo }}</h4>
55 55 </v-flex>
56 56 </v-layout>
57 57 <v-layout style="border: 1px solid lightgrey;">
58   - <v-flex xs6 sm6 class="py-0">
59   - <h4 class="right">
60   - <b>Class :</b>
  58 + <v-flex xs6 sm6>
  59 + <h4 class="right py-0">
  60 + <b>Class:</b>
61 61 </h4>
62 62 </v-flex>
63   - <v-flex sm6 xs6 class="right py-0">
64   - <h4>{{ mark.classId.classNum }}</h4>
  63 + <v-flex sm6 xs6>
  64 + <h4 class="py-0">{{value[0].classId.classNum }}</h4>
65 65 </v-flex>
66 66 </v-layout>
67 67 <v-layout style="border: 1px solid lightgrey;">
68   - <v-flex xs6 sm6 class="right py-0">
69   - <h4 class="right">
70   - <b>Section :</b>
  68 + <v-flex xs6 sm6 class="right">
  69 + <h4 class="right py-0">
  70 + <b>Section:</b>
71 71 </h4>
72 72 </v-flex>
73   - <v-flex sm6 xs6 class="right py-0">
74   - <h4>{{ mark.sectionId.name}}</h4>
  73 + <v-flex sm6 xs6 class="right">
  74 + <h4 class="py-0">{{ value[0].sectionId.name}}</h4>
75 75 </v-flex>
76 76 </v-layout>
77 77 </v-flex>
... ... @@ -84,76 +84,43 @@
84 84 <!-- ****** TABLE DATA MARK ****** -->
85 85  
86 86 <v-flex xs12 sm12 md9 class="mt-4">
87   - <v-card>
88   - <v-toolbar dark class="fixcolors" flat>
89   - <v-spacer></v-spacer>
90   - <v-toolbar-title>
91   - <h3>Mark</h3>
92   - </v-toolbar-title>
93   - <v-spacer></v-spacer>
94   - </v-toolbar>
95   - <v-card-title
96   - v-for="(markList,i) in markData"
97   - :key="i"
98   - class="subheading"
99   - >{{ markList.examId.examName }}</v-card-title>
100   - <table class="feeTypeTable tableRsponsive">
101   - <tr class="info white--text">
102   - <th rowspan="2">Subject</th>
103   - <th
104   - colspan="2"
105   - v-for="(markDistribution,i) in markDistributions"
106   - :key="i "
107   - >{{ markDistribution.markDistributionId.distributionType}}</th>
108   - <!-- <th colspan="2">ASSIGNMENT</th> -->
109   - <th colspan="3">Total</th>
110   - </tr>
111   - <tr class="info white--text">
112   - <th
113   - class="bg-sky"
114   - v-for="(markDistribution,i) in markDistributions"
115   - :key="i"
116   - >{{i === 0 ? 'Mark' : 'Highest Mark'}}</th>
117   - <th
118   - class="bg-sky-light"
119   - v-for="(markDistribution,i) in markDistributions"
120   - :key="i"
121   - >{{i === 0 ? 'Mark' : 'Highest Mark'}}</th>
122   - <th class="bg-sky">Mark</th>
123   - <th class="bg-purple">Point</th>
124   - <th class="bg-skyDark">Grade</th>
125   - </tr>
126   - <!-- </tr> -->
127   - <tr v-for="(mark,i) in markData" :key="i">
128   - <td>{{ mark.classId.subjects[0].subjectName }}</td>
129   - <td
130   - v-for="(markDistribution,i) in markParticularDistributionData"
131   - :key="i"
132   - >{{ markDistribution }}</td>
133   - <!-- <td>
134   - 10
135   - </td>
136   - <td>
137   - 10
138   - </td>
139   - <td>
140   - 83
141   - </td>
142   - <td>
143   - 8
144   - </td>
145   - <td>B
146   - </td>-->
147   - </tr>
148   - <!-- <tfoot>
149   - <tr>
150   - <td colspan="2">Total:</td>
151   - <td></td>
152   - <td></td>
153   - <td></td>
154   - <td></td>
  87 + <v-toolbar dark class="fixcolors" flat>
  88 + <v-spacer></v-spacer>
  89 + <v-toolbar-title>
  90 + <h3>Mark</h3>
  91 + </v-toolbar-title>
  92 + <v-spacer></v-spacer>
  93 + </v-toolbar>
  94 + <v-card v-for="(value, id, index) in filterData">
  95 + <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title>
  96 + <table class="mb-3 tableRsponsive feeTypeTable">
  97 + <thead>
  98 + <tr class="info white--text">
  99 + <td rowspan="2">Subject</td>
  100 + <td
  101 + colspan="2"
  102 + v-for="exam in value[index].studentsMarks"
  103 + >{{exam.markDistributionId.distributionType}}</td>
  104 + <td>Total</td>
  105 + </tr>
  106 + <tr v-for="(subject, ind) in value" v-if="ind == 0">
  107 + <template v-for="(exam, i) in subject.studentsMarks">
  108 + <td class="bg-sky white--text">Mark</td>
  109 + <td class="bg-sky-light white--text">Highest Mark</td>
  110 + </template>
  111 + <td class="bg-sky white--text">Mark</td>
  112 + </tr>
  113 + </thead>
  114 + <tbody>
  115 + <tr v-for="subject in value">
  116 + <td>{{subject.subjectName}}</td>
  117 + <template v-for="(exam, i) in subject.studentsMarks">
  118 + <td>{{exam.marksScored}}</td>
  119 + <td>{{exam.markDistributionId.markValue}}</td>
  120 + </template>
  121 + <td>{{subject.totalMarks}}</td>
155 122 </tr>
156   - </tfoot>-->
  123 + </tbody>
157 124 </table>
158 125 </v-card>
159 126 </v-flex>
... ... @@ -170,6 +137,7 @@
170 137 <script>
171 138 import http from "@/Services/http.js";
172 139 import moment from "moment";
  140 +import _ from "underscore";
173 141  
174 142 export default {
175 143 data: () => ({
... ... @@ -177,7 +145,8 @@ export default {
177 145 markData: [],
178 146 token: "",
179 147 markDistributions: [],
180   - markParticularDistributionData: []
  148 + markParticularDistributionData: [],
  149 + filterData: []
181 150 }),
182 151 mounted() {
183 152 this.token = this.$store.state.token;
... ... @@ -185,41 +154,93 @@ export default {
185 154 },
186 155 methods: {
187 156 getMarkList() {
188   - this.showLoader = true;
  157 + this.showLoader = false;
189 158 http()
190 159 .get("/getParticularMark", {
191 160 params: { studentId: this.$route.params.markId },
192 161 headers: { Authorization: "Bearer " + this.token }
193 162 })
194 163 .then(response => {
195   - this.markData = response.data.data;
196   - for (let i = 0; i < this.markData.length; i++) {
197   - for (let j = 0; j < this.markData[i].studentsMarks.length; j++) {
198   - // console.log("this.studentsMarksSSSSSSSSSSSSS",this.markData[i].studentsMarks[j].marksObtained)
199   -
200   - this.markDistributions = this.markData[i].studentsMarks[
201   - j
202   - ].marksObtained;
  164 + let newData = response.data.data;
  165 + for (var i = 0; i < newData.length; i++) {
  166 + newData[i].examination = newData[i].examId._id;
  167 + }
  168 + this.filterData = _.groupBy(newData, ["examination"]);
  169 + console.log("check filtered data", this.filterData);
  170 + for (let data in this.filterData) {
  171 + // console.log("this.filterData[data].length", this.filterData[data]);
  172 + for (let item in this.filterData[data]) {
  173 + // console.log("check", this.filterData[data][item].studentsMarks);
  174 + var totalMarks = 0;
203 175 for (
204   - let k = 0;
205   - k < this.markData[i].studentsMarks[j].marksObtained.length;
206   - k++
  176 + let i = 0;
  177 + i < this.filterData[data][item].studentsMarks.length;
  178 + i++
207 179 ) {
208   - this.markParticularDistributionData.push(
209   - this.markData[i].studentsMarks[j].marksObtained[k].marksScored
210   - );
211   - this.markParticularDistributionData.push(
212   - this.markData[i].studentsMarks[j].marksObtained[k]
213   - .markDistributionId.markValue
214   - );
215   - console.log(
216   - "this.markParticularDistributionData",
217   - this.markParticularDistributionData
218   - );
  180 + // console.log(
  181 + // "check data",
  182 + // this.filterData[data][item].studentsMarks[i]
  183 + // );
  184 + totalMarks += this.filterData[data][item].studentsMarks[i]
  185 + .marksScored;
219 186 }
  187 + this.filterData[data][item].totalMarks = totalMarks;
220 188 }
221 189 }
222   - this.showLoader = false;
  190 + // var aray = [];
  191 + // this.markData = response.data.data;
  192 + // for (let i = 0; i < this.markData.length; i++) {
  193 + // console.log(this.markData[i].examId.examName);
  194 + // let index = -1;
  195 +
  196 + // aray.forEach((dat_, k) => {
  197 + // if (dat_.category == this.markData[i].examId.examName) {
  198 + // index = k;
  199 + // }
  200 + // });
  201 + // if (index == -1) {
  202 + // var obj = {
  203 + // category: this.markData[i].examId.examName,
  204 + // extraData: []
  205 + // };
  206 + // obj.extraData.push(this.markData[i]);
  207 + // aray.push(obj);
  208 + // } else {
  209 + // console.log("=o", this.markData[i]);
  210 + // // aray[index].extraData =
  211 +
  212 + // aray[index].extraData.push(this.markData[i]);
  213 + // }
  214 + // console.log("aray-", aray);
  215 +
  216 + // for (let j = 0; j < this.markData[i].studentsMarks.length; j++) {
  217 + // // console.log("this.studentsMarksSSSSSSSSSSSSS",this.markData[i].studentsMarks[j].marksObtained)
  218 +
  219 + // this.markDistributions = this.markData[i].studentsMarks[
  220 + // j
  221 + // ].marksObtained;
  222 + // for (
  223 + // let k = 0;
  224 + // k < this.markData[i].studentsMarks[j].marksObtained.length;
  225 + // k++
  226 + // ) {
  227 + // this.markParticularDistributionData.push(
  228 + // this.markData[i].studentsMarks[j].marksObtained[k].marksScored
  229 + // );
  230 + // this.markParticularDistributionData.push(
  231 + // this.markData[i].studentsMarks[j].marksObtained[k]
  232 + // .markDistributionId.markValue
  233 + // );
  234 + // // console.log(
  235 + // // "this.markParticularDistributionData",
  236 + // // this.markParticularDistributionData
  237 + // // );
  238 + // }
  239 + // }
  240 + // }
  241 + // this.markData = aray;
  242 + // console.log("aray-2", aray);
  243 + // this.showLoader = false;
223 244 })
224 245 .catch(error => {
225 246 // console.log("err====>", err);
... ...
src/pages/News/news.vue
... ... @@ -37,7 +37,7 @@
37 37 </v-toolbar-title>
38 38 <v-spacer></v-spacer>
39 39 </v-toolbar>
40   - <v-card-text style="height:600px;">
  40 + <v-card-text style="height:520px;">
41 41 <!-- <v-form ref="form">
42 42 <v-container fluid>-->
43 43 <v-layout row>
... ...
src/pages/Notification/notification.vue
... ... @@ -82,7 +82,7 @@
82 82  
83 83 <!-- ****** PROFILE VIEW NOTIFICATION DEATILS ****** -->
84 84  
85   - <v-dialog v-model="dialog1" max-width="500px">
  85 + <v-dialog v-model="dialog1" max-width="700px">
86 86 <v-toolbar color="v-toolbar">
87 87 <v-spacer></v-spacer>
88 88 <v-toolbar-title>
... ...
src/pages/Report/progressCardReport.vue
1 1 <template>
2 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 3 <!-- ****** Progress Card Report Table****** -->
13 4  
14 5 <v-card flat>
... ... @@ -27,7 +18,7 @@
27 18 <v-flex xs3 sm6 lg2 class="subheading mt-4">
28 19 <label class="right">Class:</label>
29 20 </v-flex>
30   - <v-flex xs12 sm12 lg8 class="ml-2">
  21 + <v-flex xs9 sm6 lg8 class="ml-2">
31 22 <v-select
32 23 v-model="getReport.classId"
33 24 label="Select your class"
... ... @@ -47,7 +38,7 @@
47 38 <v-flex xs3 sm6 lg2 class="subheading mt-4">
48 39 <label class="right">Section:</label>
49 40 </v-flex>
50   - <v-flex xs12 sm12 lg8 class="ml-2">
  41 + <v-flex xs9 sm6 lg8 class="ml-2">
51 42 <v-select
52 43 :items="addSection"
53 44 label="Select your Section"
... ... @@ -67,7 +58,7 @@
67 58 <v-flex xs3 sm6 lg2 class="subheading mt-4">
68 59 <label class="right">Student:</label>
69 60 </v-flex>
70   - <v-flex xs12 sm12 lg8 class="ml-2">
  61 + <v-flex xs9 sm6 lg8 class="ml-2">
71 62 <v-select
72 63 :items="getStudentsList"
73 64 label="Select your student"
... ... @@ -81,48 +72,146 @@
81 72 </v-layout>
82 73 </v-flex>
83 74 <v-flex xs12 sm12 lg3>
84   - <v-btn @click="getReport" round dark :loading="loading" class="right mt-3">Get Report</v-btn>
  75 + <v-btn
  76 + @click="getMarkReportList"
  77 + round
  78 + dark
  79 + :loading="loading"
  80 + class="right mt-3"
  81 + >Get Report</v-btn>
85 82 </v-flex>
86 83 </v-layout>
87 84 </v-flex>
88 85 </v-form>
89 86 </v-card>
90   - <!-- <v-data-table
91   - :headers="headers"
92   - :items="getStudentsList"
93   - :pagination.sync="pagination"
94   - :search="search"
95   - >
96   - <template slot="items" slot-scope="props">
97   - <td class="text-xs-center">{{ props.index + 1}}</td>
98   - <td id="td" class="text-xs-center">
99   - <v-avatar>
100   - <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
101   - <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
102   - </v-avatar>
103   - </td>
104   - <td id="td" class="text-xs-center">{{ props.item.name}}</td>
105   - <td id="td" class="text-xs-center">{{ props.item.rollNo }}</td>
106   - <td id="td" class="text-xs-center">{{ props.item.email }}</td>
107   - <td class="text-xs-center">
108   - <span>
109   - <router-link :to="{ name:'viewMark',params: { markId:props.item._id } }">
110   - <img
111   - style="cursor:pointer; width:20px; height:18px; "
112   - class="mr-5"
113   - src="/static/icon/edit1.png"
114   - />
115   - </router-link>
116   - </span>
117   - </td>
118   - </template>
119   - <v-alert
120   - slot="no-results"
121   - :value="true"
122   - color="error"
123   - icon="warning"
124   - >Your search for "{{ search }}" found no results.</v-alert>
125   - </v-data-table>-->
  87 + <!-- ****** PROFILE MARK ****** -->
  88 +
  89 + <v-container fluid grid-list-md v-if="showReport">
  90 + <v-flex xs12 sm12>
  91 + <v-container fluid>
  92 + <v-layout wrap>
  93 + <v-flex xs12 sm12 md3 class="mt-4">
  94 + <v-card flat>
  95 + <v-toolbar dark class="fixcolors" flat>
  96 + <v-spacer></v-spacer>
  97 + <v-toolbar-title>
  98 + <h3>Profile</h3>
  99 + </v-toolbar-title>
  100 + <v-spacer></v-spacer>
  101 + </v-toolbar>
  102 + <v-card-text>
  103 + <v-container>
  104 + <v-layout wrap v-for="(value, id, index) in filterData" v-if="index == 0">
  105 + <v-flex xs12>
  106 + <v-layout>
  107 + <v-flex
  108 + xs12
  109 + class="text-xs-center text-sm-center text-md-center text-lg-center"
  110 + >
  111 + <v-avatar size="100px">
  112 + <img
  113 + src="/static/icon/user.png"
  114 + v-if="!value[0].studentId.profilePicUrl"
  115 + />
  116 + <img
  117 + :src="value[0].studentId.profilePicUrl"
  118 + v-else-if="value[0].studentId.profilePicUrl"
  119 + />
  120 + </v-avatar>
  121 + </v-flex>
  122 + </v-layout>
  123 + <v-layout>
  124 + <v-flex xs12 sm12>
  125 + <h3 class="text-xs-center">
  126 + <b>{{ value[0].studentId.name }}</b>
  127 + </h3>
  128 + <p class="text-xs-center grey--text">Student</p>
  129 + </v-flex>
  130 + </v-layout>
  131 + <v-layout style="border: 1px solid lightgrey;">
  132 + <v-flex xs6 sm6>
  133 + <h4 class="right py-0">
  134 + <b>Roll No:</b>
  135 + </h4>
  136 + </v-flex>
  137 + <v-flex sm6 xs6 >
  138 + <h4 class="py-0">{{ value[0].studentId.rollNo }}</h4>
  139 + </v-flex>
  140 + </v-layout>
  141 + <v-layout style="border: 1px solid lightgrey;" >
  142 + <v-flex xs6 sm6>
  143 + <h4 class="right py-0">
  144 + <b>Class:</b>
  145 + </h4>
  146 + </v-flex>
  147 + <v-flex sm6 xs6>
  148 + <h4 class="py-0">{{value[0].classId.classNum }}</h4>
  149 + </v-flex>
  150 + </v-layout>
  151 + <v-layout style="border: 1px solid lightgrey;">
  152 + <v-flex xs6 sm6 class="right">
  153 + <h4 class="right py-0">
  154 + <b>Section:</b>
  155 + </h4>
  156 + </v-flex>
  157 + <v-flex sm6 xs6 class="right">
  158 + <h4 class="py-0">{{ value[0].sectionId.name}}</h4>
  159 + </v-flex>
  160 + </v-layout>
  161 + </v-flex>
  162 + </v-layout>
  163 + </v-container>
  164 + </v-card-text>
  165 + </v-card>
  166 + </v-flex>
  167 +
  168 + <!-- ****** TABLE DATA MARK ****** -->
  169 +
  170 + <v-flex xs12 sm12 md9 class="mt-4">
  171 + <v-toolbar dark class="fixcolors" flat>
  172 + <v-spacer></v-spacer>
  173 + <v-toolbar-title>
  174 + <h3>Mark</h3>
  175 + </v-toolbar-title>
  176 + <v-spacer></v-spacer>
  177 + </v-toolbar>
  178 + <v-card v-for="(value, id, index) in filterData">
  179 + <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title>
  180 + <table class="mb-4 tableRsponsive feeTypeTable">
  181 + <thead>
  182 + <tr class="info white--text">
  183 + <td rowspan="2">Subject</td>
  184 + <td
  185 + colspan="2"
  186 + v-for="exam in value[index].studentsMarks"
  187 + >{{exam.markDistributionId.distributionType}}</td>
  188 + <td>Total</td>
  189 + </tr>
  190 + <tr v-for="(subject, ind) in value" v-if="ind == 0">
  191 + <template v-for="(exam, i) in subject.studentsMarks">
  192 + <td class="bg-sky white--text">Mark</td>
  193 + <td class="bg-sky-light white--text">Highest Mark</td>
  194 + </template>
  195 + <td class="bg-sky white--text">Mark</td>
  196 + </tr>
  197 + </thead>
  198 + <tbody>
  199 + <tr v-for="subject in value">
  200 + <td>{{subject.subjectName}}</td>
  201 + <template v-for="(exam, i) in subject.studentsMarks">
  202 + <td>{{exam.marksScored}}</td>
  203 + <td>{{exam.markDistributionId.markValue}}</td>
  204 + </template>
  205 + <td>{{subject.totalMarks}}</td>
  206 + </tr>
  207 + </tbody>
  208 + </table>
  209 + </v-card>
  210 + </v-flex>
  211 + </v-layout>
  212 + </v-container>
  213 + </v-flex>
  214 + </v-container>
126 215 <div class="loader" v-if="showLoader">
127 216 <v-progress-circular indeterminate color="white"></v-progress-circular>
128 217 </div>
... ... @@ -132,67 +221,32 @@
132 221 <script>
133 222 import http from "@/Services/http.js";
134 223 import moment from "moment";
  224 +import _ from "underscore";
135 225  
136 226 export default {
137 227 data: () => ({
138   - snackbar: false,
139   - color: "",
140   - y: "top",
141   - x: "right",
142   - mode: "",
143   - timeout: 10000,
144   - text: "",
145   - loading: false,
146   - search: "",
147 228 showLoader: false,
  229 + markData: [],
  230 + token: "",
  231 + markDistributions: [],
  232 + markParticularDistributionData: [],
  233 + loading: false,
148 234 valid: true,
  235 + loading: false,
  236 + showReport: false,
149 237 addSection: [],
  238 + filterData: [],
  239 + getStudentsList: [],
150 240 classRules: [v => !!v || "Class is required"],
151 241 sectionRules: [v => !!v || "Class is required"],
152 242 studentRules: [v => !!v || "Student is required"],
153   - pagination: {
154   - rowsPerPage: 15
155   - },
156   - headers: [
157   - {
158   - align: "justify-center",
159   - text: "No",
160   - sortable: false,
161   - value: "No"
162   - },
163   - {
164   - text: "Profile Pic",
165   - vaue: "profilePicUrl",
166   - sortable: false,
167   - align: "center"
168   - },
169   - {
170   - text: "Name",
171   - vaue: "name",
172   - sortable: false,
173   - align: "center"
174   - },
175   - {
176   - text: "Roll No.",
177   - value: "rollNo",
178   - sortable: false,
179   - align: "center"
180   - },
181   - {
182   - text: "Email",
183   - value: "email",
184   - sortable: false,
185   - align: "center"
186   - },
187   - { text: "Action", value: "", sortable: false, align: "center" }
188   - ],
189   - classList: [],
190 243 getReport: {},
191   - markData: [],
192   - examList: [],
193   - getStudentsList: [],
194   - token: ""
  244 + classList: []
195 245 }),
  246 + mounted() {
  247 + this.token = this.$store.state.token;
  248 + this.getClass();
  249 + },
196 250 methods: {
197 251 clear() {
198 252 this.$refs.form.reset();
... ... @@ -244,56 +298,145 @@ export default {
244 298 this.showLoader = false;
245 299 });
246 300 },
247   - getReport() {
248   - if (this.$refs.form.validate()) {
249   - this.showLoader = true;
250   - http()
251   - .get("/getParticularMark", {
252   - params: { studentId: this.getReport.studentId },
253   - headers: { Authorization: "Bearer " + this.token }
254   - })
255   - .then(response => {
256   - console.log("response.data.data", response.data.data);
257   - // this.examList = response.data.data;
258   - this.showLoader = false;
259   - this.clear();
260   - })
261   - .catch(error => {
262   - console.log("err====>", error);
263   - this.showLoader = false;
264   - // this.snackbar = true;
265   - // this.text = error.response.data.message;
266   - // if (error.response.status === 401) {
267   - // this.$router.replace({ path: "/" });
268   - // this.$store.dispatch("setToken", null);
269   - // this.$store.dispatch("Id", null);
270   - // }
271   - });
272   - }
  301 + getMarkReportList() {
  302 + this.showLoader = false;
  303 + this.showReport = true;
  304 + http()
  305 + .get("/getParticularMark", {
  306 + params: { studentId: this.getReport.studentId },
  307 + headers: { Authorization: "Bearer " + this.token }
  308 + })
  309 + .then(response => {
  310 + let newData = response.data.data;
  311 + for (var i = 0; i < newData.length; i++) {
  312 + newData[i].examination = newData[i].examId._id;
  313 + }
  314 + this.filterData = _.groupBy(newData, ["examination"]);
  315 + console.log("check filtered data", this.filterData);
  316 + for (let data in this.filterData) {
  317 + // console.log("this.filterData[data].length", this.filterData[data]);
  318 + for (let item in this.filterData[data]) {
  319 + // console.log("check", this.filterData[data][item].studentsMarks);
  320 + var totalMarks = 0;
  321 + for (
  322 + let i = 0;
  323 + i < this.filterData[data][item].studentsMarks.length;
  324 + i++
  325 + ) {
  326 + // console.log(
  327 + // "check data",
  328 + // this.filterData[data][item].studentsMarks[i]
  329 + // );
  330 + totalMarks += this.filterData[data][item].studentsMarks[i]
  331 + .marksScored;
  332 + }
  333 + this.filterData[data][item].totalMarks = totalMarks;
  334 + }
  335 + }
  336 + // var aray = [];
  337 + // this.markData = response.data.data;
  338 + // for (let i = 0; i < this.markData.length; i++) {
  339 + // console.log(this.markData[i].examId.examName);
  340 + // let index = -1;
  341 +
  342 + // aray.forEach((dat_, k) => {
  343 + // if (dat_.category == this.markData[i].examId.examName) {
  344 + // index = k;
  345 + // }
  346 + // });
  347 + // if (index == -1) {
  348 + // var obj = {
  349 + // category: this.markData[i].examId.examName,
  350 + // extraData: []
  351 + // };
  352 + // obj.extraData.push(this.markData[i]);
  353 + // aray.push(obj);
  354 + // } else {
  355 + // console.log("=o", this.markData[i]);
  356 + // // aray[index].extraData =
  357 +
  358 + // aray[index].extraData.push(this.markData[i]);
  359 + // }
  360 + // console.log("aray-", aray);
  361 +
  362 + // for (let j = 0; j < this.markData[i].studentsMarks.length; j++) {
  363 + // // console.log("this.studentsMarksSSSSSSSSSSSSS",this.markData[i].studentsMarks[j].marksObtained)
  364 +
  365 + // this.markDistributions = this.markData[i].studentsMarks[
  366 + // j
  367 + // ].marksObtained;
  368 + // for (
  369 + // let k = 0;
  370 + // k < this.markData[i].studentsMarks[j].marksObtained.length;
  371 + // k++
  372 + // ) {
  373 + // this.markParticularDistributionData.push(
  374 + // this.markData[i].studentsMarks[j].marksObtained[k].marksScored
  375 + // );
  376 + // this.markParticularDistributionData.push(
  377 + // this.markData[i].studentsMarks[j].marksObtained[k]
  378 + // .markDistributionId.markValue
  379 + // );
  380 + // // console.log(
  381 + // // "this.markParticularDistributionData",
  382 + // // this.markParticularDistributionData
  383 + // // );
  384 + // }
  385 + // }
  386 + // }
  387 + // this.markData = aray;
  388 + // console.log("aray-2", aray);
  389 + // this.showLoader = false;
  390 + })
  391 + .catch(error => {
  392 + // console.log("err====>", err);
  393 + this.showLoader = false;
  394 + this.snackbar = true;
  395 + this.text = error.response.data.message;
  396 + if (error.response.status === 401) {
  397 + this.$router.replace({ path: "/" });
  398 + this.$store.dispatch("setToken", null);
  399 + this.$store.dispatch("Id", null);
  400 + }
  401 + });
273 402 }
274   - },
275   - mounted() {
276   - this.token = this.$store.state.token;
277   - // this.getExamList();
278   - this.getClass();
279   - },
280   - created() {
281   - this.$root.$on("app:search", search => {
282   - this.search = search;
283   - });
284   - },
285   - beforeDestroy() {
286   - // dont forget to remove the listener
287   - this.$root.$off("app:search");
288 403 }
289 404 };
290 405 </script>
  406 +
291 407 <style scoped>
292   -.active {
293   - background-color: gray;
294   - color: white !important;
  408 +table {
  409 + border-collapse: collapse;
  410 + border: 1px solid #e2e7eb;
  411 +}
  412 +
  413 +th,
  414 +td {
  415 + border: 1px solid #e2e7eb;
  416 + padding: 10px;
  417 + text-align: center;
295 418 }
296   -.activebtn {
297   - color: black !important;
  419 +table.feeTypeTable {
  420 + table-layout: auto !important;
  421 + width: 100% !important;
  422 +}
  423 +.bg-sky {
  424 + background-color: #98b2cc !important;
  425 +}
  426 +.bg-sky-light {
  427 + background-color: #89a0b8;
  428 +}
  429 +.bg-purple {
  430 + background-color: #9583ac;
  431 +}
  432 +.bg-skyDark {
  433 + background-color: #956785;
  434 +}
  435 +@media screen and (max-width: 380px) {
  436 + .tableRsponsive {
  437 + display: block;
  438 + position: relative;
  439 + overflow: scroll;
  440 + }
298 441 }
299   -</style>s
300 442 \ No newline at end of file
  443 +</style> s
301 444 \ No newline at end of file
... ...
src/pages/Report/studentReport.vue
... ... @@ -18,7 +18,7 @@
18 18 <v-spacer></v-spacer>
19 19 </v-card-actions>
20 20 </v-card>
21   - <v-card flat class="elevation-0">
  21 + <v-card flat class="elevation-0">
22 22 <v-form ref="form" v-model="valid" lazy-validation>
23 23 <v-flex xs12 sm12 lg12>
24 24 <v-layout wrap>
... ... @@ -136,7 +136,7 @@
136 136 </v-flex>
137 137 </v-layout>
138 138 </v-flex>-->
139   - <v-flex xs12 sm12 lg4>
  139 + <v-flex xs12 sm12 lg4 v-if="classShow">
140 140 <v-layout>
141 141 <v-flex xs4 sm4 lg3 class="subheading mt-4">
142 142 <label class="right">Class:</label>
... ... @@ -179,26 +179,30 @@
179 179 <v-btn @click="getStudents" round dark :loading="loading" class="mt-3 ml-5">Get Report</v-btn>
180 180 </v-flex>
181 181 <v-flex xs12 sm12 lg4 class="hidden-lg-only hidden-md-only hidden-xl-only">
182   - <v-btn @click="getStudents" round dark :loading="loading" class="mt-3 right">Get Report</v-btn>
  182 + <v-btn
  183 + @click="getStudents"
  184 + round
  185 + dark
  186 + :loading="loading"
  187 + class="mt-3 right"
  188 + >Get Report</v-btn>
183 189 </v-flex>
184 190 </v-layout>
185 191 </v-flex>
186 192 </v-form>
187 193 </v-card>
188   - <v-card flat v-if="getStudentsReportList">
189   - <v-flex xs12>
190   - <v-layout v-for="(student,i) in getStudentsReportList" :key="i">
  194 + <!-- <v-card flat>
  195 + <v-flex xs12 v-for="(student,i) in getStudentsReportList" :key="i">
  196 + <v-layout>
191 197 <v-flex xs12 sm12 md6>
192   - <h5 class="mt-2 ml-2">Student Report</h5>
193   - <h5 class="right mt-2 ml-2">: {{ student.classId.classNum }}</h5>
  198 + <h5 class="mt-2 ml-2">Class: {{ student.classId.classNum }}</h5>
194 199 </v-flex>
195 200 <v-flex xs12 sm12 md6>
196   - <h5 class="right mt-2 ml-2">Student Report</h5>
197   - <h5 class="mt-2 ml-2">: {{ student.sectionId.name }}</h5>
  201 + <h5 class="right mt-2 ml-2">Section: {{ student.sectionId.name }}</h5>
198 202 </v-flex>
199 203 </v-layout>
200 204 </v-flex>
201   - </v-card>
  205 + </v-card>-->
202 206 <v-data-table
203 207 :headers="headers"
204 208 :items="getStudentsReportList"
... ... @@ -217,6 +221,8 @@
217 221 <td id="td" class="text-xs-center">{{ props.item.name}}</td>
218 222 <td id="td" class="text-xs-center">{{ props.item.rollNo }}</td>
219 223 <td id="td" class="text-xs-center">{{ props.item.email }}</td>
  224 + <td id="td" class="text-xs-center">{{ props.item.classId.classNum }}</td>
  225 + <td id="td" class="text-xs-center">{{ props.item.sectionId.name }}</td>
220 226 </template>
221 227 <v-alert
222 228 slot="no-results"
... ... @@ -258,6 +264,7 @@ export default {
258 264 BirthdayShow: false,
259 265 sectionShow: false,
260 266 showTable: false,
  267 + ClassShow: true,
261 268 addSection: [],
262 269 pagination: {
263 270 rowsPerPage: 15
... ... @@ -300,6 +307,18 @@ export default {
300 307 value: "email",
301 308 sortable: false,
302 309 align: "center"
  310 + },
  311 + {
  312 + text: "Class",
  313 + value: "classId",
  314 + sortable: false,
  315 + align: "center"
  316 + },
  317 + {
  318 + text: "Section",
  319 + value: "sectionId",
  320 + sortable: false,
  321 + align: "center"
303 322 }
304 323 ],
305 324 classList: [],
... ... @@ -350,6 +369,8 @@ export default {
350 369 this.countryShow = false;
351 370 this.BirthdayShow = false;
352 371 this.HostelShow = false;
  372 + this.classShow = false;
  373 + this.sectionShow = false;
353 374 }
354 375 if (this.report.form === "Gender") {
355 376 this.genderShow = true;
... ... @@ -358,6 +379,7 @@ export default {
358 379 this.BirthdayShow = false;
359 380 this.countryShow = false;
360 381 this.HostelShow = false;
  382 + this.classShow = true;
361 383 }
362 384 if (this.report.form === "Transport") {
363 385 this.TransportShow = true;
... ... @@ -366,6 +388,7 @@ export default {
366 388 this.BirthdayShow = false;
367 389 this.countryShow = false;
368 390 this.HostelShow = false;
  391 + this.classShow = true;
369 392 }
370 393 if (this.report.form === "Country") {
371 394 this.countryShow = true;
... ... @@ -374,6 +397,7 @@ export default {
374 397 this.bloodGroup = false;
375 398 this.BirthdayShow = false;
376 399 this.HostelShow = false;
  400 + this.classShow = true;
377 401 }
378 402 if (this.report.form === "Hostel") {
379 403 this.HostelShow = true;
... ... @@ -382,6 +406,7 @@ export default {
382 406 this.bloodGroup = false;
383 407 this.countryShow = false;
384 408 this.BirthdayShow = false;
  409 + this.classShow = true;
385 410 }
386 411 if (this.report.form === "Birthday") {
387 412 this.BirthdayShow = true;
... ... @@ -390,6 +415,7 @@ export default {
390 415 this.HostelShow = false;
391 416 this.bloodGroup = false;
392 417 this.countryShow = false;
  418 + this.classShow = true;
393 419 }
394 420 },
395 421 getStudents() {
... ...
src/pages/Students/students.vue
... ... @@ -1846,7 +1846,7 @@ export default {
1846 1846 weight: "",
1847 1847 rollNo: "",
1848 1848 establishmentYear: new Date().getFullYear()
1849   - },
  1849 + }
1850 1850 }),
1851 1851 watch: {
1852 1852 menu(val) {
... ... @@ -1878,6 +1878,7 @@ export default {
1878 1878 },
1879 1879 getSections(_id) {
1880 1880 var token = this.$store.state.token;
  1881 + this.showLoader = true;
1881 1882 http()
1882 1883 .get(
1883 1884 "/getSectionsList",
... ... @@ -1888,15 +1889,18 @@ export default {
1888 1889 )
1889 1890 .then(response => {
1890 1891 this.addSection = response.data.data;
1891   - console.log("getSectionsList=====>", this.addSection);
  1892 + this.showLoader = false;
  1893 + // console.log("getSectionsList=====>", this.addSection);
1892 1894 })
1893 1895 .catch(err => {
  1896 + this.showLoader = false;
1894 1897 // console.log("err====>", err);
1895 1898 // this.$router.replace({ path: '/' });
1896 1899 });
1897 1900 },
1898 1901 getSection(_id) {
1899 1902 var token = this.$store.state.token;
  1903 + this.showLoader = true;
1900 1904 http()
1901 1905 .get(
1902 1906 "/getSectionsList",
... ... @@ -1907,9 +1911,11 @@ export default {
1907 1911 )
1908 1912 .then(response => {
1909 1913 this.addSection = response.data.data;
1910   - console.log("getSectionsList=====>", this.addSection);
  1914 + this.showLoader = false;
  1915 + // console.log("getSectionsList=====>", this.addSection);
1911 1916 })
1912 1917 .catch(err => {
  1918 + this.showLoader = false;
1913 1919 // console.log("err====>", err);
1914 1920 // this.$router.replace({ path: '/' });
1915 1921 });
... ...
src/pages/Subjects/subjects.vue
... ... @@ -128,10 +128,10 @@
128 128 <v-card flat>
129 129 <v-card-actions>
130 130 <v-layout>
131   - <v-flex xs4 sm1>
  131 + <v-flex xs4 sm2 lg1>
132 132 <label class="right mt-4">Select Class:</label>
133 133 </v-flex>
134   - <v-flex xs8 sm3>
  134 + <v-flex xs8 sm4 lg3>
135 135 <v-select
136 136 :items="classList"
137 137 label="Select Class"
... ...
src/pages/generalSetting/generalSetting.vue
... ... @@ -0,0 +1,224 @@
  1 +<template>
  2 + <v-app id="login">
  3 + <v-container fill-height>
  4 + <v-layout>
  5 + <v-flex xs12 sm12 md12 lg12 class="mt-5">
  6 + <v-toolbar class="fixcolors mt-5" dark>
  7 + <v-spacer></v-spacer>
  8 + <v-toolbar-title>General Setting</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>
  14 + <v-form class="mt-3" ref="form" v-model="valid" lazy-validation>
  15 + <v-flex xs12>
  16 + <!-- <v-layout> -->
  17 + <v-flex xs12>
  18 + <v-layout>
  19 + <v-flex xs4 sm4>
  20 + <label class="subheading right pt-4">Site Title:</label>
  21 + </v-flex>
  22 + <v-flex xs8 sm5>
  23 + <v-text-field
  24 + class="ml-3"
  25 + placeholder="fill your Site title"
  26 + v-model="setting.name"
  27 + ></v-text-field>
  28 + </v-flex>
  29 + </v-layout>
  30 + </v-flex>
  31 + <v-flex xs12>
  32 + <v-layout>
  33 + <v-flex xs4 sm4>
  34 + <label class="subheading right pt-4">Phone:</label>
  35 + </v-flex>
  36 + <v-flex xs8 sm5>
  37 + <v-text-field
  38 + class="ml-3"
  39 + placeholder="fill your Phone number"
  40 + v-model="setting.mobile"
  41 + ></v-text-field>
  42 + </v-flex>
  43 + </v-layout>
  44 + </v-flex>
  45 + <!-- </v-layout> -->
  46 + <!-- <v-layout> -->
  47 + <v-flex xs12>
  48 + <v-layout>
  49 + <v-flex xs4 sm4>
  50 + <label class="subheading right pt-4">Email:</label>
  51 + </v-flex>
  52 + <v-flex xs8 sm5>
  53 + <v-text-field
  54 + class="ml-3"
  55 + placeholder="fill your email"
  56 + v-model="setting.email"
  57 + ></v-text-field>
  58 + </v-flex>
  59 + </v-layout>
  60 + </v-flex>
  61 + <v-flex xs12>
  62 + <v-layout>
  63 + <v-flex xs4 sm4>
  64 + <label class="subheading right pt-4">Address:</label>
  65 + </v-flex>
  66 + <v-flex xs8 sm5>
  67 + <v-text-field
  68 + class="ml-3"
  69 + placeholder="fill your Address"
  70 + v-model="setting.address"
  71 + ></v-text-field>
  72 + </v-flex>
  73 + </v-layout>
  74 + </v-flex>
  75 + <!-- </v-layout> -->
  76 + </v-flex>
  77 + </v-form>
  78 + </v-flex>
  79 + </v-card-text>
  80 + <v-card-actions>
  81 + <v-flex text-xs-center>
  82 + <v-btn
  83 + class="mt-3"
  84 + round
  85 + color="black"
  86 + dark
  87 + large
  88 + :loading="loading"
  89 + @click="reset"
  90 + >submit</v-btn>
  91 + </v-flex>
  92 + </v-card-actions>
  93 + <v-snackbar
  94 + :timeout="timeout"
  95 + :top="y === 'top'"
  96 + :right="x === 'right'"
  97 + :vertical="mode === 'vertical'"
  98 + v-model="snackbar"
  99 + :color="color"
  100 + >{{ text }}</v-snackbar>
  101 + </v-card>
  102 + </v-flex>
  103 + </v-layout>
  104 + </v-container>
  105 + </v-app>
  106 +</template>
  107 +<script>
  108 +import http from "@/Services/http.js";
  109 +
  110 +export default {
  111 + data() {
  112 + return {
  113 + snackbar: false,
  114 + y: "top",
  115 + x: "right",
  116 + mode: "",
  117 + timeout: 4000,
  118 + text: "",
  119 + color: "",
  120 + setting: {},
  121 + valid: true,
  122 + loading: false,
  123 + text: ""
  124 + };
  125 + },
  126 + mounted() {
  127 + this.token = this.$store.state.token;
  128 + // this.getRole();
  129 + },
  130 + methods: {
  131 + reset() {
  132 + if (this.$refs.form.validate()) {
  133 + this.loading = true;
  134 + this.setting.schoolId = this.$store.state.id;
  135 + http()
  136 + .put("/updateSchool", this.setting, {
  137 + headers: { Authorization: "Bearer " + this.token }
  138 + })
  139 + .then(response => {
  140 + this.loading = false;
  141 + this.snackbar = true;
  142 + this.text = response.data.message;
  143 + this.color = "green";
  144 + this.clear();
  145 + })
  146 + .catch(error => {
  147 + // console.log("err====>",err);
  148 + this.snackbar = true;
  149 + this.text = error.response.data.message;
  150 + this.color = "error";
  151 + this.loading = false;
  152 + });
  153 + }
  154 + },
  155 + // getRole() {
  156 + // this.showLoader = true;
  157 + // http()
  158 + // .get("/getRolesList", {
  159 + // headers: { Authorization: "Bearer " + this.token }
  160 + // })
  161 + // .then(response => {
  162 + // for (let i = 0; i < response.data.data.length; i++) {
  163 + // if (
  164 + // response.data.data[i].name != "SUPERADMIN" &&
  165 + // response.data.data[i].name != "ADMIN"
  166 + // ) {
  167 + // this.getRoles.push(response.data.data[i]);
  168 + // this.showLoader = false;
  169 + // }
  170 + // }
  171 + // })
  172 + // .catch(error => {
  173 + // this.showLoader = false;
  174 + // if (error.response.status === 401) {
  175 + // this.$router.replace({ path: "/" });
  176 + // this.$store.dispatch("setToken", null);
  177 + // this.$store.dispatch("Id", null);
  178 + // }
  179 + // });
  180 + // },
  181 + clear() {
  182 + this.$refs.form.reset();
  183 + }
  184 + // getUsers(roles) {
  185 + // this.showLoader = true;
  186 + // http()
  187 + // .get("/getUserWithRole", {
  188 + // params: {
  189 + // name: roles
  190 + // },
  191 + // headers: { Authorization: "Bearer " + this.token }
  192 + // })
  193 + // .then(response => {
  194 + // this.getUsersName = response.data.data;
  195 + // })
  196 + // .catch(error => {
  197 + // this.showLoader = false;
  198 + // if (error.response.status === 401) {
  199 + // this.$router.replace({ path: "/" });
  200 + // this.$store.dispatch("setToken", null);
  201 + // this.$store.dispatch("Id", null);
  202 + // }
  203 + // });
  204 + // }
  205 + }
  206 +};
  207 +</script>
  208 +<style scoped>
  209 +img {
  210 + position: absolute;
  211 + top: 13px;
  212 + left: 50px;
  213 +}
  214 +.v-btn--large {
  215 + padding: 0px 74px;
  216 +}
  217 +@media screen and (max-width: 769px) {
  218 + .v-btn--large {
  219 + font-size: 14px;
  220 + height: 44px;
  221 + padding: 0 32px;
  222 + }
  223 +}
  224 +</style>
... ...
src/router/paths.js
... ... @@ -608,5 +608,17 @@ export default [{
608 608 /* webpackMode: "lazy-once" */
609 609 `@/pages/Report/progressCardReport.vue`
610 610 )
  611 + },
  612 + {
  613 + path: '/generalSetting',
  614 + meta: {},
  615 + name: 'generalSetting',
  616 + props: (route) => ({ type: route.query.type }),
  617 + component: () =>
  618 + import (
  619 + /* webpackChunkName: "routes" */
  620 + /* webpackMode: "lazy-once" */
  621 + `@/pages/generalSetting/generalSetting.vue`
  622 + )
611 623 }
612 624 ];
613 625 \ No newline at end of file
... ...