Commit f808d58753bf71f0102cabcfd251399c3cc094e2

Authored by Shikha Mishra
1 parent a322c8b145
Exists in master and in 1 other branch ui-design

move phone no country code from mother profession to mother mobile no field in edit parent's details

Showing 1 changed file with 48 additions and 48 deletions   Show diff stats
src/pages/Parent/parents.vue
... ... @@ -99,37 +99,37 @@
99 99 <label class="right">Mother Cell No:</label>
100 100 </v-flex>
101 101 <v-flex xs8 sm6 class="ml-3">
102   - <v-text-field
103   - v-model="editedItem.motherCellNo"
104   - placeholder="fill your Mother Cell Number"
105   - type="number"
106   - required
107   - ></v-text-field>
108   - </v-flex>
109   - </v-layout>
110   - </v-flex>
111   - <v-flex xs12>
112   - <!-- EDIT MOTHER CELL NUMBER - HIDDEN AT xs and sm screen -->
113   - <v-layout>
114   - <v-flex xs3 sm4 class="pt-4 subheading">
115   - <label class="right">Mother Profession:</label>
116   - </v-flex>
117   - <v-flex xs8 sm6 class="ml-3">
118 102 <v-layout row wrap>
119 103 <v-flex md3 class="mt-3">
120 104 <vue-country-code @onSelect="onSelect" class="black--text"></vue-country-code>
121 105 </v-flex>
122 106 <v-flex md9>
123 107 <v-text-field
124   - v-model="editedItem.motherProfession"
125   - placeholder="fill your Mother Profession"
126   - type="text"
  108 + v-model="editedItem.motherCellNo"
  109 + placeholder="fill your Mother Cell Number"
  110 + type="number"
127 111 required
128 112 ></v-text-field>
129 113 </v-flex>
130 114 </v-layout>
131 115 </v-flex>
132 116 </v-layout>
  117 + </v-flex>
  118 + <v-flex xs12>
  119 + <!-- EDIT MOTHER CELL NUMBER - HIDDEN AT xs and sm screen -->
  120 + <v-layout>
  121 + <v-flex xs3 sm4 class="pt-4 subheading">
  122 + <label class="right">Mother Profession:</label>
  123 + </v-flex>
  124 + <v-flex xs8 sm6 class="ml-3">
  125 + <v-text-field
  126 + v-model="editedItem.motherProfession"
  127 + placeholder="fill your Mother Profession"
  128 + type="text"
  129 + required
  130 + ></v-text-field>
  131 + </v-flex>
  132 + </v-layout>
133 133 <v-layout>
134 134 <v-flex xs4 class="pt-4 subheading">
135 135 <label class="right">Password:</label>
... ... @@ -953,9 +953,9 @@ import moment from &quot;moment&quot;;
953 953 export default {
954 954 data: () => ({
955 955 /* EDIT FATHER CELL */
956   - editedFatherCellCode: '',
  956 + editedFatherCellCode: "",
957 957 /* ADD FATHER CELL */
958   - addedFatherCellCode: '',
  958 + addedFatherCellCode: "",
959 959 e1: true,
960 960 showParent: true,
961 961 snackbar: false,
... ... @@ -1082,12 +1082,12 @@ export default {
1082 1082 // console.log("country codes", name, iso2, dialCode);
1083 1083 // this.countryCode = iso2
1084 1084 },
1085   - editFatherCellCode({ name, iso2, dialCode }){
  1085 + editFatherCellCode({ name, iso2, dialCode }) {
1086 1086 // console.log("Edit father cell", name,iso2);
1087   - this.editedFatherCellCode = dialCode
  1087 + this.editedFatherCellCode = dialCode;
1088 1088 },
1089   - addFatherCellCode({ name, iso2, dialCode }){
1090   - this.addedFatherCellCode = dialCode
  1089 + addFatherCellCode({ name, iso2, dialCode }) {
  1090 + this.addedFatherCellCode = dialCode;
1091 1091 },
1092 1092 editItem(item) {
1093 1093 this.editedIndex = this.parentsList.indexOf(item);
... ... @@ -1168,29 +1168,29 @@ export default {
1168 1168 if (this.$refs.parentForm.validate()) {
1169 1169 this.parentData.role = "PARENT";
1170 1170 this.loading = true;
1171   - this.parentData.countryCode = this.addedFatherCellCode,
1172   - await http()
1173   - .post("/createParent", this.parentData)
1174   - .then((response) => {
1175   - this.parentId = response.data.data.id;
1176   - this.snackbar = true;
1177   - this.color = "green";
1178   - this.text = response.data.message;
1179   - this.getParentDetails();
1180   - this.clear();
1181   - this.loading = false;
1182   - this.isFatherCellExists = true;
1183   - this.addParentDialog = false;
1184   - })
1185   - .catch((error) => {
1186   - this.snackbar = true;
1187   - this.color = "error";
1188   - this.text = error.response.data.message;
1189   - if (error.response.data.statusText) {
1190   - this.text = error.response.data.statusText;
1191   - }
1192   - this.loading = false;
1193   - });
  1171 + (this.parentData.countryCode = this.addedFatherCellCode),
  1172 + await http()
  1173 + .post("/createParent", this.parentData)
  1174 + .then((response) => {
  1175 + this.parentId = response.data.data.id;
  1176 + this.snackbar = true;
  1177 + this.color = "green";
  1178 + this.text = response.data.message;
  1179 + this.getParentDetails();
  1180 + this.clear();
  1181 + this.loading = false;
  1182 + this.isFatherCellExists = true;
  1183 + this.addParentDialog = false;
  1184 + })
  1185 + .catch((error) => {
  1186 + this.snackbar = true;
  1187 + this.color = "error";
  1188 + this.text = error.response.data.message;
  1189 + if (error.response.data.statusText) {
  1190 + this.text = error.response.data.statusText;
  1191 + }
  1192 + this.loading = false;
  1193 + });
1194 1194 }
1195 1195 },
1196 1196 getParentDetails() {
... ...