Commit 11797ea5a354002fd432c7b8f0611a04c000471f

Authored by Shikha Mishra
1 parent caaa85a2cd

added password field

src/pages/Parent/parents.vue
... ... @@ -114,6 +114,21 @@
114 114 ></v-text-field>
115 115 </v-flex>
116 116 </v-layout>
  117 + <v-layout>
  118 + <v-flex xs4 class="pt-4 subheading">
  119 + <label class="right">Password:</label>
  120 + </v-flex>
  121 + <v-flex xs8 class="ml-3">
  122 + <v-text-field
  123 + :append-icon="e1 ? 'visibility_off' : 'visibility'"
  124 + :append-icon-cb="() => (e1 = !e1)"
  125 + :type="e1 ? 'password' : 'text'"
  126 + :rules="password"
  127 + placeholder="Enter Your Password"
  128 + required
  129 + ></v-text-field>
  130 + </v-flex>
  131 + </v-layout>
117 132 </v-flex>
118 133 <v-layout>
119 134 <v-flex xs12 sm12>
... ... @@ -229,6 +244,17 @@
229 244 required
230 245 ></v-text-field>
231 246 </v-flex>
  247 + <v-flex xs12 class="pt-4 subheading">
  248 + <label>Password:</label>
  249 + </v-flex>
  250 + <v-flex xs12>
  251 + <v-text-field
  252 + v-model="editedItem.password"
  253 + placeholder="Enter Password"
  254 + type="text"
  255 + required
  256 + ></v-text-field>
  257 + </v-flex>
232 258 </v-layout>
233 259 </v-flex>
234 260 <v-layout>
... ... @@ -372,6 +398,23 @@
372 398 </v-flex>
373 399 </v-layout>
374 400 </v-flex>
  401 + <v-flex xs12>
  402 + <v-layout>
  403 + <v-flex xs6>
  404 + <b>
  405 + <h5 class="right my-1 hidden-lg-only hidden-xl-only hidden-md-only">
  406 + <b>Password:</b>
  407 + </h5>
  408 + <h5 class="right my-1 hidden-sm-only hidden-xs-only">
  409 + <b>Password:</b>
  410 + </h5>
  411 + </b>
  412 + </v-flex>
  413 + <v-flex xs6>
  414 + <h5 class="my-1">{{ editedItem.password }}</h5>
  415 + </v-flex>
  416 + </v-layout>
  417 + </v-flex>
375 418 </v-layout>
376 419 </v-flex>
377 420 </v-layout>
... ... @@ -593,6 +636,24 @@
593 636 </v-flex>
594 637 </v-layout>
595 638 </v-flex>
  639 + <v-flex xs12 sm6>
  640 + <v-layout>
  641 + <v-flex xs4 class="pt-4 subheading">
  642 + <label class="right">Password:</label>
  643 + </v-flex>
  644 + <v-flex xs8 class="ml-3">
  645 + <v-text-field
  646 + v-model="parentData.password"
  647 + :append-icon="e1 ? 'visibility_off' : 'visibility'"
  648 + :append-icon-cb="() => (e1 = !e1)"
  649 + :type="e1 ? 'password' : 'text'"
  650 + :rules="password"
  651 + placeholder="Enter Your Password"
  652 + required
  653 + ></v-text-field>
  654 + </v-flex>
  655 + </v-layout>
  656 + </v-flex>
596 657 </v-layout>
597 658 <v-flex xs12 sm12>
598 659 <v-layout>
... ... @@ -769,6 +830,7 @@ import moment from &quot;moment&quot;;
769 830  
770 831 export default {
771 832 data: () => ({
  833 + e1: true,
772 834 showParent: true,
773 835 snackbar: false,
774 836 y: "top",
... ... @@ -783,6 +845,7 @@ export default {
783 845 loading: false,
784 846 date: null,
785 847 search: "",
  848 + password: "",
786 849 addParentDialog: false,
787 850 menu: false,
788 851 menu1: false,
... ... @@ -799,6 +862,10 @@ export default {
799 862 v => !!v || " father Cell Number is required",
800 863 v => v <= 10000000000 || "Max 10 characters is required"
801 864 ],
  865 + password: [
  866 + v => !!v || "Password field is Required.",
  867 + v => (/^(?=.*[a-z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 || 'Min 8 characters lower case symbol required'
  868 + ],
802 869 editFatherNoRule: [
803 870 v => !!v || " father Cell Number is required",
804 871 v => v <= 10000000000 || "Max 10 characters is required"
... ... @@ -855,7 +922,8 @@ export default {
855 922 fatherCellNo: "",
856 923 motherName: "",
857 924 motherCellNo: "",
858   - email: ""
  925 + email: "",
  926 + password: ""
859 927 }
860 928 }),
861 929 watch: {
... ...
src/pages/Students/students.vue
... ... @@ -331,7 +331,7 @@
331 331 </v-flex>
332 332 </v-layout>
333 333 </v-flex>
334   - <v-flex xs12 sm4>
  334 + <v-flex xs12 sm4 class="hidden-xs-only hidden-sm-only">
335 335 <v-layout>
336 336 <v-flex xs4 class="pt-4 subheading">
337 337 <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label>
... ... @@ -339,7 +339,6 @@
339 339 </v-flex>
340 340 <v-flex xs8 class="ml-3">
341 341 <v-text-field
342   - :items="gender"
343 342 v-model="editedItem.rollNo"
344 343 placeholder="fill roll number"
345 344 required
... ... @@ -387,6 +386,23 @@
387 386 <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap>
388 387 <v-flex xs12 sm12>
389 388 <v-layout>
  389 + <v-flex xs4 class="pt-4 subheading">
  390 + <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label>
  391 + <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Roll No:</label>
  392 + </v-flex>
  393 + <v-flex xs8 class="ml-3">
  394 + <v-text-field
  395 + v-model="editedItem.rollNo"
  396 + placeholder="fill roll number"
  397 + required
  398 + ></v-text-field>
  399 + </v-flex>
  400 + </v-layout>
  401 + </v-flex>
  402 + </v-layout>
  403 + <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap>
  404 + <v-flex xs12 sm12>
  405 + <v-layout>
390 406 <v-flex xs12 sm3 class="pt-4 subheading text-xs-center">
391 407 <label class>Present Address :</label>
392 408 </v-flex>
... ... @@ -1113,6 +1129,19 @@
1113 1129 </v-flex>
1114 1130 </v-layout>
1115 1131 </v-flex>
  1132 + <v-flex xs12 sm6>
  1133 + <v-layout wrap>
  1134 + <v-flex xs12 class="pt-4 subheading">
  1135 + <label>Password:</label>
  1136 + </v-flex>
  1137 + <v-flex xs12>
  1138 + <v-text-field
  1139 + v-model="parentData.password"
  1140 + placeholder="Enter Your Password"
  1141 + ></v-text-field>
  1142 + </v-flex>
  1143 + </v-layout>
  1144 + </v-flex>
1116 1145 </v-layout>
1117 1146 <v-flex sm12 class="hidden-xs-only">
1118 1147 <v-card-actions>
... ... @@ -1268,6 +1297,23 @@
1268 1297 </v-flex>
1269 1298 </v-layout>
1270 1299 </v-flex>
  1300 + <v-flex xs12 sm6>
  1301 + <v-layout>
  1302 + <v-flex xs4 class="pt-4 subheading">
  1303 + <label class="right">Password:</label>
  1304 + </v-flex>
  1305 + <v-flex xs8 class="ml-3">
  1306 + <v-text-field
  1307 + :append-icon="e1 ? 'visibility_off' : 'visibility'"
  1308 + :append-icon-cb="() => (e1 = !e1)"
  1309 + :type="e1 ? 'password' : 'text'"
  1310 + :rules="password"
  1311 + placeholder="Enter Your Password"
  1312 + required
  1313 + ></v-text-field>
  1314 + </v-flex>
  1315 + </v-layout>
  1316 + </v-flex>
1271 1317 </v-layout>
1272 1318 <v-flex sm12 class="hidden-xs-only">
1273 1319 <v-card-actions>
... ... @@ -1836,6 +1882,7 @@ import parent from &quot;@/script/parents.js&quot;;
1836 1882  
1837 1883 export default {
1838 1884 data: () => ({
  1885 + e1: true,
1839 1886 e2: 0,
1840 1887 showParent: true,
1841 1888 showNext: false,
... ... @@ -1853,6 +1900,7 @@ export default {
1853 1900 editLoading: false,
1854 1901 date: null,
1855 1902 search: "",
  1903 + password: "",
1856 1904 menu: false,
1857 1905 menu1: false,
1858 1906 editStudentDialog: false,
... ... @@ -1876,6 +1924,7 @@ export default {
1876 1924 cityRules: [v => !!v || " City Name is required"],
1877 1925 pincode: [v => !!v || " Pincode is required"],
1878 1926 country: [v => !!v || " Country Name is required"],
  1927 + rollNo: [v => !!v || "Roll No is required"],
1879 1928 permanentAddress: [v => !!v || " Permanent Address is required"],
1880 1929 presentAddress: [v => !!v || " Present Address is required"],
1881 1930 stateRules: [v => !!v || "State Name is required"],
... ... @@ -1886,6 +1935,10 @@ export default {
1886 1935 v => !!v || " father Cell Number is required",
1887 1936 v => v <= 10000000000 || "Max 10 characters is required"
1888 1937 ],
  1938 + password: [
  1939 + v => !!v || "Password field is Required.",
  1940 + v => (/^(?=.*[a-z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8
  1941 + ],
1889 1942 mobileNoRule: [v => !!v || " Mobile Number is required"],
1890 1943 establishmentYearRules: [v => !!v || " Academic Year is required"],
1891 1944 errorMessages: "",
... ... @@ -2276,6 +2329,7 @@ export default {
2276 2329 motherCellNo: this.parentData.motherCellNo,
2277 2330 fatherProfession: this.parentData.fatherProfession,
2278 2331 motherProfession: this.parentData.motherProfession,
  2332 + password: this.parentData.password,
2279 2333 role: "PARENT"
2280 2334 };
2281 2335 this.loading = true;
... ... @@ -2332,6 +2386,7 @@ export default {
2332 2386 this.parentData.motherCellNo = "";
2333 2387 this.parentData.fatherProfession = "";
2334 2388 this.parentData.motherProfession = "";
  2389 + this.parentData.password = "";
2335 2390 }
2336 2391 this.showLoader = false;
2337 2392 });
... ...
src/script/parents.js
... ... @@ -5,7 +5,8 @@ export default () =&gt; {
5 5 "fatherName": "Abhishek",
6 6 "motherName": "Rita",
7 7 "motherCellNo": "8989786789",
8   - "fatherCellNo": "9898981234"
  8 + "fatherCellNo": "9898981234",
  9 + "password": ""
9 10  
10 11 },
11 12 {
... ... @@ -13,7 +14,8 @@ export default () =&gt; {
13 14 "fatherName": "suresh",
14 15 "motherName": "rita kumari",
15 16 "fatherCellNo": "9898987867",
16   - "motherCellNo": "9768576536"
  17 + "motherCellNo": "9768576536",
  18 + "password": ""
17 19 }
18 20 ]
19 21 return parents;
... ...