Commit 0721aca93505fe4576a52ff0b3cb6084b21726a8

Authored by Neeraj Sharma
1 parent 9c887fee01

solve bugs in subject and create student

src/pages/Account/globalPayment.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 <!-- ****** EXISTING GLOBAL PAYMENT TABLE ****** --> 3 <!-- ****** EXISTING GLOBAL PAYMENT TABLE ****** -->
4 <v-form ref="form" v-model="valid" lazy-validation> 4 <v-form ref="form" v-model="valid" lazy-validation>
5 <v-container fluid> 5 <v-container fluid>
6 <v-flex xs12 sm12 lg12> 6 <v-flex xs12 sm12 lg12>
7 <v-layout wrap> 7 <v-layout wrap>
8 <v-flex xs12 sm12 lg10> 8 <v-flex xs12 sm12 lg10>
9 <v-layout wrap> 9 <v-layout wrap>
10 <v-flex xs12 sm12 lg4> 10 <v-flex xs12 sm12 lg4>
11 <v-flex xs12 sm4 lg4 class="subheading"> 11 <v-flex xs12 sm4 lg4 class="subheading">
12 <label class="mt-4">Class:</label> 12 <label class="mt-4">Class:</label>
13 </v-flex> 13 </v-flex>
14 <v-flex xs12 sm12 lg10> 14 <v-flex xs12 sm12 lg10>
15 <v-select 15 <v-select
16 :items="addclass" 16 :items="addclass"
17 label="Select Class" 17 label="Select Class"
18 v-model="selectStudents.selectClassId" 18 v-model="selectStudents.selectClassId"
19 item-text="classNum" 19 item-text="classNum"
20 item-value="_id" 20 item-value="_id"
21 name="Select Class" 21 name="Select Class"
22 :rules="classRules" 22 :rules="classRules"
23 @change="getSection()" 23 @change="getSection()"
24 required 24 required
25 ></v-select> 25 ></v-select>
26 </v-flex> 26 </v-flex>
27 </v-flex> 27 </v-flex>
28 <v-flex xs12 sm12 lg4> 28 <v-flex xs12 sm12 lg4>
29 <v-flex xs12 sm4 lg4 class="subheading"> 29 <v-flex xs12 sm4 lg4 class="subheading">
30 <label class="mt-4">Section:</label> 30 <label class="mt-4">Section:</label>
31 </v-flex> 31 </v-flex>
32 <v-flex xs12 sm12 lg10 class> 32 <v-flex xs12 sm12 lg10 class>
33 <v-select 33 <v-select
34 :items="addSection" 34 :items="addSection"
35 label="Select Section" 35 label="Select Section"
36 v-model="selectStudents.selectSection" 36 v-model="selectStudents.selectSection"
37 item-text="name" 37 item-text="name"
38 item-value="_id" 38 item-value="_id"
39 name="Select Section" 39 name="Select Section"
40 :rules="sectionRules" 40 :rules="sectionRules"
41 @change="getStudents()" 41 @change="getStudents()"
42 required 42 required
43 ></v-select> 43 ></v-select>
44 </v-flex> 44 </v-flex>
45 </v-flex> 45 </v-flex>
46 <v-flex xs12 sm12 lg4> 46 <v-flex xs12 sm12 lg4>
47 <v-flex xs12 sm4 lg4 class="subheading"> 47 <v-flex xs12 sm4 lg4 class="subheading">
48 <label class="mt-4">Student:</label> 48 <label class="mt-4">Student:</label>
49 </v-flex> 49 </v-flex>
50 <v-flex xs12 sm12 lg10 class> 50 <v-flex xs12 sm12 lg10 class>
51 <v-select 51 <v-select
52 :items="studentData" 52 :items="studentData"
53 label="Select Student" 53 label="Select Student"
54 v-model="selectStudents.selectId" 54 v-model="selectStudents.selectId"
55 item-text="name" 55 item-text="name"
56 item-value="_id" 56 item-value="_id"
57 :rules="studentRules" 57 :rules="studentRules"
58 required 58 required
59 ></v-select> 59 ></v-select>
60 </v-flex> 60 </v-flex>
61 </v-flex> 61 </v-flex>
62 </v-layout> 62 </v-layout>
63 </v-flex> 63 </v-flex>
64 <v-flex xs12 sm12 lg2> 64 <v-flex xs12 sm12 lg2>
65 <v-flex xs12 sm12 lg12> 65 <v-flex xs12 sm12 lg12>
66 <v-btn 66 <v-btn
67 @click="getInvoicesData()" 67 @click="getInvoicesData()"
68 round 68 round
69 dark 69 dark
70 :loading="loading" 70 :loading="loading"
71 class="right mt-4" 71 class="right mt-4"
72 >Search</v-btn> 72 >Search</v-btn>
73 </v-flex> 73 </v-flex>
74 </v-flex> 74 </v-flex>
75 </v-layout> 75 </v-layout>
76 </v-flex> 76 </v-flex>
77 </v-container> 77 </v-container>
78 </v-form> 78 </v-form>
79 <v-container fluid grid-list-md> 79 <v-container fluid grid-list-md>
80 <v-flex xs12> 80 <v-flex xs12>
81 <v-layout wrap> 81 <v-layout wrap>
82 <v-flex xs12 sm12 md4> 82 <v-flex xs12 sm12 md4>
83 <v-card 83 <v-card
84 flat 84 flat
85 class="pa-3" 85 class="pa-3"
86 v-for="(invoiceData,i) in studentInvoiceData" 86 v-for="(invoiceData,i) in studentInvoiceData"
87 :key="i" 87 :key="i"
88 v-if="i === 0" 88 v-if="i === 0"
89 > 89 >
90 <v-layout> 90 <v-layout>
91 <v-flex xs12> 91 <v-flex xs12>
92 <v-avatar 92 <v-avatar
93 size="80px" 93 size="80px"
94 style="margin: auto;display:block;margin-bottom:10px !important" 94 style="margin: auto;display:block;margin-bottom:10px !important"
95 > 95 >
96 <img src="/static/icon/user.png" v-if="!invoiceData.studentId.profilePicUrl" /> 96 <img src="/static/icon/user.png" v-if="!invoiceData.studentId.profilePicUrl" />
97 <img 97 <img
98 :src="invoiceData.studentId.profilePicUrl" 98 :src="invoiceData.studentId.profilePicUrl"
99 v-else-if="invoiceData.studentId.profilePicUrl" 99 v-else-if="invoiceData.studentId.profilePicUrl"
100 /> 100 />
101 </v-avatar> 101 </v-avatar>
102 </v-flex> 102 </v-flex>
103 </v-layout> 103 </v-layout>
104 <v-layout class="studentProfile"> 104 <v-layout class="studentProfile">
105 <v-flex xs4 sm3 md3> 105 <v-flex xs4 sm3 md3>
106 <h4> 106 <h4>
107 <b>Name</b> 107 <b>Name</b>
108 </h4> 108 </h4>
109 </v-flex> 109 </v-flex>
110 <v-flex sm9 xs8 md9> 110 <v-flex sm9 xs8 md9>
111 <h4>: {{ invoiceData.studentId.name }}</h4> 111 <h4>: {{ invoiceData.studentId.name }}</h4>
112 </v-flex> 112 </v-flex>
113 </v-layout> 113 </v-layout>
114 <v-layout class="studentProfile"> 114 <v-layout class="studentProfile">
115 <v-flex xs4 sm3 md3> 115 <v-flex xs4 sm3 md3>
116 <h4> 116 <h4>
117 <b>Class</b> 117 <b>Class</b>
118 </h4> 118 </h4>
119 </v-flex> 119 </v-flex>
120 <v-flex sm9 xs8 md9> 120 <v-flex sm9 xs8 md9>
121 <h4>: {{ invoiceData.classId.classNum }}</h4> 121 <h4>: {{ invoiceData.classId.classNum }}</h4>
122 </v-flex> 122 </v-flex>
123 </v-layout> 123 </v-layout>
124 <v-layout class="studentProfile"> 124 <v-layout class="studentProfile">
125 <v-flex xs4 sm3 md3> 125 <v-flex xs4 sm3 md3>
126 <h4> 126 <h4>
127 <b>Roll No</b> 127 <b>Roll No</b>
128 </h4> 128 </h4>
129 </v-flex> 129 </v-flex>
130 <v-flex sm9 xs8 md9> 130 <v-flex sm9 xs8 md9>
131 <h4>: {{ invoiceData.studentId.rollNo }}</h4> 131 <h4>: {{ invoiceData.studentId.rollNo }}</h4>
132 </v-flex> 132 </v-flex>
133 </v-layout> 133 </v-layout>
134 </v-card> 134 </v-card>
135 </v-flex> 135 </v-flex>
136 <v-flex xs12 sm12 md8 v-show="showInvoiceTable"> 136 <v-flex xs12 sm12 md8 v-show="showInvoiceTable">
137 <v-card> 137 <v-card>
138 <v-data-table 138 <v-data-table
139 :headers="headers" 139 :headers="headers"
140 :items="studentInvoiceData" 140 :items="studentInvoiceData"
141 :search="search" 141 :search="search"
142 hide-actions 142 hide-actions
143 > 143 >
144 <template slot="items" slot-scope="props"> 144 <template slot="items" slot-scope="props">
145 <td id="td" class="text-xs-center">{{ props.item.invoiceNumber}}</td> 145 <td id="td" class="text-xs-center">{{ props.item.invoiceNumber }}</td>
146 <td id="td" class="text-xs-center">{{ props.item.totalAmount}}</td> 146 <td id="td" class="text-xs-center">{{ props.item.totalAmount }}</td>
147 <td id="td" class="text-xs-center">{{ props.item.totalDiscount }}</td> 147 <td id="td" class="text-xs-center">{{ props.item.totalDiscount }}</td>
148 <td id="td" class="text-xs-center">{{ props.item.totalSubTotal }}</td> 148 <td id="td" class="text-xs-center">{{ props.item.totalSubTotal }}</td>
149 <td id="td" class="text-xs-center">{{ props.item.paymentStatus}}</td> 149 <td id="td" class="text-xs-center">{{ props.item.paymentStatus}}</td>
150 <td id="td" class="text-xs-center">{{ dates(props.item.date) }}</td> 150 <td id="td" class="text-xs-center">{{ dates(props.item.date) }}</td>
151 <td class="text-xs-center"> 151 <td class="text-xs-center">
152 <router-link 152 <router-link
153 :to="{ name:'ViewInvoice',params: { viewInvoiceId:props.item._id } }" 153 :to="{ name:'ViewInvoice',params: { viewInvoiceId:props.item._id } }"
154 > 154 >
155 <v-tooltip top> 155 <v-tooltip top>
156 <img 156 <img
157 slot="activator" 157 slot="activator"
158 style="cursor:pointer; width:25px; height:18px; " 158 style="cursor:pointer; width:25px; height:18px; "
159 @click="profile(props.item)" 159 @click="profile(props.item)"
160 src="/static/icon/eye1.png" 160 src="/static/icon/eye1.png"
161 /> 161 />
162 <span>View</span> 162 <span>View</span>
163 </v-tooltip> 163 </v-tooltip>
164 </router-link> 164 </router-link>
165 </td> 165 </td>
166 </template> 166 </template>
167 <v-alert 167 <v-alert
168 slot="no-results" 168 slot="no-results"
169 :value="true" 169 :value="true"
170 color="error" 170 color="error"
171 icon="warning" 171 icon="warning"
172 >Your search for "{{ search }}" found no results.</v-alert> 172 >Your search for "{{ search }}" found no results.</v-alert>
173 </v-data-table> 173 </v-data-table>
174 </v-card> 174 </v-card>
175 </v-flex> 175 </v-flex>
176 </v-layout> 176 </v-layout>
177 </v-flex> 177 </v-flex>
178 </v-container> 178 </v-container>
179 <div class="loader" v-if="showLoader"> 179 <div class="loader" v-if="showLoader">
180 <v-progress-circular indeterminate color="white"></v-progress-circular> 180 <v-progress-circular indeterminate color="white"></v-progress-circular>
181 </div> 181 </div>
182 </div> 182 </div>
183 </template> 183 </template>
184 184
185 <script> 185 <script>
186 import http from "@/Services/http.js"; 186 import http from "@/Services/http.js";
187 import moment from "moment"; 187 import moment from "moment";
188 188
189 export default { 189 export default {
190 data: () => ({ 190 data: () => ({
191 snackbar: false, 191 snackbar: false,
192 showInvoiceTable: false, 192 showInvoiceTable: false,
193 y: "top", 193 y: "top",
194 x: "right", 194 x: "right",
195 mode: "", 195 mode: "",
196 timeout: 3000, 196 timeout: 3000,
197 text: "", 197 text: "",
198 showLoader: false, 198 showLoader: false,
199 loading: false, 199 loading: false,
200 search: "", 200 search: "",
201 valid: true, 201 valid: true,
202 addclass: [], 202 addclass: [],
203 selectStudents: {}, 203 selectStudents: {},
204 addSection: [], 204 addSection: [],
205 classRules: [v => !!v || " Class Name is required"], 205 classRules: [v => !!v || " Class Name is required"],
206 sectionRules: [v => !!v || " Section Name is required"], 206 sectionRules: [v => !!v || " Section Name is required"],
207 studentRules: [v => !!v || "Student Name is required"], 207 studentRules: [v => !!v || "Student Name is required"],
208 headers: [ 208 headers: [
209 { 209 {
210 text: "Invoice Number", 210 text: "Invoice Number",
211 align: "center", 211 align: "center",
212 sortable: false, 212 sortable: false,
213 value: "invoiceNumber" 213 value: "invoiceNumber"
214 }, 214 },
215 { 215 {
216 text: "Total Pay", 216 text: "Total Pay",
217 value: "totalAmount", 217 value: "totalAmount",
218 sortable: false, 218 sortable: false,
219 align: "center" 219 align: "center"
220 }, 220 },
221 { 221 {
222 text: "Weaver", 222 text: "Weaver",
223 value: "totalDiscount", 223 value: "totalDiscount",
224 sortable: false, 224 sortable: false,
225 align: "center" 225 align: "center"
226 }, 226 },
227 { 227 {
228 text: " Total Collection", 228 text: " Total Collection",
229 value: "totalSubTotal", 229 value: "totalSubTotal",
230 sortable: false, 230 sortable: false,
231 align: "center" 231 align: "center"
232 }, 232 },
233 { 233 {
234 text: "Clearance", 234 text: "Clearance",
235 value: "paymentStatus", 235 value: "paymentStatus",
236 sortable: false, 236 sortable: false,
237 align: "center" 237 align: "center"
238 }, 238 },
239 { text: "Payment Date", value: "date", sortable: false, align: "center" }, 239 { text: "Payment Date", value: "date", sortable: false, align: "center" },
240 { text: "Action", value: "", sortable: false, align: "center" } 240 { text: "Action", value: "", sortable: false, align: "center" }
241 ], 241 ],
242 studentData: [], 242 studentData: [],
243 studentInvoiceData: [] 243 studentInvoiceData: []
244 }), 244 }),
245 methods: { 245 methods: {
246 dates: function(date) { 246 dates: function(date) {
247 return moment(date).format("MMMM DD, YYYY"); 247 return moment(date).format("MMMM DD, YYYY");
248 }, 248 },
249 getSection() { 249 getSection() {
250 var token = this.$store.state.token; 250 var token = this.$store.state.token;
251 this.showLoader = true; 251 this.showLoader = true;
252 http() 252 http()
253 .get( 253 .get(
254 "/getSectionsList", 254 "/getSectionsList",
255 { params: { classId: this.selectStudents.selectClassId } }, 255 { params: { classId: this.selectStudents.selectClassId } },
256 { 256 {
257 headers: { Authorization: "Bearer " + token } 257 headers: { Authorization: "Bearer " + token }
258 } 258 }
259 ) 259 )
260 .then(response => { 260 .then(response => {
261 this.addSection = response.data.data; 261 this.addSection = response.data.data;
262 this.showLoader = false; 262 this.showLoader = false;
263 // console.log("getSectionsList=====>", this.addSection); 263 // console.log("getSectionsList=====>", this.addSection);
264 }) 264 })
265 .catch(error => { 265 .catch(error => {
266 this.showLoader = false; 266 this.showLoader = false;
267 // console.log("err====>", err); 267 // console.log("err====>", err);
268 // this.$router.replace({ path: '/' }); 268 // this.$router.replace({ path: '/' });
269 }); 269 });
270 }, 270 },
271 getStudents() { 271 getStudents() {
272 this.showLoader = true; 272 this.showLoader = true;
273 http() 273 http()
274 .get("/getStudentWithClass", { 274 .get("/getStudentWithClass", {
275 params: { 275 params: {
276 classId: this.selectStudents.selectClassId, 276 classId: this.selectStudents.selectClassId,
277 sectionId: this.selectStudents.selectSection 277 sectionId: this.selectStudents.selectSection
278 } 278 }
279 }) 279 })
280 .then(response => { 280 .then(response => {
281 this.studentData = response.data.data; 281 this.studentData = response.data.data;
282 this.showLoader = false; 282 this.showLoader = false;
283 }) 283 })
284 .catch(err => { 284 .catch(err => {
285 console.log("err====>", err); 285 console.log("err====>", err);
286 this.showLoader = false; 286 this.showLoader = false;
287 }); 287 });
288 }, 288 },
289 getInvoicesData() { 289 getInvoicesData() {
290 this.showLoader = true; 290 this.showLoader = true;
291 this.showInvoiceTable = true; 291 this.showInvoiceTable = true;
292 http() 292 http()
293 .get("/getInvoicesList", { 293 .get("/getInvoicesList", {
294 params: { 294 params: {
295 classId: this.selectStudents.selectClassId, 295 classId: this.selectStudents.selectClassId,
296 studentId: this.selectStudents.selectId 296 studentId: this.selectStudents.selectId
297 } 297 }
298 }) 298 })
299 .then(response => { 299 .then(response => {
300 this.studentInvoiceData = response.data.data; 300 this.studentInvoiceData = response.data.data;
301 // console.log("this.studentInvoiceData", this.studentInvoiceData); 301 // console.log("this.studentInvoiceData", this.studentInvoiceData);
302 this.showLoader = false; 302 this.showLoader = false;
303 }) 303 })
304 .catch(err => { 304 .catch(err => {
305 console.log("err====>", err); 305 console.log("err====>", err);
306 this.showLoader = false; 306 this.showLoader = false;
307 }); 307 });
308 } 308 }
309 }, 309 },
310 mounted() { 310 mounted() {
311 var token = this.$store.state.token; 311 var token = this.$store.state.token;
312 http() 312 http()
313 .get("/getClassesList", { 313 .get("/getClassesList", {
314 headers: { Authorization: "Bearer " + token } 314 headers: { Authorization: "Bearer " + token }
315 }) 315 })
316 .then(response => { 316 .then(response => {
317 this.addclass = response.data.data; 317 this.addclass = response.data.data;
318 }) 318 })
319 .catch(error => { 319 .catch(error => {
320 this.showLoader = false; 320 this.showLoader = false;
321 if (error.response.status === 401) { 321 if (error.response.status === 401) {
322 this.$router.replace({ path: "/" }); 322 this.$router.replace({ path: "/" });
323 this.$store.dispatch("setToken", null); 323 this.$store.dispatch("setToken", null);
324 this.$store.dispatch("Id", null); 324 this.$store.dispatch("Id", null);
325 this.$store.dispatch("Role", null); 325 this.$store.dispatch("Role", null);
326 } 326 }
327 }); 327 });
328 }, 328 },
329 created() { 329 created() {
330 this.$root.$on("app:search", search => { 330 this.$root.$on("app:search", search => {
331 this.search = search; 331 this.search = search;
332 }); 332 });
333 }, 333 },
334 beforeDestroy() { 334 beforeDestroy() {
335 // dont forget to remove the listener 335 // dont forget to remove the listener
336 this.$root.$off("app:search"); 336 this.$root.$off("app:search");
337 } 337 }
338 }; 338 };
339 </script> 339 </script>
340 340
341 341
342 <style scoped> 342 <style scoped>
343 .studentProfile { 343 .studentProfile {
344 border: 1px solid lightgrey; 344 border: 1px solid lightgrey;
345 } 345 }
346 </style> 346 </style>
src/pages/NoticeBoard/noticeBoard.vue
1 <template> 1 <template>
2 <v-app id="pages-dasboard"> 2 <v-app id="pages-dasboard">
3 <v-tabs grow slider-color="gray"> 3 <v-tabs grow slider-color="gray">
4 <v-tab 4 <v-tab
5 ripple 5 ripple
6 @click="activeTab('existing')" 6 @click="activeTab('existing')"
7 v-bind:class="{ active: isActive }" 7 v-bind:class="{ active: isActive }"
8 id="tab" 8 id="tab"
9 class="subheading" 9 class="subheading"
10 >Existing Notice Board</v-tab> 10 >Existing Notice Board</v-tab>
11 <v-tab 11 <v-tab
12 ripple 12 ripple
13 @click="activeTab('new')" 13 @click="activeTab('new')"
14 v-bind:class="{ active: newActive }" 14 v-bind:class="{ active: newActive }"
15 id="tab1" 15 id="tab1"
16 User 16 User
17 class="subheading" 17 class="subheading"
18 >Add New Notice Board</v-tab> 18 >Add New Notice Board</v-tab>
19 19
20 <!-- ****** Edit Notice Board ****** --> 20 <!-- ****** Edit Notice Board ****** -->
21 21
22 <v-tab-item> 22 <v-tab-item>
23 <v-snackbar 23 <v-snackbar
24 :timeout="timeout" 24 :timeout="timeout"
25 :top="y === 'top'" 25 :top="y === 'top'"
26 :right="x === 'right'" 26 :right="x === 'right'"
27 :vertical="mode === 'vertical'" 27 :vertical="mode === 'vertical'"
28 v-model="snackbar" 28 v-model="snackbar"
29 color="success" 29 color="success"
30 >{{ text }}</v-snackbar> 30 >{{ text }}</v-snackbar>
31 <v-dialog v-model="dialog" max-width="940px" scrollable> 31 <v-dialog v-model="dialog" max-width="940px" scrollable>
32 <v-card> 32 <v-card>
33 <v-toolbar color="grey lighten-2" flat> 33 <v-toolbar color="grey lighten-2" flat>
34 <v-spacer></v-spacer> 34 <v-spacer></v-spacer>
35 <v-toolbar-title> 35 <v-toolbar-title>
36 <h3>Edit Notice Board</h3> 36 <h3>Edit Notice Board</h3>
37 </v-toolbar-title> 37 </v-toolbar-title>
38 <v-spacer></v-spacer> 38 <v-spacer></v-spacer>
39 </v-toolbar> 39 </v-toolbar>
40 <v-card-text> 40 <v-card-text>
41 <v-layout> 41 <v-layout>
42 <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center"> 42 <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center">
43 <img 43 <img
44 src="/static/icon/user.png" 44 src="/static/icon/user.png"
45 v-if="!editedItem.eventImageUrl && !imageUrl" 45 v-if="!editedItem.eventImageUrl && !imageUrl"
46 width="150px" 46 width="150px"
47 /> 47 />
48 <img 48 <img
49 :src="editedItem.eventImageUrl" 49 :src="editedItem.eventImageUrl"
50 height="150" 50 height="150"
51 v-else-if="editedItem.eventImageUrl && !imageUrl" 51 v-else-if="editedItem.eventImageUrl && !imageUrl"
52 width="180px" 52 width="180px"
53 /> 53 />
54 <img 54 <img
55 v-if="imageUrl" 55 v-if="imageUrl"
56 :src="imageUrl" 56 :src="imageUrl"
57 height="150" 57 height="150"
58 style="border-radius:50%; width:200px" 58 style="border-radius:50%; width:200px"
59 /> 59 />
60 <input 60 <input
61 type="file" 61 type="file"
62 style="display: none" 62 style="display: none"
63 ref="image" 63 ref="image"
64 accept="image/*" 64 accept="image/*"
65 @change="onFilePicked" 65 @change="onFilePicked"
66 /> 66 />
67 </v-flex> 67 </v-flex>
68 </v-layout> 68 </v-layout>
69 <v-layout wrap> 69 <v-layout wrap>
70 <v-flex xs12> 70 <v-flex xs12>
71 <v-layout> 71 <v-layout>
72 <v-flex xs4 class="pt-4 subheading"> 72 <v-flex xs4 class="pt-4 subheading">
73 <label class="right">Title:</label> 73 <label class="right">Title:</label>
74 </v-flex> 74 </v-flex>
75 <v-flex xs6 class="ml-3"> 75 <v-flex xs6 class="ml-3">
76 <v-text-field 76 <v-text-field
77 v-model="editedItem.title" 77 v-model="editedItem.title"
78 placeholder="fill your Title" 78 placeholder="fill your Title"
79 name="name" 79 name="name"
80 type="text" 80 type="text"
81 required 81 required
82 ></v-text-field> 82 ></v-text-field>
83 </v-flex> 83 </v-flex>
84 </v-layout> 84 </v-layout>
85 </v-flex> 85 </v-flex>
86 <v-flex xs12> 86 <v-flex xs12>
87 <v-layout> 87 <v-layout>
88 <v-flex xs4 class="pt-4 subheading"> 88 <v-flex xs4 class="pt-4 subheading">
89 <label class="right">Description:</label> 89 <label class="right">Description:</label>
90 </v-flex> 90 </v-flex>
91 <v-flex xs6 class="ml-3"> 91 <v-flex xs6 class="ml-3">
92 <v-text-field 92 <v-text-field
93 placeholder="fill your Description" 93 placeholder="fill your Description"
94 v-model="editedItem.description" 94 v-model="editedItem.description"
95 type="text" 95 type="text"
96 name="email" 96 name="email"
97 required 97 required
98 ></v-text-field> 98 ></v-text-field>
99 </v-flex> 99 </v-flex>
100 </v-layout> 100 </v-layout>
101 </v-flex> 101 </v-flex>
102 <v-flex xs12> 102 <v-flex xs12>
103 <v-layout> 103 <v-layout>
104 <v-flex xs4 class="pt-4 subheading"> 104 <v-flex xs4 class="pt-4 subheading">
105 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> 105 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
106 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label> 106 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label>
107 </v-flex> 107 </v-flex>
108 <v-flex xs6 class="ml-3"> 108 <v-flex xs6 class="ml-3">
109 <v-text-field 109 <v-text-field
110 label="Select Image" 110 label="Select Image"
111 @click="pickFile" 111 @click="pickFile"
112 v-model="imageName" 112 v-model="imageName"
113 append-icon="attach_file" 113 append-icon="attach_file"
114 ></v-text-field> 114 ></v-text-field>
115 </v-flex> 115 </v-flex>
116 </v-layout> 116 </v-layout>
117 </v-flex> 117 </v-flex>
118 <v-flex xs12 sm9 offset-sm2> 118 <v-flex xs12 sm9 offset-sm2>
119 <v-card-actions> 119 <v-card-actions>
120 <v-btn round dark @click.native="close">Cancel</v-btn> 120 <v-btn round dark @click.native="close">Cancel</v-btn>
121 <v-spacer></v-spacer> 121 <v-spacer></v-spacer>
122 <v-btn round dark @click="save">Save</v-btn> 122 <v-btn round dark @click="save">Save</v-btn>
123 </v-card-actions> 123 </v-card-actions>
124 </v-flex> 124 </v-flex>
125 </v-layout> 125 </v-layout>
126 </v-card-text> 126 </v-card-text>
127 </v-card> 127 </v-card>
128 </v-dialog> 128 </v-dialog>
129 129
130 <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> 130 <!-- ****** VIEW PROFIL NOTICE BOARD ****** -->
131 131
132 <v-dialog v-model="dialog1" max-width="640px" scrollable> 132 <v-dialog v-model="dialog1" max-width="940px" scrollable>
133 <v-card> 133 <v-card>
134 <v-toolbar color="grey lighten-2" flat> 134 <v-toolbar color="grey lighten-2" flat>
135 <v-spacer></v-spacer> 135 <v-spacer></v-spacer>
136 <v-toolbar-title> 136 <v-toolbar-title>
137 <h3>Notice Board</h3> 137 <h3>Notice Board</h3>
138 </v-toolbar-title> 138 </v-toolbar-title>
139 <v-spacer></v-spacer> 139 <v-spacer></v-spacer>
140 <v-icon @click="close1">close</v-icon> 140 <v-icon @click="close1">close</v-icon>
141 </v-toolbar> 141 </v-toolbar>
142 <v-card-text> 142 <v-card-text>
143 <v-layout> 143 <v-layout>
144 <v-flex align-center justify-center layout text-xs-center class="mt-2"> 144 <v-flex align-center justify-center layout text-xs-center class="mt-2">
145 <img src="/static/icon/user.png" v-if="!editedItem.eventImageUrl" width="130px" /> 145 <img src="/static/icon/user.png" v-if="!editedItem.eventImageUrl" width="130px" />
146 <img 146 <img
147 :src="editedItem.eventImageUrl" 147 :src="editedItem.eventImageUrl"
148 v-else-if="editedItem.eventImageUrl" 148 v-else-if="editedItem.eventImageUrl"
149 class="img" 149 class="img"
150 width="200" 150 width="200"
151 /> 151 />
152 </v-flex> 152 </v-flex>
153 </v-layout> 153 </v-layout>
154 <v-container grid-list-md> 154 <v-container grid-list-md>
155 <v-layout wrap> 155 <v-layout wrap>
156 <v-flex> 156 <v-flex>
157 <v-layout> 157 <v-layout>
158 <v-flex xs5 sm6> 158 <v-flex xs5 sm6>
159 <h5 class="right my-1"> 159 <h5 class="right my-1">
160 <b>Title:</b> 160 <b>Title:</b>
161 </h5> 161 </h5>
162 </v-flex> 162 </v-flex>
163 <v-flex sm6 xs8> 163 <v-flex sm6 xs8>
164 <h5 class="my-1">{{ editedItem.title }}</h5> 164 <h5 class="my-1">{{ editedItem.title }}</h5>
165 </v-flex> 165 </v-flex>
166 </v-layout> 166 </v-layout>
167 <v-layout> 167 <v-layout>
168 <v-flex xs5 sm6> 168 <v-flex xs5 sm6>
169 <h5 class="right my-1"> 169 <h5 class="right my-1">
170 <b>Description:</b> 170 <b>Description:</b>
171 </h5> 171 </h5>
172 </v-flex> 172 </v-flex>
173 <v-flex sm6 xs8> 173 <v-flex sm6 xs8>
174 <h5 class="my-1">{{ editedItem.description }}</h5> 174 <h5 class="my-1">{{ editedItem.description }}</h5>
175 </v-flex> 175 </v-flex>
176 </v-layout> 176 </v-layout>
177 </v-flex> 177 </v-flex>
178 </v-layout> 178 </v-layout>
179 </v-container> 179 </v-container>
180 </v-card-text> 180 </v-card-text>
181 </v-card> 181 </v-card>
182 </v-dialog> 182 </v-dialog>
183 183
184 <v-snackbar 184 <v-snackbar
185 :timeout="timeout" 185 :timeout="timeout"
186 :top="y === 'top'" 186 :top="y === 'top'"
187 :right="x === 'right'" 187 :right="x === 'right'"
188 :vertical="mode === 'vertical'" 188 :vertical="mode === 'vertical'"
189 v-model="snackbar" 189 v-model="snackbar"
190 color="success" 190 color="success"
191 >{{ text }}</v-snackbar> 191 >{{ text }}</v-snackbar>
192 192
193 <!-- ****** EXISTING Notice Board TABLE ****** --> 193 <!-- ****** EXISTING Notice Board TABLE ****** -->
194 194
195 <v-data-table 195 <v-data-table
196 :headers="headers" 196 :headers="headers"
197 :items="desserts" 197 :items="desserts"
198 :pagination.sync="pagination" 198 :pagination.sync="pagination"
199 :search="search" 199 :search="search"
200 > 200 >
201 <template slot="items" slot-scope="props"> 201 <template slot="items" slot-scope="props">
202 <td id="td" class="text-xs-center">{{ props.index + 1}}</td> 202 <td id="td" class="text-xs-center">{{ props.index + 1}}</td>
203 <td id="td" class="text-xs-center">{{ props.item.title}}</td> 203 <td id="td" class="text-xs-center">{{ props.item.title}}</td>
204 <td id="td" class="text-xs-center td-dec">{{ props.item.description}}</td> 204 <td id="td" class="text-xs-center td-dec">{{ props.item.description}}</td>
205 205
206 <td class="text-xs-center"> 206 <td class="text-xs-center">
207 <span> 207 <span>
208 <v-tooltip top> 208 <v-tooltip top>
209 <img 209 <img
210 slot="activator" 210 slot="activator"
211 style="cursor:pointer; width:25px; height:18px; " 211 style="cursor:pointer; width:25px; height:18px; "
212 class="mr5" 212 class="mr5"
213 @click="profile(props.item)" 213 @click="profile(props.item)"
214 src="/static/icon/eye1.png" 214 src="/static/icon/eye1.png"
215 /> 215 />
216 <span>View</span> 216 <span>View</span>
217 </v-tooltip> 217 </v-tooltip>
218 <v-tooltip top> 218 <v-tooltip top>
219 <img 219 <img
220 slot="activator" 220 slot="activator"
221 style="cursor:pointer; width:20px; height:18px; " 221 style="cursor:pointer; width:20px; height:18px; "
222 class="mr5" 222 class="mr5"
223 @click="editItem(props.item)" 223 @click="editItem(props.item)"
224 src="/static/icon/edit1.png" 224 src="/static/icon/edit1.png"
225 /> 225 />
226 <span>Edit</span> 226 <span>Edit</span>
227 </v-tooltip> 227 </v-tooltip>
228 <v-tooltip top> 228 <v-tooltip top>
229 <img 229 <img
230 slot="activator" 230 slot="activator"
231 style="cursor:pointer; width:20px; height:20px; " 231 style="cursor:pointer; width:20px; height:20px; "
232 class="mr5" 232 class="mr5"
233 @click="deleteItem(props.item)" 233 @click="deleteItem(props.item)"
234 src="/static/icon/delete1.png" 234 src="/static/icon/delete1.png"
235 /> 235 />
236 <span>Delete</span> 236 <span>Delete</span>
237 </v-tooltip> 237 </v-tooltip>
238 </span> 238 </span>
239 </td> 239 </td>
240 </template> 240 </template>
241 <v-alert 241 <v-alert
242 slot="no-results" 242 slot="no-results"
243 :value="true" 243 :value="true"
244 color="error" 244 color="error"
245 icon="warning" 245 icon="warning"
246 >Your search for "{{ search }}" found no results.</v-alert> 246 >Your search for "{{ search }}" found no results.</v-alert>
247 </v-data-table> 247 </v-data-table>
248 </v-tab-item> 248 </v-tab-item>
249 249
250 <!-- ****** ADD MULTIPLE Notice Board ****** --> 250 <!-- ****** ADD MULTIPLE Notice Board ****** -->
251 251
252 <v-tab-item> 252 <v-tab-item>
253 <v-container> 253 <v-container>
254 <v-snackbar 254 <v-snackbar
255 :timeout="timeout" 255 :timeout="timeout"
256 :top="y === 'top'" 256 :top="y === 'top'"
257 :right="x === 'right'" 257 :right="x === 'right'"
258 :vertical="mode === 'vertical'" 258 :vertical="mode === 'vertical'"
259 v-model="snackbar" 259 v-model="snackbar"
260 color="success" 260 color="success"
261 >{{ text }}</v-snackbar> 261 >{{ text }}</v-snackbar>
262 <v-flex xs12 sm8 offset-sm2 class="top"> 262 <v-flex xs12 sm8 offset-sm2 class="top">
263 <v-card flat> 263 <v-card flat>
264 <v-container fluid fill-height> 264 <v-container fluid fill-height>
265 <v-layout align-center> 265 <v-layout align-center>
266 <v-flex xs12> 266 <v-flex xs12>
267 <v-form ref="form" v-model="valid" lazy-validation> 267 <v-form ref="form" v-model="valid" lazy-validation>
268 <v-layout> 268 <v-layout>
269 <v-flex 269 <v-flex
270 xs12 270 xs12
271 class="text-xs-center text-sm-center text-md-center text-lg-center my-4" 271 class="text-xs-center text-sm-center text-md-center text-lg-center my-4"
272 > 272 >
273 <v-avatar size="100px"> 273 <v-avatar size="100px">
274 <img src="/static/icon/user.png" v-if="!imageUrl" /> 274 <img src="/static/icon/user.png" v-if="!imageUrl" />
275 </v-avatar> 275 </v-avatar>
276 <input 276 <input
277 type="file" 277 type="file"
278 style="display: none" 278 style="display: none"
279 ref="image" 279 ref="image"
280 accept="image/*" 280 accept="image/*"
281 @change="onFilePicked" 281 @change="onFilePicked"
282 /> 282 />
283 <img 283 <img
284 :src="imageUrl" 284 :src="imageUrl"
285 height="150" 285 height="150"
286 v-if="imageUrl" 286 v-if="imageUrl"
287 style="border-radius:50%; width:200px" 287 style="border-radius:50%; width:200px"
288 /> 288 />
289 </v-flex> 289 </v-flex>
290 </v-layout> 290 </v-layout>
291 <v-layout> 291 <v-layout>
292 <v-flex xs4 class="pt-4 subheading"> 292 <v-flex xs4 class="pt-4 subheading">
293 <label class="right">Title:</label> 293 <label class="right">Title:</label>
294 </v-flex> 294 </v-flex>
295 <v-flex xs6 class="ml-3"> 295 <v-flex xs6 class="ml-3">
296 <v-text-field 296 <v-text-field
297 v-model="addNoticeBoard.title" 297 v-model="addNoticeBoard.title"
298 placeholder="fill your Title" 298 placeholder="fill your Title"
299 name="name" 299 name="name"
300 type="text" 300 type="text"
301 :rules="titleRules" 301 :rules="titleRules"
302 required 302 required
303 ></v-text-field> 303 ></v-text-field>
304 </v-flex> 304 </v-flex>
305 </v-layout> 305 </v-layout>
306 <v-layout> 306 <v-layout>
307 <v-flex xs4 class="pt-4 subheading"> 307 <v-flex xs4 class="pt-4 subheading">
308 <label class="right">Description:</label> 308 <label class="right">Description:</label>
309 </v-flex> 309 </v-flex>
310 <v-flex xs6 class="ml-3"> 310 <v-flex xs6 class="ml-3">
311 <v-text-field 311 <v-text-field
312 v-model="addNoticeBoard.description" 312 v-model="addNoticeBoard.description"
313 placeholder="fill your Description" 313 placeholder="fill your Description"
314 name="name" 314 name="name"
315 type="text" 315 type="text"
316 :rules="descriptionRules" 316 :rules="descriptionRules"
317 required 317 required
318 ></v-text-field> 318 ></v-text-field>
319 </v-flex> 319 </v-flex>
320 </v-layout> 320 </v-layout>
321 <v-layout> 321 <v-layout>
322 <v-flex xs4 class="pt-4 subheading"> 322 <v-flex xs4 class="pt-4 subheading">
323 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> 323 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
324 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label> 324 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label>
325 </v-flex> 325 </v-flex>
326 <v-flex xs6 class="ml-3"> 326 <v-flex xs6 class="ml-3">
327 <v-text-field 327 <v-text-field
328 label="Select Image" 328 label="Select Image"
329 @click="pickFile" 329 @click="pickFile"
330 v-model="imageName" 330 v-model="imageName"
331 append-icon="attach_file" 331 append-icon="attach_file"
332 ></v-text-field> 332 ></v-text-field>
333 </v-flex> 333 </v-flex>
334 </v-layout> 334 </v-layout>
335 <v-layout> 335 <v-layout>
336 <v-flex xs12 sm9 offset-sm2> 336 <v-flex xs12 sm9 offset-sm2>
337 <v-card-actions> 337 <v-card-actions>
338 <v-btn @click="clear" round dark>clear</v-btn> 338 <v-btn @click="clear" round dark>clear</v-btn>
339 <v-spacer></v-spacer> 339 <v-spacer></v-spacer>
340 <v-btn @click="submit" round dark :loading="loading">Add</v-btn> 340 <v-btn @click="submit" round dark :loading="loading">Add</v-btn>
341 </v-card-actions> 341 </v-card-actions>
342 </v-flex> 342 </v-flex>
343 </v-layout> 343 </v-layout>
344 </v-form> 344 </v-form>
345 </v-flex> 345 </v-flex>
346 </v-layout> 346 </v-layout>
347 </v-container> 347 </v-container>
348 </v-card> 348 </v-card>
349 </v-flex> 349 </v-flex>
350 </v-container> 350 </v-container>
351 </v-tab-item> 351 </v-tab-item>
352 </v-tabs> 352 </v-tabs>
353 <div class="loader" v-if="showLoader"> 353 <div class="loader" v-if="showLoader">
354 <v-progress-circular indeterminate color="white"></v-progress-circular> 354 <v-progress-circular indeterminate color="white"></v-progress-circular>
355 </div> 355 </div>
356 </v-app> 356 </v-app>
357 </template> 357 </template>
358 358
359 <script> 359 <script>
360 import http from "@/Services/http.js"; 360 import http from "@/Services/http.js";
361 import Util from "@/util"; 361 import Util from "@/util";
362 362
363 export default { 363 export default {
364 data: () => ({ 364 data: () => ({
365 snackbar: false, 365 snackbar: false,
366 y: "top", 366 y: "top",
367 x: "right", 367 x: "right",
368 mode: "", 368 mode: "",
369 timeout: 3000, 369 timeout: 3000,
370 text: "", 370 text: "",
371 showLoader: false, 371 showLoader: false,
372 loading: false, 372 loading: false,
373 date: null, 373 date: null,
374 search: "", 374 search: "",
375 dialog: false, 375 dialog: false,
376 dialog1: false, 376 dialog1: false,
377 valid: true, 377 valid: true,
378 isActive: true, 378 isActive: true,
379 newActive: false, 379 newActive: false,
380 addclass: [], 380 addclass: [],
381 addSection: [], 381 addSection: [],
382 gender: ["Male", "Female"], 382 gender: ["Male", "Female"],
383 AddUsercredentials: {}, 383 AddUsercredentials: {},
384 pagination: { 384 pagination: {
385 rowsPerPage: 19 385 rowsPerPage: 19
386 }, 386 },
387 imageName: "", 387 imageName: "",
388 imageUrl: "", 388 imageUrl: "",
389 imageFile: "", 389 imageFile: "",
390 upload: "", 390 upload: "",
391 titleRules: [v => !!v || " Title is required"], 391 titleRules: [v => !!v || " Title is required"],
392 descriptionRules: [v => !!v || " Description is required"], 392 descriptionRules: [v => !!v || " Description is required"],
393 headers: [ 393 headers: [
394 { 394 {
395 text: "No", 395 text: "No",
396 align: "center", 396 align: "center",
397 sortable: false, 397 sortable: false,
398 value: "No" 398 value: "No"
399 }, 399 },
400 { text: "Title", value: "title", sortable: false, align: "center" }, 400 { text: "Title", value: "title", sortable: false, align: "center" },
401 { 401 {
402 text: "Description", 402 text: "Description",
403 value: "description", 403 value: "description",
404 sortable: false, 404 sortable: false,
405 align: "center" 405 align: "center"
406 }, 406 },
407 { text: "Action", value: "", sortable: false, align: "center" } 407 { text: "Action", value: "", sortable: false, align: "center" }
408 ], 408 ],
409 desserts: [], 409 desserts: [],
410 editedIndex: -1, 410 editedIndex: -1,
411 addNoticeBoard: {}, 411 addNoticeBoard: {},
412 editedItem: { 412 editedItem: {
413 title: "", 413 title: "",
414 description: "" 414 description: ""
415 }, 415 },
416 defaultItem: { 416 defaultItem: {
417 title: "", 417 title: "",
418 description: "" 418 description: ""
419 } 419 }
420 }), 420 }),
421 methods: { 421 methods: {
422 pickFile() { 422 pickFile() {
423 this.$refs.image.click(); 423 this.$refs.image.click();
424 }, 424 },
425 425
426 onFilePicked(e) { 426 onFilePicked(e) {
427 // console.log(e) 427 // console.log(e)
428 const files = e.target.files; 428 const files = e.target.files;
429 this.upload = e.target.files[0]; 429 this.upload = e.target.files[0];
430 console.log("thisupload==>", this.upload); 430 console.log("thisupload==>", this.upload);
431 if (files[0] !== undefined) { 431 if (files[0] !== undefined) {
432 this.imageName = files[0].name; 432 this.imageName = files[0].name;
433 if (this.imageName.lastIndexOf(".") <= 0) { 433 if (this.imageName.lastIndexOf(".") <= 0) {
434 return; 434 return;
435 } 435 }
436 const fr = new FileReader(); 436 const fr = new FileReader();
437 fr.readAsDataURL(files[0]); 437 fr.readAsDataURL(files[0]);
438 fr.addEventListener("load", () => { 438 fr.addEventListener("load", () => {
439 this.imageUrl = fr.result; 439 this.imageUrl = fr.result;
440 this.imageFile = files[0]; // this is an image file that can be sent to server... 440 this.imageFile = files[0]; // this is an image file that can be sent to server...
441 }); 441 });
442 } else { 442 } else {
443 this.imageName = ""; 443 this.imageName = "";
444 this.imageFile = ""; 444 this.imageFile = "";
445 this.imageUrl = ""; 445 this.imageUrl = "";
446 } 446 }
447 }, 447 },
448 getNoticeDataList() { 448 getNoticeDataList() {
449 this.showLoader = true; 449 this.showLoader = true;
450 var token = this.$store.state.token; 450 var token = this.$store.state.token;
451 http() 451 http()
452 .get("/getEventsList", { 452 .get("/getEventsList", {
453 headers: { Authorization: "Bearer " + token } 453 headers: { Authorization: "Bearer " + token }
454 }) 454 })
455 .then(response => { 455 .then(response => {
456 this.desserts = response.data.data; 456 this.desserts = response.data.data;
457 this.showLoader = false; 457 this.showLoader = false;
458 }) 458 })
459 .catch(error => { 459 .catch(error => {
460 this.showLoader = false; 460 this.showLoader = false;
461 if (error.response.status === 401) { 461 if (error.response.status === 401) {
462 this.$router.replace({ path: "/" }); 462 this.$router.replace({ path: "/" });
463 this.$store.dispatch("setToken", null); 463 this.$store.dispatch("setToken", null);
464 this.$store.dispatch("Id", null); 464 this.$store.dispatch("Id", null);
465 } 465 }
466 }); 466 });
467 }, 467 },
468 editItem(item) { 468 editItem(item) {
469 this.editedIndex = this.desserts.indexOf(item); 469 this.editedIndex = this.desserts.indexOf(item);
470 this.editedItem = Object.assign({}, item); 470 this.editedItem = Object.assign({}, item);
471 this.dialog = true; 471 this.dialog = true;
472 }, 472 },
473 profile(item) { 473 profile(item) {
474 this.editedIndex = this.desserts.indexOf(item); 474 this.editedIndex = this.desserts.indexOf(item);
475 this.editedItem = Object.assign({}, item); 475 this.editedItem = Object.assign({}, item);
476 this.dialog1 = true; 476 this.dialog1 = true;
477 }, 477 },
478 deleteItem(item) { 478 deleteItem(item) {
479 let deleteEvent = { 479 let deleteEvent = {
480 eventId: item._id 480 eventId: item._id
481 }; 481 };
482 http() 482 http()
483 .delete( 483 .delete(
484 "/deleteEvent", 484 "/deleteEvent",
485 confirm("Are you sure you want to delete this?") && { 485 confirm("Are you sure you want to delete this?") && {
486 params: deleteEvent 486 params: deleteEvent
487 } 487 }
488 ) 488 )
489 .then(response => { 489 .then(response => {
490 // console.log("deleteUers",deleteEvent) 490 // console.log("deleteUers",deleteEvent)
491 if ((this.snackbar = true)) { 491 if ((this.snackbar = true)) {
492 this.text = "Successfully delete Existing Notice Data"; 492 this.text = "Successfully delete Existing Notice Data";
493 } 493 }
494 this.getNoticeDataList(); 494 this.getNoticeDataList();
495 }) 495 })
496 .catch(error => { 496 .catch(error => {
497 // console.log(error); 497 // console.log(error);
498 }); 498 });
499 }, 499 },
500 activeTab(type) { 500 activeTab(type) {
501 switch (type) { 501 switch (type) {
502 case "existing": 502 case "existing":
503 this.newActive = false; 503 this.newActive = false;
504 this.isActive = true; 504 this.isActive = true;
505 break; 505 break;
506 506
507 default: 507 default:
508 this.newActive = true; 508 this.newActive = true;
509 this.isActive = false; 509 this.isActive = false;
510 break; 510 break;
511 } 511 }
512 }, 512 },
513 close() { 513 close() {
514 this.dialog = false; 514 this.dialog = false;
515 setTimeout(() => { 515 setTimeout(() => {
516 this.editedItem = Object.assign({}, this.defaultItem); 516 this.editedItem = Object.assign({}, this.defaultItem);
517 this.editedIndex = -1; 517 this.editedIndex = -1;
518 }, 300); 518 }, 300);
519 }, 519 },
520 close1() { 520 close1() {
521 this.dialog1 = false; 521 this.dialog1 = false;
522 }, 522 },
523 submit() { 523 submit() {
524 if (this.$refs.form.validate()) { 524 if (this.$refs.form.validate()) {
525 if (this.imageUrl) { 525 if (this.imageUrl) {
526 var str = this.imageUrl; 526 var str = this.imageUrl;
527 const [baseUrl, imageUrl] = str.split(/,/); 527 const [baseUrl, imageUrl] = str.split(/,/);
528 this.addNoticeBoard.upload = imageUrl; 528 this.addNoticeBoard.upload = imageUrl;
529 } 529 }
530 http() 530 http()
531 .post("/createEvent", this.addNoticeBoard) 531 .post("/createEvent", this.addNoticeBoard)
532 .then(response => { 532 .then(response => {
533 this.imageUrl = ""; 533 this.imageUrl = "";
534 this.snackbar = true; 534 this.snackbar = true;
535 this.text = "New Notice added successfully"; 535 this.text = "New Notice added successfully";
536 this.getNoticeDataList(); 536 this.getNoticeDataList();
537 this.clear(); 537 this.clear();
538 }) 538 })
539 .catch(error => { 539 .catch(error => {
540 // console.log(error); 540 // console.log(error);
541 this.snackbar = true; 541 this.snackbar = true;
542 this.text = error.response.data.message; 542 this.text = error.response.data.message;
543 }); 543 });
544 } 544 }
545 }, 545 },
546 clear() { 546 clear() {
547 this.$refs.form.reset(); 547 this.$refs.form.reset();
548 this.imageUrl = ""; 548 this.imageUrl = "";
549 }, 549 },
550 save() { 550 save() {
551 let editNoticeBoard = { 551 let editNoticeBoard = {
552 eventId: this.editedItem._id, 552 eventId: this.editedItem._id,
553 title: this.editedItem.title, 553 title: this.editedItem.title,
554 description: this.editedItem.description 554 description: this.editedItem.description
555 }; 555 };
556 if (this.imageUrl) { 556 if (this.imageUrl) {
557 var str = this.imageUrl; 557 var str = this.imageUrl;
558 const [baseUrl, imageUrl] = str.split(/,/); 558 const [baseUrl, imageUrl] = str.split(/,/);
559 editNoticeBoard.upload = imageUrl; 559 editNoticeBoard.upload = imageUrl;
560 } 560 }
561 http() 561 http()
562 .put("/updateEvent", editNoticeBoard) 562 .put("/updateEvent", editNoticeBoard)
563 .then(response => { 563 .then(response => {
564 if ((this.snackbar = true)) { 564 if ((this.snackbar = true)) {
565 this.text = "Successfully Edit Existing Notice Data"; 565 this.text = "Successfully Edit Existing Notice Data";
566 } 566 }
567 this.getNoticeDataList(); 567 this.getNoticeDataList();
568 this.close(); 568 this.close();
569 }) 569 })
570 .catch(error => { 570 .catch(error => {
571 // console.log(error); 571 // console.log(error);
572 }); 572 });
573 } 573 }
574 }, 574 },
575 mounted() { 575 mounted() {
576 this.getNoticeDataList(); 576 this.getNoticeDataList();
577 }, 577 },
578 created() { 578 created() {
579 this.$root.$on("app:search", search => { 579 this.$root.$on("app:search", search => {
580 this.search = search; 580 this.search = search;
581 }); 581 });
582 }, 582 },
583 beforeDestroy() { 583 beforeDestroy() {
584 // dont forget to remove the listener 584 // dont forget to remove the listener
585 this.$root.$off("app:search"); 585 this.$root.$off("app:search");
586 } 586 }
587 }; 587 };
588 </script> 588 </script>
589 <style scoped> 589 <style scoped>
590 .active { 590 .active {
591 background-color: gray; 591 background-color: gray;
592 color: white !important; 592 color: white !important;
593 } 593 }
594 .activebtn { 594 .activebtn {
595 color: black !important; 595 color: black !important;
596 } 596 }
597 .td-dec { 597 .td-dec {
598 max-width: 200px !important; 598 max-width: 200px !important;
599 } 599 }
600 </style> 600 </style>
src/pages/Students/students.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 <v-tabs grow slider-color="gray"> 3 <v-tabs grow slider-color="gray">
4 <v-tab 4 <v-tab
5 ripple 5 ripple
6 @click="activeTab('existing')" 6 @click="activeTab('existing')"
7 v-bind:class="{ active: isActive }" 7 v-bind:class="{ active: isActive }"
8 id="tab" 8 id="tab"
9 class="subheading" 9 class="subheading"
10 >Existing Students</v-tab> 10 >Existing Students</v-tab>
11 <v-tab 11 <v-tab
12 ripple 12 ripple
13 @click="activeTab('new')" 13 @click="activeTab('new')"
14 v-bind:class="{ active: newActive }" 14 v-bind:class="{ active: newActive }"
15 id="tab1" 15 id="tab1"
16 User 16 User
17 class="subheading" 17 class="subheading"
18 >Add New Students</v-tab> 18 >Add New Students</v-tab>
19 19
20 <!-- ****** EDITS STUDENTS DETAILS ****** --> 20 <!-- ****** EDITS STUDENTS DETAILS ****** -->
21 21
22 <v-tab-item> 22 <v-tab-item>
23 <v-snackbar 23 <v-snackbar
24 :timeout="timeout" 24 :timeout="timeout"
25 :top="y === 'top'" 25 :top="y === 'top'"
26 :right="x === 'right'" 26 :right="x === 'right'"
27 :vertical="mode === 'vertical'" 27 :vertical="mode === 'vertical'"
28 v-model="snackbar" 28 v-model="snackbar"
29 color="success" 29 color="success"
30 >{{ text }}</v-snackbar> 30 >{{ text }}</v-snackbar>
31 <v-dialog v-model="dialog" max-width="170 0px" scrollable> 31 <v-dialog v-model="dialog" max-width="170 0px" scrollable>
32 <v-card flat> 32 <v-card flat>
33 <v-toolbar color="grey lighten-2" flat> 33 <v-toolbar color="grey lighten-2" flat>
34 <v-spacer></v-spacer> 34 <v-spacer></v-spacer>
35 <v-toolbar-title> 35 <v-toolbar-title>
36 <h3>Edit Student Profile</h3> 36 <h3>Edit Student Profile</h3>
37 </v-toolbar-title> 37 </v-toolbar-title>
38 <v-spacer></v-spacer> 38 <v-spacer></v-spacer>
39 </v-toolbar> 39 </v-toolbar>
40 <v-card-text style="height: 680px;"> 40 <v-card-text style="height: 680px;">
41 <v-form ref="form"> 41 <v-form ref="form">
42 <v-container fluid> 42 <v-container fluid>
43 <v-layout> 43 <v-layout>
44 <v-flex 44 <v-flex
45 xs12 45 xs12
46 class="text-xs-center text-sm-center text-md-center text-lg-center" 46 class="text-xs-center text-sm-center text-md-center text-lg-center"
47 > 47 >
48 <v-avatar size="160px"> 48 <v-avatar size="160px">
49 <img 49 <img
50 src="/static/icon/user.png" 50 src="/static/icon/user.png"
51 v-if="!editedItem.profilePicUrl && !imageUrl" 51 v-if="!editedItem.profilePicUrl && !imageUrl"
52 /> 52 />
53 <img 53 <img
54 :src="editedItem.profilePicUrl" 54 :src="editedItem.profilePicUrl"
55 v-else-if="editedItem.profilePicUrl && !imageUrl" 55 v-else-if="editedItem.profilePicUrl && !imageUrl"
56 /> 56 />
57 <img 57 <img
58 v-if="imageUrl" 58 v-if="imageUrl"
59 :src="imageUrl" 59 :src="imageUrl"
60 height="150" 60 height="150"
61 style="border-radius:50%; width:200px" 61 style="border-radius:50%; width:200px"
62 /> 62 />
63 </v-avatar> 63 </v-avatar>
64 <input 64 <input
65 type="file" 65 type="file"
66 style="display: none" 66 style="display: none"
67 ref="image" 67 ref="image"
68 accept="image/*" 68 accept="image/*"
69 @change="onFilePicked" 69 @change="onFilePicked"
70 /> 70 />
71 </v-flex> 71 </v-flex>
72 </v-layout> 72 </v-layout>
73 <v-layout> 73 <v-layout>
74 <v-flex xs12 sm4> 74 <v-flex xs12 sm4>
75 <v-layout> 75 <v-layout>
76 <v-flex xs4 class="pt-4 subheading"> 76 <v-flex xs4 class="pt-4 subheading">
77 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> 77 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label>
78 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> 78 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label>
79 </v-flex> 79 </v-flex>
80 <v-flex xs8 class="ml-3"> 80 <v-flex xs8 class="ml-3">
81 <v-select 81 <v-select
82 :items="addclass" 82 :items="addclass"
83 label="Select Class" 83 label="Select Class"
84 v-model="editedItem.select" 84 v-model="editedItem.select"
85 item-text="classNum" 85 item-text="classNum"
86 item-value="_id" 86 item-value="_id"
87 name="Select Class" 87 name="Select Class"
88 @change="getSections(editedItem.select)" 88 @change="getSections(editedItem.select)"
89 required 89 required
90 ></v-select> 90 ></v-select>
91 </v-flex> 91 </v-flex>
92 </v-layout> 92 </v-layout>
93 </v-flex> 93 </v-flex>
94 <v-flex xs12 sm4> 94 <v-flex xs12 sm4>
95 <v-layout> 95 <v-layout>
96 <v-flex xs4 class="pt-4 subheading"> 96 <v-flex xs4 class="pt-4 subheading">
97 <label class="right hidden-xs-only hidden-sm-only">Select Section:</label> 97 <label class="right hidden-xs-only hidden-sm-only">Select Section:</label>
98 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Section:</label> 98 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Section:</label>
99 </v-flex> 99 </v-flex>
100 <v-flex xs8 class="ml-3"> 100 <v-flex xs8 class="ml-3">
101 <v-select 101 <v-select
102 :items="addSection" 102 :items="addSection"
103 label="Select Section" 103 label="Select Section"
104 v-model="editedItem.selectSection" 104 v-model="editedItem.selectSection"
105 item-text="name" 105 item-text="name"
106 item-value="_id" 106 item-value="_id"
107 name="Select Section" 107 name="Select Section"
108 required 108 required
109 ></v-select> 109 ></v-select>
110 </v-flex> 110 </v-flex>
111 </v-layout> 111 </v-layout>
112 </v-flex> 112 </v-flex>
113 <v-flex xs12 sm4> 113 <v-flex xs12 sm4>
114 <v-layout> 114 <v-layout>
115 <v-flex xs4 class="pt-4 subheading"> 115 <v-flex xs4 class="pt-4 subheading">
116 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> 116 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label>
117 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> 117 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label>
118 </v-flex> 118 </v-flex>
119 <v-flex xs8 class="ml-3"> 119 <v-flex xs8 class="ml-3">
120 <v-text-field 120 <v-text-field
121 v-model="editedItem.name" 121 v-model="editedItem.name"
122 placeholder="fill your full Name" 122 placeholder="fill your full Name"
123 name="name" 123 name="name"
124 type="text" 124 type="text"
125 required 125 required
126 ></v-text-field> 126 ></v-text-field>
127 </v-flex> 127 </v-flex>
128 </v-layout> 128 </v-layout>
129 </v-flex> 129 </v-flex>
130 </v-layout> 130 </v-layout>
131 <v-layout> 131 <v-layout>
132 <v-flex xs12 sm4> 132 <v-flex xs12 sm4>
133 <v-layout> 133 <v-layout>
134 <v-flex xs4 class="pt-4 subheading"> 134 <v-flex xs4 class="pt-4 subheading">
135 <label class="right">Email ID:</label> 135 <label class="right hidden-xs-only hidden-sm-only">Email Id:</label>
136 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Email:</label>
136 </v-flex> 137 </v-flex>
137 <v-flex xs8 class="ml-3"> 138 <v-flex xs8 class="ml-3">
138 <v-text-field 139 <v-text-field
139 placeholder="fill your email" 140 placeholder="fill your email"
140 v-model="editedItem.email" 141 v-model="editedItem.email"
141 type="text" 142 type="text"
142 name="email" 143 name="email"
143 required 144 required
144 ></v-text-field> 145 ></v-text-field>
145 </v-flex> 146 </v-flex>
146 </v-layout> 147 </v-layout>
147 </v-flex> 148 </v-flex>
148 <v-flex xs12 sm4> 149 <v-flex xs12 sm4>
149 <v-layout> 150 <v-layout>
150 <v-flex xs4 class="pt-4 subheading"> 151 <v-flex xs4 class="pt-4 subheading">
151 <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> 152 <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label>
152 <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> 153 <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label>
153 </v-flex> 154 </v-flex>
154 <v-flex xs8 class="ml-3"> 155 <v-flex xs8 class="ml-3">
155 <v-menu 156 <v-menu
156 ref="menu" 157 ref="menu"
157 :close-on-content-click="false" 158 :close-on-content-click="false"
158 v-model="menu1" 159 v-model="menu1"
159 :nudge-right="40" 160 :nudge-right="40"
160 lazy 161 lazy
161 transition="scale-transition" 162 transition="scale-transition"
162 offset-y 163 offset-y
163 full-width 164 full-width
164 min-width="290px" 165 min-width="290px"
165 > 166 >
166 <v-text-field 167 <v-text-field
167 slot="activator" 168 slot="activator"
168 v-model="editedItem.dob" 169 v-model="editedItem.dob"
169 placeholder="Select Dob" 170 placeholder="Select Dob"
170 ></v-text-field> 171 ></v-text-field>
171 <v-date-picker 172 <v-date-picker
172 ref="picker" 173 ref="picker"
173 v-model="editedItem.dob" 174 v-model="editedItem.dob"
174 :max="new Date().toISOString().substr(0, 10)" 175 :max="new Date().toISOString().substr(0, 10)"
175 min="1950-01-01" 176 min="1950-01-01"
176 @input="menu1 = false" 177 @input="menu1 = false"
177 ></v-date-picker> 178 ></v-date-picker>
178 </v-menu> 179 </v-menu>
179 </v-flex> 180 </v-flex>
180 </v-layout> 181 </v-layout>
181 </v-flex> 182 </v-flex>
182 <v-flex xs12 sm4> 183 <v-flex xs12 sm4>
183 <v-layout> 184 <v-layout>
184 <v-flex xs4 class="pt-4 subheading"> 185 <v-flex xs4 class="pt-4 subheading">
185 <label class="right">City:</label> 186 <label class="right">City:</label>
186 </v-flex> 187 </v-flex>
187 <v-flex xs8 class="ml-3"> 188 <v-flex xs8 class="ml-3">
188 <v-text-field 189 <v-text-field
189 v-model="editedItem.city" 190 v-model="editedItem.city"
190 placeholder="fill your City Name" 191 placeholder="fill your City Name"
191 name="City" 192 name="City"
192 type="text" 193 type="text"
193 required 194 required
194 ></v-text-field> 195 ></v-text-field>
195 </v-flex> 196 </v-flex>
196 </v-layout> 197 </v-layout>
197 </v-flex> 198 </v-flex>
198 </v-layout> 199 </v-layout>
199 <v-layout> 200 <v-layout>
200 <v-flex xs12 sm4> 201 <v-flex xs12 sm4>
201 <v-layout> 202 <v-layout>
202 <v-flex xs4 class="pt-4 subheading"> 203 <v-flex xs4 class="pt-4 subheading">
203 <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label> 204 <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label>
204 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Blood:</label> 205 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Blood:</label>
205 </v-flex> 206 </v-flex>
206 <v-flex xs8 class="ml-3"> 207 <v-flex xs8 class="ml-3">
207 <v-text-field 208 <v-text-field
208 v-model="editedItem.bloodGroup" 209 v-model="editedItem.bloodGroup"
209 placeholder="fill your BloodGroup" 210 placeholder="fill your BloodGroup"
210 name="state" 211 name="state"
211 type="text" 212 type="text"
212 required 213 required
213 ></v-text-field> 214 ></v-text-field>
214 </v-flex> 215 </v-flex>
215 </v-layout> 216 </v-layout>
216 </v-flex> 217 </v-flex>
217 <v-flex xs12 sm4> 218 <v-flex xs12 sm4>
218 <v-layout> 219 <v-layout>
219 <v-flex xs4 class="pt-4 subheading"> 220 <v-flex xs4 class="pt-4 subheading">
220 <label class="right">Allergies:</label> 221 <label class="right">Gender:</label>
221 </v-flex> 222 </v-flex>
222 <v-flex xs8 class="ml-3"> 223 <v-flex xs8 class="ml-3">
223 <v-text-field 224 <v-select
224 v-model="editedItem.allergies" 225 :items="gender"
225 placeholder="fill your Allergies" 226 v-model="editedItem.gender"
226 name="pincode" 227 placeholder="Select Gender"
227 required 228 required
228 ></v-text-field> 229 ></v-select>
229 </v-flex> 230 </v-flex>
230 </v-layout> 231 </v-layout>
231 </v-flex> 232 </v-flex>
232 <v-flex xs12 sm4> 233 <v-flex xs12 sm4>
233 <v-layout> 234 <v-layout>
234 <v-flex xs4 class="pt-4 subheading"> 235 <v-flex xs4 class="pt-4 subheading">
235 <label class="right">Medical Notes:</label> 236 <label class="right">Medical Notes:</label>
236 </v-flex> 237 </v-flex>
237 <v-flex xs8 class="ml-3"> 238 <v-flex xs8 class="ml-3">
238 <v-text-field 239 <v-text-field
239 v-model="editedItem.medicalNotes" 240 v-model="editedItem.medicalNotes"
240 placeholder="fill your medicalNotes" 241 placeholder="fill your medicalNotes"
241 name="mobileNo" 242 name="mobileNo"
242 required 243 required
243 ></v-text-field> 244 ></v-text-field>
244 </v-flex> 245 </v-flex>
245 </v-layout> 246 </v-layout>
246 </v-flex> 247 </v-flex>
247 </v-layout> 248 </v-layout>
248 <v-layout> 249 <v-layout>
249 <v-flex xs12 sm4> 250 <v-flex xs12 sm4>
250 <v-layout> 251 <v-layout>
251 <v-flex xs4 class="pt-4 subheading"> 252 <v-flex xs4 class="pt-4 subheading">
252 <label class="right">Height:</label> 253 <label class="right">Height:</label>
253 </v-flex> 254 </v-flex>
254 <v-flex xs8 class="ml-3"> 255 <v-flex xs8 class="ml-3">
255 <v-text-field 256 <v-text-field
256 v-model="editedItem.height" 257 v-model="editedItem.height"
257 placeholder="fill your Height" 258 placeholder="fill your Height"
258 name="state" 259 name="state"
259 type="text" 260 type="text"
260 required 261 required
261 ></v-text-field> 262 ></v-text-field>
262 </v-flex> 263 </v-flex>
263 </v-layout> 264 </v-layout>
264 </v-flex> 265 </v-flex>
265 <v-flex xs12 sm4> 266 <v-flex xs12 sm4>
266 <v-layout> 267 <v-layout>
267 <v-flex xs4 class="pt-4 subheading"> 268 <v-flex xs4 class="pt-4 subheading">
268 <label class="right">Weight:</label> 269 <label class="right">Weight:</label>
269 </v-flex> 270 </v-flex>
270 <v-flex xs8 class="ml-3"> 271 <v-flex xs8 class="ml-3">
271 <v-text-field 272 <v-text-field
272 v-model="editedItem.weight" 273 v-model="editedItem.weight"
273 placeholder="fill your Weight" 274 placeholder="fill your Weight"
274 name="pincode" 275 name="pincode"
275 required 276 required
276 ></v-text-field> 277 ></v-text-field>
277 </v-flex> 278 </v-flex>
278 </v-layout> 279 </v-layout>
279 </v-flex> 280 </v-flex>
280 <v-flex xs12 sm4> 281 <v-flex xs12 sm4>
281 <v-layout> 282 <v-layout>
282 <v-flex xs4 class="pt-4 subheading"> 283 <v-flex xs4 class="pt-4 subheading">
283 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> 284 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
284 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label> 285 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label>
285 </v-flex> 286 </v-flex>
286 <v-flex xs8 class="ml-3"> 287 <v-flex xs8 class="ml-3">
287 <v-text-field 288 <v-text-field
288 label="Select Image" 289 label="Select Image"
289 @click="pickFile" 290 @click="pickFile"
290 v-model="imageName" 291 v-model="imageName"
291 append-icon="attach_file" 292 append-icon="attach_file"
292 ></v-text-field> 293 ></v-text-field>
293 </v-flex> 294 </v-flex>
294 </v-layout> 295 </v-layout>
295 </v-flex> 296 </v-flex>
296 </v-layout> 297 </v-layout>
297 <v-layout> 298 <v-layout>
298 <v-flex xs12 sm4> 299 <v-flex xs12 sm4>
299 <v-layout> 300 <v-layout>
300 <v-flex xs4 class="pt-4 subheading"> 301 <v-flex xs4 class="pt-4 subheading">
301 <label class="right">State:</label> 302 <label class="right">State:</label>
302 </v-flex> 303 </v-flex>
303 <v-flex xs8 class="ml-3"> 304 <v-flex xs8 class="ml-3">
304 <v-text-field 305 <v-text-field
305 v-model="editedItem.state" 306 v-model="editedItem.state"
306 placeholder="fill your State Name" 307 placeholder="fill your State Name"
307 name="state" 308 name="state"
308 type="text" 309 type="text"
309 required 310 required
310 ></v-text-field> 311 ></v-text-field>
311 </v-flex> 312 </v-flex>
312 </v-layout> 313 </v-layout>
313 </v-flex> 314 </v-flex>
314 <v-flex xs12 sm4> 315 <v-flex xs12 sm4>
315 <v-layout> 316 <v-layout>
316 <v-flex xs4 class="pt-4 subheading"> 317 <v-flex xs4 class="pt-4 subheading">
317 <label class="right">Pincode:</label> 318 <label class="right">Pincode:</label>
318 </v-flex> 319 </v-flex>
319 <v-flex xs8 class="ml-3"> 320 <v-flex xs8 class="ml-3">
320 <v-text-field 321 <v-text-field
321 v-model="editedItem.pincode" 322 v-model="editedItem.pincode"
322 placeholder="fill your pincode" 323 placeholder="fill your pincode"
323 name="pincode" 324 name="pincode"
324 type="number" 325 type="number"
325 required 326 required
326 ></v-text-field> 327 ></v-text-field>
327 </v-flex> 328 </v-flex>
328 </v-layout> 329 </v-layout>
329 </v-flex> 330 </v-flex>
330 <v-flex xs12 sm4> 331 <v-flex xs12 sm4>
331 <v-layout> 332 <v-layout>
332 <v-flex xs4 class="pt-4 subheading"> 333 <v-flex xs4 class="pt-4 subheading">
333 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> 334 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
334 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> 335 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label>
335 </v-flex> 336 </v-flex>
336 <v-flex xs8 class="ml-3"> 337 <v-flex xs8 class="ml-3">
337 <v-text-field 338 <v-text-field
338 v-model="editedItem.mobile" 339 v-model="editedItem.mobile"
339 placeholder="fill your MobileNo" 340 placeholder="fill your MobileNo"
340 name="mobileNo" 341 name="mobileNo"
341 type="number" 342 type="number"
342 required 343 required
343 ></v-text-field> 344 ></v-text-field>
344 </v-flex> 345 </v-flex>
345 </v-layout> 346 </v-layout>
346 </v-flex> 347 </v-flex>
347 </v-layout> 348 </v-layout>
348 <v-layout> 349 <v-layout>
349 <v-flex xs12 sm4> 350 <v-flex xs12 sm4>
350 <v-layout> 351 <v-layout>
351 <v-flex xs4 class="pt-4 subheading"> 352 <v-flex xs4 class="pt-4 subheading">
352 <label class="right hidden-xs-only hidden-sm-only">Select Country:</label> 353 <label class="right hidden-xs-only hidden-sm-only">Select Country:</label>
353 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> 354 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label>
354 </v-flex> 355 </v-flex>
355 <v-flex xs8 class="ml-3"> 356 <v-flex xs8 class="ml-3">
356 <v-autocomplete 357 <v-autocomplete
357 v-model="editedItem.country" 358 v-model="editedItem.country"
358 :items="countries" 359 :items="countries"
359 placeholder="Select Country Name" 360 placeholder="Select Country Name"
360 required 361 required
361 ></v-autocomplete> 362 ></v-autocomplete>
362 </v-flex> 363 </v-flex>
363 </v-layout> 364 </v-layout>
364 </v-flex> 365 </v-flex>
365 <v-flex xs12 sm4> 366 <v-flex xs12 sm4>
366 <v-layout> 367 <v-layout>
367 <v-flex xs4 class="pt-4 subheading"> 368 <v-flex xs4 class="pt-4 subheading">
368 <label class="right">Gender:</label>
369 </v-flex>
370 <v-flex xs8 class="ml-3">
371 <v-select
372 :items="gender"
373 v-model="editedItem.gender"
374 placeholder="Select Gender"
375 required
376 ></v-select>
377 </v-flex>
378 </v-layout>
379 </v-flex>
380 <v-flex xs12 sm4>
381 <v-layout>
382 <v-flex xs4 class="pt-4 subheading">
383 <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> 369 <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label>
384 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Roll No:</label> 370 <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Roll No:</label>
385 </v-flex> 371 </v-flex>
386 <v-flex xs8 class="ml-3"> 372 <v-flex xs8 class="ml-3">
387 <v-text-field 373 <v-text-field
388 :items="gender" 374 :items="gender"
389 v-model="editedItem.rollNo" 375 v-model="editedItem.rollNo"
390 placeholder="fill roll number" 376 placeholder="fill roll number"
391 required 377 required
392 ></v-text-field> 378 ></v-text-field>
393 </v-flex> 379 </v-flex>
394 </v-layout> 380 </v-layout>
395 </v-flex> 381 </v-flex>
396 </v-layout> 382 <v-flex xs12 sm4 class="hidden-xs-only hidden-sm-only">
397 <v-layout class="hidden-xs-only hidden-sm-only">
398 <v-flex xs12 sm4>
399 <v-layout> 383 <v-layout>
400 <v-flex xs4 sm4 class="pt-4 subheading"> 384 <v-flex xs4 sm4 class="pt-4 subheading">
401 <label class="right hidden-xs-only hidden-sm-only">Permanent Address:</label> 385 <label class="right hidden-xs-only hidden-sm-only">Permanent Address:</label>
402 <label 386 <label
403 class="right hidden-lg-only hidden-md-only hidden-xl-only" 387 class="right hidden-lg-only hidden-md-only hidden-xl-only"
404 >Permanent Address:</label> 388 >Permanent Address:</label>
405 </v-flex> 389 </v-flex>
406 <v-flex xs12 sm8 class="ml-3"> 390 <v-flex xs12 sm8 class="ml-3">
407 <v-text-field 391 <v-text-field
408 v-model="editedItem.permanentAddress" 392 v-model="editedItem.permanentAddress"
409 placeholder="fill Your Permanent Address" 393 placeholder="fill Your Permanent Address"
410 required 394 required
411 ></v-text-field> 395 ></v-text-field>
412 </v-flex> 396 </v-flex>
413 </v-layout> 397 </v-layout>
414 </v-flex> 398 </v-flex>
399 </v-layout>
400 <v-layout class="hidden-xs-only hidden-sm-only">
415 <v-flex xs12 sm4> 401 <v-flex xs12 sm4>
416 <v-layout> 402 <v-layout>
417 <v-flex xs4 class="pt-4 subheading"> 403 <v-flex xs4 class="pt-4 subheading">
418 <label class="right hidden-xs-only hidden-sm-only">Present Address:</label> 404 <label class="right hidden-xs-only hidden-sm-only">Present Address:</label>
419 <label 405 <label
420 class="right hidden-lg-only hidden-md-only hidden-xl-only" 406 class="right hidden-lg-only hidden-md-only hidden-xl-only"
421 >Present Address:</label> 407 >Present Address:</label>
422 </v-flex> 408 </v-flex>
423 <v-flex xs8 class="ml-3"> 409 <v-flex xs8 class="ml-3">
424 <v-text-field 410 <v-text-field
425 v-model="editedItem.presentAddress" 411 v-model="editedItem.presentAddress"
426 placeholder="Select Country Name" 412 placeholder="Select Country Name"
427 required 413 required
428 ></v-text-field> 414 ></v-text-field>
429 </v-flex> 415 </v-flex>
430 </v-layout> 416 </v-layout>
431 </v-flex> 417 </v-flex>
432 </v-layout> 418 </v-layout>
433 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only"> 419 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only">
434 <v-flex xs12 sm12> 420 <v-flex xs12 sm12>
435 <v-layout> 421 <v-layout>
436 <v-flex xs12 sm3 class="pt-4 subheading text-xs-center"> 422 <v-flex xs12 sm3 class="pt-4 subheading text-xs-center">
437 <label class>Present Address :</label> 423 <label class>Present Address :</label>
438 </v-flex> 424 </v-flex>
439 </v-layout> 425 </v-layout>
440 <v-layout> 426 <v-layout>
441 <v-flex xs12 sm12> 427 <v-flex xs12 sm12>
442 <v-textarea 428 <v-textarea
443 v-model="editedItem.presentAddress" 429 v-model="editedItem.presentAddress"
444 placeholder="fill Your present Address" 430 placeholder="fill Your present Address"
445 required 431 required
446 ></v-textarea> 432 ></v-textarea>
447 </v-flex> 433 </v-flex>
448 </v-layout> 434 </v-layout>
449 </v-flex> 435 </v-flex>
450 <v-flex xs12 sm12> 436 <v-flex xs12 sm12>
451 <v-layout> 437 <v-layout>
452 <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm"> 438 <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm">
453 <label>Permanent addr:</label> 439 <label>Permanent addr:</label>
454 </v-flex> 440 </v-flex>
455 </v-layout> 441 </v-layout>
456 <v-layout> 442 <v-layout>
457 <v-flex xs12 sm12> 443 <v-flex xs12 sm12>
458 <v-textarea 444 <v-textarea
459 name="input-4-3" 445 name="input-4-3"
460 v-model="editedItem.permanentAddress" 446 v-model="editedItem.permanentAddress"
461 placeholder="fill Your Permanent Address" 447 placeholder="fill Your Permanent Address"
462 required 448 required
463 ></v-textarea> 449 ></v-textarea>
464 </v-flex> 450 </v-flex>
465 </v-layout> 451 </v-layout>
466 </v-flex> 452 </v-flex>
467 </v-layout> 453 </v-layout>
468 <v-layout> 454 <v-layout>
469 <v-flex xs12 sm12> 455 <v-flex xs12 sm12>
470 <v-layout> 456 <v-layout>
471 <v-flex xs6> 457 <v-flex xs6>
472 <v-btn round dark @click.native="close">Cancel</v-btn> 458 <v-btn round dark @click.native="close">Cancel</v-btn>
473 </v-flex> 459 </v-flex>
474 <v-flex xs6> 460 <v-flex xs6>
475 <v-btn @click="save" round dark :loading="loading" class="right">Save</v-btn> 461 <v-btn @click="save" round dark :loading="loading" class="right">Save</v-btn>
476 </v-flex> 462 </v-flex>
477 </v-layout> 463 </v-layout>
478 </v-flex> 464 </v-flex>
479 </v-layout> 465 </v-layout>
480 </v-container> 466 </v-container>
481 </v-form> 467 </v-form>
482 </v-card-text> 468 </v-card-text>
483 </v-card> 469 </v-card>
484 </v-dialog> 470 </v-dialog>
485 471
486 <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** --> 472 <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** -->
487 473
488 <v-dialog v-model="dialog1" max-width="1100px" scrollable> 474 <v-dialog v-model="dialog1" max-width="1100px" scrollable>
489 <v-card> 475 <v-card>
490 <v-toolbar color="grey lighten-2" flat> 476 <v-toolbar color="grey lighten-2" flat>
491 <v-spacer></v-spacer> 477 <v-spacer></v-spacer>
492 <v-toolbar-title>Student Profile</v-toolbar-title> 478 <v-toolbar-title>Student Profile</v-toolbar-title>
493 <v-spacer></v-spacer> 479 <v-spacer></v-spacer>
494 <v-icon @click="close1">close</v-icon> 480 <v-icon @click="close1">close</v-icon>
495 </v-toolbar> 481 </v-toolbar>
496 <v-card-text style="height: 700px;"> 482 <v-card-text style="height: 700px;">
497 <v-flex align-center justify-center layout text-xs-center class="mt-3"> 483 <v-flex align-center justify-center layout text-xs-center class="mt-3">
498 <v-avatar size="160px"> 484 <v-avatar size="160px">
499 <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" /> 485 <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" />
500 <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" /> 486 <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" />
501 </v-avatar> 487 </v-avatar>
502 </v-flex> 488 </v-flex>
503 <v-container grid-list-md> 489 <v-container grid-list-md>
504 <v-layout wrap> 490 <v-layout wrap>
505 <v-flex xs12 sm6> 491 <v-flex xs12 sm6>
506 <v-layout> 492 <v-layout>
507 <v-flex xs6 sm5> 493 <v-flex xs6 sm5>
508 <h5 class="right my-1"> 494 <h5 class="right my-1">
509 <b>Full Name:</b> 495 <b>Full Name:</b>
510 </h5> 496 </h5>
511 </v-flex> 497 </v-flex>
512 <v-flex sm7 xs6> 498 <v-flex sm7 xs6>
513 <h5 class="my-1 left">{{ editedItem.name }}</h5> 499 <h5 class="my-1 left">{{ editedItem.name }}</h5>
514 </v-flex> 500 </v-flex>
515 </v-layout> 501 </v-layout>
516 </v-flex> 502 </v-flex>
517 <v-flex xs12 sm6> 503 <v-flex xs12 sm6>
518 <v-layout> 504 <v-layout>
519 <v-flex xs6 sm4> 505 <v-flex xs6 sm4>
520 <h5 class="right my-1"> 506 <h5 class="right my-1">
521 <b>Email:</b> 507 <b>Email:</b>
522 </h5> 508 </h5>
523 </v-flex> 509 </v-flex>
524 <v-flex sm8 xs6> 510 <v-flex sm8 xs6>
525 <h5 class="my-1 left">{{ editedItem.email }}</h5> 511 <h5 class="my-1 left">{{ editedItem.email }}</h5>
526 </v-flex> 512 </v-flex>
527 </v-layout> 513 </v-layout>
528 </v-flex> 514 </v-flex>
529 </v-layout> 515 </v-layout>
530 <v-layout wrap> 516 <v-layout wrap>
531 <v-flex xs12 sm6> 517 <v-flex xs12 sm6>
532 <v-layout> 518 <v-layout>
533 <v-flex xs6 sm5> 519 <v-flex xs6 sm5>
534 <b> 520 <b>
535 <h5 class="right my-1"> 521 <h5 class="right my-1">
536 <b>Gender:</b> 522 <b>Gender:</b>
537 </h5> 523 </h5>
538 </b> 524 </b>
539 </v-flex> 525 </v-flex>
540 <v-flex sm7 xs6> 526 <v-flex sm7 xs6>
541 <h5 class="my-1 left">{{ editedItem.gender }}</h5> 527 <h5 class="my-1 left">{{ editedItem.gender }}</h5>
542 </v-flex> 528 </v-flex>
543 </v-layout> 529 </v-layout>
544 </v-flex> 530 </v-flex>
545 <v-flex xs12 sm6> 531 <v-flex xs12 sm6>
546 <v-layout> 532 <v-layout>
547 <v-flex xs6 sm4> 533 <v-flex xs6 sm4>
548 <b> 534 <b>
549 <h5 class="right my-1"> 535 <h5 class="right my-1">
550 <b>D.O.B:</b> 536 <b>D.O.B:</b>
551 </h5> 537 </h5>
552 </b> 538 </b>
553 </v-flex> 539 </v-flex>
554 <v-flex sm7 xs6> 540 <v-flex sm7 xs6>
555 <h5 class="my-1">{{ dates(editedItem.dob) }}</h5> 541 <h5 class="my-1">{{ dates(editedItem.dob) }}</h5>
556 </v-flex> 542 </v-flex>
557 </v-layout> 543 </v-layout>
558 </v-flex> 544 </v-flex>
559 </v-layout> 545 </v-layout>
560 <v-layout wrap> 546 <v-layout wrap>
561 <v-flex xs12 sm6> 547 <v-flex xs12 sm6>
562 <v-layout> 548 <v-layout>
563 <v-flex xs6 sm5> 549 <v-flex xs6 sm5>
564 <b> 550 <b>
565 <h5 class="right my-1"> 551 <h5 class="right my-1">
566 <b>Blood Group:</b> 552 <b>Blood Group:</b>
567 </h5> 553 </h5>
568 </b> 554 </b>
569 </v-flex> 555 </v-flex>
570 <v-flex sm7 xs6> 556 <v-flex sm7 xs6>
571 <h5 class="my-1 left">{{ editedItem.bloodGroup }}</h5> 557 <h5 class="my-1 left">{{ editedItem.bloodGroup }}</h5>
572 </v-flex> 558 </v-flex>
573 </v-layout> 559 </v-layout>
574 </v-flex> 560 </v-flex>
575 <v-flex xs12 sm6> 561 <!-- <v-flex xs12 sm6>
576 <v-layout> 562 <v-layout>
577 <v-flex xs6 sm4> 563 <v-flex xs6 sm4>
578 <b> 564 <b>
579 <h5 class="right my-1"> 565 <h5 class="right my-1">
580 <b>Allergies:</b> 566 <b>Allergies:</b>
581 </h5> 567 </h5>
582 </b> 568 </b>
583 </v-flex> 569 </v-flex>
584 <v-flex sm8 xs6> 570 <v-flex sm8 xs6>
585 <h5 class="my-1">{{ editedItem.allergies }}</h5> 571 <h5 class="my-1">{{ editedItem.allergies }}</h5>
586 </v-flex> 572 </v-flex>
587 </v-layout> 573 </v-layout>
574 </v-flex>-->
575 <v-flex xs12 sm6>
576 <v-layout>
577 <v-flex xs6 sm4>
578 <b>
579 <h5 class="right my-1">
580 <b>Roll No. :</b>
581 </h5>
582 </b>
583 </v-flex>
584 <v-flex sm6 xs6>
585 <h5 class="my-1">{{ editedItem.rollNo }}</h5>
586 </v-flex>
587 </v-layout>
588 </v-flex> 588 </v-flex>
589 </v-layout> 589 </v-layout>
590 <v-layout wrap> 590 <v-layout wrap>
591 <v-flex xs12 sm6> 591 <v-flex xs12 sm6>
592 <v-layout> 592 <v-layout>
593 <v-flex xs6 sm5> 593 <v-flex xs6 sm5>
594 <b> 594 <b>
595 <h5 class="right my-1"> 595 <h5 class="right my-1">
596 <b>Height:</b> 596 <b>Height:</b>
597 </h5> 597 </h5>
598 </b> 598 </b>
599 </v-flex> 599 </v-flex>
600 <v-flex sm7 xs6> 600 <v-flex sm7 xs6>
601 <h5 class="my-1 left">{{ editedItem.height }}</h5> 601 <h5 class="my-1 left">{{ editedItem.height }}</h5>
602 </v-flex> 602 </v-flex>
603 </v-layout> 603 </v-layout>
604 </v-flex> 604 </v-flex>
605 <v-flex xs12 sm6> 605 <v-flex xs12 sm6>
606 <v-layout> 606 <v-layout>
607 <v-flex xs6 sm4> 607 <v-flex xs6 sm4>
608 <b> 608 <b>
609 <h5 class="right my-1"> 609 <h5 class="right my-1">
610 <b>Weight:</b> 610 <b>Weight:</b>
611 </h5> 611 </h5>
612 </b> 612 </b>
613 </v-flex> 613 </v-flex>
614 <v-flex sm8 xs6> 614 <v-flex sm8 xs6>
615 <h5 class="my-1">{{ editedItem.weight }}</h5> 615 <h5 class="my-1">{{ editedItem.weight }}</h5>
616 </v-flex> 616 </v-flex>
617 </v-layout> 617 </v-layout>
618 </v-flex> 618 </v-flex>
619 </v-layout> 619 </v-layout>
620 <v-layout wrap> 620 <v-layout wrap>
621 <v-flex xs12 sm6> 621 <v-flex xs12 sm6>
622 <v-layout> 622 <v-layout>
623 <v-flex xs6 sm5> 623 <v-flex xs6 sm5>
624 <b> 624 <b>
625 <h5 class="right my-1"> 625 <h5 class="right my-1">
626 <b>City:</b> 626 <b>City:</b>
627 </h5> 627 </h5>
628 </b> 628 </b>
629 </v-flex> 629 </v-flex>
630 <v-flex sm7 xs6> 630 <v-flex sm7 xs6>
631 <h5 class="my-1 left">{{ editedItem.city }}</h5> 631 <h5 class="my-1 left">{{ editedItem.city }}</h5>
632 </v-flex> 632 </v-flex>
633 </v-layout> 633 </v-layout>
634 </v-flex> 634 </v-flex>
635 <v-flex xs12 sm6> 635 <v-flex xs12 sm6>
636 <v-layout> 636 <v-layout>
637 <v-flex xs6 sm4> 637 <v-flex xs6 sm4>
638 <b> 638 <b>
639 <h5 class="right my-1"> 639 <h5 class="right my-1">
640 <b>State:</b> 640 <b>State:</b>
641 </h5> 641 </h5>
642 </b> 642 </b>
643 </v-flex> 643 </v-flex>
644 <v-flex sm8 xs6> 644 <v-flex sm8 xs6>
645 <h5 class="my-1">{{ editedItem.state }}</h5> 645 <h5 class="my-1">{{ editedItem.state }}</h5>
646 </v-flex> 646 </v-flex>
647 </v-layout> 647 </v-layout>
648 </v-flex> 648 </v-flex>
649 </v-layout> 649 </v-layout>
650 <v-layout wrap> 650 <v-layout wrap>
651 <v-flex xs12 sm6> 651 <v-flex xs12 sm6>
652 <v-layout> 652 <v-layout>
653 <v-flex xs6 sm5> 653 <v-flex xs6 sm5>
654 <b> 654 <b>
655 <h5 class="right my-1"> 655 <h5 class="right my-1">
656 <b>Pincode:</b> 656 <b>Pincode:</b>
657 </h5> 657 </h5>
658 </b> 658 </b>
659 </v-flex> 659 </v-flex>
660 <v-flex sm7 xs6> 660 <v-flex sm7 xs6>
661 <h5 class="my-1">{{ editedItem.pincode }}</h5> 661 <h5 class="my-1">{{ editedItem.pincode }}</h5>
662 </v-flex> 662 </v-flex>
663 </v-layout> 663 </v-layout>
664 </v-flex> 664 </v-flex>
665 <v-flex xs12 sm5> 665 <v-flex xs12 sm5>
666 <v-layout> 666 <v-layout>
667 <v-flex xs6 sm5> 667 <v-flex xs6 sm5>
668 <b> 668 <b>
669 <h5 class="right my-1"> 669 <h5 class="right my-1">
670 <b>Country:</b> 670 <b>Country:</b>
671 </h5> 671 </h5>
672 </b> 672 </b>
673 </v-flex> 673 </v-flex>
674 <v-flex sm7 xs6> 674 <v-flex sm7 xs6>
675 <h5 class="my-1">{{ editedItem.country }}</h5> 675 <h5 class="my-1">{{ editedItem.country }}</h5>
676 </v-flex> 676 </v-flex>
677 </v-layout> 677 </v-layout>
678 </v-flex> 678 </v-flex>
679 </v-layout> 679 </v-layout>
680 <v-layout wrap> 680 <v-layout wrap>
681 <v-flex xs12 sm6> 681 <v-flex xs12 sm6>
682 <v-layout> 682 <v-layout>
683 <v-flex sm5 xs6> 683 <v-flex sm5 xs6>
684 <b> 684 <b>
685 <h5 class="right my-1"> 685 <h5 class="right my-1">
686 <b>Mobile No:</b> 686 <b>Mobile No:</b>
687 </h5> 687 </h5>
688 </b> 688 </b>
689 </v-flex> 689 </v-flex>
690 <v-flex sm6 xs6> 690 <v-flex sm6 xs6>
691 <h5 class="my-1">{{ editedItem.mobile }}</h5> 691 <h5 class="my-1">{{ editedItem.mobile }}</h5>
692 </v-flex> 692 </v-flex>
693 </v-layout> 693 </v-layout>
694 </v-flex> 694 </v-flex>
695 <v-flex xs12 sm6> 695 <v-flex xs12 sm6>
696 <v-layout> 696 <v-layout>
697 <v-flex xs6 sm4> 697 <v-flex xs6 sm4>
698 <b> 698 <b>
699 <h5 class="right my-1"> 699 <h5 class="right my-1">
700 <b>Fahter Name:</b> 700 <b>FahterName:</b>
701 </h5> 701 </h5>
702 </b> 702 </b>
703 </v-flex> 703 </v-flex>
704 <v-flex sm8 xs6> 704 <v-flex sm8 xs6>
705 <h5 class="my-1">{{ editedItem.fatherName }}</h5> 705 <h5 class="my-1">{{ editedItem.fatherName }}</h5>
706 </v-flex> 706 </v-flex>
707 </v-layout> 707 </v-layout>
708 </v-flex> 708 </v-flex>
709 </v-layout> 709 </v-layout>
710 <v-layout wrap> 710 <v-layout wrap>
711 <v-flex xs12 sm5> 711 <v-flex xs12 sm5>
712 <v-layout> 712 <v-layout>
713 <v-flex xs6 sm6> 713 <v-flex xs6 sm6>
714 <b> 714 <b>
715 <h5 class="right my-1"> 715 <h5 class="right my-1">
716 <b>Mother Name:</b> 716 <b>MotherName:</b>
717 </h5> 717 </h5>
718 </b> 718 </b>
719 </v-flex> 719 </v-flex>
720 <v-flex sm6 xs6> 720 <v-flex sm6 xs6>
721 <h5 class="my-1">{{ editedItem.motherName }}</h5> 721 <h5 class="my-1">{{ editedItem.motherName }}</h5>
722 </v-flex> 722 </v-flex>
723 </v-layout> 723 </v-layout>
724 </v-flex> 724 </v-flex>
725 <v-flex xs12 sm6> 725 <v-flex xs12 sm6>
726 <v-layout> 726 <v-layout>
727 <v-flex xs6 sm6> 727 <v-flex xs6 sm6>
728 <b> 728 <b>
729 <h5 class="right my-1"> 729 <h5 class="right my-1">
730 <b>Father Cell No:</b> 730 <b>FatherCellNo:</b>
731 </h5> 731 </h5>
732 </b> 732 </b>
733 </v-flex> 733 </v-flex>
734 <v-flex sm6 xs6> 734 <v-flex sm6 xs6>
735 <h5 class="my-1">{{ editedItem.fatherCellNo }}</h5> 735 <h5 class="my-1">{{ editedItem.fatherCellNo }}</h5>
736 </v-flex> 736 </v-flex>
737 </v-layout> 737 </v-layout>
738 </v-flex> 738 </v-flex>
739 </v-layout> 739 </v-layout>
740 <v-layout wrap> 740 <v-layout wrap>
741 <v-flex xs12 sm5> 741 <v-flex xs12 sm5>
742 <v-layout> 742 <v-layout>
743 <v-flex xs6 sm6> 743 <v-flex xs6 sm6>
744 <b> 744 <b>
745 <h5 class="right my-1"> 745 <h5 class="right my-1">
746 <b>Mother Cell No:</b> 746 <b>MotherCellNo:</b>
747 </h5> 747 </h5>
748 </b> 748 </b>
749 </v-flex> 749 </v-flex>
750 <v-flex sm6 xs6> 750 <v-flex sm6 xs6>
751 <h5 class="my-1">{{ editedItem.motherCellNo }}</h5> 751 <h5 class="my-1">{{ editedItem.motherCellNo }}</h5>
752 </v-flex> 752 </v-flex>
753 </v-layout> 753 </v-layout>
754 </v-flex> 754 </v-flex>
755 <v-flex xs12 sm6> 755 <v-flex xs12 sm6>
756 <v-layout> 756 <v-layout>
757 <v-flex xs6 sm6> 757 <v-flex xs6 sm6>
758 <b> 758 <b>
759 <h5 class="my-1 right"> 759 <h5 class="my-1 right">
760 <b>Academic Year:</b> 760 <b>AcademicYear:</b>
761 </h5> 761 </h5>
762 </b> 762 </b>
763 </v-flex> 763 </v-flex>
764 <v-flex sm5 xs6> 764 <v-flex sm5 xs6>
765 <h5 class="my-1">{{ editedItem.establishmentYear }}</h5> 765 <h5 class="my-1">{{ editedItem.establishmentYear }}</h5>
766 </v-flex> 766 </v-flex>
767 </v-layout> 767 </v-layout>
768 </v-flex> 768 </v-flex>
769 </v-layout> 769 </v-layout>
770 <v-layout wrap> 770 <v-layout wrap>
771 <v-flex xs12 sm5> 771 <v-flex xs12 sm5>
772 <v-layout> 772 <v-layout>
773 <v-flex xs6 sm6> 773 <v-flex xs6 sm6>
774 <b> 774 <b>
775 <h5 class="my-1 right"> 775 <h5 class="my-1 right">
776 <b>Medical Notes:</b> 776 <b>MedicalNotes:</b>
777 </h5> 777 </h5>
778 </b> 778 </b>
779 </v-flex> 779 </v-flex>
780 <v-flex sm5 xs6> 780 <v-flex sm5 xs6>
781 <h5 class="my-1">{{ editedItem.medicalNotes }}</h5> 781 <h5 class="my-1">{{ editedItem.medicalNotes }}</h5>
782 </v-flex> 782 </v-flex>
783 </v-layout> 783 </v-layout>
784 </v-flex> 784 </v-flex>
785 <v-flex xs12 sm6> 785 <v-flex xs12 sm5 class="hidden-xs-only">
786 <v-layout>
787 <v-flex xs6 sm6>
788 <b>
789 <h5 class="right my-1">
790 <b>Roll No. :</b>
791 </h5>
792 </b>
793 </v-flex>
794 <v-flex sm6 xs6>
795 <h5 class="my-1">{{ editedItem.rollNo }}</h5>
796 </v-flex>
797 </v-layout>
798 </v-flex>
799 </v-layout>
800 <v-layout wrap class="hidden-xs-only">
801 <v-flex xs12 sm5>
802 <v-layout wrap> 786 <v-layout wrap>
803 <v-flex sm6> 787 <v-flex sm6>
804 <b> 788 <b>
805 <h5 class="my-1 right"> 789 <h5 class="my-1 right">
806 <b>present Address:</b> 790 <b>present Address:</b>
807 </h5> 791 </h5>
808 </b> 792 </b>
809 </v-flex> 793 </v-flex>
810 <v-flex sm5> 794 <v-flex sm5>
811 <h5 class="my-1">{{ editedItem.presentAddress }}</h5> 795 <h5 class="my-1">{{ editedItem.presentAddress }}</h5>
812 </v-flex> 796 </v-flex>
813 </v-layout> 797 </v-layout>
814 </v-flex> 798 </v-flex>
815 <v-flex sm6> 799 <v-flex sm6 class="hidden-xs-only">
816 <v-layout wrap> 800 <v-layout wrap>
817 <v-flex sm6> 801 <v-flex sm6>
818 <b> 802 <b>
819 <h5 class="my-1 right"> 803 <h5 class="my-1 right">
820 <b>Permanent Address:</b> 804 <b>Permanent Address:</b>
821 </h5> 805 </h5>
822 </b> 806 </b>
823 </v-flex> 807 </v-flex>
824 <v-flex sm6> 808 <v-flex sm6>
825 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> 809 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5>
826 </v-flex> 810 </v-flex>
827 </v-layout> 811 </v-layout>
828 </v-flex> 812 </v-flex>
829 </v-layout> 813 </v-layout>
830 <v-layout wrap class="hidden-sm-only hidden-md-only hidden-lg-only hidden-xl-only"> 814 <v-layout wrap class="hidden-sm-only hidden-md-only hidden-lg-only hidden-xl-only">
831 <v-flex xs12 sm5> 815 <v-flex xs12 sm5>
832 <v-layout wrap> 816 <v-layout wrap>
833 <v-flex xs8 sm6> 817 <v-flex xs12 sm6>
834 <b> 818 <b>
835 <h5 class="my-1"> 819 <h5 class="my-1">
836 <b>present Address:-</b> 820 <b>present Address:-</b>
837 </h5> 821 </h5>
838 </b> 822 </b>
839 </v-flex> 823 </v-flex>
840 <v-flex sm5 xs12> 824 <v-flex sm5 xs12>
841 <h5 class="my-1">{{ editedItem.presentAddress }}</h5> 825 <h5 class="my-1">{{ editedItem.presentAddress }}</h5>
842 </v-flex> 826 </v-flex>
843 </v-layout> 827 </v-layout>
844 </v-flex> 828 </v-flex>
845 <v-flex xs12 sm6> 829 <v-flex xs12 sm6>
846 <v-layout wrap> 830 <v-layout wrap>
847 <v-flex xs9 sm6> 831 <v-flex xs12 sm6>
848 <b> 832 <b>
849 <h5 class="my-1"> 833 <h5 class="my-1">
850 <b>Permanent Address:-</b> 834 <b>Permanent Address:-</b>
851 </h5> 835 </h5>
852 </b> 836 </b>
853 </v-flex> 837 </v-flex>
854 <v-flex sm6 xs12> 838 <v-flex sm6 xs12>
855 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> 839 <h5 class="my-1">{{ editedItem.permanentAddress }}</h5>
856 </v-flex> 840 </v-flex>
857 </v-layout> 841 </v-layout>
858 </v-flex> 842 </v-flex>
859 </v-layout> 843 </v-layout>
860 </v-container> 844 </v-container>
861 </v-card-text> 845 </v-card-text>
862 </v-card> 846 </v-card>
863 </v-dialog> 847 </v-dialog>
864 848
865 <v-snackbar 849 <v-snackbar
866 :timeout="timeout" 850 :timeout="timeout"
867 :top="y === 'top'" 851 :top="y === 'top'"
868 :right="x === 'right'" 852 :right="x === 'right'"
869 :vertical="mode === 'vertical'" 853 :vertical="mode === 'vertical'"
870 v-model="snackbar" 854 v-model="snackbar"
871 color="success" 855 color="success"
872 >{{ text }}</v-snackbar> 856 >{{ text }}</v-snackbar>
873 857
874 <!-- ****** EXISTING-USERS STUDENTS TABLE ****** --> 858 <!-- ****** EXISTING-USERS STUDENTS TABLE ****** -->
875 <v-card flat> 859 <v-card flat>
876 <v-card-actions class="hidden-xs-only hidden-sm-only"> 860 <v-card-actions class="hidden-xs-only hidden-sm-only">
877 <v-layout> 861 <v-layout>
878 <label class="right mt-4 ml-5">Select Class:</label> 862 <label class="right mt-4 ml-5">Select Class:</label>
879 <v-select 863 <v-select
880 :items="addclass" 864 :items="addclass"
881 label="Select Class" 865 label="Select Class"
882 v-model="selectStudents.select" 866 v-model="selectStudents.select"
883 item-text="classNum" 867 item-text="classNum"
884 item-value="_id" 868 item-value="_id"
885 name="Select Class" 869 name="Select Class"
886 :rules="classRules" 870 :rules="classRules"
887 @change="getSections(selectStudents.select)" 871 @change="getSections(selectStudents.select)"
888 class="px-4" 872 class="px-4"
889 required 873 required
890 ></v-select> 874 ></v-select>
891 <label class="right mt-4">Select Section:</label> 875 <label class="right mt-4">Select Section:</label>
892 <v-select 876 <v-select
893 :items="addSection" 877 :items="addSection"
894 label="Select Section" 878 label="Select Section"
895 v-model="selectStudents.selectSection" 879 v-model="selectStudents.selectSection"
896 item-text="name" 880 item-text="name"
897 item-value="_id" 881 item-value="_id"
898 name="Select Section" 882 name="Select Section"
899 :rules="sectionRules" 883 :rules="sectionRules"
900 class="pl-3" 884 class="pl-3"
901 required 885 required
902 ></v-select> 886 ></v-select>
903 </v-layout> 887 </v-layout>
904 <v-spacer></v-spacer> 888 <v-spacer></v-spacer>
905 <v-btn @click="findStudents()" round dark :loading="loading" class="left">Find</v-btn> 889 <v-btn @click="findStudents()" round dark :loading="loading" class="left">Find</v-btn>
906 </v-card-actions> 890 </v-card-actions>
907 <v-flex class="hidden-xl-only hidden-lg-only hidden-md-only"> 891 <v-flex class="hidden-xl-only hidden-lg-only hidden-md-only">
908 <v-layout> 892 <v-layout>
909 <v-flex xs4> 893 <v-flex xs4>
910 <label class="right mt-4">Select Class:</label> 894 <label class="right mt-4">Select Class:</label>
911 </v-flex> 895 </v-flex>
912 <v-flex xs8> 896 <v-flex xs8>
913 <v-select 897 <v-select
914 :items="addclass" 898 :items="addclass"
915 label="Select Class" 899 label="Select Class"
916 v-model="selectStudents.select" 900 v-model="selectStudents.select"
917 item-text="classNum" 901 item-text="classNum"
918 item-value="_id" 902 item-value="_id"
919 name="Select Class" 903 name="Select Class"
920 :rules="classRules" 904 :rules="classRules"
921 @change="getSections(selectStudents.select)" 905 @change="getSections(selectStudents.select)"
922 class="px-2" 906 class="px-2"
923 required 907 required
924 ></v-select> 908 ></v-select>
925 </v-flex> 909 </v-flex>
926 </v-layout> 910 </v-layout>
927 <v-layout> 911 <v-layout>
928 <v-flex xs4> 912 <v-flex xs4>
929 <label class="right mt-4">Select Section:</label> 913 <label class="right mt-4">Select Section:</label>
930 </v-flex> 914 </v-flex>
931 <v-flex xs8> 915 <v-flex xs8>
932 <v-select 916 <v-select
933 :items="addSection" 917 :items="addSection"
934 label="Select Section" 918 label="Select Section"
935 v-model="selectStudents.selectSection" 919 v-model="selectStudents.selectSection"
936 item-text="name" 920 item-text="name"
937 item-value="_id" 921 item-value="_id"
938 name="Select Section" 922 name="Select Section"
939 :rules="sectionRules" 923 :rules="sectionRules"
940 class="px-2" 924 class="px-2"
941 required 925 required
942 ></v-select> 926 ></v-select>
943 </v-flex> 927 </v-flex>
944 </v-layout> 928 </v-layout>
945 <v-layout> 929 <v-layout>
946 <v-flex xs5 class="mx-auto mb-2"> 930 <v-flex xs5 class="mx-auto mb-2">
947 <v-btn @click="findStudents()" block round dark :loading="loading">Find</v-btn> 931 <v-btn @click="findStudents()" block round dark :loading="loading">Find</v-btn>
948 </v-flex> 932 </v-flex>
949 </v-layout> 933 </v-layout>
950 </v-flex> 934 </v-flex>
951 </v-card> 935 </v-card>
952 <v-data-table 936 <v-data-table
953 :headers="headers" 937 :headers="headers"
954 :items="desserts" 938 :items="desserts"
955 :pagination.sync="pagination" 939 :pagination.sync="pagination"
956 :search="search" 940 :search="search"
957 > 941 >
958 <template slot="items" slot-scope="props"> 942 <template slot="items" slot-scope="props">
959 <td id="td" class="text-xs-center">{{ props.item.rollNo}}</td> 943 <td id="td" class="text-xs-center">{{ props.item.rollNo}}</td>
960 <td id="td" class="text-xs-center"> 944 <td id="td" class="text-xs-center">
961 <v-avatar> 945 <v-avatar>
962 <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> 946 <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
963 <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> 947 <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
964 </v-avatar> 948 </v-avatar>
965 </td> 949 </td>
966 <td id="td" class="text-xs-center">{{ props.item.name}}</td> 950 <td id="td" class="text-xs-center">{{ props.item.name}}</td>
967 <td id="td" class="text-xs-center">{{ props.item.email }}</td> 951 <td id="td" class="text-xs-center">{{ props.item.email }}</td>
968 <td id="td" class="text-xs-center">{{ dates(props.item.dob) }}</td> 952 <td id="td" class="text-xs-center">{{ dates(props.item.dob) }}</td>
969 <td id="td" class="text-xs-center">{{ props.item.gender }}</td> 953 <td id="td" class="text-xs-center">{{ props.item.gender }}</td>
970 <td id="td" class="text-xs-center">{{ props.item.parentId.fatherName }}</td> 954 <td id="td" class="text-xs-center">{{ props.item.parentId.fatherName }}</td>
971 <td id="td" class="text-xs-center">{{ props.item.parentId.motherName }}</td> 955 <td id="td" class="text-xs-center">{{ props.item.parentId.motherName }}</td>
972 <td id="td" class="text-xs-center">{{ props.item.establishmentYear }}</td> 956 <td id="td" class="text-xs-center">{{ props.item.establishmentYear }}</td>
973 <td id="td" class="text-xs-center">{{ props.item.mobile}}</td> 957 <td id="td" class="text-xs-center">{{ props.item.mobile}}</td>
974 958
975 <td class="text-xs-center"> 959 <td class="text-xs-center">
976 <span> 960 <span>
977 <v-tooltip top> 961 <v-tooltip top>
978 <img 962 <img
979 slot="activator" 963 slot="activator"
980 style="cursor:pointer; width:25px; height:18px; " 964 style="cursor:pointer; width:25px; height:18px; "
981 class="mr5" 965 class="mr5"
982 @click="profile(props.item)" 966 @click="profile(props.item)"
983 src="/static/icon/eye1.png" 967 src="/static/icon/eye1.png"
984 /> 968 />
985 <span>View</span> 969 <span>View</span>
986 </v-tooltip> 970 </v-tooltip>
987 <v-tooltip top> 971 <v-tooltip top>
988 <img 972 <img
989 slot="activator" 973 slot="activator"
990 style="cursor:pointer; width:20px; height:18px; " 974 style="cursor:pointer; width:20px; height:18px; "
991 class="mr5" 975 class="mr5"
992 @click="editItem(props.item)" 976 @click="editItem(props.item)"
993 src="/static/icon/edit1.png" 977 src="/static/icon/edit1.png"
994 /> 978 />
995 <span>Edit</span> 979 <span>Edit</span>
996 </v-tooltip> 980 </v-tooltip>
997 <v-tooltip top> 981 <v-tooltip top>
998 <img 982 <img
999 slot="activator" 983 slot="activator"
1000 style="cursor:pointer; width:20px; height:20px; " 984 style="cursor:pointer; width:20px; height:20px; "
1001 class="mr5" 985 class="mr5"
1002 @click="deleteItem(props.item)" 986 @click="deleteItem(props.item)"
1003 src="/static/icon/delete1.png" 987 src="/static/icon/delete1.png"
1004 /> 988 />
1005 <span>Delete</span> 989 <span>Delete</span>
1006 </v-tooltip> 990 </v-tooltip>
1007 </span> 991 </span>
1008 </td> 992 </td>
1009 </template> 993 </template>
1010 <v-alert 994 <v-alert
1011 slot="no-results" 995 slot="no-results"
1012 :value="true" 996 :value="true"
1013 color="error" 997 color="error"
1014 icon="warning" 998 icon="warning"
1015 >Your search for "{{ search }}" found no results.</v-alert> 999 >Your search for "{{ search }}" found no results.</v-alert>
1016 </v-data-table> 1000 </v-data-table>
1017 </v-tab-item> 1001 </v-tab-item>
1018 1002
1019 <!-- ****** ADD STUDENTS DETAILS****** --> 1003 <!-- ****** ADD STUDENTS DETAILS****** -->
1020 <v-tab-item> 1004 <v-tab-item>
1021 <v-container fluid> 1005 <v-container fluid>
1022 <v-layout align-center justify-center fill-height> 1006 <v-layout align-center justify-center fill-height>
1023 <v-flex xs12 sm12 md10 lg11> 1007 <v-flex xs12 sm12 md10 lg11>
1024 <div> 1008 <div>
1025 <v-app> 1009 <v-app>
1026 <v-stepper v-model="e2"> 1010 <v-stepper v-model="e2">
1027 <v-stepper-header> 1011 <v-stepper-header>
1028 <v-stepper-step :complete="e2 > 1" step="1">Fill parent Details</v-stepper-step> 1012 <v-stepper-step :complete="e2 > 1" step="1">Fill parent Details</v-stepper-step>
1029 <v-divider></v-divider> 1013 <v-divider></v-divider>
1030 <v-stepper-step step="2">Fill Student Details</v-stepper-step> 1014 <v-stepper-step step="2">Fill Student Details</v-stepper-step>
1031 </v-stepper-header> 1015 </v-stepper-header>
1032 <v-stepper-items> 1016 <v-stepper-items>
1033 <v-stepper-content step="1"> 1017 <v-stepper-content step="1">
1034 <v-container fluid class> 1018 <v-container fluid class>
1035 <v-snackbar 1019 <v-snackbar
1036 :timeout="timeout" 1020 :timeout="timeout"
1037 :top="y === 'top'" 1021 :top="y === 'top'"
1038 :right="x === 'right'" 1022 :right="x === 'right'"
1039 :vertical="mode === 'vertical'" 1023 :vertical="mode === 'vertical'"
1040 v-model="snackbar" 1024 v-model="snackbar"
1041 color="success" 1025 color="success"
1042 >{{ text }}</v-snackbar> 1026 >{{ text }}</v-snackbar>
1043 <v-flex xs12 sm12 class="hidden-md-only hidden-lg-only hidden-xl-only"> 1027 <v-flex xs12 sm12 class="hidden-md-only hidden-lg-only hidden-xl-only">
1044 <v-form ref="parentForm" v-model="valid" lazy-validation> 1028 <v-form ref="parentForm" v-model="valid" lazy-validation>
1045 <v-layout wrap> 1029 <v-layout wrap>
1046 <v-flex xs12 sm6> 1030 <v-flex xs12 sm6>
1047 <v-layout wrap> 1031 <v-layout wrap>
1048 <v-flex xs12 class="pt-4 subheading"> 1032 <v-flex xs12 class="pt-4 subheading">
1049 <label>Father Cell No:</label> 1033 <label>Father Cell No:</label>
1050 </v-flex> 1034 </v-flex>
1051 <v-flex xs12> 1035 <v-flex xs12>
1052 <v-text-field 1036 <v-text-field
1053 v-model.trim="parentData.fatherCellNo" 1037 v-model.trim="parentData.fatherCellNo"
1054 placeholder="fill your father Cell Number" 1038 placeholder="fill your father Cell Number"
1055 type="number" 1039 type="number"
1056 :rules="fatheCellNoRules" 1040 :rules="fatheCellNoRules"
1057 v-on:keyup="getParentDetails()" 1041 v-on:keyup="getParentDetails()"
1058 required 1042 required
1059 ></v-text-field> 1043 ></v-text-field>
1060 </v-flex> 1044 </v-flex>
1061 </v-layout> 1045 </v-layout>
1062 </v-flex> 1046 </v-flex>
1063 <v-flex xs12 sm6> 1047 <v-flex xs12 sm6>
1064 <v-layout wrap> 1048 <v-layout wrap>
1065 <v-flex xs12 class="pt-4 subheading"> 1049 <v-flex xs12 class="pt-4 subheading">
1066 <label>Parent Email Id:</label> 1050 <label>Parent Email Id:</label>
1067 </v-flex> 1051 </v-flex>
1068 <v-flex xs12> 1052 <v-flex xs12>
1069 <v-text-field 1053 <v-text-field
1070 placeholder="fill Parent email" 1054 placeholder="fill Parent email"
1071 v-model="parentData.email" 1055 v-model="parentData.email"
1072 type="text" 1056 type="text"
1073 required 1057 required
1074 ></v-text-field> 1058 ></v-text-field>
1075 </v-flex> 1059 </v-flex>
1076 </v-layout> 1060 </v-layout>
1077 </v-flex> 1061 </v-flex>
1078 </v-layout> 1062 </v-layout>
1079 <v-layout wrap> 1063 <v-layout wrap>
1080 <v-flex xs12 sm6> 1064 <v-flex xs12 sm6>
1081 <v-layout wrap> 1065 <v-layout wrap>
1082 <v-flex xs12 class="pt-4 subheading"> 1066 <v-flex xs12 class="pt-4 subheading">
1083 <label>Father Name:</label> 1067 <label>Father Name:</label>
1084 </v-flex> 1068 </v-flex>
1085 <v-flex xs12> 1069 <v-flex xs12>
1086 <v-text-field 1070 <v-text-field
1087 v-model="parentData.fatherName" 1071 v-model="parentData.fatherName"
1088 placeholder="Fill your father Name" 1072 placeholder="Fill your father Name"
1089 required 1073 required
1090 ></v-text-field> 1074 ></v-text-field>
1091 </v-flex> 1075 </v-flex>
1092 </v-layout> 1076 </v-layout>
1093 </v-flex> 1077 </v-flex>
1094 <v-flex xs12 sm6> 1078 <v-flex xs12 sm6>
1095 <v-layout wrap> 1079 <v-layout wrap>
1096 <v-flex xs12 class="pt-4 subheading"> 1080 <v-flex xs12 class="pt-4 subheading">
1097 <label>Mother Name:</label> 1081 <label>Mother Name:</label>
1098 </v-flex> 1082 </v-flex>
1099 <v-flex xs12> 1083 <v-flex xs12>
1100 <v-text-field 1084 <v-text-field
1101 v-model="parentData.motherName" 1085 v-model="parentData.motherName"
1102 placeholder="fill your Mother Name" 1086 placeholder="fill your Mother Name"
1103 name="state" 1087 name="state"
1104 type="text" 1088 type="text"
1105 required 1089 required
1106 ></v-text-field> 1090 ></v-text-field>
1107 </v-flex> 1091 </v-flex>
1108 </v-layout> 1092 </v-layout>
1109 </v-flex> 1093 </v-flex>
1110 </v-layout> 1094 </v-layout>
1111 <v-layout wrap> 1095 <v-layout wrap>
1112 <v-flex xs12 sm6> 1096 <v-flex xs12 sm6>
1113 <v-layout wrap> 1097 <v-layout wrap>
1114 <v-flex xs12 class="pt-4 subheading"> 1098 <v-flex xs12 class="pt-4 subheading">
1115 <label>Mother Cell No:</label> 1099 <label>Mother Cell No:</label>
1116 </v-flex> 1100 </v-flex>
1117 <v-flex xs12> 1101 <v-flex xs12>
1118 <v-text-field 1102 <v-text-field
1119 v-model="parentData.motherCellNo" 1103 v-model="parentData.motherCellNo"
1120 placeholder="fill your Mother Cell Number" 1104 placeholder="fill your Mother Cell Number"
1121 name="state" 1105 name="state"
1122 type="number" 1106 type="number"
1123 required 1107 required
1124 ></v-text-field> 1108 ></v-text-field>
1125 </v-flex> 1109 </v-flex>
1126 </v-layout> 1110 </v-layout>
1127 </v-flex> 1111 </v-flex>
1128 <v-flex xs12 sm6> 1112 <v-flex xs12 sm6>
1129 <v-layout wrap> 1113 <v-layout wrap>
1130 <v-flex xs12 class="pt-4 subheading"> 1114 <v-flex xs12 class="pt-4 subheading">
1131 <label>Father Profession:</label> 1115 <label>Father Profession:</label>
1132 </v-flex> 1116 </v-flex>
1133 <v-flex xs12> 1117 <v-flex xs12>
1134 <v-text-field 1118 <v-text-field
1135 v-model="parentData.fatherProfession" 1119 v-model="parentData.fatherProfession"
1136 placeholder="fill your father profession" 1120 placeholder="fill your father profession"
1137 ></v-text-field> 1121 ></v-text-field>
1138 </v-flex> 1122 </v-flex>
1139 </v-layout> 1123 </v-layout>
1140 </v-flex> 1124 </v-flex>
1141 </v-layout> 1125 </v-layout>
1142 <v-layout wrap> 1126 <v-layout wrap>
1143 <v-flex xs12 sm6> 1127 <v-flex xs12 sm6>
1144 <v-layout wrap> 1128 <v-layout wrap>
1145 <v-flex xs12 class="pt-4 subheading"> 1129 <v-flex xs12 class="pt-4 subheading">
1146 <label>Mother Profession:</label> 1130 <label>Mother Profession:</label>
1147 </v-flex> 1131 </v-flex>
1148 <v-flex xs12> 1132 <v-flex xs12>
1149 <v-text-field 1133 <v-text-field
1150 v-model="parentData.motherProfession" 1134 v-model="parentData.motherProfession"
1151 placeholder="fill your mother profession" 1135 placeholder="fill your mother profession"
1152 ></v-text-field> 1136 ></v-text-field>
1153 </v-flex> 1137 </v-flex>
1154 </v-layout> 1138 </v-layout>
1155 </v-flex> 1139 </v-flex>
1156 </v-layout> 1140 </v-layout>
1157 <v-flex sm12 class="hidden-xs-only"> 1141 <v-flex sm12 class="hidden-xs-only">
1158 <v-card-actions> 1142 <v-card-actions>
1159 <v-spacer></v-spacer> 1143 <v-spacer></v-spacer>
1160 <v-btn 1144 <v-btn
1161 @click="submitParentDetails" 1145 @click="submitParentDetails"
1162 round 1146 round
1163 dark 1147 dark
1164 :loading="loading" 1148 :loading="loading"
1165 v-show="showParent" 1149 v-show="showParent"
1166 >Add</v-btn> 1150 >Add</v-btn>
1167 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn> 1151 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn>
1168 </v-card-actions> 1152 </v-card-actions>
1169 </v-flex> 1153 </v-flex>
1170 <v-flex 1154 <v-flex
1171 xs6 1155 xs6
1172 class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2" 1156 class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2"
1173 > 1157 >
1174 <v-btn 1158 <v-btn
1175 @click="submitParentDetails" 1159 @click="submitParentDetails"
1176 round 1160 round
1177 dark 1161 dark
1178 :loading="loading" 1162 :loading="loading"
1179 v-show="showParent" 1163 v-show="showParent"
1180 >Add</v-btn> 1164 >Add</v-btn>
1181 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn> 1165 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn>
1182 </v-flex> 1166 </v-flex>
1183 </v-form> 1167 </v-form>
1184 </v-flex> 1168 </v-flex>
1185 <v-flex xs12 sm12 class="hidden-xs-only hidden-sm-only"> 1169 <v-flex xs12 sm12 class="hidden-xs-only hidden-sm-only">
1186 <v-form ref="parentForm" v-model="valid" lazy-validation> 1170 <v-form ref="parentForm" v-model="valid" lazy-validation>
1187 <v-layout wrap> 1171 <v-layout wrap>
1188 <v-flex xs12 sm6> 1172 <v-flex xs12 sm6>
1189 <v-layout> 1173 <v-layout>
1190 <v-flex xs4 class="pt-4 subheading"> 1174 <v-flex xs4 class="pt-4 subheading">
1191 <label class="right">Father Cell No:</label> 1175 <label class="right">Father Cell No:</label>
1192 </v-flex> 1176 </v-flex>
1193 <v-flex xs8 class="ml-3"> 1177 <v-flex xs8 class="ml-3">
1194 <v-text-field 1178 <v-text-field
1195 v-model.trim="parentData.fatherCellNo" 1179 v-model.trim="parentData.fatherCellNo"
1196 placeholder="fill your father Cell Number" 1180 placeholder="fill your father Cell Number"
1197 type="number" 1181 type="number"
1198 :rules="fatheCellNoRules" 1182 :rules="fatheCellNoRules"
1199 v-on:keyup="getParentDetails()" 1183 v-on:keyup="getParentDetails()"
1200 required 1184 required
1201 ></v-text-field> 1185 ></v-text-field>
1202 </v-flex> 1186 </v-flex>
1203 </v-layout> 1187 </v-layout>
1204 </v-flex> 1188 </v-flex>
1205 <v-flex xs12 sm6> 1189 <v-flex xs12 sm6>
1206 <v-layout> 1190 <v-layout>
1207 <v-flex xs4 class="pt-4 subheading"> 1191 <v-flex xs4 class="pt-4 subheading">
1208 <label class="right">Parent Email Id:</label> 1192 <label class="right">Parent Email Id:</label>
1209 </v-flex> 1193 </v-flex>
1210 <v-flex xs8 class="ml-3"> 1194 <v-flex xs8 class="ml-3">
1211 <v-text-field 1195 <v-text-field
1212 placeholder="fill Parent email" 1196 placeholder="fill Parent email"
1213 v-model="parentData.email" 1197 v-model="parentData.email"
1214 type="text" 1198 type="text"
1215 required 1199 required
1216 ></v-text-field> 1200 ></v-text-field>
1217 </v-flex> 1201 </v-flex>
1218 </v-layout> 1202 </v-layout>
1219 </v-flex> 1203 </v-flex>
1220 </v-layout> 1204 </v-layout>
1221 <v-layout wrap> 1205 <v-layout wrap>
1222 <v-flex xs12 sm6> 1206 <v-flex xs12 sm6>
1223 <v-layout> 1207 <v-layout>
1224 <v-flex xs4 class="pt-4 subheading"> 1208 <v-flex xs4 class="pt-4 subheading">
1225 <label class="right">Father Name:</label> 1209 <label class="right">Father Name:</label>
1226 </v-flex> 1210 </v-flex>
1227 <v-flex xs8 class="ml-3"> 1211 <v-flex xs8 class="ml-3">
1228 <v-text-field 1212 <v-text-field
1229 v-model="parentData.fatherName" 1213 v-model="parentData.fatherName"
1230 placeholder="Fill your father Name" 1214 placeholder="Fill your father Name"
1231 required 1215 required
1232 ></v-text-field> 1216 ></v-text-field>
1233 </v-flex> 1217 </v-flex>
1234 </v-layout> 1218 </v-layout>
1235 </v-flex> 1219 </v-flex>
1236 <v-flex xs12 sm6> 1220 <v-flex xs12 sm6>
1237 <v-layout> 1221 <v-layout>
1238 <v-flex xs4 class="pt-4 subheading"> 1222 <v-flex xs4 class="pt-4 subheading">
1239 <label class="right">Mother Name:</label> 1223 <label class="right">Mother Name:</label>
1240 </v-flex> 1224 </v-flex>
1241 <v-flex xs8 class="ml-3"> 1225 <v-flex xs8 class="ml-3">
1242 <v-text-field 1226 <v-text-field
1243 v-model="parentData.motherName" 1227 v-model="parentData.motherName"
1244 placeholder="fill your Mother Name" 1228 placeholder="fill your Mother Name"
1245 name="state" 1229 name="state"
1246 type="text" 1230 type="text"
1247 required 1231 required
1248 ></v-text-field> 1232 ></v-text-field>
1249 </v-flex> 1233 </v-flex>
1250 </v-layout> 1234 </v-layout>
1251 </v-flex> 1235 </v-flex>
1252 </v-layout> 1236 </v-layout>
1253 <v-layout wrap> 1237 <v-layout wrap>
1254 <v-flex xs12 sm6> 1238 <v-flex xs12 sm6>
1255 <v-layout> 1239 <v-layout>
1256 <v-flex xs4 class="pt-4 subheading"> 1240 <v-flex xs4 class="pt-4 subheading">
1257 <label class="right">Mother Cell No:</label> 1241 <label class="right">Mother Cell No:</label>
1258 </v-flex> 1242 </v-flex>
1259 <v-flex xs8 class="ml-3"> 1243 <v-flex xs8 class="ml-3">
1260 <v-text-field 1244 <v-text-field
1261 v-model="parentData.motherCellNo" 1245 v-model="parentData.motherCellNo"
1262 placeholder="fill your Mother Cell Number" 1246 placeholder="fill your Mother Cell Number"
1263 name="state" 1247 name="state"
1264 type="number" 1248 type="number"
1265 required 1249 required
1266 ></v-text-field> 1250 ></v-text-field>
1267 </v-flex> 1251 </v-flex>
1268 </v-layout> 1252 </v-layout>
1269 </v-flex> 1253 </v-flex>
1270 <v-flex xs12 sm6> 1254 <v-flex xs12 sm6>
1271 <v-layout> 1255 <v-layout>
1272 <v-flex xs4 class="pt-4 subheading"> 1256 <v-flex xs4 class="pt-4 subheading">
1273 <label class="right">Father Profession:</label> 1257 <label class="right">Father Profession:</label>
1274 </v-flex> 1258 </v-flex>
1275 <v-flex xs8 class="ml-3"> 1259 <v-flex xs8 class="ml-3">
1276 <v-text-field 1260 <v-text-field
1277 v-model="parentData.fatherProfession" 1261 v-model="parentData.fatherProfession"
1278 placeholder="fill your father profession" 1262 placeholder="fill your father profession"
1279 ></v-text-field> 1263 ></v-text-field>
1280 </v-flex> 1264 </v-flex>
1281 </v-layout> 1265 </v-layout>
1282 </v-flex> 1266 </v-flex>
1283 </v-layout> 1267 </v-layout>
1284 <v-layout wrap> 1268 <v-layout wrap>
1285 <v-flex xs12 sm6> 1269 <v-flex xs12 sm6>
1286 <v-layout> 1270 <v-layout>
1287 <v-flex xs4 class="pt-4 subheading"> 1271 <v-flex xs4 class="pt-4 subheading">
1288 <label class="right">Mother Profession:</label> 1272 <label class="right">Mother Profession:</label>
1289 </v-flex> 1273 </v-flex>
1290 <v-flex xs8 class="ml-3"> 1274 <v-flex xs8 class="ml-3">
1291 <v-text-field 1275 <v-text-field
1292 v-model="parentData.motherProfession" 1276 v-model="parentData.motherProfession"
1293 placeholder="fill your mother profession" 1277 placeholder="fill your mother profession"
1294 ></v-text-field> 1278 ></v-text-field>
1295 </v-flex> 1279 </v-flex>
1296 </v-layout> 1280 </v-layout>
1297 </v-flex> 1281 </v-flex>
1298 </v-layout> 1282 </v-layout>
1299 <v-flex sm12 class="hidden-xs-only"> 1283 <v-flex sm12 class="hidden-xs-only">
1300 <v-card-actions> 1284 <v-card-actions>
1301 <v-spacer></v-spacer> 1285 <v-spacer></v-spacer>
1302 <v-btn 1286 <v-btn
1303 @click="submitParentDetails" 1287 @click="submitParentDetails"
1304 round 1288 round
1305 dark 1289 dark
1306 :loading="loading" 1290 :loading="loading"
1307 v-show="showParent" 1291 v-show="showParent"
1308 >Add</v-btn> 1292 >Add</v-btn>
1309 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn> 1293 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn>
1310 </v-card-actions> 1294 </v-card-actions>
1311 </v-flex> 1295 </v-flex>
1312 <v-flex 1296 <v-flex
1313 xs6 1297 xs6
1314 class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2" 1298 class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2"
1315 > 1299 >
1316 <v-btn 1300 <v-btn
1317 @click="submitParentDetails" 1301 @click="submitParentDetails"
1318 round 1302 round
1319 dark 1303 dark
1320 :loading="loading" 1304 :loading="loading"
1321 v-show="showParent" 1305 v-show="showParent"
1322 >Add</v-btn> 1306 >Add</v-btn>
1323 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn> 1307 <v-btn v-show="showNext" @click="e2 = 2" round dark>Next</v-btn>
1324 </v-flex> 1308 </v-flex>
1325 </v-form> 1309 </v-form>
1326 </v-flex> 1310 </v-flex>
1327 </v-container> 1311 </v-container>
1328 </v-stepper-content> 1312 </v-stepper-content>
1329 <v-stepper-content step="2"> 1313 <v-stepper-content step="2">
1330 <v-snackbar 1314 <v-snackbar
1331 :timeout="timeout" 1315 :timeout="timeout"
1332 :top="y === 'top'" 1316 :top="y === 'top'"
1333 :right="x === 'right'" 1317 :right="x === 'right'"
1334 :vertical="mode === 'vertical'" 1318 :vertical="mode === 'vertical'"
1335 v-model="snackbar" 1319 v-model="snackbar"
1336 color="success" 1320 color="success"
1337 >{{ text }}</v-snackbar> 1321 >{{ text }}</v-snackbar>
1338 <v-flex xs12 sm12> 1322 <v-flex xs12 sm12>
1339 <v-form ref="form" v-model="valid" lazy-validation> 1323 <v-form ref="form" v-model="valid" lazy-validation>
1340 <v-layout> 1324 <v-layout>
1341 <v-flex 1325 <v-flex
1342 xs12 1326 xs12
1343 class="text-xs-center text-sm-center text-md-center text-lg-center" 1327 class="text-xs-center text-sm-center text-md-center text-lg-center"
1344 > 1328 >
1345 <v-avatar size="100px"> 1329 <v-avatar size="100px">
1346 <img src="/static/icon/user.png" v-if="!imageUrl" /> 1330 <img src="/static/icon/user.png" v-if="!imageUrl" />
1347 </v-avatar> 1331 </v-avatar>
1348 <input 1332 <input
1349 type="file" 1333 type="file"
1350 style="display: none" 1334 style="display: none"
1351 ref="image" 1335 ref="image"
1352 accept="image/*" 1336 accept="image/*"
1353 @change="onFilePicked" 1337 @change="onFilePicked"
1354 /> 1338 />
1355 <img 1339 <img
1356 :src="imageData.imageUrl" 1340 :src="imageData.imageUrl"
1357 height="150" 1341 height="150"
1358 v-if="imageUrl" 1342 v-if="imageUrl"
1359 style="border-radius:50%; width:200px" 1343 style="border-radius:50%; width:200px"
1360 /> 1344 />
1361 </v-flex> 1345 </v-flex>
1362 </v-layout> 1346 </v-layout>
1363 <v-layout wrap> 1347 <v-layout wrap>
1364 <v-flex xs12 sm6> 1348 <v-flex xs12 sm6>
1365 <v-layout> 1349 <v-layout>
1366 <v-flex x4 sm4 class="pt-4 subheading"> 1350 <v-flex x4 sm4 class="pt-4 subheading">
1367 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> 1351 <label class="right hidden-xs-only hidden-sm-only">Select Class:</label>
1368 <label 1352 <label
1369 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1353 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1370 >Class:</label> 1354 >Class:</label>
1371 </v-flex> 1355 </v-flex>
1372 <v-flex xs8 sm8 class="ml-3"> 1356 <v-flex xs8 sm8 class="ml-3">
1373 <v-select 1357 <v-select
1374 :items="addclass" 1358 :items="addclass"
1375 label="Select Class" 1359 label="Select Class"
1376 v-model="addStudents.select" 1360 v-model="addStudents.select"
1377 item-text="classNum" 1361 item-text="classNum"
1378 item-value="_id" 1362 item-value="_id"
1379 name="Select Class" 1363 name="Select Class"
1380 :rules="classRules" 1364 :rules="classRules"
1381 @change="getSection(addStudents.select)" 1365 @change="getSection(addStudents.select)"
1382 required 1366 required
1383 ></v-select> 1367 ></v-select>
1384 </v-flex> 1368 </v-flex>
1385 </v-layout> 1369 </v-layout>
1386 </v-flex> 1370 </v-flex>
1387 <v-flex xs12 sm6> 1371 <v-flex xs12 sm6>
1388 <v-layout> 1372 <v-layout>
1389 <v-flex xs4 class="pt-4 subheading"> 1373 <v-flex xs4 class="pt-4 subheading">
1390 <label 1374 <label
1391 class="right hidden-xs-only hidden-sm-only" 1375 class="right hidden-xs-only hidden-sm-only"
1392 >Select Section:</label> 1376 >Select Section:</label>
1393 <label 1377 <label
1394 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1378 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1395 >Section:</label> 1379 >Section:</label>
1396 </v-flex> 1380 </v-flex>
1397 <v-flex xs8 class="ml-3"> 1381 <v-flex xs8 class="ml-3">
1398 <v-select 1382 <v-select
1399 :items="addSection" 1383 :items="addSection"
1400 label="Select Section" 1384 label="Select Section"
1401 v-model="addStudents.selectSection" 1385 v-model="addStudents.selectSection"
1402 item-text="name" 1386 item-text="name"
1403 item-value="_id" 1387 item-value="_id"
1404 name="Select Section" 1388 name="Select Section"
1405 :rules="sectionRules" 1389 :rules="sectionRules"
1406 required 1390 required
1407 ></v-select> 1391 ></v-select>
1408 </v-flex> 1392 </v-flex>
1409 </v-layout> 1393 </v-layout>
1410 </v-flex> 1394 </v-flex>
1411 </v-layout> 1395 </v-layout>
1412 <v-layout wrap> 1396 <v-layout wrap>
1413 <v-flex xs12 sm6> 1397 <v-flex xs12 sm6>
1414 <v-layout> 1398 <v-layout>
1415 <v-flex xs4 sm4 class="pt-4 subheading"> 1399 <v-flex xs4 sm4 class="pt-4 subheading">
1416 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> 1400 <label class="right hidden-xs-only hidden-sm-only">Full Name:</label>
1417 <label 1401 <label
1418 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1402 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1419 >Name:</label> 1403 >Name:</label>
1420 </v-flex> 1404 </v-flex>
1421 <v-flex xs8 sm8 class="ml-3"> 1405 <v-flex xs8 sm8 class="ml-3">
1422 <v-text-field 1406 <v-text-field
1423 v-model="addStudents.name" 1407 v-model="addStudents.name"
1424 placeholder="fill your full Name" 1408 placeholder="fill your full Name"
1425 name="name" 1409 name="name"
1426 type="text" 1410 type="text"
1427 :rules="nameRules" 1411 :rules="nameRules"
1428 required 1412 required
1429 ></v-text-field> 1413 ></v-text-field>
1430 </v-flex> 1414 </v-flex>
1431 </v-layout> 1415 </v-layout>
1432 </v-flex> 1416 </v-flex>
1433 <v-flex xs12 sm6> 1417 <v-flex xs12 sm6>
1434 <v-layout> 1418 <v-layout>
1435 <v-flex xs4 sm4 class="pt-4 subheading"> 1419 <v-flex xs4 sm4 class="pt-4 subheading">
1436 <label class="right">Email ID:</label> 1420 <label class="right">Email ID:</label>
1437 </v-flex> 1421 </v-flex>
1438 <v-flex xs8 sm8 class="ml-3"> 1422 <v-flex xs8 sm8 class="ml-3">
1439 <v-text-field 1423 <v-text-field
1440 placeholder="fill your email" 1424 placeholder="fill your email"
1441 v-model="addStudents.email" 1425 v-model="addStudents.email"
1442 type="text" 1426 type="text"
1443 name="email" 1427 name="email"
1444 required 1428 required
1445 ></v-text-field> 1429 ></v-text-field>
1446 </v-flex> 1430 </v-flex>
1447 </v-layout> 1431 </v-layout>
1448 </v-flex> 1432 </v-flex>
1449 </v-layout> 1433 </v-layout>
1450 <v-layout wrap> 1434 <v-layout wrap>
1451 <v-flex xs12 sm6> 1435 <v-flex xs12 sm6>
1452 <v-layout> 1436 <v-layout>
1453 <v-flex xs4 sm4 class="pt-4 subheading"> 1437 <v-flex xs4 sm4 class="pt-4 subheading">
1454 <label 1438 <label
1455 class="right hidden-sm-only hidden-xs-only" 1439 class="right hidden-sm-only hidden-xs-only"
1456 >Date of Birth:</label> 1440 >Date of Birth:</label>
1457 <label 1441 <label
1458 class="right hidden-lg-only hidden-xl-only hidden-md-only" 1442 class="right hidden-lg-only hidden-xl-only hidden-md-only"
1459 >D.O.B:</label> 1443 >D.O.B:</label>
1460 </v-flex> 1444 </v-flex>
1461 <v-flex xs8 sm8 class="ml-3"> 1445 <v-flex xs8 sm8 class="ml-3">
1462 <v-menu 1446 <v-menu
1463 ref="menu" 1447 ref="menu"
1464 :close-on-content-click="false" 1448 :close-on-content-click="false"
1465 v-model="menu" 1449 v-model="menu"
1466 :nudge-right="40" 1450 :nudge-right="40"
1467 lazy 1451 lazy
1468 transition="scale-transition" 1452 transition="scale-transition"
1469 offset-y 1453 offset-y
1470 full-width 1454 full-width
1471 min-width="290px" 1455 min-width="290px"
1472 > 1456 >
1473 <v-text-field 1457 <v-text-field
1474 slot="activator" 1458 slot="activator"
1475 :rules="dateRules" 1459 :rules="dateRules"
1476 v-model="addStudents.date" 1460 v-model="addStudents.date"
1477 placeholder="Select date" 1461 placeholder="Select date"
1478 ></v-text-field> 1462 ></v-text-field>
1479 <v-date-picker 1463 <v-date-picker
1480 ref="picker" 1464 ref="picker"
1481 v-model="addStudents.date" 1465 v-model="addStudents.date"
1482 :max="new Date().toISOString().substr(0, 10)" 1466 :max="new Date().toISOString().substr(0, 10)"
1483 min="1950-01-01" 1467 min="1950-01-01"
1484 @input="menu = false" 1468 @input="menu = false"
1485 ></v-date-picker> 1469 ></v-date-picker>
1486 </v-menu> 1470 </v-menu>
1487 </v-flex> 1471 </v-flex>
1488 </v-layout> 1472 </v-layout>
1489 </v-flex> 1473 </v-flex>
1490 <v-flex xs12 sm6> 1474 <v-flex xs12 sm6>
1491 <v-layout> 1475 <v-layout>
1492 <v-flex xs4 class="pt-4 subheading"> 1476 <v-flex xs4 class="pt-4 subheading">
1493 <label class="right">City:</label> 1477 <label class="right">City:</label>
1494 </v-flex> 1478 </v-flex>
1495 <v-flex xs8 class="ml-3"> 1479 <v-flex xs8 class="ml-3">
1496 <v-text-field 1480 <v-text-field
1497 v-model="addStudents.city" 1481 v-model="addStudents.city"
1498 placeholder="fill your City Name" 1482 placeholder="fill your City Name"
1499 name="City" 1483 name="City"
1500 type="text" 1484 type="text"
1501 :rules="cityRules" 1485 :rules="cityRules"
1502 required 1486 required
1503 ></v-text-field> 1487 ></v-text-field>
1504 </v-flex> 1488 </v-flex>
1505 </v-layout> 1489 </v-layout>
1506 </v-flex> 1490 </v-flex>
1507 </v-layout> 1491 </v-layout>
1508 <v-layout wrap> 1492 <v-layout wrap>
1509 <v-flex xs12 sm6> 1493 <v-flex xs12 sm6>
1510 <v-layout> 1494 <v-layout>
1511 <v-flex xs4 class="pt-4 subheading"> 1495 <v-flex xs4 class="pt-4 subheading">
1512 <label class="right">State:</label> 1496 <label class="right">State:</label>
1513 </v-flex> 1497 </v-flex>
1514 <v-flex xs8 class="ml-3"> 1498 <v-flex xs8 class="ml-3">
1515 <v-text-field 1499 <v-text-field
1516 v-model="addStudents.state" 1500 v-model="addStudents.state"
1517 placeholder="fill your State Name" 1501 placeholder="fill your State Name"
1518 name="state" 1502 name="state"
1519 type="text" 1503 type="text"
1520 :rules="stateRules" 1504 :rules="stateRules"
1521 required 1505 required
1522 ></v-text-field> 1506 ></v-text-field>
1523 </v-flex> 1507 </v-flex>
1524 </v-layout> 1508 </v-layout>
1525 </v-flex> 1509 </v-flex>
1526 <v-flex xs12 sm6> 1510 <v-flex xs12 sm6>
1527 <v-layout> 1511 <v-layout>
1528 <v-flex xs4 class="pt-4 subheading"> 1512 <v-flex xs4 class="pt-4 subheading">
1529 <label class="right">Pincode:</label> 1513 <label class="right">Pincode:</label>
1530 </v-flex> 1514 </v-flex>
1531 <v-flex xs8 class="ml-3"> 1515 <v-flex xs8 class="ml-3">
1532 <v-text-field 1516 <v-text-field
1533 v-model="addStudents.pincode" 1517 v-model="addStudents.pincode"
1534 placeholder="fill your pincode" 1518 placeholder="fill your pincode"
1535 name="pincode" 1519 name="pincode"
1536 type="number" 1520 type="number"
1537 :rules="pincode" 1521 :rules="pincode"
1538 required 1522 required
1539 ></v-text-field> 1523 ></v-text-field>
1540 </v-flex> 1524 </v-flex>
1541 </v-layout> 1525 </v-layout>
1542 </v-flex> 1526 </v-flex>
1543 </v-layout> 1527 </v-layout>
1544 <v-layout wrap> 1528 <v-layout wrap>
1545 <v-flex xs12 sm6> 1529 <v-flex xs12 sm6>
1546 <v-layout> 1530 <v-layout>
1547 <v-flex xs4 class="pt-4 subheading"> 1531 <v-flex xs4 class="pt-4 subheading">
1548 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> 1532 <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label>
1549 <label 1533 <label
1550 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1534 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1551 >Mobile:</label> 1535 >Mobile:</label>
1552 </v-flex> 1536 </v-flex>
1553 <v-flex xs8 class="ml-3"> 1537 <v-flex xs8 class="ml-3">
1554 <v-text-field 1538 <v-text-field
1555 v-model="addStudents.mobile" 1539 v-model="addStudents.mobile"
1556 placeholder="fill your MobileNo" 1540 placeholder="fill your MobileNo"
1557 name="mobileNo" 1541 name="mobileNo"
1558 type="number" 1542 type="number"
1559 required 1543 required
1560 ></v-text-field> 1544 ></v-text-field>
1561 </v-flex> 1545 </v-flex>
1562 </v-layout> 1546 </v-layout>
1563 </v-flex> 1547 </v-flex>
1564 <v-flex xs12 sm6> 1548 <v-flex xs12 sm6>
1565 <v-layout> 1549 <v-layout>
1566 <v-flex xs4 class="pt-4 subheading"> 1550 <v-flex xs4 class="pt-4 subheading">
1567 <label 1551 <label
1568 class="right hidden-xs-only hidden-sm-only" 1552 class="right hidden-xs-only hidden-sm-only"
1569 >Select Country:</label> 1553 >Select Country:</label>
1570 <label 1554 <label
1571 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1555 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1572 >Country:</label> 1556 >Country:</label>
1573 </v-flex> 1557 </v-flex>
1574 <v-flex xs8 class="ml-3"> 1558 <v-flex xs8 class="ml-3">
1575 <v-autocomplete 1559 <v-autocomplete
1576 v-model="addStudents.country" 1560 v-model="addStudents.country"
1577 :rules="country" 1561 :rules="country"
1578 :items="countries" 1562 :items="countries"
1579 placeholder="Select Country Name" 1563 placeholder="Select Country Name"
1580 required 1564 required
1581 ></v-autocomplete> 1565 ></v-autocomplete>
1582 </v-flex> 1566 </v-flex>
1583 </v-layout> 1567 </v-layout>
1584 </v-flex> 1568 </v-flex>
1585 </v-layout> 1569 </v-layout>
1586 <v-layout wrap> 1570 <v-layout wrap>
1587 <v-flex xs12 sm6> 1571 <v-flex xs12 sm6>
1588 <v-layout> 1572 <v-layout>
1589 <v-flex xs4 class="pt-4 subheading"> 1573 <v-flex xs4 class="pt-4 subheading">
1590 <label class="right">Gender:</label> 1574 <label class="right">Gender:</label>
1591 </v-flex> 1575 </v-flex>
1592 <v-flex xs8 class="ml-3"> 1576 <v-flex xs8 class="ml-3">
1593 <v-select 1577 <v-select
1594 :items="gender" 1578 :items="gender"
1595 v-model="addStudents.gender" 1579 v-model="addStudents.gender"
1596 :rules="genderRules" 1580 :rules="genderRules"
1597 label="Select Gender" 1581 label="Select Gender"
1598 required 1582 required
1599 ></v-select> 1583 ></v-select>
1600 </v-flex> 1584 </v-flex>
1601 </v-layout> 1585 </v-layout>
1602 </v-flex> 1586 </v-flex>
1603 <v-flex xs12 sm6> 1587 <v-flex xs12 sm6>
1604 <v-layout> 1588 <v-layout>
1605 <v-flex xs4 class="pt-4 subheading"> 1589 <v-flex xs4 class="pt-4 subheading">
1606 <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label> 1590 <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label>
1607 <label 1591 <label
1608 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1592 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1609 >Blood:</label> 1593 >Blood:</label>
1610 </v-flex> 1594 </v-flex>
1611 <v-flex xs8 class="ml-3"> 1595 <v-flex xs8 class="ml-3">
1612 <v-text-field 1596 <v-text-field
1613 v-model="addStudents.bloodGroup" 1597 v-model="addStudents.bloodGroup"
1614 placeholder="Fill your Blood Group" 1598 placeholder="Fill your Blood Group"
1615 required 1599 required
1616 ></v-text-field> 1600 ></v-text-field>
1617 </v-flex> 1601 </v-flex>
1618 </v-layout> 1602 </v-layout>
1619 </v-flex> 1603 </v-flex>
1620 </v-layout> 1604 </v-layout>
1621 <v-layout wrap> 1605 <v-layout wrap>
1622 <!-- <v-flex xs12 sm6> 1606 <!-- <v-flex xs12 sm6>
1623 <v-layout> 1607 <v-layout>
1624 <v-flex xs4 class="pt-4 subheading"> 1608 <v-flex xs4 class="pt-4 subheading">
1625 <label class="right">Allergies:</label> 1609 <label class="right">Allergies:</label>
1626 </v-flex> 1610 </v-flex>
1627 <v-flex xs8 class="ml-3"> 1611 <v-flex xs8 class="ml-3">
1628 <v-text-field 1612 <v-text-field
1629 v-model="addStudents.allergies" 1613 v-model="addStudents.allergies"
1630 placeholder="Fill your Allergies" 1614 placeholder="Fill your Allergies"
1631 required 1615 required
1632 ></v-text-field> 1616 ></v-text-field>
1633 </v-flex> 1617 </v-flex>
1634 </v-layout> 1618 </v-layout>
1635 </v-flex>--> 1619 </v-flex>-->
1636 <v-flex xs12 sm6> 1620 <v-flex xs12 sm6>
1637 <v-layout> 1621 <v-layout>
1638 <v-flex xs4 class="pt-4 subheading"> 1622 <v-flex xs4 class="pt-4 subheading">
1639 <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> 1623 <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label>
1640 <label 1624 <label
1641 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1625 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1642 >Roll No:</label> 1626 >Roll No:</label>
1643 </v-flex> 1627 </v-flex>
1644 <v-flex xs8 class="ml-3"> 1628 <v-flex xs8 class="ml-3">
1645 <v-text-field 1629 <v-text-field
1646 v-model="addStudents.rollNo" 1630 v-model="addStudents.rollNo"
1647 placeholder="Fill your Roll Number" 1631 placeholder="Fill your Roll Number"
1648 required 1632 required
1649 ></v-text-field> 1633 ></v-text-field>
1650 </v-flex> 1634 </v-flex>
1651 </v-layout> 1635 </v-layout>
1652 </v-flex> 1636 </v-flex>
1653 <v-flex xs12 sm6> 1637 <v-flex xs12 sm6>
1654 <v-layout> 1638 <v-layout>
1655 <v-flex xs4 class="pt-4 subheading"> 1639 <v-flex xs4 class="pt-4 subheading">
1656 <label 1640 <label
1657 class="right hidden-xs-only hidden-sm-only" 1641 class="right hidden-xs-only hidden-sm-only"
1658 >Medical Notes:</label> 1642 >Medical Notes:</label>
1659 <label 1643 <label
1660 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1644 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1661 >Medical:</label> 1645 >Medical:</label>
1662 </v-flex> 1646 </v-flex>
1663 <v-flex xs8 class="ml-3"> 1647 <v-flex xs8 class="ml-3">
1664 <v-text-field 1648 <v-text-field
1665 v-model="addStudents.medicalNotes" 1649 v-model="addStudents.medicalNotes"
1666 placeholder="Fill your Medical Notes" 1650 placeholder="Fill your Medical Notes"
1667 required 1651 required
1668 ></v-text-field> 1652 ></v-text-field>
1669 </v-flex> 1653 </v-flex>
1670 </v-layout> 1654 </v-layout>
1671 </v-flex> 1655 </v-flex>
1672 </v-layout> 1656 </v-layout>
1673 <v-layout wrap> 1657 <v-layout wrap>
1674 <v-flex xs12 sm6> 1658 <v-flex xs12 sm6>
1675 <v-layout> 1659 <v-layout>
1676 <v-flex xs4 class="pt-4 subheading"> 1660 <v-flex xs4 class="pt-4 subheading">
1677 <label class="right">Height:</label> 1661 <label class="right">Height:</label>
1678 </v-flex> 1662 </v-flex>
1679 <v-flex xs8 class="ml-3"> 1663 <v-flex xs8 class="ml-3">
1680 <v-text-field 1664 <v-text-field
1681 v-model="addStudents.height" 1665 v-model="addStudents.height"
1682 placeholder="Fill your Height" 1666 placeholder="Fill your Height"
1683 required 1667 required
1684 ></v-text-field> 1668 ></v-text-field>
1685 </v-flex> 1669 </v-flex>
1686 </v-layout> 1670 </v-layout>
1687 </v-flex> 1671 </v-flex>
1688 <v-flex xs12 sm6> 1672 <v-flex xs12 sm6>
1689 <v-layout> 1673 <v-layout>
1690 <v-flex xs4 class="pt-4 subheading"> 1674 <v-flex xs4 class="pt-4 subheading">
1691 <label class="right">Weight:</label> 1675 <label class="right">Weight:</label>
1692 </v-flex> 1676 </v-flex>
1693 <v-flex xs8 class="ml-3"> 1677 <v-flex xs8 class="ml-3">
1694 <v-text-field 1678 <v-text-field
1695 v-model="addStudents.weight" 1679 v-model="addStudents.weight"
1696 placeholder="Fill your Weight" 1680 placeholder="Fill your Weight"
1697 required 1681 required
1698 ></v-text-field> 1682 ></v-text-field>
1699 </v-flex> 1683 </v-flex>
1700 </v-layout> 1684 </v-layout>
1701 </v-flex> 1685 </v-flex>
1702 </v-layout> 1686 </v-layout>
1703 <v-layout wrap> 1687 <v-layout wrap>
1704 <v-flex xs12 sm6> 1688 <v-flex xs12 sm6>
1705 <v-layout> 1689 <v-layout>
1706 <v-flex xs4 class="pt-4 subheading"> 1690 <v-flex xs4 class="pt-4 subheading">
1707 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> 1691 <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label>
1708 <label 1692 <label
1709 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1693 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1710 >Uplaod :</label> 1694 >Uplaod :</label>
1711 </v-flex> 1695 </v-flex>
1712 <v-flex xs8 class="ml-3"> 1696 <v-flex xs8 class="ml-3">
1713 <v-text-field 1697 <v-text-field
1714 label="Select Image" 1698 label="Select Image"
1715 @click="pickFile" 1699 @click="pickFile"
1716 v-model="imageName" 1700 v-model="imageName"
1717 append-icon="attach_file" 1701 append-icon="attach_file"
1718 ></v-text-field> 1702 ></v-text-field>
1719 </v-flex> 1703 </v-flex>
1720 </v-layout> 1704 </v-layout>
1721 </v-flex> 1705 </v-flex>
1722 <v-flex xs12 sm6> 1706 <v-flex xs12 sm6>
1723 <v-layout> 1707 <v-layout>
1724 <v-flex xs4 class="pt-4 subheading"> 1708 <v-flex xs4 class="pt-4 subheading">
1725 <label 1709 <label
1726 class="right hidden-xs-only hidden-sm-only" 1710 class="right hidden-xs-only hidden-sm-only"
1727 >Academic Year:</label> 1711 >Academic Year:</label>
1728 <label 1712 <label
1729 class="right hidden-lg-only hidden-md-only hidden-xl-only" 1713 class="right hidden-lg-only hidden-md-only hidden-xl-only"
1730 >Year:</label> 1714 >Year:</label>
1731 </v-flex> 1715 </v-flex>
1732 <v-flex xs8 class="ml-3"> 1716 <v-flex xs8 class="ml-3">
1733 <v-text-field 1717 <v-text-field
1734 v-model="addStudents.establishmentYear" 1718 v-model="addStudents.establishmentYear"
1735 placeholder="fill your Academic Year" 1719 placeholder="fill your Academic Year"
1736 name="state" 1720 name="state"
1737 type="number" 1721 type="number"
1738 :rules="establishmentYearRules" 1722 :rules="establishmentYearRules"
1739 required 1723 required
1740 ></v-text-field> 1724 ></v-text-field>
1741 </v-flex> 1725 </v-flex>
1742 </v-layout> 1726 </v-layout>
1743 </v-flex> 1727 </v-flex>
1744 </v-layout> 1728 </v-layout>
1745 <v-layout wrap class="hidden-xs-only hidden-sm-only"> 1729 <v-layout wrap class="hidden-xs-only hidden-sm-only">
1746 <v-flex xs12 sm6> 1730 <v-flex xs12 sm6>
1747 <v-layout> 1731 <v-layout>
1748 <v-flex xs4 sm4 class="pt-4 subheading"> 1732 <v-flex xs4 sm4 class="pt-4 subheading">
1749 <label class="right pr-4">Present Address:</label> 1733 <label class="right pr-4">Present Address:</label>
1750 </v-flex> 1734 </v-flex>
1751 <v-flex xs8 sm8 class="ml-3"> 1735 <v-flex xs8 sm8 class="ml-3">
1752 <v-text-field 1736 <v-text-field
1753 name="input-4-3" 1737 name="input-4-3"
1754 v-model="addStudents.presentAddress" 1738 v-model="addStudents.presentAddress"
1755 :rules="presentAddress" 1739 :rules="presentAddress"
1756 placeholder="fill Your present Address" 1740 placeholder="fill Your present Address"
1757 required 1741 required
1758 ></v-text-field> 1742 ></v-text-field>
1759 </v-flex> 1743 </v-flex>
1760 </v-layout> 1744 </v-layout>
1761 </v-flex> 1745 </v-flex>
1762 <v-flex xs12 sm6> 1746 <v-flex xs12 sm6>
1763 <v-layout> 1747 <v-layout>
1764 <v-flex xs4 sm4 class="pt-4 subheading addressForm"> 1748 <v-flex xs4 sm4 class="pt-4 subheading addressForm">
1765 <label class="right">Permanent Address:</label> 1749 <label class="right">Permanent Address:</label>
1766 </v-flex> 1750 </v-flex>
1767 <v-flex xs12 sm8 class="ml-3"> 1751 <v-flex xs12 sm8 class="ml-3">
1768 <v-text-field 1752 <v-text-field
1769 name="input-4-3" 1753 name="input-4-3"
1770 v-model="addStudents.permanentAddress" 1754 v-model="addStudents.permanentAddress"
1771 :rules="permanentAddress" 1755 :rules="permanentAddress"
1772 placeholder="fill Your Permanent Address" 1756 placeholder="fill Your Permanent Address"
1773 required 1757 required
1774 ></v-text-field> 1758 ></v-text-field>
1775 </v-flex> 1759 </v-flex>
1776 </v-layout> 1760 </v-layout>
1777 </v-flex> 1761 </v-flex>
1778 </v-layout> 1762 </v-layout>
1779 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap> 1763 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap>
1780 <v-flex xs12 sm12> 1764 <v-flex xs12 sm12>
1781 <v-layout> 1765 <v-layout>
1782 <v-flex xs12 sm12 class="pt-4 subheading text-xs-center"> 1766 <v-flex xs12 sm12 class="pt-4 subheading text-xs-center">
1783 <label class>Present Address :</label> 1767 <label class>Present Address :</label>
1784 </v-flex> 1768 </v-flex>
1785 </v-layout> 1769 </v-layout>
1786 <v-layout> 1770 <v-layout>
1787 <v-flex xs12 sm12> 1771 <v-flex xs12 sm12>
1788 <v-textarea 1772 <v-textarea
1789 name="input-4-3" 1773 name="input-4-3"
1790 v-model="addStudents.presentAddress" 1774 v-model="addStudents.presentAddress"
1791 :rules="presentAddress" 1775 :rules="presentAddress"
1792 placeholder="fill Your present Address" 1776 placeholder="fill Your present Address"
1793 required 1777 required
1794 ></v-textarea> 1778 ></v-textarea>
1795 </v-flex> 1779 </v-flex>
1796 </v-layout> 1780 </v-layout>
1797 </v-flex> 1781 </v-flex>
1798 <v-flex xs12 sm12> 1782 <v-flex xs12 sm12>
1799 <v-layout> 1783 <v-layout>
1800 <v-flex 1784 <v-flex
1801 xs12 1785 xs12
1802 sm12 1786 sm12
1803 class="pt-4 pr-4 subheading text-xs-center addressForm" 1787 class="pt-4 pr-4 subheading text-xs-center addressForm"
1804 > 1788 >
1805 <label>Permanent addr:</label> 1789 <label>Permanent addr:</label>
1806 </v-flex> 1790 </v-flex>
1807 </v-layout> 1791 </v-layout>
1808 <v-layout> 1792 <v-layout>
1809 <v-flex xs12 sm12> 1793 <v-flex xs12 sm12>
1810 <v-textarea 1794 <v-textarea
1811 name="input-4-3" 1795 name="input-4-3"
1812 v-model="addStudents.permanentAddress" 1796 v-model="addStudents.permanentAddress"
1813 :rules="permanentAddress" 1797 :rules="permanentAddress"
1814 placeholder="fill Your Permanent Address" 1798 placeholder="fill Your Permanent Address"
1815 required 1799 required
1816 ></v-textarea> 1800 ></v-textarea>
1817 </v-flex> 1801 </v-flex>
1818 </v-layout> 1802 </v-layout>
1819 </v-flex> 1803 </v-flex>
1820 </v-layout> 1804 </v-layout>
1821 <v-layout> 1805 <v-layout>
1822 <v-flex xs12 sm11 offset-sm1> 1806 <v-flex xs12 sm11 offset-sm1>
1823 <v-layout> 1807 <v-layout>
1824 <v-flex xs6> 1808 <v-flex xs6>
1825 <v-btn round dark @click="e2 = 1">Back</v-btn> 1809 <v-btn round dark @click="e2 = 1">Back</v-btn>
1826 </v-flex> 1810 </v-flex>
1827 <v-flex xs6> 1811 <v-flex xs6>
1828 <v-btn 1812 <v-btn
1829 @click="submit" 1813 @click="submit"
1830 round 1814 round
1831 dark 1815 dark
1832 :loading="loading" 1816 :loading="loading"
1833 class="right" 1817 class="right"
1834 >Add</v-btn> 1818 >Add</v-btn>
1835 </v-flex> 1819 </v-flex>
1836 </v-layout> 1820 </v-layout>
1837 </v-flex> 1821 </v-flex>
1838 </v-layout> 1822 </v-layout>
1839 </v-form> 1823 </v-form>
1840 </v-flex> 1824 </v-flex>
1841 </v-stepper-content> 1825 </v-stepper-content>
1842 </v-stepper-items> 1826 </v-stepper-items>
1843 </v-stepper> 1827 </v-stepper>
1844 </v-app> 1828 </v-app>
1845 </div> 1829 </div>
1846 </v-flex> 1830 </v-flex>
1847 </v-layout> 1831 </v-layout>
1848 </v-container> 1832 </v-container>
1849 </v-tab-item> 1833 </v-tab-item>
1850 </v-tabs> 1834 </v-tabs>
1851 <div class="loader" v-if="showLoader"> 1835 <div class="loader" v-if="showLoader">
1852 <v-progress-circular indeterminate color="white"></v-progress-circular> 1836 <v-progress-circular indeterminate color="white"></v-progress-circular>
1853 </div> 1837 </div>
1854 </div> 1838 </div>
1855 </template> 1839 </template>
1856 1840
1857 <script> 1841 <script>
1858 import http from "@/Services/http.js"; 1842 import http from "@/Services/http.js";
1859 import moment from "moment"; 1843 import moment from "moment";
1860 import countryList from "@/script/country.js"; 1844 import countryList from "@/script/country.js";
1861 import parent from "@/script/parents.js"; 1845 import parent from "@/script/parents.js";
1862 1846
1863 export default { 1847 export default {
1864 data: () => ({ 1848 data: () => ({
1865 e2: 0, 1849 e2: 0,
1866 showParent: true, 1850 showParent: true,
1867 showNext: false, 1851 showNext: false,
1868 snackbar: false, 1852 snackbar: false,
1869 y: "top", 1853 y: "top",
1870 x: "right", 1854 x: "right",
1871 mode: "", 1855 mode: "",
1872 timeout: 3000, 1856 timeout: 3000,
1873 text: "", 1857 text: "",
1874 showLoader: false, 1858 showLoader: false,
1875 loading: false, 1859 loading: false,
1876 date: null, 1860 date: null,
1877 search: "", 1861 search: "",
1878 menu: false, 1862 menu: false,
1879 menu1: false, 1863 menu1: false,
1880 dialog: false, 1864 dialog: false,
1881 dialog1: false, 1865 dialog1: false,
1882 valid: true, 1866 valid: true,
1883 isActive: true, 1867 isActive: true,
1884 newActive: false, 1868 newActive: false,
1885 addclass: [], 1869 addclass: [],
1886 addSection: [], 1870 addSection: [],
1887 gender: ["Male", "Female"], 1871 gender: ["Male", "Female"],
1888 pagination: { 1872 pagination: {
1889 rowsPerPage: 15 1873 rowsPerPage: 15
1890 }, 1874 },
1891 imageData: {}, 1875 imageData: {},
1892 imageName: "", 1876 imageName: "",
1893 imageUrl: "", 1877 imageUrl: "",
1894 imageFile: "", 1878 imageFile: "",
1895 nameRules: [v => !!v || " Full Name is required"], 1879 nameRules: [v => !!v || " Full Name is required"],
1896 dateRules: [v => !!v || " DOB is required"], 1880 dateRules: [v => !!v || " DOB is required"],
1897 cityRules: [v => !!v || " City Name is required"], 1881 cityRules: [v => !!v || " City Name is required"],
1898 pincode: [v => !!v || " Pincode is required"], 1882 pincode: [v => !!v || " Pincode is required"],
1899 country: [v => !!v || " Country Name is required"], 1883 country: [v => !!v || " Country Name is required"],
1900 permanentAddress: [v => !!v || " Permanent Address is required"], 1884 permanentAddress: [v => !!v || " Permanent Address is required"],
1901 presentAddress: [v => !!v || " Present Address is required"], 1885 presentAddress: [v => !!v || " Present Address is required"],
1902 stateRules: [v => !!v || "State Name is required"], 1886 stateRules: [v => !!v || "State Name is required"],
1903 classRules: [v => !!v || " Class Name is required"], 1887 classRules: [v => !!v || " Class Name is required"],
1904 sectionRules: [v => !!v || " Section Name is required"], 1888 sectionRules: [v => !!v || " Section Name is required"],
1905 genderRules: [v => !!v || " Select Gender is required"], 1889 genderRules: [v => !!v || " Select Gender is required"],
1906 fatheCellNoRules: [v => !!v || " father Cell Number is required"], 1890 fatheCellNoRules: [v => !!v || " father Cell Number is required"],
1907 establishmentYearRules: [v => !!v || " Academic Year is required"], 1891 establishmentYearRules: [v => !!v || " Academic Year is required"],
1908 errorMessages: "", 1892 errorMessages: "",
1909 countries: [], 1893 countries: [],
1910 headers: [ 1894 headers: [
1911 { 1895 {
1912 text: "Roll No.", 1896 text: "Roll No.",
1913 align: "center", 1897 align: "center",
1914 sortable: false, 1898 sortable: false,
1915 value: "rollNo" 1899 value: "rollNo"
1916 }, 1900 },
1917 { 1901 {
1918 text: "Profile Pic", 1902 text: "Profile Pic",
1919 value: "profilePicUrl", 1903 value: "profilePicUrl",
1920 sortable: false, 1904 sortable: false,
1921 align: "center" 1905 align: "center"
1922 }, 1906 },
1923 { text: "Name", value: "name", sortable: false, align: "center" }, 1907 { text: "Name", value: "name", sortable: false, align: "center" },
1924 { text: "Email", value: "email", sortable: false, align: "center" }, 1908 { text: "Email", value: "email", sortable: false, align: "center" },
1925 { text: "Dob", value: "dob", sortable: false, align: "center" }, 1909 { text: "Dob", value: "dob", sortable: false, align: "center" },
1926 { text: "Gender", value: "gender", sortable: false, align: "center" }, 1910 { text: "Gender", value: "gender", sortable: false, align: "center" },
1927 { 1911 {
1928 text: "Father Name", 1912 text: "Father Name",
1929 value: "fatherName", 1913 value: "fatherName",
1930 sortable: false, 1914 sortable: false,
1931 align: "center" 1915 align: "center"
1932 }, 1916 },
1933 { 1917 {
1934 text: "Mother Name", 1918 text: "Mother Name",
1935 value: "motherName", 1919 value: "motherName",
1936 sortable: false, 1920 sortable: false,
1937 align: "center" 1921 align: "center"
1938 }, 1922 },
1939 { 1923 {
1940 text: "Academic Year", 1924 text: "Academic Year",
1941 value: "establishmentYear", 1925 value: "establishmentYear",
1942 sortable: false, 1926 sortable: false,
1943 align: "center" 1927 align: "center"
1944 }, 1928 },
1945 { text: "Mobile No", value: "mobile", sortable: false, align: "center" }, 1929 { text: "Mobile No", value: "mobile", sortable: false, align: "center" },
1946 { text: "Action", value: "", sortable: false, align: "center" } 1930 { text: "Action", value: "", sortable: false, align: "center" }
1947 ], 1931 ],
1948 desserts: [], 1932 desserts: [],
1949 parentId: "", 1933 parentId: "",
1950 editedIndex: -1, 1934 editedIndex: -1,
1951 parentData: {}, 1935 parentData: {},
1952 addStudents: { 1936 addStudents: {
1953 role: "STUDENT", 1937 role: "STUDENT",
1954 name: "", 1938 name: "",
1955 email: "", 1939 email: "",
1956 date: "", 1940 date: "",
1957 city: "", 1941 city: "",
1958 pincode: "", 1942 pincode: "",
1959 country: "", 1943 country: "",
1960 permanentAddress: "", 1944 permanentAddress: "",
1961 presentAddress: "", 1945 presentAddress: "",
1962 mobile: "", 1946 mobile: "",
1963 state: "", 1947 state: "",
1964 gender: "", 1948 gender: "",
1965 select: "", 1949 select: "",
1966 selectSection: "", 1950 selectSection: "",
1967 bloodGroup: "", 1951 bloodGroup: "",
1968 allergies: "", 1952 allergies: "",
1969 medicalNotes: "", 1953 medicalNotes: "",
1970 height: "", 1954 height: "",
1971 weight: "", 1955 weight: "",
1972 rollNo: "", 1956 rollNo: "",
1973 establishmentYear: new Date().getFullYear() 1957 establishmentYear: new Date().getFullYear()
1974 }, 1958 },
1975 selectStudents: { 1959 selectStudents: {
1976 select: "", 1960 select: "",
1977 selectSection: "" 1961 selectSection: ""
1978 }, 1962 },
1979 editedItem: { 1963 editedItem: {
1980 role: "STUDENT", 1964 role: "STUDENT",
1981 name: "", 1965 name: "",
1982 email: "", 1966 email: "",
1983 dob: "", 1967 dob: "",
1984 city: "", 1968 city: "",
1985 pincode: "", 1969 pincode: "",
1986 country: "", 1970 country: "",
1987 permanentAddress: "", 1971 permanentAddress: "",
1988 presentAddress: "", 1972 presentAddress: "",
1989 mobile: "", 1973 mobile: "",
1990 state: "", 1974 state: "",
1991 gender: "", 1975 gender: "",
1992 select: "", 1976 select: "",
1993 selectSection: "", 1977 selectSection: "",
1994 bloodGroup: "", 1978 bloodGroup: "",
1995 allergies: "", 1979 allergies: "",
1996 medicalNotes: "", 1980 medicalNotes: "",
1997 height: "", 1981 height: "",
1998 weight: "", 1982 weight: "",
1999 rollNo: "", 1983 rollNo: "",
2000 establishmentYear: new Date().getFullYear() 1984 establishmentYear: new Date().getFullYear()
2001 } 1985 }
2002 }), 1986 }),
2003 watch: { 1987 watch: {
2004 menu(val) { 1988 menu(val) {
2005 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); 1989 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
2006 }, 1990 },
2007 menu1(val) { 1991 menu1(val) {
2008 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); 1992 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
2009 } 1993 }
2010 }, 1994 },
2011 methods: { 1995 methods: {
2012 findStudents() { 1996 findStudents() {
2013 this.showLoader = true; 1997 this.showLoader = true;
2014 http() 1998 http()
2015 .get("/getStudentWithClass", { 1999 .get("/getStudentWithClass", {
2016 params: { 2000 params: {
2017 classId: this.selectStudents.select, 2001 classId: this.selectStudents.select,
2018 sectionId: this.selectStudents.selectSection 2002 sectionId: this.selectStudents.selectSection
2019 } 2003 }
2020 }) 2004 })
2021 .then(response => { 2005 .then(response => {
2022 this.desserts = response.data.data; 2006 this.desserts = response.data.data;
2023 this.showLoader = false; 2007 this.showLoader = false;
2024 }) 2008 })
2025 .catch(err => { 2009 .catch(err => {
2026 console.log("err====>", err); 2010 console.log("err====>", err);
2027 this.showLoader = false; 2011 this.showLoader = false;
2028 }); 2012 });
2029 }, 2013 },
2030 getSections(_id) { 2014 getSections(_id) {
2031 var token = this.$store.state.token; 2015 var token = this.$store.state.token;
2032 this.showLoader = true; 2016 this.showLoader = true;
2033 http() 2017 http()
2034 .get( 2018 .get(
2035 "/getSectionsList", 2019 "/getSectionsList",
2036 { params: { classId: _id } }, 2020 { params: { classId: _id } },
2037 { 2021 {
2038 headers: { Authorization: "Bearer " + token } 2022 headers: { Authorization: "Bearer " + token }
2039 } 2023 }
2040 ) 2024 )
2041 .then(response => { 2025 .then(response => {
2042 this.addSection = response.data.data; 2026 this.addSection = response.data.data;
2043 this.showLoader = false; 2027 this.showLoader = false;
2044 }) 2028 })
2045 .catch(err => { 2029 .catch(err => {
2046 this.showLoader = false; 2030 this.showLoader = false;
2047 // console.log("err====>", err); 2031 // console.log("err====>", err);
2048 // this.$router.replace({ path: '/' }); 2032 // this.$router.replace({ path: '/' });
2049 }); 2033 });
2050 }, 2034 },
2051 getSection(_id) { 2035 getSection(_id) {
2052 var token = this.$store.state.token; 2036 var token = this.$store.state.token;
2053 this.showLoader = true; 2037 this.showLoader = true;
2054 http() 2038 http()
2055 .get( 2039 .get(
2056 "/getSectionsList", 2040 "/getSectionsList",
2057 { params: { classId: _id } }, 2041 { params: { classId: _id } },
2058 { 2042 {
2059 headers: { Authorization: "Bearer " + token } 2043 headers: { Authorization: "Bearer " + token }
2060 } 2044 }
2061 ) 2045 )
2062 .then(response => { 2046 .then(response => {
2063 this.addSection = response.data.data; 2047 this.addSection = response.data.data;
2064 this.showLoader = false; 2048 this.showLoader = false;
2065 // console.log("getSectionsList=====>", this.addSection); 2049 // console.log("getSectionsList=====>", this.addSection);
2066 }) 2050 })
2067 .catch(err => { 2051 .catch(err => {
2068 this.showLoader = false; 2052 this.showLoader = false;
2069 // console.log("err====>", err); 2053 // console.log("err====>", err);
2070 // this.$router.replace({ path: '/' }); 2054 // this.$router.replace({ path: '/' });
2071 }); 2055 });
2072 }, 2056 },
2073 pickFile() { 2057 pickFile() {
2074 this.$refs.image.click(); 2058 this.$refs.image.click();
2075 }, 2059 },
2076 dates: function(date) { 2060 dates: function(date) {
2077 return moment(date).format("MMMM DD, YYYY"); 2061 return moment(date).format("MMMM DD, YYYY");
2078 }, 2062 },
2079 onFilePicked(e) { 2063 onFilePicked(e) {
2080 // console.log(e) 2064 // console.log(e)
2081 const files = e.target.files; 2065 const files = e.target.files;
2082 this.imageData.upload = e.target.files[0]; 2066 this.imageData.upload = e.target.files[0];
2083 if (files[0] !== undefined) { 2067 if (files[0] !== undefined) {
2084 this.imageName = files[0].name; 2068 this.imageName = files[0].name;
2085 if (this.imageName.lastIndexOf(".") <= 0) { 2069 if (this.imageName.lastIndexOf(".") <= 0) {
2086 return; 2070 return;
2087 } 2071 }
2088 const fr = new FileReader(); 2072 const fr = new FileReader();
2089 fr.readAsDataURL(files[0]); 2073 fr.readAsDataURL(files[0]);
2090 fr.addEventListener("load", () => { 2074 fr.addEventListener("load", () => {
2091 this.imageUrl = fr.result; 2075 this.imageUrl = fr.result;
2092 this.imageFile = files[0]; // this is an image file that can be sent to server... 2076 this.imageFile = files[0]; // this is an image file that can be sent to server...
2093 this.imageData.imageUrl = URL.createObjectURL(this.imageFile); 2077 this.imageData.imageUrl = URL.createObjectURL(this.imageFile);
2094 }); 2078 });
2095 } else { 2079 } else {
2096 this.imageName = ""; 2080 this.imageName = "";
2097 this.imageFile = ""; 2081 this.imageFile = "";
2098 this.imageUrl = ""; 2082 this.imageUrl = "";
2099 } 2083 }
2100 }, 2084 },
2101 // getStudentList() { 2085 // getStudentList() {
2102 // this.showLoader = true; 2086 // this.showLoader = true;
2103 // var token = this.$store.state.token; 2087 // var token = this.$store.state.token;
2104 // http() 2088 // http()
2105 // .get("/getStudentsList", { 2089 // .get("/getStudentsList", {
2106 // headers: { Authorization: "Bearer " + token } 2090 // headers: { Authorization: "Bearer " + token }
2107 // }) 2091 // })
2108 // .then(response => { 2092 // .then(response => {
2109 // this.desserts = response.data.data; 2093 // this.desserts = response.data.data;
2110 // this.showLoader = false; 2094 // this.showLoader = false;
2111 // // console.log("getStudentList=====>",this.desserts) 2095 // // console.log("getStudentList=====>",this.desserts)
2112 // }) 2096 // })
2113 // .catch(err => { 2097 // .catch(err => {
2114 // // console.log("err====>", err); 2098 // // console.log("err====>", err);
2115 // this.showLoader = false; 2099 // this.showLoader = false;
2116 // this.$router.replace({ path: "/" }); 2100 // this.$router.replace({ path: "/" });
2117 // }); 2101 // });
2118 // }, 2102 // },
2119 editItem(item) { 2103 editItem(item) {
2120 this.editedIndex = this.desserts.indexOf(item); 2104 this.editedIndex = this.desserts.indexOf(item);
2121 this.editedItem = Object.assign({}, item); 2105 this.editedItem = Object.assign({}, item);
2122 this.editedItem.fatherName = item.parentId.fatherName; 2106 this.editedItem.fatherName = item.parentId.fatherName;
2123 this.editedItem.fatherCellNo = item.parentId.fatherCellNo; 2107 this.editedItem.fatherCellNo = item.parentId.fatherCellNo;
2124 this.editedItem.motherName = item.parentId.motherName; 2108 this.editedItem.motherName = item.parentId.motherName;
2125 this.editedItem.motherCellNo = item.parentId.motherCellNo; 2109 this.editedItem.motherCellNo = item.parentId.motherCellNo;
2126 this.editedItem.dob = 2110 this.editedItem.dob =
2127 this.editedItem.dob != undefined 2111 this.editedItem.dob != undefined
2128 ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10)) 2112 ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10))
2129 : (this.editedItem.dob = ""); 2113 : (this.editedItem.dob = "");
2130 this.dialog = true; 2114 this.dialog = true;
2131 }, 2115 },
2132 profile(item) { 2116 profile(item) {
2133 // console.log("item", item); 2117 // console.log("item", item);
2134 this.editedIndex = this.desserts.indexOf(item); 2118 this.editedIndex = this.desserts.indexOf(item);
2135 this.editedItem = Object.assign({}, item); 2119 this.editedItem = Object.assign({}, item);
2136 this.editedItem.fatherName = item.parentId.fatherName; 2120 this.editedItem.fatherName = item.parentId.fatherName;
2137 this.editedItem.fatherCellNo = item.parentId.fatherCellNo; 2121 this.editedItem.fatherCellNo = item.parentId.fatherCellNo;
2138 this.editedItem.motherName = item.parentId.motherName; 2122 this.editedItem.motherName = item.parentId.motherName;
2139 this.editedItem.motherCellNo = item.parentId.motherCellNo; 2123 this.editedItem.motherCellNo = item.parentId.motherCellNo;
2140 2124
2141 this.dialog1 = true; 2125 this.dialog1 = true;
2142 }, 2126 },
2143 deleteItem(item) { 2127 deleteItem(item) {
2144 let deleteStudent = { 2128 let deleteStudent = {
2145 studentId: item._id 2129 studentId: item._id
2146 }; 2130 };
2147 http() 2131 http()
2148 .delete( 2132 .delete(
2149 "/deleteStudent", 2133 "/deleteStudent",
2150 confirm("Are you sure you want to delete this?") && { 2134 confirm("Are you sure you want to delete this?") && {
2151 params: deleteStudent 2135 params: deleteStudent
2152 } 2136 }
2153 ) 2137 )
2154 .then(response => { 2138 .then(response => {
2155 // console.log("deleteUers",deleteStudent) 2139 // console.log("deleteUers",deleteStudent)
2156 this.snackbar = true; 2140 this.snackbar = true;
2157 this.text = "Successfully delete Existing Student"; 2141 this.text = "Successfully delete Existing Student";
2158 this.getStudentList(); 2142 this.getStudentList();
2159 }) 2143 })
2160 .catch(error => { 2144 .catch(error => {
2161 // console.log(error); 2145 // console.log(error);
2162 }); 2146 });
2163 }, 2147 },
2164 activeTab(type) { 2148 activeTab(type) {
2165 switch (type) { 2149 switch (type) {
2166 case "existing": 2150 case "existing":
2167 this.newActive = false; 2151 this.newActive = false;
2168 this.isActive = true; 2152 this.isActive = true;
2169 break; 2153 break;
2170 2154
2171 default: 2155 default:
2172 this.newActive = true; 2156 this.newActive = true;
2173 this.isActive = false; 2157 this.isActive = false;
2174 break; 2158 break;
2175 } 2159 }
2176 }, 2160 },
2177 close() { 2161 close() {
2178 this.dialog = false; 2162 this.dialog = false;
2179 setTimeout(() => { 2163 setTimeout(() => {
2180 this.editedItem = Object.assign({}, this.defaultItem); 2164 this.editedItem = Object.assign({}, this.defaultItem);
2181 this.editedIndex = -1; 2165 this.editedIndex = -1;
2182 }, 300); 2166 }, 300);
2183 }, 2167 },
2184 close1() { 2168 close1() {
2185 this.dialog1 = false; 2169 this.dialog1 = false;
2186 }, 2170 },
2187 submit() { 2171 submit() {
2188 if (this.$refs.form.validate()) { 2172 if (this.$refs.form.validate()) {
2189 let addStudent = { 2173 let addStudent = {
2190 parentId: this.parentId, 2174 parentId: this.parentId,
2191 name: this.addStudents.name, 2175 name: this.addStudents.name,
2192 email: this.addStudents.email, 2176 email: this.addStudents.email,
2193 role: this.addStudents.role, 2177 role: this.addStudents.role,
2194 dob: this.addStudents.date, 2178 dob: this.addStudents.date,
2195 city: this.addStudents.city, 2179 city: this.addStudents.city,
2196 pincode: this.addStudents.pincode, 2180 pincode: this.addStudents.pincode,
2197 country: this.addStudents.country, 2181 country: this.addStudents.country,
2198 permanentAddress: this.addStudents.permanentAddress, 2182 permanentAddress: this.addStudents.permanentAddress,
2199 presentAddress: this.addStudents.presentAddress, 2183 presentAddress: this.addStudents.presentAddress,
2200 mobile: this.addStudents.mobile, 2184 mobile: this.addStudents.mobile,
2201 state: this.addStudents.state, 2185 state: this.addStudents.state,
2202 gender: this.addStudents.gender, 2186 gender: this.addStudents.gender,
2203 establishmentYear: this.addStudents.establishmentYear, 2187 establishmentYear: this.addStudents.establishmentYear,
2204 classId: this.addStudents.select, 2188 classId: this.addStudents.select,
2205 sectionId: this.addStudents.selectSection, 2189 sectionId: this.addStudents.selectSection,
2206 bloodGroup: this.addStudents.bloodGroup, 2190 bloodGroup: this.addStudents.bloodGroup,
2207 allergies: this.addStudents.allergies,
2208 medicalNotes: this.addStudents.medicalNotes, 2191 medicalNotes: this.addStudents.medicalNotes,
2209 height: this.addStudents.height, 2192 height: this.addStudents.height,
2210 weight: this.addStudents.weight, 2193 weight: this.addStudents.weight,
2211 rollNo: this.addStudents.rollNo 2194 rollNo: this.addStudents.rollNo
2212 }; 2195 };
2213 if (this.imageUrl) { 2196 if (this.imageUrl) {
2214 var str = this.imageUrl; 2197 var str = this.imageUrl;
2215 const [baseUrl, imageUrl] = str.split(/,/); 2198 const [baseUrl, imageUrl] = str.split(/,/);
2216 addStudent.upload = imageUrl; 2199 addStudent.upload = imageUrl;
2217 } 2200 }
2218 this.loading = true; 2201 this.loading = true;
2219 http() 2202 http()
2220 .post("/createStudent", addStudent) 2203 .post("/createStudent", addStudent)
2221 .then(response => { 2204 .then(response => {
2222 // console.log(addStudent); 2205 // console.log(addStudent);
2223 this.snackbar = true; 2206 this.snackbar = true;
2224 this.text = "New Student added successfully"; 2207 this.text = "New Student added successfully";
2225 // this.getStudentList(); 2208 // this.getStudentList();
2226 this.clear(); 2209 this.clear();
2227 this.loading = false; 2210 this.loading = false;
2228 }) 2211 })
2229 .catch(error => { 2212 .catch(error => {
2230 // console.log(error); 2213 // console.log(error);
2231 this.snackbar = true; 2214 this.snackbar = true;
2232 this.text = error.response.data.message; 2215 this.text = error.response.data.message;
2233 this.loading = false; 2216 this.loading = false;
2234 }); 2217 });
2235 } 2218 }
2236 }, 2219 },
2237 clear() { 2220 clear() {
2238 this.$refs.form.reset(); 2221 this.$refs.form.reset();
2239 this.imageUrl = ""; 2222 this.imageUrl = "";
2240 }, 2223 },
2241 save() { 2224 save() {
2242 let editStudent = { 2225 let editStudent = {
2243 studentId: this.editedItem._id, 2226 studentId: this.editedItem._id,
2244 name: this.editedItem.name, 2227 name: this.editedItem.name,
2245 email: this.editedItem.email, 2228 email: this.editedItem.email,
2246 role: this.editedItem.role, 2229 role: this.editedItem.role,
2247 dob: this.editedItem.dob, 2230 dob: this.editedItem.dob,
2248 city: this.editedItem.city, 2231 city: this.editedItem.city,
2249 pincode: this.editedItem.pincode, 2232 pincode: this.editedItem.pincode,
2250 country: this.editedItem.country, 2233 country: this.editedItem.country,
2251 permanentAddress: this.editedItem.permanentAddress, 2234 permanentAddress: this.editedItem.permanentAddress,
2252 presentAddress: this.editedItem.presentAddress, 2235 presentAddress: this.editedItem.presentAddress,
2253 mobile: this.editedItem.mobile, 2236 mobile: this.editedItem.mobile,
2254 state: this.editedItem.state, 2237 state: this.editedItem.state,
2255 gender: this.editedItem.gender, 2238 gender: this.editedItem.gender,
2256 establishmentYear: this.editedItem.establishmentYear, 2239 establishmentYear: this.editedItem.establishmentYear,
2257 classId: this.editedItem.select, 2240 classId: this.editedItem.select,
2258 sectionId: this.editedItem.selectSection, 2241 sectionId: this.editedItem.selectSection,
2259 bloodGroup: this.editedItem.bloodGroup, 2242 bloodGroup: this.editedItem.bloodGroup,
2260 allergies: this.editedItem.allergies,
2261 medicalNotes: this.editedItem.medicalNotes, 2243 medicalNotes: this.editedItem.medicalNotes,
2262 height: this.editedItem.height, 2244 height: this.editedItem.height,
2263 weight: this.editedItem.weight, 2245 weight: this.editedItem.weight,
2264 rollNo: this.editedItem.rollNo 2246 rollNo: this.editedItem.rollNo
2265 }; 2247 };
2266 if (this.imageUrl) { 2248 if (this.imageUrl) {
2267 var str = this.imageUrl; 2249 var str = this.imageUrl;
2268 const [baseUrl, imageUrl] = str.split(/,/); 2250 const [baseUrl, imageUrl] = str.split(/,/);
2269 editStudent.upload = imageUrl; 2251 editStudent.upload = imageUrl;
2270 } 2252 }
2271 http() 2253 http()
2272 .put("/updateStudent", editStudent) 2254 .put("/updateStudent", editStudent)
2273 .then(response => { 2255 .then(response => {
2274 this.snackbar = true; 2256 this.snackbar = true;
2275 this.text = response.data.message; 2257 this.text = response.data.message;
2276 this.imageUrl = ""; 2258 this.imageUrl = "";
2277 this.findStudents(); 2259 this.findStudents();
2278 this.close(); 2260 this.close();
2279 }) 2261 })
2280 .catch(error => { 2262 .catch(error => {
2281 // console.log(error); 2263 // console.log(error);
2282 this.snackbar = true; 2264 this.snackbar = true;
2283 this.text = error.response.data.statusText; 2265 this.text = error.response.data.statusText;
2284 }); 2266 });
2285 }, 2267 },
2286 submitParentDetails() { 2268 submitParentDetails() {
2287 if (this.$refs.parentForm.validate()) { 2269 if (this.$refs.parentForm.validate()) {
2288 let addparentDetails = { 2270 let addparentDetails = {
2289 email: this.parentData.email, 2271 email: this.parentData.email,
2290 fatherName: this.parentData.fatherName, 2272 fatherName: this.parentData.fatherName,
2291 fatherCellNo: this.parentData.fatherCellNo, 2273 fatherCellNo: this.parentData.fatherCellNo,
2292 motherName: this.parentData.motherName, 2274 motherName: this.parentData.motherName,
2293 motherCellNo: this.parentData.motherCellNo, 2275 motherCellNo: this.parentData.motherCellNo,
2294 role: "PARENT" 2276 role: "PARENT"
2295 }; 2277 };
2296 this.loading = true; 2278 this.loading = true;
2297 http() 2279 http()
2298 .post("/createParent", addparentDetails) 2280 .post("/createParent", addparentDetails)
2299 .then(response => { 2281 .then(response => {
2300 this.parentId = response.data.data.id; 2282 this.parentId = response.data.data.id;
2301 this.e2 = 2; 2283 this.e2 = 2;
2302 this.snackbar = true; 2284 this.snackbar = true;
2303 this.text = "successfully"; 2285 this.text = "successfully";
2304 // this.getStudentList(); 2286 // this.getStudentList();
2305 this.clear(); 2287 this.clear();
2306 this.loading = false; 2288 this.loading = false;
2307 }) 2289 })
2308 .catch(error => { 2290 .catch(error => {
2309 this.snackbar = true; 2291 this.snackbar = true;
2310 this.text = error.response.data.message; 2292 this.text = error.response.data.message;
2311 this.text = error.response.data.statusText; 2293 this.text = error.response.data.statusText;
2312 this.loading = false; 2294 this.loading = false;
2313 }); 2295 });
2314 } 2296 }
2315 }, 2297 },
2316 getParentDetails() { 2298 getParentDetails() {
2317 if (this.parentData.fatherCellNo.length > 9) { 2299 if (this.parentData.fatherCellNo.length > 9) {
2318 http() 2300 http()
2319 .get("getParticularParent", { 2301 .get("getParticularParent", {
2320 params: { fatherCellNo: this.parentData.fatherCellNo }, 2302 params: { fatherCellNo: this.parentData.fatherCellNo },
2321 headers: { 2303 headers: {
2322 Authorization: "Bearer " + this.$store.state.token 2304 Authorization: "Bearer " + this.$store.state.token
2323 } 2305 }
2324 }) 2306 })
2325 .then(response => { 2307 .then(response => {
2326 this.showNext = true; 2308 this.showNext = true;
2327 this.showParent = false; 2309 this.showParent = false;
2328 this.parentData = response.data.data; 2310 this.parentData = response.data.data;
2329 this.parentId = response.data.data._id; 2311 this.parentId = response.data.data._id;
2330 }) 2312 })
2331 .catch(error => { 2313 .catch(error => {
2332 console.log("err====>", error.response.data.message); 2314 console.log("err====>", error.response.data.message);
2333 }); 2315 });
2334 } 2316 }
2335 } 2317 }
2336 }, 2318 },
2337 mounted() { 2319 mounted() {
2338 const getCountryList = countryList(); 2320 const getCountryList = countryList();
2339 this.countries = getCountryList; 2321 this.countries = getCountryList;
2340 var token = this.$store.state.token; 2322 var token = this.$store.state.token;
2341 http() 2323 http()
2342 .get("/getClassesList", { 2324 .get("/getClassesList", {
2343 headers: { Authorization: "Bearer " + token } 2325 headers: { Authorization: "Bearer " + token }
2344 }) 2326 })
2345 .then(response => { 2327 .then(response => {
2346 this.addclass = response.data.data; 2328 this.addclass = response.data.data;
2347 }) 2329 })
2348 .catch(error => { 2330 .catch(error => {
2349 this.showLoader = false; 2331 this.showLoader = false;
2350 if (error.response.status === 401) { 2332 if (error.response.status === 401) {
2351 this.$router.replace({ path: "/" }); 2333 this.$router.replace({ path: "/" });
2352 this.$store.dispatch("setToken", null); 2334 this.$store.dispatch("setToken", null);
2353 this.$store.dispatch("Id", null); 2335 this.$store.dispatch("Id", null);
2354 this.$store.dispatch("Role", null); 2336 this.$store.dispatch("Role", null);
2355 } 2337 }
2356 }); 2338 });
2357 }, 2339 },
2358 created() { 2340 created() {
2359 this.$root.$on("app:search", search => { 2341 this.$root.$on("app:search", search => {
2360 this.search = search; 2342 this.search = search;
src/pages/Subjects/subjects.vue
1 <template> 1 <template>
2 <v-app id="pages-dasboard"> 2 <v-app id="pages-dasboard">
3 <v-tabs grow slider-color="gray"> 3 <v-tabs grow slider-color="gray">
4 <v-tab 4 <v-tab
5 ripple 5 ripple
6 @click="activeTab('existing')" 6 @click="activeTab('existing')"
7 v-bind:class="{ active: isActive }" 7 v-bind:class="{ active: isActive }"
8 id="tab" 8 id="tab"
9 class="subheading" 9 class="subheading"
10 >Existing Subjects</v-tab> 10 >Existing Subjects</v-tab>
11 <v-tab 11 <v-tab
12 ripple 12 ripple
13 @click="activeTab('new')" 13 @click="activeTab('new')"
14 v-bind:class="{ active: newActive }" 14 v-bind:class="{ active: newActive }"
15 id="tab1" 15 id="tab1"
16 User 16 User
17 class="subheading" 17 class="subheading"
18 >Add New Subject</v-tab> 18 >Add New Subject</v-tab>
19 19
20 <!-- ****** EDIT Subject ****** --> 20 <!-- ****** EDIT Subject ****** -->
21 21
22 <v-tab-item> 22 <v-tab-item>
23 <v-snackbar 23 <v-snackbar
24 :timeout="timeout" 24 :timeout="timeout"
25 :top="y === 'top'" 25 :top="y === 'top'"
26 :right="x === 'right'" 26 :right="x === 'right'"
27 :vertical="mode === 'vertical'" 27 :vertical="mode === 'vertical'"
28 v-model="snackbar" 28 v-model="snackbar"
29 color="success" 29 color="success"
30 >{{ text }}</v-snackbar> 30 >{{ text }}</v-snackbar>
31 <v-dialog v-model="dialog" max-width="600px"> 31 <v-dialog v-model="dialog" max-width="600px">
32 <v-flex xs12 sm12 class> 32 <v-flex xs12 sm12 class>
33 <v-toolbar color="v-toolbar"> 33 <v-toolbar color="v-toolbar">
34 <v-spacer></v-spacer> 34 <v-spacer></v-spacer>
35 <v-toolbar-title> 35 <v-toolbar-title>
36 <h3>Edit Subject</h3> 36 <h3>Edit Subject</h3>
37 </v-toolbar-title> 37 </v-toolbar-title>
38 <v-spacer></v-spacer> 38 <v-spacer></v-spacer>
39 </v-toolbar> 39 </v-toolbar>
40 <v-card flat> 40 <v-card flat>
41 <v-container fluid> 41 <v-container fluid>
42 <v-layout> 42 <v-layout>
43 <v-flex xs4 class="pt-4 subheading"> 43 <v-flex xs4 class="pt-4 subheading">
44 <label class="right">Class:</label> 44 <label class="right">Class:</label>
45 </v-flex> 45 </v-flex>
46 <v-flex xs6 class="ml-3"> 46 <v-flex xs6 class="ml-3">
47 <v-select 47 <v-select
48 :items="classList" 48 :items="classList"
49 label="Select Class" 49 label="Select Class"
50 v-model="addSubject.selectName" 50 v-model="addSubject.selectName"
51 item-text="classNum" 51 item-text="classNum"
52 item-value="_id" 52 item-value="_id"
53 name="Select Class" 53 name="Select Class"
54 :rules="nameRules" 54 :rules="nameRules"
55 required 55 required
56 ></v-select> 56 ></v-select>
57 </v-flex> 57 </v-flex>
58 </v-layout> 58 </v-layout>
59 <v-layout> 59 <v-layout>
60 <v-flex xs4 class="pt-4 subheading"> 60 <v-flex xs4 class="pt-4 subheading">
61 <label class="right">Subject:</label> 61 <label class="right">Subject:</label>
62 </v-flex> 62 </v-flex>
63 <v-flex xs6 class="ml-3"> 63 <v-flex xs6 class="ml-3">
64 <v-text-field 64 <v-text-field
65 placeholder="fill your Subject" 65 placeholder="fill your Subject"
66 v-model="editedItem.subjectName" 66 v-model="editedItem.subjectName"
67 type="text" 67 type="text"
68 name="email" 68 name="email"
69 required 69 required
70 ></v-text-field> 70 ></v-text-field>
71 </v-flex> 71 </v-flex>
72 </v-layout> 72 </v-layout>
73 <v-flex xs12 sm9 offset-sm2> 73 <v-flex xs12 sm9 offset-sm2>
74 <v-card-actions> 74 <v-card-actions>
75 <v-btn round dark @click.native="close">Cancel</v-btn> 75 <v-btn round dark @click.native="close">Cancel</v-btn>
76 <v-spacer></v-spacer> 76 <v-spacer></v-spacer>
77 <v-btn round dark @click="save">Save</v-btn> 77 <v-btn round dark @click="save">Save</v-btn>
78 </v-card-actions> 78 </v-card-actions>
79 </v-flex> 79 </v-flex>
80 </v-container> 80 </v-container>
81 </v-card> 81 </v-card>
82 </v-flex> 82 </v-flex>
83 </v-dialog> 83 </v-dialog>
84 84
85 <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> 85 <!-- ****** VIEW PROFIL NOTICE BOARD ****** -->
86 86
87 <v-dialog v-model="dialog1" max-width="600px"> 87 <v-dialog v-model="dialog1" max-width="600px">
88 <v-toolbar color="v-toolbar"> 88 <v-toolbar color="v-toolbar">
89 <v-spacer></v-spacer> 89 <v-spacer></v-spacer>
90 <v-toolbar-title> 90 <v-toolbar-title>
91 <h3>Subject</h3> 91 <h3>Subject</h3>
92 </v-toolbar-title> 92 </v-toolbar-title>
93 <v-spacer></v-spacer> 93 <v-spacer></v-spacer>
94 <v-icon @click="close1">close</v-icon> 94 <v-icon @click="close1">close</v-icon>
95 </v-toolbar> 95 </v-toolbar>
96 <v-card> 96 <v-card>
97 <v-card-text> 97 <v-card-text>
98 <v-container grid-list-md> 98 <v-container grid-list-md>
99 <v-layout wrap> 99 <v-layout wrap>
100 <v-flex> 100 <v-flex>
101 <v-layout> 101 <v-layout>
102 <v-flex xs7 sm6> 102 <v-flex xs7 sm6>
103 <h5 class="right my-1"> 103 <h5 class="right my-1">
104 <b>Subject Name:</b> 104 <b>Subject Name:</b>
105 </h5> 105 </h5>
106 </v-flex> 106 </v-flex>
107 <v-flex sm6 xs5> 107 <v-flex sm6 xs5>
108 <h5 class="my-1">{{ editedItem.subjectName }}</h5> 108 <h5 class="my-1">{{ editedItem.subjectName }}</h5>
109 </v-flex> 109 </v-flex>
110 </v-layout> 110 </v-layout>
111 </v-flex> 111 </v-flex>
112 </v-layout> 112 </v-layout>
113 </v-container> 113 </v-container>
114 </v-card-text> 114 </v-card-text>
115 </v-card> 115 </v-card>
116 </v-dialog> 116 </v-dialog>
117 117
118 <v-snackbar 118 <v-snackbar
119 :timeout="timeout" 119 :timeout="timeout"
120 :top="y === 'top'" 120 :top="y === 'top'"
121 :right="x === 'right'" 121 :right="x === 'right'"
122 :vertical="mode === 'vertical'" 122 :vertical="mode === 'vertical'"
123 v-model="snackbar" 123 v-model="snackbar"
124 color="success" 124 color="success"
125 >{{ text }}</v-snackbar> 125 >{{ text }}</v-snackbar>
126 126
127 <!-- ****** EXISTING SUBJECTS TABLE ****** --> 127 <!-- ****** EXISTING SUBJECTS TABLE ****** -->
128 <v-card flat> 128 <v-card flat>
129 <v-card-actions> 129 <v-card-actions>
130 <v-layout> 130 <v-layout>
131 <v-flex xs4 sm2 lg1> 131 <v-flex xs4 sm2 lg1>
132 <label class="right mt-4">Select Class:</label> 132 <label class="right mt-4">Select Class:</label>
133 </v-flex> 133 </v-flex>
134 <v-flex xs8 sm4 lg3> 134 <v-flex xs8 sm4 lg3>
135 <v-select 135 <v-select
136 :items="classList" 136 :items="classList"
137 label="Select Class" 137 label="Select Class"
138 v-model="addSubject.selectName" 138 v-model="selectClassId"
139 item-text="classNum" 139 item-text="classNum"
140 item-value="_id" 140 item-value="_id"
141 name="Select Class" 141 name="Select Class"
142 :rules="nameRules" 142 :rules="nameRules"
143 @change="getClassSubject(addSubject.selectName)" 143 @change="getClassSubject"
144 class="px-4" 144 class="px-4"
145 required 145 required
146 ></v-select> 146 ></v-select>
147 </v-flex> 147 </v-flex>
148 </v-layout> 148 </v-layout>
149 </v-card-actions> 149 </v-card-actions>
150 </v-card> 150 </v-card>
151 <v-data-table 151 <v-data-table
152 :headers="headers" 152 :headers="headers"
153 :items="subjectList.subjects" 153 :items="subjectList.subjects"
154 :pagination.sync="pagination" 154 :pagination.sync="pagination"
155 :search="search" 155 :search="search"
156 > 156 >
157 <template slot="items" slot-scope="props"> 157 <template slot="items" slot-scope="props">
158 <td id="td" class="text-xs-center">{{ props.index + 1}}</td> 158 <td id="td" class="text-xs-center">{{ props.index + 1}}</td>
159 <td id="td" class="text-xs-center">{{ props.item.subjectName}}</td> 159 <td id="td" class="text-xs-center">{{ props.item.subjectName}}</td>
160 160
161 <td class="text-xs-center"> 161 <td class="text-xs-center">
162 <span> 162 <span>
163 <v-tooltip top> 163 <v-tooltip top>
164 <img 164 <img
165 slot="activator" 165 slot="activator"
166 style="cursor:pointer; width:25px; height:18px; " 166 style="cursor:pointer; width:25px; height:18px; "
167 class="mr5" 167 class="mr5"
168 @click="profile(props.item)" 168 @click="profile(props.item)"
169 src="/static/icon/eye1.png" 169 src="/static/icon/eye1.png"
170 /> 170 />
171 <span>View</span> 171 <span>View</span>
172 </v-tooltip> 172 </v-tooltip>
173 <v-tooltip top> 173 <v-tooltip top>
174 <img 174 <img
175 slot="activator" 175 slot="activator"
176 style="cursor:pointer; width:20px; height:18px; " 176 style="cursor:pointer; width:20px; height:18px; "
177 class="mr5" 177 class="mr5"
178 @click="editItem(props.item)" 178 @click="editItem(props.item)"
179 src="/static/icon/edit1.png" 179 src="/static/icon/edit1.png"
180 /> 180 />
181 <span>Edit</span> 181 <span>Edit</span>
182 </v-tooltip> 182 </v-tooltip>
183 <v-tooltip top> 183 <v-tooltip top>
184 <img 184 <img
185 slot="activator" 185 slot="activator"
186 style="cursor:pointer; width:20px; height:20px; " 186 style="cursor:pointer; width:20px; height:20px; "
187 class="mr5" 187 class="mr5"
188 @click="deleteItem(props.item)" 188 @click="deleteItem(props.item)"
189 src="/static/icon/delete1.png" 189 src="/static/icon/delete1.png"
190 /> 190 />
191 <span>Delete</span> 191 <span>Delete</span>
192 </v-tooltip> 192 </v-tooltip>
193 </span> 193 </span>
194 </td> 194 </td>
195 </template> 195 </template>
196 <v-alert 196 <v-alert
197 slot="no-results" 197 slot="no-results"
198 :value="true" 198 :value="true"
199 color="error" 199 color="error"
200 icon="warning" 200 icon="warning"
201 >Your search for "{{ search }}" found no results.</v-alert> 201 >Your search for "{{ search }}" found no results.</v-alert>
202 </v-data-table> 202 </v-data-table>
203 </v-tab-item> 203 </v-tab-item>
204 204
205 <!-- ****** ADD MULTIPLE Subject ****** --> 205 <!-- ****** ADD MULTIPLE Subject ****** -->
206 206
207 <v-tab-item> 207 <v-tab-item>
208 <v-container> 208 <v-container>
209 <v-snackbar 209 <v-snackbar
210 :timeout="timeout" 210 :timeout="timeout"
211 :top="y === 'top'" 211 :top="y === 'top'"
212 :right="x === 'right'" 212 :right="x === 'right'"
213 :vertical="mode === 'vertical'" 213 :vertical="mode === 'vertical'"
214 v-model="snackbar" 214 v-model="snackbar"
215 color="success" 215 :color="color"
216 >{{ text }}</v-snackbar> 216 >{{ text }}</v-snackbar>
217 <v-flex xs12 sm8 offset-sm2 class="top"> 217 <v-flex xs12 sm8 offset-sm2 class="top">
218 <v-card flat> 218 <v-card flat>
219 <v-container fluid fill-height> 219 <v-container fluid fill-height>
220 <v-layout align-center> 220 <v-layout align-center>
221 <v-flex xs12> 221 <v-flex xs12>
222 <v-form ref="form" v-model="valid" lazy-validation> 222 <v-form ref="form" v-model="valid" lazy-validation>
223 <v-layout> 223 <v-layout>
224 <v-flex xs4 sm4 class="pt-4 subheading"> 224 <v-flex xs4 sm4 class="pt-4 subheading">
225 <label class="right">Class:</label> 225 <label class="right">Class:</label>
226 </v-flex> 226 </v-flex>
227 <v-flex xs8 sm6 class="ml-3"> 227 <v-flex xs8 sm6 class="ml-3">
228 <v-select 228 <v-select
229 v-model="addSubject.classId" 229 v-model="addSubject.classId"
230 label="Select your class" 230 label="Select your class"
231 type="text" 231 type="text"
232 :items="classList" 232 :items="classList"
233 item-text="classNum" 233 item-text="classNum"
234 item-value="_id" 234 item-value="_id"
235 :rules="nameRules" 235 :rules="nameRules"
236 required 236 required
237 ></v-select> 237 ></v-select>
238 </v-flex> 238 </v-flex>
239 </v-layout> 239 </v-layout>
240 <v-layout> 240 <v-layout>
241 <v-flex xs4 sm4 class="pt-4 subheading"> 241 <v-flex xs4 sm4 class="pt-4 subheading">
242 <label class="right">Subject:</label> 242 <label class="right">Subject:</label>
243 </v-flex> 243 </v-flex>
244 <v-flex xs8 sm6 class="ml-3"> 244 <v-flex xs8 sm6 class="ml-3">
245 <v-text-field 245 <v-text-field
246 v-model="addSubject.subjectName" 246 v-model="addSubject.subjectName"
247 placeholder="fill your Subject Name" 247 placeholder="fill your Subject Name"
248 name="name" 248 name="name"
249 type="text" 249 type="text"
250 :rules="subjectRules" 250 :rules="subjectRules"
251 required 251 required
252 ></v-text-field> 252 ></v-text-field>
253 </v-flex> 253 </v-flex>
254 </v-layout> 254 </v-layout>
255 <v-layout> 255 <v-layout>
256 <v-flex xs12 sm9 offset-sm2> 256 <v-flex xs12 sm9 offset-sm2>
257 <v-card-actions> 257 <v-card-actions>
258 <v-btn @click="clear" round dark>clear</v-btn> 258 <v-btn @click="clear" round dark>clear</v-btn>
259 <v-spacer></v-spacer> 259 <v-spacer></v-spacer>
260 <v-btn @click="submit" round dark :loading="loading">Add</v-btn> 260 <v-btn @click="submit" round dark :loading="loading">Add</v-btn>
261 </v-card-actions> 261 </v-card-actions>
262 </v-flex> 262 </v-flex>
263 </v-layout> 263 </v-layout>
264 </v-form> 264 </v-form>
265 </v-flex> 265 </v-flex>
266 </v-layout> 266 </v-layout>
267 </v-container> 267 </v-container>
268 </v-card> 268 </v-card>
269 </v-flex> 269 </v-flex>
270 </v-container> 270 </v-container>
271 </v-tab-item> 271 </v-tab-item>
272 </v-tabs> 272 </v-tabs>
273 <div class="loader" v-if="showLoader"> 273 <div class="loader" v-if="showLoader">
274 <v-progress-circular indeterminate color="white"></v-progress-circular> 274 <v-progress-circular indeterminate color="white"></v-progress-circular>
275 </div> 275 </div>
276 </v-app> 276 </v-app>
277 </template> 277 </template>
278 278
279 <script> 279 <script>
280 import http from "@/Services/http.js"; 280 import http from "@/Services/http.js";
281 import Util from "@/util"; 281 import Util from "@/util";
282 282
283 export default { 283 export default {
284 data: () => ({ 284 data: () => ({
285 snackbar: false, 285 snackbar: false,
286 y: "top", 286 y: "top",
287 x: "right", 287 x: "right",
288 mode: "", 288 mode: "",
289 timeout: 3000, 289 timeout: 3000,
290 text: "", 290 text: "",
291 color: "",
291 showLoader: false, 292 showLoader: false,
292 loading: false, 293 loading: false,
293 date: null, 294 date: null,
294 search: "", 295 search: "",
295 dialog: false, 296 dialog: false,
296 dialog1: false, 297 dialog1: false,
297 valid: true, 298 valid: true,
298 isActive: true, 299 isActive: true,
299 newActive: false, 300 newActive: false,
300 gender: ["Male", "Female"], 301 gender: ["Male", "Female"],
301 pagination: { 302 pagination: {
302 rowsPerPage: 19 303 rowsPerPage: 19
303 }, 304 },
304 token: "", 305 token: "",
305 nameRules: [v => !!v || " Class Name is required"], 306 nameRules: [v => !!v || " Class Name is required"],
306 subjectRules: [v => !!v || " Subject Name is required"], 307 subjectRules: [v => !!v || " Subject Name is required"],
307 headers: [ 308 headers: [
308 { 309 {
309 text: "No", 310 text: "No",
310 align: "center", 311 align: "center",
311 sortable: false, 312 sortable: false,
312 value: "No" 313 value: "No"
313 }, 314 },
314 { 315 {
315 text: "Subject Name", 316 text: "Subject Name",
316 value: "subjectName", 317 value: "subjectName",
317 sortable: false, 318 sortable: false,
318 align: "center" 319 align: "center"
319 }, 320 },
320 { text: "Action", value: "", sortable: false, align: "center" } 321 { text: "Action", value: "", sortable: false, align: "center" }
321 ], 322 ],
322 subjectList: [], 323 subjectList: [],
323 classList: [], 324 classList: [],
324 editedIndex: -1, 325 editedIndex: -1,
325 addSubject: {}, 326 addSubject: {},
326 selectClassId: "", 327 selectClassId: "",
328 selectClassId: "",
327 editedItem: { 329 editedItem: {
328 subjectName: "" 330 subjectName: ""
329 } 331 }
330 }), 332 }),
331 methods: { 333 methods: {
332 pickFile() { 334 pickFile() {
333 this.$refs.image.click(); 335 this.$refs.image.click();
334 }, 336 },
335 337
336 editItem(item) { 338 editItem(item) {
337 this.editedItem = Object.assign({}, item); 339 this.editedItem = Object.assign({}, item);
338 console.log("this.editedItem._id", this.editedItem._id);
339 this.dialog = true; 340 this.dialog = true;
340 }, 341 },
341 profile(item) { 342 profile(item) {
342 this.editedItem = Object.assign({}, item); 343 this.editedItem = Object.assign({}, item);
343 this.dialog1 = true; 344 this.dialog1 = true;
344 }, 345 },
345 deleteItem(item) { 346 deleteItem(item) {
346 let deleteSubject = { 347 let deleteSubject = {
347 classId: this.addSubject.selectName, 348 classId: this.selectClassId,
348 subjectId: item._id 349 subjectId: item._id
349 }; 350 };
350 http() 351 http()
351 .delete( 352 .delete(
352 "/deleteSubject", 353 "/deleteSubject",
353 confirm("Are you sure you want to delete this?") && { 354 confirm("Are you sure you want to delete this?") && {
354 params: deleteSubject 355 params: deleteSubject
355 } 356 }
356 ) 357 )
357 .then(response => { 358 .then(response => {
358 if ((this.snackbar = true)) { 359 this.getClassSubject();
359 this.text = "Successfully delete Existing Subject"; 360 this.snackbar = true;
360 } 361 this.text = "Successfully delete Existing Subject";
361 this.getEventList();
362 }) 362 })
363 .catch(error => { 363 .catch(error => {
364 // console.log(error); 364 // console.log(error);
365 }); 365 });
366 }, 366 },
367 activeTab(type) { 367 activeTab(type) {
368 switch (type) { 368 switch (type) {
369 case "existing": 369 case "existing":
370 this.newActive = false; 370 this.newActive = false;
371 this.isActive = true; 371 this.isActive = true;
372 break; 372 break;
373 373
374 default: 374 default:
375 this.newActive = true; 375 this.newActive = true;
376 this.isActive = false; 376 this.isActive = false;
377 break; 377 break;
378 } 378 }
379 }, 379 },
380 close() { 380 close() {
381 this.dialog = false; 381 this.dialog = false;
382 setTimeout(() => { 382 setTimeout(() => {
383 this.editedItem = Object.assign({}, this.defaultItem); 383 this.editedItem = Object.assign({}, this.defaultItem);
384 this.editedIndex = -1; 384 this.editedIndex = -1;
385 }, 300); 385 }, 300);
386 }, 386 },
387 close1() { 387 close1() {
388 this.dialog1 = false; 388 this.dialog1 = false;
389 }, 389 },
390 submit() { 390 submit() {
391 if (this.$refs.form.validate()) { 391 if (this.$refs.form.validate()) {
392 http() 392 http()
393 .post("/addSubject", this.addSubject) 393 .post("/addSubject", this.addSubject)
394 .then(response => { 394 .then(response => {
395 if ((this.snackbar = true)) { 395 this.getClassSubject();
396 this.text = "New Subject added successfully"; 396 this.snackbar = true;
397 } 397 this.text = "New Subject added successfully";
398 this.clear(); 398 this.clear();
399 this.color = "green";
399 }) 400 })
400 .catch(error => { 401 .catch(error => {
401 // console.log(error); 402 // console.log(error);
402 if ((this.snackbar = true)) { 403 this.snackbar = true;
403 this.text = error.response.data.message; 404 this.text = error.response.data.message;
404 } 405 this.color = "error";
405 }); 406 });
406 } 407 }
407 }, 408 },
408 clear() { 409 clear() {
409 this.$refs.form.reset(); 410 this.$refs.form.reset();
410 }, 411 },
411 save() { 412 save() {
412 let editSubject = { 413 let editSubject = {
413 classId: this.addSubject.selectName, 414 classId: this.addSubject.selectName,
414 subjectId: this.editedItem._id, 415 subjectId: this.editedItem._id,
415 subjectName: this.editedItem.subjectName 416 subjectName: this.editedItem.subjectName
416 }; 417 };
417 http() 418 http()
418 .put("/updateSubject", editSubject) 419 .put("/updateSubject", editSubject)
419 .then(response => { 420 .then(response => {
420 // console.log("editEvent",editEvent); 421 // console.log("editEvent",editEvent);
421 if ((this.snackbar = true)) { 422 if ((this.snackbar = true)) {
422 this.text = "Successfully Edit Existing Subject"; 423 this.text = "Successfully Edit Existing Subject";
423 } 424 }
424 // this.getClassSubject(); 425 // this.getClassSubject();
425 http() 426 http()
426 .get( 427 .get(
427 "/getParticularClass", 428 "/getParticularClass",
428 { params: { classId: this.selectClassId } }, 429 { params: { classId: this.selectClassId } },
429 { 430 {
430 headers: { Authorization: "Bearer " + this.token } 431 headers: { Authorization: "Bearer " + this.token }
431 } 432 }
432 ) 433 )
433 .then(response => { 434 .then(response => {
434 this.subjectList = response.data.data; 435 this.subjectList = response.data.data;
435 }) 436 })
436 .catch(err => { 437 .catch(err => {
437 console.log("err====>", err); 438 console.log("err====>", err);
438 }); 439 });
439 }) 440 })
440 .catch(error => { 441 .catch(error => {
441 // console.log(error); 442 // console.log(error);
442 }); 443 });
443 this.close(); 444 this.close();
444 }, 445 },
445 getClassSubject(id) { 446 getClassSubject() {
446 this.selectClassId = id; 447 this.selectClassId = this.selectClassId;
447 http() 448 http()
448 .get( 449 .get(
449 "/getParticularClass", 450 "/getParticularClass",
450 { params: { classId: this.selectClassId } }, 451 { params: { classId: this.selectClassId } },
451 { 452 {
452 headers: { Authorization: "Bearer " + this.token } 453 headers: { Authorization: "Bearer " + this.token }
453 } 454 }
454 ) 455 )
455 .then(response => { 456 .then(response => {
456 this.subjectList = response.data.data; 457 this.subjectList = response.data.data;
457 }) 458 })
458 .catch(err => { 459 .catch(err => {
459 console.log("err====>", err); 460 console.log("err====>", err);
460 }); 461 });
461 }, 462 },
462 getClass() { 463 getClass() {
463 http() 464 http()
464 .get("/getClassesList", { 465 .get("/getClassesList", {
465 headers: { Authorization: "Bearer " + this.token } 466 headers: { Authorization: "Bearer " + this.token }
466 }) 467 })
467 .then(response => { 468 .then(response => {
468 this.classList = response.data.data; 469 this.classList = response.data.data;
469 }) 470 })
470 .catch(error => { 471 .catch(error => {
471 if (error.response.status === 401) { 472 if (error.response.status === 401) {
472 this.$router.replace({ path: "/" }); 473 this.$router.replace({ path: "/" });
473 this.$store.dispatch("setToken", null); 474 this.$store.dispatch("setToken", null);
474 this.$store.dispatch("Id", null); 475 this.$store.dispatch("Id", null);
475 } 476 }
476 }); 477 });
477 } 478 }
478 }, 479 },
479 mounted() { 480 mounted() {
480 this.token = this.$store.state.token; 481 this.token = this.$store.state.token;
481 // this.getNoticeDataList(); 482 // this.getNoticeDataList();
482 this.getClass(); 483 this.getClass();
483 }, 484 },
484 created() { 485 created() {
485 this.$root.$on("app:search", search => { 486 this.$root.$on("app:search", search => {
486 this.search = search; 487 this.search = search;
487 }); 488 });
488 }, 489 },
489 beforeDestroy() { 490 beforeDestroy() {
490 // dont forget to remove the listener 491 // dont forget to remove the listener
491 this.$root.$off("app:search"); 492 this.$root.$off("app:search");
492 } 493 }
493 }; 494 };
494 </script> 495 </script>
495 <style scoped> 496 <style scoped>
496 .active { 497 .active {
497 background-color: gray; 498 background-color: gray;
498 color: white !important; 499 color: white !important;
499 } 500 }
500 .activebtn { 501 .activebtn {
501 color: black !important; 502 color: black !important;