/home/techb158/ileadtechnology.com/SSM/public/js/student
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/student/edit.js (75191B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[330],{Xcnk:function(t,e,a){"use strict";a.r(e);var s={components:{},props:["student"],data:function(){return{basicForm:new Form({first_name:"",middle_name:"",last_name:"",date_of_birth:"",gender:"",mother_tongue:"",unique_identification_number:"",birth_place:"",nationality:"",caste_id:"",category_id:"",religion_id:"",blood_group_id:"",custom_values:[],type:"basic"},!1),custom_fields:[],custom_values:[],castes:[],selected_caste:null,religions:[],selected_religion:null,blood_groups:[],selected_blood_group:null,categories:[],selected_category:null,genders:[],customFieldFormErrors:{}}},mounted:function(){helper.hasPermission("edit-student")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getPreRequisite(),this.get(this.student)},methods:{getPreRequisite:function(){var t=this,e=this.$loading.show();axios.get("/api/student/pre-requisite?form_type=student_basic").then((function(a){t.castes=a.castes,t.religions=a.religions,t.blood_groups=a.blood_groups,t.categories=a.categories,t.genders=a.genders,t.custom_fields=a.custom_fields,e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},updateCustomValues:function(t){this.basicForm.custom_values=t},get:function(t){this.basicForm.first_name=t.first_name,this.basicForm.middle_name=t.middle_name||"",this.basicForm.last_name=t.last_name||"",this.basicForm.date_of_birth=t.date_of_birth,this.basicForm.birth_place=t.birth_place,this.basicForm.nationality=t.nationality,this.basicForm.gender=t.gender,this.basicForm.unique_identification_number=t.unique_identification_number,this.basicForm.mother_tongue=t.mother_tongue,this.basicForm.caste_id=t.caste_id,this.basicForm.category_id=t.category_id,this.basicForm.religion_id=t.religion_id,this.basicForm.blood_group_id=t.blood_group_id,this.selected_caste=t.caste_id?{id:t.caste_id,name:t.caste.name}:null,this.selected_category=t.category_id?{id:t.category_id,name:t.category.name}:null,this.selected_religion=t.religion_id?{id:t.religion_id,name:t.religion.name}:null,this.selected_blood_group=t.blood_group_id?{id:t.blood_group_id,name:t.blood_group.name}:null,this.custom_values=t.options&&t.options.hasOwnProperty("custom_values")?t.options.custom_values:[]},submit:function(){var t=this,e=this.$loading.show();this.basicForm.patch("/api/student/"+this.student.uuid).then((function(a){t.$emit("complete"),toastr.success(a.message),e.hide()})).catch((function(a){e.hide(),t.customFieldFormErrors=a,helper.showErrorMsg(a)}))},onCasteSelect:function(t){this.basicForm.caste_id=t.id},onCategorySelect:function(t){this.basicForm.category_id=t.id},onReligionSelect:function(t){this.basicForm.religion_id=t.id},onBloodGroupSelect:function(t){this.basicForm.blood_group_id=t.id}},watch:{student:function(t){this.get(t)}}},r=a("KHd+"),n=Object(r.a)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("form",{on:{submit:function(e){return e.preventDefault(),t.submit(e)},keydown:function(e){return t.basicForm.errors.clear(e.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_name")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.basicForm.first_name,expression:"basicForm.first_name"}],staticClass:"form-control",attrs:{type:"text",name:"first_name",placeholder:t.trans("student.first_name")},domProps:{value:t.basicForm.first_name},on:{input:function(e){e.target.composing||t.$set(t.basicForm,"first_name",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"first_name"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.middle_name")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.basicForm.middle_name,expression:"basicForm.middle_name"}],staticClass:"form-control",attrs:{type:"text",name:"middle_name",placeholder:t.trans("student.middle_name")},domProps:{value:t.basicForm.middle_name},on:{input:function(e){e.target.composing||t.$set(t.basicForm,"middle_name",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"middle_name"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.last_name")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.basicForm.last_name,expression:"basicForm.last_name"}],staticClass:"form-control",attrs:{type:"text",name:"last_name",placeholder:t.trans("student.last_name")},domProps:{value:t.basicForm.last_name},on:{input:function(e){e.target.composing||t.$set(t.basicForm,"last_name",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"last_name"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.gender")))]),t._v(" "),a("div",{staticClass:"radio radio-info p-l-0"},t._l(t.genders,(function(e){return a("div",{staticClass:"form-check form-check-inline "},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.basicForm.gender,expression:"basicForm.gender"}],staticClass:"form-check-input",attrs:{type:"radio",id:e.id,name:"gender"},domProps:{value:e.id,checked:t.basicForm.gender==e.id,checked:t._q(t.basicForm.gender,e.id)},on:{click:function(e){return t.basicForm.errors.clear("gender")},change:function(a){return t.$set(t.basicForm,"gender",e.id)}}}),t._v(" "),a("label",{staticClass:"form-check-label",attrs:{for:e.id}},[t._v(" "+t._s(t.trans("list."+e.id)))])])})),0),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"gender"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.date_of_birth")))]),t._v(" "),a("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("student.date_of_birth")},on:{selected:function(e){return t.basicForm.errors.clear("date_of_birth")}},model:{value:t.basicForm.date_of_birth,callback:function(e){t.$set(t.basicForm,"date_of_birth",e)},expression:"basicForm.date_of_birth"}}),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"date_of_birth"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.birth_place")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.basicForm.birth_place,expression:"basicForm.birth_place"}],staticClass:"form-control",attrs:{type:"text",name:"birth_place",placeholder:t.trans("student.birth_place")},domProps:{value:t.basicForm.birth_place},on:{input:function(e){e.target.composing||t.$set(t.basicForm,"birth_place",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"birth_place"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.unique_identification_number")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.basicForm.unique_identification_number,expression:"basicForm.unique_identification_number"}],staticClass:"form-control",attrs:{type:"text",name:"unique_identification_number",placeholder:t.trans("student.unique_identification_number")},domProps:{value:t.basicForm.unique_identification_number},on:{input:function(e){e.target.composing||t.$set(t.basicForm,"unique_identification_number",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"unique_identification_number"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.nationality")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.basicForm.nationality,expression:"basicForm.nationality"}],staticClass:"form-control",attrs:{type:"text",name:"nationality",placeholder:t.trans("student.nationality")},domProps:{value:t.basicForm.nationality},on:{input:function(e){e.target.composing||t.$set(t.basicForm,"nationality",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"nationality"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.mother_tongue")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.basicForm.mother_tongue,expression:"basicForm.mother_tongue"}],staticClass:"form-control",attrs:{type:"text",name:"mother_tongue",placeholder:t.trans("student.mother_tongue")},domProps:{value:t.basicForm.mother_tongue},on:{input:function(e){e.target.composing||t.$set(t.basicForm,"mother_tongue",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"mother_tongue"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("misc.caste")))]),t._v(" "),a("v-select",{attrs:{label:"name",name:"caste_id",id:"caste_id",options:t.castes,placeholder:t.trans("misc.select_caste")},on:{select:t.onCasteSelect,close:function(e){return t.basicForm.errors.clear("caste_id")},remove:function(e){t.basicForm.caste_id=""}},model:{value:t.selected_caste,callback:function(e){t.selected_caste=e},expression:"selected_caste"}},[t.castes.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"caste_id"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("misc.category")))]),t._v(" "),a("v-select",{attrs:{label:"name",name:"category_id",id:"category_id",options:t.categories,placeholder:t.trans("misc.select_category")},on:{select:t.onCategorySelect,close:function(e){return t.basicForm.errors.clear("category_id")},remove:function(e){t.basicForm.category_id=""}},model:{value:t.selected_category,callback:function(e){t.selected_category=e},expression:"selected_category"}},[t.categories.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"category_id"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("misc.religion")))]),t._v(" "),a("v-select",{attrs:{label:"name",name:"religion_id",id:"religion_id",options:t.religions,placeholder:t.trans("misc.select_religion")},on:{select:t.onReligionSelect,close:function(e){return t.basicForm.errors.clear("religion_id")},remove:function(e){t.basicForm.religion_id=""}},model:{value:t.selected_religion,callback:function(e){t.selected_religion=e},expression:"selected_religion"}},[t.religions.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"religion_id"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("misc.blood_group")))]),t._v(" "),a("v-select",{attrs:{label:"name",name:"blood_group_id",id:"blood_group_id",options:t.blood_groups,placeholder:t.trans("misc.select_blood_group")},on:{select:t.onBloodGroupSelect,close:function(e){return t.basicForm.errors.clear("blood_group_id")},remove:function(e){t.basicForm.blood_group_id=""}},model:{value:t.selected_blood_group,callback:function(e){t.selected_blood_group=e},expression:"selected_blood_group"}},[t.blood_groups.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),a("show-error",{attrs:{"form-name":t.basicForm,"prop-name":"blood_group_id"}})],1)])]),t._v(" "),a("custom-field",{attrs:{fields:t.custom_fields,customValues:t.custom_values,formErrors:t.customFieldFormErrors},on:{updateCustomValues:t.updateCustomValues}}),t._v(" "),a("div",{staticClass:"card-footer text-right"},[a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null).exports,o={components:{},props:["student"],data:function(){return{parentForm:new Form({first_guardian_name:null,first_guardian_relation:null,second_guardian_name:null,second_guardian_relation:null,first_guardian_email:null,second_guardian_email:null,first_guardian_date_of_birth:null,second_guardian_date_of_birth:null,first_guardian_qualification:null,second_guardian_qualification:null,first_guardian_occupation:null,second_guardian_occupation:null,first_guardian_annual_income:null,second_guardian_annual_income:null,first_guardian_contact_number_1:null,second_guardian_contact_number_1:null,first_guardian_contact_number_2:null,second_guardian_contact_number_2:null,first_guardian_unique_identification_number:null,second_guardian_unique_identification_number:null,type:"parent",custom_values:[]},!1),first_guardian_photo:"",second_guardian_photo:"",student_parents:[],editParentForm:new Form({student_parent_id:""}),selected_student_parent:null,guardian_relations:[],custom_fields:[],custom_values:[],clearCustomField:!1,customFieldFormErrors:{}}},mounted:function(){helper.hasPermission("edit-student")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getParents()},methods:{updateCustomValues:function(t){this.parentForm.custom_values=t},onStudentParentSelect:function(t){this.editParentForm.student_parent_id=t.id},getParents:function(){var t=this,e=this.$loading.show();axios.get("/api/student/pre-requisite?form_type=student_parent").then((function(a){t.custom_fields=a.custom_fields,t.student_parents=a.student_parents,t.guardian_relations=a.guardian_relations,t.get(t.student),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},get:function(t){var e=t.parent;e&&(this.parentForm.first_guardian_name=e.first_guardian_name,this.parentForm.first_guardian_relation=e.first_guardian_relation,this.parentForm.second_guardian_name=e.second_guardian_name,this.parentForm.second_guardian_relation=e.second_guardian_relation,this.parentForm.first_guardian_date_of_birth=e.first_guardian_date_of_birth,this.parentForm.second_guardian_date_of_birth=e.second_guardian_date_of_birth,this.parentForm.first_guardian_qualification=e.first_guardian_qualification,this.parentForm.second_guardian_qualification=e.second_guardian_qualification,this.parentForm.first_guardian_occupation=e.first_guardian_occupation,this.parentForm.second_guardian_occupation=e.second_guardian_occupation,this.parentForm.first_guardian_annual_income=e.first_guardian_annual_income,this.parentForm.second_guardian_annual_income=e.second_guardian_annual_income,this.parentForm.first_guardian_email=e.first_guardian_email,this.parentForm.second_guardian_email=e.second_guardian_email,this.parentForm.first_guardian_contact_number_1=e.first_guardian_contact_number_1,this.parentForm.second_guardian_contact_number_1=e.second_guardian_contact_number_1,this.parentForm.first_guardian_contact_number_2=e.first_guardian_contact_number_2,this.parentForm.second_guardian_contact_number_2=e.second_guardian_contact_number_2,this.parentForm.first_guardian_unique_identification_number=e.first_guardian_unique_identification_number,this.parentForm.second_guardian_unique_identification_number=e.second_guardian_unique_identification_number,this.first_guardian_photo=e.first_guardian_photo,this.second_guardian_photo=e.second_guardian_photo,this.custom_values=e.options&&e.options.hasOwnProperty("custom_values")?e.options.custom_values:[])},submit:function(){var t=this,e=this.$loading.show();this.parentForm.patch("/api/student/"+this.student.uuid).then((function(a){t.$emit("complete"),toastr.success(a.message),e.hide()})).catch((function(a){e.hide(),t.customFieldFormErrors=a,helper.showErrorMsg(a)}))},updateParent:function(){var t=this,e=this.$loading.show();this.editParentForm.post("/api/student/"+this.student.uuid+"/parent").then((function(a){t.$emit("completed"),toastr.success(a.message),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},updateFirstGuardian:function(){},updateSecondGuardian:function(){}},watch:{student:function(t){this.get(t)}}},i=Object(r.a)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("form",{on:{submit:function(e){return e.preventDefault(),t.updateParent(e)},keydown:function(e){return t.editParentForm.errors.clear(e.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.edit_parent")))]),t._v(" "),a("v-select",{attrs:{label:"name",name:"student_parent_id",id:"student_parent_id",options:t.student_parents,placeholder:t.trans("student.select_parent")},on:{select:t.onStudentParentSelect,close:function(e){return t.editParentForm.errors.clear("student_parent_id")},remove:function(e){t.editParentForm.student_parent_id=""}},model:{value:t.selected_student_parent,callback:function(e){t.selected_student_parent=e},expression:"selected_student_parent"}},[t.student_parents.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),a("show-error",{attrs:{"form-name":t.editParentForm,"prop-name":"student_parent_id"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("button",{staticClass:"btn btn-info waves-effect waves-light pull-right",attrs:{type:"submit"}},[t._v(t._s(t.trans("general.save")))])])])]),t._v(" "),a("hr"),t._v(" "),a("form",{on:{submit:function(e){return e.preventDefault(),t.submit(e)},keydown:function(e){return t.parentForm.errors.clear(e.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("general.relation")))]),t._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.first_guardian_relation,expression:"parentForm.first_guardian_relation"}],staticClass:"custom-select col-12",attrs:{name:"first_guardian_relation"},on:{change:[function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.parentForm,"first_guardian_relation",e.target.multiple?a:a[0])},function(e){return t.parentForm.errors.clear("first_guardian_relation")}]}},[a("option",{attrs:{value:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.guardian_relations,(function(e){return a("option",{domProps:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])}))],2),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_relation"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("general.relation")))]),t._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.second_guardian_relation,expression:"parentForm.second_guardian_relation"}],staticClass:"custom-select col-12",attrs:{name:"second_guardian_relation"},on:{change:[function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.parentForm,"second_guardian_relation",e.target.multiple?a:a[0])},function(e){return t.parentForm.errors.clear("second_guardian_relation")}]}},[a("option",{attrs:{value:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.guardian_relations,(function(e){return a("option",{domProps:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])}))],2),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_relation"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_guardian_name")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.first_guardian_name,expression:"parentForm.first_guardian_name"}],staticClass:"form-control",attrs:{type:"text",name:"first_guardian_name",placeholder:t.trans("student.first_guardian_name")},domProps:{value:t.parentForm.first_guardian_name},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"first_guardian_name",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_name"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.second_guardian_name")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.second_guardian_name,expression:"parentForm.second_guardian_name"}],staticClass:"form-control",attrs:{type:"text",name:"second_guardian_name",placeholder:t.trans("student.second_guardian_name")},domProps:{value:t.parentForm.second_guardian_name},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"second_guardian_name",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_name"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_guardian_date_of_birth")))]),t._v(" "),a("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("student.first_guardian_date_of_birth")},on:{selected:function(e){return t.parentForm.errors.clear("first_guardian_date_of_birth")}},model:{value:t.parentForm.first_guardian_date_of_birth,callback:function(e){t.$set(t.parentForm,"first_guardian_date_of_birth",e)},expression:"parentForm.first_guardian_date_of_birth"}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_date_of_birth"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.second_guardian_date_of_birth")))]),t._v(" "),a("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("student.second_guardian_date_of_birth")},on:{selected:function(e){return t.parentForm.errors.clear("second_guardian_date_of_birth")}},model:{value:t.parentForm.second_guardian_date_of_birth,callback:function(e){t.$set(t.parentForm,"second_guardian_date_of_birth",e)},expression:"parentForm.second_guardian_date_of_birth"}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_date_of_birth"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_guardian_qualification")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.first_guardian_qualification,expression:"parentForm.first_guardian_qualification"}],staticClass:"form-control",attrs:{type:"text",name:"first_guardian_qualification",placeholder:t.trans("student.first_guardian_qualification")},domProps:{value:t.parentForm.first_guardian_qualification},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"first_guardian_qualification",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_qualification"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.second_guardian_qualification")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.second_guardian_qualification,expression:"parentForm.second_guardian_qualification"}],staticClass:"form-control",attrs:{type:"text",name:"second_guardian_qualification",placeholder:t.trans("student.second_guardian_qualification")},domProps:{value:t.parentForm.second_guardian_qualification},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"second_guardian_qualification",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_qualification"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_guardian_occupation")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.first_guardian_occupation,expression:"parentForm.first_guardian_occupation"}],staticClass:"form-control",attrs:{type:"text",name:"first_guardian_occupation",placeholder:t.trans("student.first_guardian_occupation")},domProps:{value:t.parentForm.first_guardian_occupation},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"first_guardian_occupation",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_occupation"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.second_guardian_occupation")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.second_guardian_occupation,expression:"parentForm.second_guardian_occupation"}],staticClass:"form-control",attrs:{type:"text",name:"second_guardian_occupation",placeholder:t.trans("student.second_guardian_occupation")},domProps:{value:t.parentForm.second_guardian_occupation},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"second_guardian_occupation",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_occupation"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_guardian_annual_income")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.first_guardian_annual_income,expression:"parentForm.first_guardian_annual_income"}],staticClass:"form-control",attrs:{type:"text",name:"first_guardian_annual_income",placeholder:t.trans("student.first_guardian_annual_income")},domProps:{value:t.parentForm.first_guardian_annual_income},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"first_guardian_annual_income",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_annual_income"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.second_guardian_annual_income")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.second_guardian_annual_income,expression:"parentForm.second_guardian_annual_income"}],staticClass:"form-control",attrs:{type:"text",name:"second_guardian_annual_income",placeholder:t.trans("student.second_guardian_annual_income")},domProps:{value:t.parentForm.second_guardian_annual_income},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"second_guardian_annual_income",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_annual_income"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_guardian_email")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.first_guardian_email,expression:"parentForm.first_guardian_email"}],staticClass:"form-control",attrs:{type:"text",name:"first_guardian_email",placeholder:t.trans("student.first_guardian_email")},domProps:{value:t.parentForm.first_guardian_email},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"first_guardian_email",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_email"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.second_guardian_email")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.second_guardian_email,expression:"parentForm.second_guardian_email"}],staticClass:"form-control",attrs:{type:"text",name:"second_guardian_email",placeholder:t.trans("student.second_guardian_email")},domProps:{value:t.parentForm.second_guardian_email},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"second_guardian_email",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_email"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_guardian_contact_number_1")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.first_guardian_contact_number_1,expression:"parentForm.first_guardian_contact_number_1"}],staticClass:"form-control",attrs:{type:"text",name:"first_guardian_contact_number_1",placeholder:t.trans("student.first_guardian_contact_number_1")},domProps:{value:t.parentForm.first_guardian_contact_number_1},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"first_guardian_contact_number_1",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_contact_number_1"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.second_guardian_contact_number_1")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.second_guardian_contact_number_1,expression:"parentForm.second_guardian_contact_number_1"}],staticClass:"form-control",attrs:{type:"text",name:"second_guardian_contact_number_1",placeholder:t.trans("student.second_guardian_contact_number_1")},domProps:{value:t.parentForm.second_guardian_contact_number_1},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"second_guardian_contact_number_1",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_contact_number_1"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_guardian_contact_number_2")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.first_guardian_contact_number_2,expression:"parentForm.first_guardian_contact_number_2"}],staticClass:"form-control",attrs:{type:"text",name:"first_guardian_contact_number_2",placeholder:t.trans("student.first_guardian_contact_number_2")},domProps:{value:t.parentForm.first_guardian_contact_number_2},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"first_guardian_contact_number_2",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_contact_number_2"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.second_guardian_contact_number_2")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.second_guardian_contact_number_2,expression:"parentForm.second_guardian_contact_number_2"}],staticClass:"form-control",attrs:{type:"text",name:"second_guardian_contact_number_2",placeholder:t.trans("student.second_guardian_contact_number_2")},domProps:{value:t.parentForm.second_guardian_contact_number_2},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"second_guardian_contact_number_2",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_contact_number_2"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_guardian_unique_identification_number")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.first_guardian_unique_identification_number,expression:"parentForm.first_guardian_unique_identification_number"}],staticClass:"form-control",attrs:{type:"text",name:"first_guardian_unique_identification_number",placeholder:t.trans("student.first_guardian_unique_identification_number")},domProps:{value:t.parentForm.first_guardian_unique_identification_number},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"first_guardian_unique_identification_number",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"first_guardian_unique_identification_number"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.second_guardian_unique_identification_number")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.parentForm.second_guardian_unique_identification_number,expression:"parentForm.second_guardian_unique_identification_number"}],staticClass:"form-control",attrs:{type:"text",name:"second_guardian_unique_identification_number",placeholder:t.trans("student.second_guardian_unique_identification_number")},domProps:{value:t.parentForm.second_guardian_unique_identification_number},on:{input:function(e){e.target.composing||t.$set(t.parentForm,"second_guardian_unique_identification_number",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.parentForm,"prop-name":"second_guardian_unique_identification_number"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("upload-image",{attrs:{id:"first_guardian_photo","upload-path":"/student/first-guardian/photo/"+t.student.uuid,"remove-path":"/student/first-guardian/photo/remove/"+t.student.uuid,"image-source":t.first_guardian_photo},on:{uploaded:t.updateFirstGuardian,removed:t.updateFirstGuardian}})],1),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("upload-image",{attrs:{id:"second_guardian_photo","upload-path":"/student/second-guardian/photo/"+t.student.uuid,"remove-path":"/student/second-guardian/photo/remove/"+t.student.uuid,"image-source":t.second_guardian_photo},on:{uploaded:t.updateSecondGuardian,removed:t.updateSecondGuardian}})],1)]),t._v(" "),a("custom-field",{attrs:{fields:t.custom_fields,customValues:t.custom_values,clear:t.clearCustomField,formErrors:t.customFieldFormErrors},on:{updateCustomValues:t.updateCustomValues}}),t._v(" "),a("div",{staticClass:"card-footer text-right"},[a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null).exports,c={components:{},props:["student"],data:function(){return{contactForm:new Form({contact_number:"",email:"",present_address_line_1:"",present_address_line_2:"",present_city:"",present_state:"",present_zipcode:"",present_country:"",same_as_present_address:!1,permanent_address_line_1:"",permanent_address_line_2:"",permanent_city:"",permanent_state:"",permanent_zipcode:"",permanent_country:"",emergency_contact_name:"",emergency_contact_number:"",custom_values:[],type:"contact"},!1),custom_fields:[],custom_values:[],customFieldFormErrors:{}}},mounted:function(){helper.hasPermission("edit-student")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getPreRequisite()},methods:{getPreRequisite:function(){var t=this,e=this.$loading.show();axios.get("/api/student/pre-requisite?form_type=student_contact").then((function(a){t.custom_fields=a.custom_fields,t.get(t.student),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},updateCustomValues:function(t){this.contactForm.custom_values=t},updatePermanentAddress:function(){this.contactForm.permanent_address_line_1=this.contactForm.present_address_line_1,this.contactForm.permanent_address_line_2=this.contactForm.present_address_line_2,this.contactForm.permanent_city=this.contactForm.present_city,this.contactForm.permanent_state=this.contactForm.present_state,this.contactForm.permanent_zipcode=this.contactForm.present_zipcode,this.contactForm.permanent_country=this.contactForm.present_country},get:function(t){this.contactForm.contact_number=t.contact_number,this.contactForm.email=t.email,this.contactForm.present_address_line_1=t.present_address_line_1,this.contactForm.present_address_line_2=t.present_address_line_2,this.contactForm.present_city=t.present_city,this.contactForm.present_state=t.present_state,this.contactForm.present_zipcode=t.present_zipcode,this.contactForm.present_country=t.present_country,this.contactForm.same_as_present_address=t.same_as_present_address,this.contactForm.permanent_address_line_1=t.permanent_address_line_1,this.contactForm.permanent_address_line_2=t.permanent_address_line_2,this.contactForm.permanent_city=t.permanent_city,this.contactForm.permanent_state=t.permanent_state,this.contactForm.permanent_zipcode=t.permanent_zipcode,this.contactForm.permanent_country=t.permanent_country,this.contactForm.emergency_contact_name=t.emergency_contact_name,this.contactForm.emergency_contact_number=t.emergency_contact_number,this.custom_values=t.options&&t.options.hasOwnProperty("custom_values")?t.options.custom_values:[]},submit:function(){var t=this,e=this.$loading.show();this.contactForm.patch("/api/student/"+this.student.uuid).then((function(a){t.$emit("complete"),toastr.success(a.message),e.hide()})).catch((function(a){e.hide(),t.customFieldFormErrors=a,helper.showErrorMsg(a)}))}},watch:{student:function(t){this.get(t)}}},l=Object(r.a)(c,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("form",{on:{submit:function(e){return e.preventDefault(),t.submit(e)},keydown:function(e){return t.contactForm.errors.clear(e.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.contact_number")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.contact_number,expression:"contactForm.contact_number"}],staticClass:"form-control",attrs:{type:"text",name:"contact_number",placeholder:t.trans("student.contact_number")},domProps:{value:t.contactForm.contact_number},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"contact_number",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"contact_number"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.email")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.email,expression:"contactForm.email"}],staticClass:"form-control",attrs:{type:"text",name:"email",placeholder:t.trans("student.email")},domProps:{value:t.contactForm.email},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"email",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"email"}})],1)])]),t._v(" "),a("hr"),t._v(" "),a("h5",{staticClass:"card-title"},[t._v(t._s(t.trans("student.emergency_contact")))]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.emergency_contact_name")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.emergency_contact_name,expression:"contactForm.emergency_contact_name"}],staticClass:"form-control",attrs:{type:"text",name:"emergency_contact_name",placeholder:t.trans("student.emergency_contact_name")},domProps:{value:t.contactForm.emergency_contact_name},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"emergency_contact_name",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"emergency_contact_name"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.emergency_contact_number")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.emergency_contact_number,expression:"contactForm.emergency_contact_number"}],staticClass:"form-control",attrs:{type:"text",name:"emergency_contact_number",placeholder:t.trans("student.emergency_contact_number")},domProps:{value:t.contactForm.emergency_contact_number},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"emergency_contact_number",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"emergency_contact_number"}})],1)])]),t._v(" "),a("hr"),t._v(" "),a("h5",{staticClass:"card-title"},[t._v(t._s(t.trans("student.present_address")))]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.address_line_1")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.present_address_line_1,expression:"contactForm.present_address_line_1"}],staticClass:"form-control",attrs:{type:"text",name:"present_address_line_1",placeholder:t.trans("student.address_line_1")},domProps:{value:t.contactForm.present_address_line_1},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"present_address_line_1",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"present_address_line_1"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.address_line_2")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.present_address_line_2,expression:"contactForm.present_address_line_2"}],staticClass:"form-control",attrs:{type:"text",name:"present_address_line_2",placeholder:t.trans("student.address_line_2")},domProps:{value:t.contactForm.present_address_line_2},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"present_address_line_2",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"present_address_line_2"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.city")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.present_city,expression:"contactForm.present_city"}],staticClass:"form-control",attrs:{type:"text",name:"present_city",placeholder:t.trans("student.city")},domProps:{value:t.contactForm.present_city},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"present_city",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"present_city"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.state")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.present_state,expression:"contactForm.present_state"}],staticClass:"form-control",attrs:{type:"text",name:"present_state",placeholder:t.trans("student.state")},domProps:{value:t.contactForm.present_state},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"present_state",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"present_state"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.zipcode")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.present_zipcode,expression:"contactForm.present_zipcode"}],staticClass:"form-control",attrs:{type:"text",name:"present_zipcode",placeholder:t.trans("student.zipcode")},domProps:{value:t.contactForm.present_zipcode},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"present_zipcode",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"present_zipcode"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.country")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.present_country,expression:"contactForm.present_country"}],staticClass:"form-control",attrs:{type:"text",name:"present_country",placeholder:t.trans("student.country")},domProps:{value:t.contactForm.present_country},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"present_country",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"present_country"}})],1)])]),t._v(" "),a("hr"),t._v(" "),a("h5",{staticClass:"card-title"},[t._v(t._s(t.trans("student.permanent_address")))]),t._v(" "),a("div",{staticClass:"form-group"},[a("switches",{staticClass:"m-l-20",attrs:{theme:"bootstrap",color:"success"},nativeOn:{change:function(e){return t.updatePermanentAddress(e)}},model:{value:t.contactForm.same_as_present_address,callback:function(e){t.$set(t.contactForm,"same_as_present_address",e)},expression:"contactForm.same_as_present_address"}}),t._v(" "+t._s(t.trans("student.same_as_present_address"))+"\n\t ")],1),t._v(" "),t.contactForm.same_as_present_address?t._e():a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.address_line_1")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.permanent_address_line_1,expression:"contactForm.permanent_address_line_1"}],staticClass:"form-control",attrs:{type:"text",name:"permanent_address_line_1",placeholder:t.trans("student.address_line_1")},domProps:{value:t.contactForm.permanent_address_line_1},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"permanent_address_line_1",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"permanent_address_line_1"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.address_line_2")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.permanent_address_line_2,expression:"contactForm.permanent_address_line_2"}],staticClass:"form-control",attrs:{type:"text",name:"permanent_address_line_2",placeholder:t.trans("student.address_line_2")},domProps:{value:t.contactForm.permanent_address_line_2},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"permanent_address_line_2",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"permanent_address_line_2"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.city")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.permanent_city,expression:"contactForm.permanent_city"}],staticClass:"form-control",attrs:{type:"text",name:"permanent_city",placeholder:t.trans("student.city")},domProps:{value:t.contactForm.permanent_city},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"permanent_city",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"permanent_city"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.state")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.permanent_state,expression:"contactForm.permanent_state"}],staticClass:"form-control",attrs:{type:"text",name:"permanent_state",placeholder:t.trans("student.state")},domProps:{value:t.contactForm.permanent_state},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"permanent_state",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"permanent_state"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.zipcode")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.permanent_zipcode,expression:"contactForm.permanent_zipcode"}],staticClass:"form-control",attrs:{type:"text",name:"permanent_zipcode",placeholder:t.trans("student.zipcode")},domProps:{value:t.contactForm.permanent_zipcode},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"permanent_zipcode",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"permanent_zipcode"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.country")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.contactForm.permanent_country,expression:"contactForm.permanent_country"}],staticClass:"form-control",attrs:{type:"text",name:"permanent_country",placeholder:t.trans("student.country")},domProps:{value:t.contactForm.permanent_country},on:{input:function(e){e.target.composing||t.$set(t.contactForm,"permanent_country",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.contactForm,"prop-name":"permanent_country"}})],1)])]),t._v(" "),a("custom-field",{attrs:{fields:t.custom_fields,customValues:t.custom_values,formErrors:t.customFieldFormErrors},on:{updateCustomValues:t.updateCustomValues}}),t._v(" "),a("div",{staticClass:"card-footer text-right"},[a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null).exports,d=a("zVuu"),_=a("O2oq"),u=a("5/cv"),m=a("Mk/M"),p=a("1SQT"),v=a("VOv9"),f=a("ljPE"),g={components:{basicForm:n,parentForm:i,contactForm:l,documentDetail:d.a,accountDetail:_.a,qualificationDetail:u.a,terminationDetail:m.a,siblingDetail:v.a,promotionDetail:p.a,loginDetail:f.a},data:function(){return{uuid:this.$route.params.uuid,student:{},photo:"",tab:""}},mounted:function(){helper.hasPermission("edit-student")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getStudent(),helper.showDemoNotification(["student"])},methods:{hasPermission:function(t){return helper.hasPermission(t)},getConfig:function(t){return helper.getConfig(t)},getStudent:function(){var t=this,e=this.$loading.show();axios.get("/api/student/"+this.uuid).then((function(a){t.student=a,t.photo=t.student.student_photo,e.hide()})).catch((function(a){e.hide(),helper.showErrorMsg(a),t.$router.push("/dashboard")}))},getStudentName:function(){return helper.getStudentName(this.student)},updatePhoto:function(t){},getStatus:function(t){return t?t.date_of_exit?'
'+i18n.student.student_status_not_terminated+"":'
'+i18n.student.student_status_not_studying+"":'
'+i18n.student.student_status_not_admitted+""}},computed:{getDefaultAcademicSession:function(){return helper.getDefaultAcademicSession()},currentStudentRecords:function(){return this.student.student_records.filter((function(t){return t.academic_session_id===helper.getDefaultAcademicSession().id}))}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)}},watch:{"$route.params.uuid":function(t){this.uuid=t,this.getStudent()}}},h=Object(r.a)(g,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.student.id?a("div",{staticClass:"page-titles"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("student.student_detail"))+"\n "),a("span",{staticClass:"card-subtitle"},[t._v(t._s(t.getStudentName(t.student)))])])]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"action-buttons pull-right"},[a("router-link",{staticClass:"btn btn-info btn-sm",attrs:{to:"/student/card-view"}},[a("i",{staticClass:"fas fa-list"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("student.student")))])]),t._v(" "),t.student.student_records.length?a("div",{staticClass:"btn-group"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.more_option"),expression:"trans('general.more_option')"}],staticClass:"btn btn-info btn-sm dropdown-toggle no-caret ",attrs:{type:"button",role:"menu",id:"moreOption","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[a("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),a("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},t._l(t.student.student_records,(function(e){return a("button",{staticClass:"dropdown-item custom-dropdown",on:{click:function(a){return t.$router.push("/student/"+t.student.uuid+"/fee/"+e.id)}}},[a("i",{staticClass:"fas fa-file"}),t._v(" "+t._s(e.batch.course.name)+" "+t._s(t.trans("finance.fee_allocation")))])})),0)]):t._e()],1)])])]):t._e(),t._v(" "),a("div",{staticClass:"container-fluid"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-8 p-0"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-body"},[t.student.id?a("div",{staticClass:"accordion",attrs:{id:"accordion"}},[a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"basic","data-toggle":"collapse","data-target":"#collapseBasic","aria-expanded":"false","aria-controls":"collapseBasic"},on:{click:function(e){t.tab="basic"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-graduation-cap fa-fix-w-32"}),t._v(" "+t._s(t.trans("student.basic_information")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapseBasic","aria-labelledby":"basic","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["basic"==t.tab?a("basic-form",{attrs:{student:t.student}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"parent","data-toggle":"collapse","data-target":"#collapseParent","aria-expanded":"false","aria-controls":"collapseParent"},on:{click:function(e){t.tab="parent"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-users fa-fix-w-32"}),t._v(" "+t._s(t.trans("student.parent_information")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapseParent","aria-labelledby":"parent","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["parent"==t.tab?a("parent-form",{attrs:{student:t.student},on:{completed:t.getStudent}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"contact","data-toggle":"collapse","data-target":"#collapseContact","aria-expanded":"false","aria-controls":"collapseContact"},on:{click:function(e){t.tab="contact"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-address-book fa-fix-w-32"}),t._v(" "+t._s(t.trans("student.contact_information")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapseContact","aria-labelledby":"contact","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["contact"==t.tab?a("contact-form",{attrs:{student:t.student}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"document","data-toggle":"collapse","data-target":"#collapseDocument","aria-expanded":"false","aria-controls":"collapseDocument"},on:{click:function(e){t.tab="document"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-folder fa-fix-w-32"}),t._v(" "+t._s(t.trans("student.document_information")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapseDocument","aria-labelledby":"document","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["document"==t.tab?a("document-detail",{attrs:{student:t.student}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"qualification","data-toggle":"collapse","data-target":"#collapseQualification","aria-expanded":"false","aria-controls":"collapseQualification"},on:{click:function(e){t.tab="qualification"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-book fa-fix-w-32"}),t._v(" "+t._s(t.trans("student.qualification_information")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapseQualification","aria-labelledby":"qualification","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["qualification"==t.tab?a("qualification-detail",{attrs:{student:t.student}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"sibling","data-toggle":"collapse","data-target":"#collapseSibling","aria-expanded":"false","aria-controls":"collapseSibling"},on:{click:function(e){t.tab="sibling"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-people-carry fa-fix-w-32"}),t._v(" "+t._s(t.trans("student.sibling_information")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapseSibling","aria-labelledby":"sibling","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["sibling"==t.tab?a("sibling-detail",{attrs:{student:t.student}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"account","data-toggle":"collapse","data-target":"#collapseAccount","aria-expanded":"false","aria-controls":"collapseAccount"},on:{click:function(e){t.tab="account"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-university fa-fix-w-32"}),t._v(" "+t._s(t.trans("student.account_information")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapseAccount","aria-labelledby":"account","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["account"==t.tab?a("account-detail",{attrs:{student:t.student}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"login","data-toggle":"collapse","data-target":"#collapseUserLogin","aria-expanded":"false","aria-controls":"collapseUserLogin"},on:{click:function(e){t.tab="login"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-sign-in-alt fa-fix-w-32"}),t._v(" "+t._s(t.trans("auth.user_login")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapseUserLogin","aria-labelledby":"login","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["login"==t.tab?a("login-detail",{attrs:{student:t.student,footer:!0},on:{completed:t.getStudent}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"promotion","data-toggle":"collapse","data-target":"#collapsePromotion","aria-expanded":"false","aria-controls":"collapsePromotion"},on:{click:function(e){t.tab="promotion"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-chart-line fa-fix-w-32"}),t._v(" "+t._s(t.trans("student.promotion_history")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapsePromotion","aria-labelledby":"promotion","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["promotion"==t.tab?a("promotion-detail",{attrs:{student:t.student},on:{completed:t.getStudent}}):t._e()],1)])]),t._v(" "),a("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[a("div",{staticClass:"card-header collapsed",attrs:{id:"termination","data-toggle":"collapse","data-target":"#collapseTermination","aria-expanded":"false","aria-controls":"collapseTermination"},on:{click:function(e){t.tab="termination"}}},[a("h5",[a("i",{staticClass:"fas fa-lg fa-sign-out-alt fa-fix-w-32"}),t._v(" "+t._s(t.trans("student.termination_history")))])]),t._v(" "),a("div",{staticClass:"collapse",attrs:{id:"collapseTermination","aria-labelledby":"termination","data-parent":"#accordion"}},[a("div",{staticClass:"card-body"},["termination"==t.tab?a("termination-detail",{attrs:{student:t.student},on:{completed:t.getStudent}}):t._e()],1)])])]):t._e()])])]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4 hidden-sm-down p-0 border-left"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-body p-r-20"},[t.hasPermission("edit-student")?a("div",{staticClass:"m-2"},[a("upload-image",{attrs:{id:"photo","upload-path":"/student/self/photo/"+t.student.uuid,"remove-path":"/student/self/photo/remove/"+t.student.uuid,"image-source":t.photo},on:{uploaded:t.updatePhoto,removed:t.updatePhoto}})],1):t._e(),t._v(" "),t.student.id?a("div",{staticClass:"table-responsive"},[a("table",{staticClass:"table table-sm custom-show-table"},[a("tbody",[a("tr",[a("td",[t._v(t._s(t.trans("student.name")))]),t._v(" "),a("td",[t._v(t._s(t.getStudentName(t.student)))])]),t._v(" "),a("tr",[a("td",[t._v(t._s(t.trans("student.father_name")))]),t._v(" "),a("td",[t._v(t._s(t.student.parent?t.student.parent.father_name:""))])]),t._v(" "),a("tr",[a("td",[t._v(t._s(t.trans("student.mother_name")))]),t._v(" "),a("td",[t._v(t._s(t.student.parent?t.student.parent.mother_name:""))])]),t._v(" "),a("tr",[a("td",[t._v(t._s(t.trans("student.contact_number")))]),t._v(" "),a("td",[t._v(t._s(t.student.contact_number))])]),t._v(" "),a("tr",[a("td",[t._v(t._s(t.trans("student.gender")))]),t._v(" "),a("td",[t._v(t._s(t.trans("list."+t.student.gender)))])]),t._v(" "),a("tr",[a("td",[t._v(t._s(t.trans("student.date_of_birth")))]),t._v(" "),a("td",[t._v(t._s(t._f("moment")(t.student.date_of_birth)))])])])]),t._v(" "),t._l(t.currentStudentRecords,(function(e){return a("table",{staticClass:"table table-sm custom-show-table"},[a("tbody",[a("tr",[a("td",[t._v(t._s(t.trans("academic.batch")))]),t._v(" "),a("td",[a("span",{domProps:{innerHTML:t._s(t.getStatus(e))}}),t._v(" "+t._s(e.batch.course.name+" "+e.batch.name+" "+e.academic_session.name))])]),t._v(" "),a("tr",[a("td",[t._v(t._s(t.trans("student.date_of_admission")))]),t._v(" "),a("td",[t._v(t._s(t._f("moment")(e.admission.date_of_admission)))])]),t._v(" "),a("tr",[a("td",[t._v(t._s(t.trans("student.admission_number")))]),t._v(" "),a("td",[t._v(t._s(e.admission.admission_number))])]),t._v(" "),a("tr",[a("td",[t._v(t._s(t.trans("student.date_of_promotion")))]),t._v(" "),a("td",[t._v(t._s(t._f("moment")(e.date_of_entry)))])]),t._v(" "),e.date_of_exit?a("tr",[a("td",{staticClass:"text-danger font-weight-bold"},[t._v(t._s(t.trans("student.date_of_termination")))]),t._v(" "),a("td",{staticClass:"text-danger font-weight-bold"},[t._v(t._s(t._f("moment")(e.date_of_exit)))])]):t._e()])])})),t._v(" "),a("table",{staticClass:"table table-sm custom-show-table"},[a("tbody",[a("tr",[a("td",[t._v(t._s(t.trans("general.created_at")))]),t._v(" "),a("td",[t._v(t._s(t._f("momentDateTime")(t.student.created_at)))])]),t._v(" "),a("tr",[a("td",[t._v(t._s(t.trans("general.updated_at")))]),t._v(" "),a("td",[t._v(t._s(t._f("momentDateTime")(t.student.updated_at)))])])])])],2):t._e()])])])])])])}),[],!1,null,null,null);e.default=h.exports},ljPE:function(t,e,a){"use strict";var s={props:["student","footer"],data:function(){return{userForm:new Form({enable_parent_login:!1,enable_student_login:!1,change_student_password:!0,change_parent_password:!0,student_email:"",student_username:"",parent_email:"",parent_username:"",parent_password:"",parent_password_confirmation:"",student_password:"",student_password_confirmation:""})}},mounted:function(){this.updateLoginForm(this.student)},methods:{submit:function(){var t=this,e=this.$loading.show();this.userForm.patch("/api/student/"+this.student.uuid+"/user/login").then((function(a){toastr.success(a.message),t.userForm.change_student_password=!0,t.userForm.change_parent_password=!0,t.$emit("completed"),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},updateLoginForm:function(t){this.userForm.enable_student_login=!(!t.user_id||"activated"!=t.user.status),this.userForm.enable_parent_login=!(!t.parent.user_id||"activated"!=t.parent.user.status),this.userForm.student_email=t.user_id?t.user.email:"",this.userForm.student_username=t.user_id?t.user.username:"",this.userForm.parent_email=t.parent.user_id?t.parent.user.email:"",this.userForm.parent_username=t.parent.user_id?t.parent.user.username:""}},watch:{student:function(t){this.updateLoginForm(t)}}},r=a("KHd+"),n=Object(r.a)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.student.id?a("div",[a("form",{on:{submit:function(e){return e.preventDefault(),t.submit(e)},keydown:function(e){return t.userForm.errors.clear(e.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.enable_parent_login,expression:"userForm.enable_parent_login"}],staticClass:"custom-control-input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.userForm.enable_parent_login)?t._i(t.userForm.enable_parent_login,null)>-1:t.userForm.enable_parent_login},on:{change:function(e){var a=t.userForm.enable_parent_login,s=e.target,r=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.userForm,"enable_parent_login",a.concat([null])):n>-1&&t.$set(t.userForm,"enable_parent_login",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.userForm,"enable_parent_login",r)}}}),t._v(" "),a("span",{staticClass:"custom-control-label"},[t._v(t._s(t.trans("student.enable_parent_login")))])])]),t._v(" "),t.userForm.enable_parent_login?[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("auth.email")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.parent_email,expression:"userForm.parent_email"}],staticClass:"form-control",attrs:{type:"text",name:"parent_email",placeholder:t.trans("student.parent_email")},domProps:{value:t.userForm.parent_email},on:{input:function(e){e.target.composing||t.$set(t.userForm,"parent_email",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.userForm,"prop-name":"parent_email"}})],1),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("auth.username")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.parent_username,expression:"userForm.parent_username"}],staticClass:"form-control",attrs:{type:"text",name:"parent_username",placeholder:t.trans("student.parent_username")},domProps:{value:t.userForm.parent_username},on:{input:function(e){e.target.composing||t.$set(t.userForm,"parent_username",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.userForm,"prop-name":"parent_username"}})],1),t._v(" "),t.student.parent.user_id?a("div",{staticClass:"form-group"},[a("label",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.change_parent_password,expression:"userForm.change_parent_password"}],staticClass:"custom-control-input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.userForm.change_parent_password)?t._i(t.userForm.change_parent_password,null)>-1:t.userForm.change_parent_password},on:{change:function(e){var a=t.userForm.change_parent_password,s=e.target,r=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.userForm,"change_parent_password",a.concat([null])):n>-1&&t.$set(t.userForm,"change_parent_password",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.userForm,"change_parent_password",r)}}}),t._v(" "),a("span",{staticClass:"custom-control-label"},[t._v(t._s(t.trans("auth.change_password")))])])]):t._e(),t._v(" "),t.userForm.change_parent_password?[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("auth.password")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.parent_password,expression:"userForm.parent_password"}],staticClass:"form-control",attrs:{type:"password",name:"parent_password",placeholder:t.trans("student.parent_password")},domProps:{value:t.userForm.parent_password},on:{input:function(e){e.target.composing||t.$set(t.userForm,"parent_password",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.userForm,"prop-name":"parent_password"}})],1),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("auth.confirm_password")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.parent_password_confirmation,expression:"userForm.parent_password_confirmation"}],staticClass:"form-control",attrs:{type:"password",name:"parent_password_confirmation",placeholder:t.trans("auth.confirm_password")},domProps:{value:t.userForm.parent_password_confirmation},on:{input:function(e){e.target.composing||t.$set(t.userForm,"parent_password_confirmation",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.userForm,"prop-name":"parent_password_confirmation"}})],1)]:t._e()]:t._e()],2),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.enable_student_login,expression:"userForm.enable_student_login"}],staticClass:"custom-control-input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.userForm.enable_student_login)?t._i(t.userForm.enable_student_login,null)>-1:t.userForm.enable_student_login},on:{change:function(e){var a=t.userForm.enable_student_login,s=e.target,r=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.userForm,"enable_student_login",a.concat([null])):n>-1&&t.$set(t.userForm,"enable_student_login",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.userForm,"enable_student_login",r)}}}),t._v(" "),a("span",{staticClass:"custom-control-label"},[t._v(t._s(t.trans("student.enable_student_login")))])])]),t._v(" "),t.userForm.enable_student_login?[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("auth.email")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.student_email,expression:"userForm.student_email"}],staticClass:"form-control",attrs:{type:"text",name:"student_email",placeholder:t.trans("student.student_email")},domProps:{value:t.userForm.student_email},on:{input:function(e){e.target.composing||t.$set(t.userForm,"student_email",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.userForm,"prop-name":"student_email"}})],1),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("auth.username")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.student_username,expression:"userForm.student_username"}],staticClass:"form-control",attrs:{type:"text",name:"student_username",placeholder:t.trans("student.student_username")},domProps:{value:t.userForm.student_username},on:{input:function(e){e.target.composing||t.$set(t.userForm,"student_username",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.userForm,"prop-name":"student_username"}})],1),t._v(" "),t.student.user_id?a("div",{staticClass:"form-group"},[a("label",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.change_student_password,expression:"userForm.change_student_password"}],staticClass:"custom-control-input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.userForm.change_student_password)?t._i(t.userForm.change_student_password,null)>-1:t.userForm.change_student_password},on:{change:function(e){var a=t.userForm.change_student_password,s=e.target,r=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.userForm,"change_student_password",a.concat([null])):n>-1&&t.$set(t.userForm,"change_student_password",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.userForm,"change_student_password",r)}}}),t._v(" "),a("span",{staticClass:"custom-control-label"},[t._v(t._s(t.trans("auth.change_password")))])])]):t._e(),t._v(" "),t.userForm.change_student_password?[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("auth.password")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.student_password,expression:"userForm.student_password"}],staticClass:"form-control",attrs:{type:"password",name:"student_password",placeholder:t.trans("student.student_password")},domProps:{value:t.userForm.student_password},on:{input:function(e){e.target.composing||t.$set(t.userForm,"student_password",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.userForm,"prop-name":"student_password"}})],1),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("auth.confirm_password")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.userForm.student_password_confirmation,expression:"userForm.student_password_confirmation"}],staticClass:"form-control",attrs:{type:"password",name:"student_password_confirmation",placeholder:t.trans("auth.confirm_password")},domProps:{value:t.userForm.student_password_confirmation},on:{input:function(e){e.target.composing||t.$set(t.userForm,"student_password_confirmation",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.userForm,"prop-name":"student_password_confirmation"}})],1)]:t._e()]:t._e()],2)]),t._v(" "),a("div",{staticClass:"text-right",class:t.footer?"card-footer":""},[a("button",{staticClass:"btn btn-info",attrs:{type:"submit"}},[t._v(t._s(t.trans("general.save")))])])])]):t._e()}),[],!1,null,null,null);e.a=n.exports}}]);
//# sourceMappingURL=edit.js.map?id=af0baf0a1a71da6786ee