(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["js/reception/enquiry/edit~js/reception/enquiry/index"],{

/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/reception/enquiry/form.vue?vue&type=script&lang=js&":
/*!****************************************************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/views/reception/enquiry/form.vue?vue&type=script&lang=js& ***!
  \****************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
  components: {},
  props: ['uuid'],
  data: function data() {
    return {
      enquiryForm: new Form({
        first_guardian_name: '',
        first_guardian_relation: '',
        second_guardian_name: '',
        second_guardian_relation: '',
        third_guardian_name: '',
        third_guardian_relation: '',
        date_of_enquiry: '',
        enquiry_type_id: '',
        enquiry_source_id: '',
        contact_number: '',
        alternate_contact_number: '',
        email: '',
        remarks: '',
        students: []
      }),
      guardian_relations: [],
      enquiry_types: [],
      enquiry_sources: [],
      courses: [],
      institutes: [],
      genders: [],
      selected_enquiry_type: null,
      selected_enquiry_source: null
    };
  },
  mounted: function mounted() {
    if (!this.uuid) this.addRow();
    if (this.uuid) this.get();
    this.getPreRequisite();
  },
  methods: {
    proceed: function proceed() {
      if (this.uuid) this.update();else this.store();
    },
    getPreRequisite: function getPreRequisite() {
      var _this = this;

      var loader = this.$loading.show();
      axios.get('/api/enquiry/pre-requisite').then(function (response) {
        _this.enquiry_types = response.enquiry_types;
        _this.enquiry_sources = response.enquiry_sources;
        _this.courses = response.courses;
        _this.institutes = response.institutes;
        _this.genders = response.genders;
        _this.guardian_relations = response.guardian_relations;
        loader.hide();
      })["catch"](function (error) {
        loader.hide();
        helper.showErrorMsg(error);
      });
    },
    addRow: function addRow() {
      var new_index = this.enquiryForm.students.push({
        uuid: this.$uuid.v4(),
        student_name: '',
        date_of_birth: '',
        gender: '',
        course_id: '',
        institute_id: '',
        remarks: '',
        selected_course: null,
        selected_institute: null
      });
    },
    getStudentName: function getStudentName(index) {
      return index + '_student_name';
    },
    getRemarkName: function getRemarkName(index) {
      return index + '_remarks';
    },
    getDateOfBirthName: function getDateOfBirthName(index) {
      return index + '_date_of_birth';
    },
    getCourseName: function getCourseName(index) {
      return index + '_course_id';
    },
    getCurrentInstituteName: function getCurrentInstituteName(index) {
      return index + '_institute_id';
    },
    getGenderName: function getGenderName(index) {
      return index + '_gender';
    },
    getGenderId: function getGenderId(index, id) {
      return index + '_' + id + '_gender';
    },
    get: function get() {
      var _this2 = this;

      var loader = this.$loading.show();
      axios.get('/api/enquiry/' + this.uuid).then(function (response) {
        _this2.enquiryForm.date_of_enquiry = response.enquiry.date_of_enquiry;
        _this2.enquiryForm.first_guardian_name = response.enquiry.first_guardian_name;
        _this2.enquiryForm.second_guardian_name = response.enquiry.second_guardian_name;
        _this2.enquiryForm.third_guardian_name = response.enquiry.third_guardian_name;
        _this2.enquiryForm.first_guardian_relation = response.enquiry.first_guardian_relation;
        _this2.enquiryForm.second_guardian_relation = response.enquiry.second_guardian_relation;
        _this2.enquiryForm.third_guardian_relation = response.enquiry.third_guardian_relation;
        _this2.enquiryForm.contact_number = response.enquiry.contact_number;
        _this2.enquiryForm.alternate_contact_number = response.enquiry.alternate_contact_number;
        _this2.enquiryForm.email = response.enquiry.email;
        _this2.enquiryForm.remarks = response.enquiry.remarks;
        _this2.enquiryForm.enquiry_type_id = response.enquiry.enquiry_type_id;
        _this2.selected_enquiry_type = response.enquiry.enquiry_type_id ? {
          id: response.enquiry.enquiry_type_id,
          name: response.enquiry.enquiry_type.name
        } : null;
        _this2.enquiryForm.enquiry_source_id = response.enquiry.enquiry_source_id;
        _this2.selected_enquiry_source = response.enquiry.enquiry_source_id ? {
          id: response.enquiry.enquiry_source_id,
          name: response.enquiry.enquiry_source.name
        } : null;
        response.enquiry.enquiry_details.forEach(function (student) {
          _this2.enquiryForm.students.push({
            uuid: student.uuid,
            student_name: student.student_name,
            gender: student.gender,
            date_of_birth: student.date_of_birth,
            course_id: student.course_id,
            selected_course: student.course_id ? {
              id: student.course_id,
              name: student.course.name
            } : null,
            institute_id: student.institute_id,
            selected_institute: student.institute_id ? {
              id: student.institute_id,
              name: student.institute.name
            } : null,
            remarks: student.remarks
          });
        });
        loader.hide();
      })["catch"](function (error) {
        loader.hide();
        helper.showErrorMsg(error);
      });
    },
    store: function store() {
      var _this3 = this;

      var loader = this.$loading.show();
      this.enquiryForm.post('/api/enquiry').then(function (response) {
        toastr.success(response.message);
        _this3.enquiryForm.selected_enquiry_type = null;
        _this3.enquiryForm.selected_enquiry_source = null;
        _this3.enquiryForm.students = [];

        _this3.addRow();

        _this3.$emit('completed');

        loader.hide();
      })["catch"](function (error) {
        loader.hide();
        helper.showErrorMsg(error);
      });
    },
    update: function update() {
      var _this4 = this;

      var loader = this.$loading.show();
      this.enquiryForm.patch('/api/enquiry/' + this.uuid).then(function (response) {
        toastr.success(response.message);
        loader.hide();

        _this4.$router.push('/reception/enquiry');
      })["catch"](function (error) {
        loader.hide();
        helper.showErrorMsg(error);
      });
    },
    onEnquiryTypeSelect: function onEnquiryTypeSelect(selectedOption) {
      this.enquiryForm.enquiry_type_id = selectedOption.id;
    },
    onEnquirySourceSelect: function onEnquirySourceSelect(selectedOption) {
      this.enquiryForm.enquiry_source_id = selectedOption.id;
    },
    confirmDelete: function confirmDelete(index) {
      var _this5 = this;

      return function (dialog) {
        return _this5.deleteStudent(index);
      };
    },
    deleteStudent: function deleteStudent(index) {
      this.enquiryForm.students.splice(index, 1);
    },
    onCourseSelect: function onCourseSelect(selectedOption, id) {
      var index = id.split("_")[0];
      var student = this.enquiryForm.students[index];
      student.course_id = selectedOption.id;
    },
    onCourseRemove: function onCourseRemove(removedOption, id) {
      var index = id.split("_")[0];
      var student = this.enquiryForm.students[index];
      student.course_id = '';
    },
    onInstituteSelect: function onInstituteSelect(selectedOption, id) {
      var index = id.split("_")[0];
      var student = this.enquiryForm.students[index];
      student.institute_id = selectedOption.id;
    },
    onInstituteRemove: function onInstituteRemove(removedOption, id) {
      var index = id.split("_")[0];
      var student = this.enquiryForm.students[index];
      student.institute_id = '';
    }
  },
  computed: {
    getDefaultAcademicSession: function getDefaultAcademicSession() {
      return helper.getDefaultAcademicSession();
    }
  }
});

/***/ }),

/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/reception/enquiry/form.vue?vue&type=template&id=629b658f&":
/*!********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/views/reception/enquiry/form.vue?vue&type=template&id=629b658f& ***!
  \********************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c("div", [
    _c(
      "form",
      {
        on: {
          submit: function($event) {
            $event.preventDefault()
            return _vm.proceed($event)
          },
          keydown: function($event) {
            return _vm.enquiryForm.errors.clear($event.target.name)
          }
        }
      },
      [
        _c("div", { staticClass: "row" }, [
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("reception.date_of_enquiry")))
                ]),
                _vm._v(" "),
                _c("datepicker", {
                  attrs: {
                    bootstrapStyling: true,
                    placeholder: _vm.trans("reception.date_of_enquiry")
                  },
                  on: {
                    selected: function($event) {
                      return _vm.enquiryForm.errors.clear("date_of_enquiry")
                    }
                  },
                  model: {
                    value: _vm.enquiryForm.date_of_enquiry,
                    callback: function($$v) {
                      _vm.$set(_vm.enquiryForm, "date_of_enquiry", $$v)
                    },
                    expression: "enquiryForm.date_of_enquiry"
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "date_of_enquiry"
                  }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("reception.enquiry_type")))
                ]),
                _vm._v(" "),
                _c(
                  "v-select",
                  {
                    attrs: {
                      label: "name",
                      name: "enquiry_type_id",
                      id: "enquiry_type_id",
                      options: _vm.enquiry_types,
                      placeholder: _vm.trans("reception.select_enquiry_type")
                    },
                    on: {
                      select: _vm.onEnquiryTypeSelect,
                      close: function($event) {
                        return _vm.enquiryForm.errors.clear("enquiry_type_id")
                      },
                      remove: function($event) {
                        _vm.enquiryForm.enquiry_type_id = ""
                      }
                    },
                    model: {
                      value: _vm.selected_enquiry_type,
                      callback: function($$v) {
                        _vm.selected_enquiry_type = $$v
                      },
                      expression: "selected_enquiry_type"
                    }
                  },
                  [
                    !_vm.enquiry_types.length
                      ? _c(
                          "div",
                          {
                            staticClass: "multiselect__option",
                            attrs: { slot: "afterList" },
                            slot: "afterList"
                          },
                          [
                            _vm._v(
                              "\n                                " +
                                _vm._s(_vm.trans("general.no_option_found")) +
                                "\n                            "
                            )
                          ]
                        )
                      : _vm._e()
                  ]
                ),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "enquiry_type_id"
                  }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("reception.enquiry_source")))
                ]),
                _vm._v(" "),
                _c(
                  "v-select",
                  {
                    attrs: {
                      label: "name",
                      name: "enquiry_source_id",
                      id: "enquiry_source_id",
                      options: _vm.enquiry_sources,
                      placeholder: _vm.trans("reception.select_enquiry_source")
                    },
                    on: {
                      select: _vm.onEnquirySourceSelect,
                      close: function($event) {
                        return _vm.enquiryForm.errors.clear("enquiry_source_id")
                      },
                      remove: function($event) {
                        _vm.enquiryForm.enquiry_source_id = ""
                      }
                    },
                    model: {
                      value: _vm.selected_enquiry_source,
                      callback: function($$v) {
                        _vm.selected_enquiry_source = $$v
                      },
                      expression: "selected_enquiry_source"
                    }
                  },
                  [
                    !_vm.enquiry_sources.length
                      ? _c(
                          "div",
                          {
                            staticClass: "multiselect__option",
                            attrs: { slot: "afterList" },
                            slot: "afterList"
                          },
                          [
                            _vm._v(
                              "\n                                " +
                                _vm._s(_vm.trans("general.no_option_found")) +
                                "\n                            "
                            )
                          ]
                        )
                      : _vm._e()
                  ]
                ),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "enquiry_source_id"
                  }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("student.email")))
                ]),
                _vm._v(" "),
                _c("input", {
                  directives: [
                    {
                      name: "model",
                      rawName: "v-model",
                      value: _vm.enquiryForm.email,
                      expression: "enquiryForm.email"
                    }
                  ],
                  staticClass: "form-control",
                  attrs: {
                    type: "text",
                    name: "email",
                    placeholder: _vm.trans("student.email")
                  },
                  domProps: { value: _vm.enquiryForm.email },
                  on: {
                    input: function($event) {
                      if ($event.target.composing) {
                        return
                      }
                      _vm.$set(_vm.enquiryForm, "email", $event.target.value)
                    }
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: { "form-name": _vm.enquiryForm, "prop-name": "email" }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("student.contact_number")))
                ]),
                _vm._v(" "),
                _c("input", {
                  directives: [
                    {
                      name: "model",
                      rawName: "v-model",
                      value: _vm.enquiryForm.contact_number,
                      expression: "enquiryForm.contact_number"
                    }
                  ],
                  staticClass: "form-control",
                  attrs: {
                    type: "text",
                    name: "contact_number",
                    placeholder: _vm.trans("student.contact_number")
                  },
                  domProps: { value: _vm.enquiryForm.contact_number },
                  on: {
                    input: function($event) {
                      if ($event.target.composing) {
                        return
                      }
                      _vm.$set(
                        _vm.enquiryForm,
                        "contact_number",
                        $event.target.value
                      )
                    }
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "contact_number"
                  }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("student.alternate_contact_number")))
                ]),
                _vm._v(" "),
                _c("input", {
                  directives: [
                    {
                      name: "model",
                      rawName: "v-model",
                      value: _vm.enquiryForm.alternate_contact_number,
                      expression: "enquiryForm.alternate_contact_number"
                    }
                  ],
                  staticClass: "form-control",
                  attrs: {
                    type: "text",
                    name: "alternate_contact_number",
                    placeholder: _vm.trans("student.alternate_contact_number")
                  },
                  domProps: { value: _vm.enquiryForm.alternate_contact_number },
                  on: {
                    input: function($event) {
                      if ($event.target.composing) {
                        return
                      }
                      _vm.$set(
                        _vm.enquiryForm,
                        "alternate_contact_number",
                        $event.target.value
                      )
                    }
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "alternate_contact_number"
                  }
                })
              ],
              1
            )
          ])
        ]),
        _vm._v(" "),
        _c("h4", { staticClass: "card-title" }, [
          _vm._v(_vm._s(_vm.trans("student.guardian")))
        ]),
        _vm._v(" "),
        _c("div", { staticClass: "row" }, [
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("student.first_guardian_name")))
                ]),
                _vm._v(" "),
                _c("input", {
                  directives: [
                    {
                      name: "model",
                      rawName: "v-model",
                      value: _vm.enquiryForm.first_guardian_name,
                      expression: "enquiryForm.first_guardian_name"
                    }
                  ],
                  staticClass: "form-control",
                  attrs: {
                    type: "text",
                    name: "first_guardian_name",
                    placeholder: _vm.trans("student.first_guardian_name")
                  },
                  domProps: { value: _vm.enquiryForm.first_guardian_name },
                  on: {
                    input: function($event) {
                      if ($event.target.composing) {
                        return
                      }
                      _vm.$set(
                        _vm.enquiryForm,
                        "first_guardian_name",
                        $event.target.value
                      )
                    }
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "first_guardian_name"
                  }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("general.relation")))
                ]),
                _vm._v(" "),
                _c(
                  "select",
                  {
                    directives: [
                      {
                        name: "model",
                        rawName: "v-model",
                        value: _vm.enquiryForm.first_guardian_relation,
                        expression: "enquiryForm.first_guardian_relation"
                      }
                    ],
                    staticClass: "custom-select col-12",
                    attrs: { name: "first_guardian_relation" },
                    on: {
                      change: [
                        function($event) {
                          var $$selectedVal = Array.prototype.filter
                            .call($event.target.options, function(o) {
                              return o.selected
                            })
                            .map(function(o) {
                              var val = "_value" in o ? o._value : o.value
                              return val
                            })
                          _vm.$set(
                            _vm.enquiryForm,
                            "first_guardian_relation",
                            $event.target.multiple
                              ? $$selectedVal
                              : $$selectedVal[0]
                          )
                        },
                        function($event) {
                          return _vm.enquiryForm.errors.clear(
                            "first_guardian_relation"
                          )
                        }
                      ]
                    }
                  },
                  [
                    _c("option", { attrs: { value: "" } }, [
                      _vm._v(_vm._s(_vm.trans("general.select_one")))
                    ]),
                    _vm._v(" "),
                    _vm._l(_vm.guardian_relations, function(relation) {
                      return _c(
                        "option",
                        { domProps: { value: relation.id } },
                        [
                          _vm._v(
                            "\n                            " +
                              _vm._s(relation.name) +
                              "\n                          "
                          )
                        ]
                      )
                    })
                  ],
                  2
                ),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "first_guardian_relation"
                  }
                })
              ],
              1
            )
          ])
        ]),
        _vm._v(" "),
        _c("div", { staticClass: "row" }, [
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("student.second_guardian_name")))
                ]),
                _vm._v(" "),
                _c("input", {
                  directives: [
                    {
                      name: "model",
                      rawName: "v-model",
                      value: _vm.enquiryForm.second_guardian_name,
                      expression: "enquiryForm.second_guardian_name"
                    }
                  ],
                  staticClass: "form-control",
                  attrs: {
                    type: "text",
                    name: "second_guardian_name",
                    placeholder: _vm.trans("student.second_guardian_name")
                  },
                  domProps: { value: _vm.enquiryForm.second_guardian_name },
                  on: {
                    input: function($event) {
                      if ($event.target.composing) {
                        return
                      }
                      _vm.$set(
                        _vm.enquiryForm,
                        "second_guardian_name",
                        $event.target.value
                      )
                    }
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "second_guardian_name"
                  }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("general.relation")))
                ]),
                _vm._v(" "),
                _c(
                  "select",
                  {
                    directives: [
                      {
                        name: "model",
                        rawName: "v-model",
                        value: _vm.enquiryForm.second_guardian_relation,
                        expression: "enquiryForm.second_guardian_relation"
                      }
                    ],
                    staticClass: "custom-select col-12",
                    attrs: { name: "second_guardian_relation" },
                    on: {
                      change: [
                        function($event) {
                          var $$selectedVal = Array.prototype.filter
                            .call($event.target.options, function(o) {
                              return o.selected
                            })
                            .map(function(o) {
                              var val = "_value" in o ? o._value : o.value
                              return val
                            })
                          _vm.$set(
                            _vm.enquiryForm,
                            "second_guardian_relation",
                            $event.target.multiple
                              ? $$selectedVal
                              : $$selectedVal[0]
                          )
                        },
                        function($event) {
                          return _vm.enquiryForm.errors.clear(
                            "second_guardian_relation"
                          )
                        }
                      ]
                    }
                  },
                  [
                    _c("option", { attrs: { value: "" } }, [
                      _vm._v(_vm._s(_vm.trans("general.select_one")))
                    ]),
                    _vm._v(" "),
                    _vm._l(_vm.guardian_relations, function(relation) {
                      return _c(
                        "option",
                        { domProps: { value: relation.id } },
                        [
                          _vm._v(
                            "\n                            " +
                              _vm._s(relation.name) +
                              "\n                          "
                          )
                        ]
                      )
                    })
                  ],
                  2
                ),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "second_guardian_relation"
                  }
                })
              ],
              1
            )
          ])
        ]),
        _vm._v(" "),
        _c("div", { staticClass: "row" }, [
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("student.third_guardian_name")))
                ]),
                _vm._v(" "),
                _c("input", {
                  directives: [
                    {
                      name: "model",
                      rawName: "v-model",
                      value: _vm.enquiryForm.third_guardian_name,
                      expression: "enquiryForm.third_guardian_name"
                    }
                  ],
                  staticClass: "form-control",
                  attrs: {
                    type: "text",
                    name: "third_guardian_name",
                    placeholder: _vm.trans("student.third_guardian_name")
                  },
                  domProps: { value: _vm.enquiryForm.third_guardian_name },
                  on: {
                    input: function($event) {
                      if ($event.target.composing) {
                        return
                      }
                      _vm.$set(
                        _vm.enquiryForm,
                        "third_guardian_name",
                        $event.target.value
                      )
                    }
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "third_guardian_name"
                  }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("general.relation")))
                ]),
                _vm._v(" "),
                _c(
                  "select",
                  {
                    directives: [
                      {
                        name: "model",
                        rawName: "v-model",
                        value: _vm.enquiryForm.third_guardian_relation,
                        expression: "enquiryForm.third_guardian_relation"
                      }
                    ],
                    staticClass: "custom-select col-12",
                    attrs: { name: "third_guardian_relation" },
                    on: {
                      change: [
                        function($event) {
                          var $$selectedVal = Array.prototype.filter
                            .call($event.target.options, function(o) {
                              return o.selected
                            })
                            .map(function(o) {
                              var val = "_value" in o ? o._value : o.value
                              return val
                            })
                          _vm.$set(
                            _vm.enquiryForm,
                            "third_guardian_relation",
                            $event.target.multiple
                              ? $$selectedVal
                              : $$selectedVal[0]
                          )
                        },
                        function($event) {
                          return _vm.enquiryForm.errors.clear(
                            "third_guardian_relation"
                          )
                        }
                      ]
                    }
                  },
                  [
                    _c("option", { attrs: { value: "" } }, [
                      _vm._v(_vm._s(_vm.trans("general.select_one")))
                    ]),
                    _vm._v(" "),
                    _vm._l(_vm.guardian_relations, function(relation) {
                      return _c(
                        "option",
                        { domProps: { value: relation.id } },
                        [
                          _vm._v(
                            "\n                            " +
                              _vm._s(relation.name) +
                              "\n                          "
                          )
                        ]
                      )
                    })
                  ],
                  2
                ),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "third_guardian_relation"
                  }
                })
              ],
              1
            )
          ])
        ]),
        _vm._v(" "),
        _c("div", { staticClass: "row" }, [
          _c("div", { staticClass: "col-12 col-sm-9" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("reception.enquiry_remarks")))
                ]),
                _vm._v(" "),
                _c("autosize-textarea", {
                  attrs: {
                    rows: "1",
                    name: "remarks",
                    placeholder: _vm.trans("reception.enquiry_remarks")
                  },
                  model: {
                    value: _vm.enquiryForm.remarks,
                    callback: function($$v) {
                      _vm.$set(_vm.enquiryForm, "remarks", $$v)
                    },
                    expression: "enquiryForm.remarks"
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.enquiryForm,
                    "prop-name": "remarks"
                  }
                })
              ],
              1
            )
          ])
        ]),
        _vm._v(" "),
        _c(
          "div",
          { staticClass: "p-t-20 border-top" },
          [
            _vm._l(_vm.enquiryForm.students, function(student, index) {
              return _c("div", { staticClass: "row" }, [
                _c("div", { staticClass: "col-12 col-sm-2" }, [
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(
                          "\n                                " +
                            _vm._s(_vm.trans("student.name")) +
                            "\n                                "
                        ),
                        _c(
                          "button",
                          {
                            directives: [
                              {
                                name: "confirm",
                                rawName: "v-confirm",
                                value: { ok: _vm.confirmDelete(index) },
                                expression: "{ok: confirmDelete(index)}"
                              },
                              {
                                name: "tooltip",
                                rawName: "v-tooltip",
                                value: _vm.trans("student.delete_student"),
                                expression: "trans('student.delete_student')"
                              }
                            ],
                            key: index + "_delete_student",
                            staticClass: "btn btn-xs btn-danger",
                            attrs: { type: "button" }
                          },
                          [_c("i", { staticClass: "fas fa-times" })]
                        )
                      ]),
                      _vm._v(" "),
                      _c("input", {
                        directives: [
                          {
                            name: "model",
                            rawName: "v-model",
                            value: student.student_name,
                            expression: "student.student_name"
                          }
                        ],
                        staticClass: "form-control",
                        attrs: {
                          type: "text",
                          name: _vm.getStudentName(index),
                          placeholder: _vm.trans("student.name")
                        },
                        domProps: { value: student.student_name },
                        on: {
                          input: function($event) {
                            if ($event.target.composing) {
                              return
                            }
                            _vm.$set(
                              student,
                              "student_name",
                              $event.target.value
                            )
                          }
                        }
                      }),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.enquiryForm,
                          "prop-name": _vm.getStudentName(index)
                        }
                      })
                    ],
                    1
                  )
                ]),
                _vm._v(" "),
                _c("div", { staticClass: "col-12 col-sm-2" }, [
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(_vm._s(_vm.trans("student.gender")))
                      ]),
                      _vm._v(" "),
                      _c(
                        "div",
                        { staticClass: "radio radio-info p-l-0" },
                        _vm._l(_vm.genders, function(gender) {
                          return _c(
                            "div",
                            { staticClass: "form-check form-check-inline " },
                            [
                              _c("input", {
                                directives: [
                                  {
                                    name: "model",
                                    rawName: "v-model",
                                    value: student.gender,
                                    expression: "student.gender"
                                  }
                                ],
                                staticClass: "form-check-input",
                                attrs: {
                                  type: "radio",
                                  id: _vm.getGenderId(index, gender.id),
                                  name: _vm.getGenderName(index)
                                },
                                domProps: {
                                  value: gender.id,
                                  checked: student.gender == gender.id,
                                  checked: _vm._q(student.gender, gender.id)
                                },
                                on: {
                                  click: function($event) {
                                    _vm.enquiryForm.errors.clear(
                                      _vm.getGenderName(index)
                                    )
                                  },
                                  change: function($event) {
                                    return _vm.$set(
                                      student,
                                      "gender",
                                      gender.id
                                    )
                                  }
                                }
                              }),
                              _vm._v(" "),
                              _c(
                                "label",
                                {
                                  staticClass: "form-check-label",
                                  attrs: {
                                    for: _vm.getGenderId(index, gender.id)
                                  }
                                },
                                [
                                  _vm._v(
                                    " " + _vm._s(_vm.trans("list." + gender.id))
                                  )
                                ]
                              )
                            ]
                          )
                        }),
                        0
                      ),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.enquiryForm,
                          "prop-name": _vm.getGenderName(index)
                        }
                      })
                    ],
                    1
                  )
                ]),
                _vm._v(" "),
                _c("div", { staticClass: "col-12 col-sm-2" }, [
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(_vm._s(_vm.trans("student.date_of_birth")))
                      ]),
                      _vm._v(" "),
                      _c("datepicker", {
                        attrs: {
                          bootstrapStyling: true,
                          placeholder: _vm.trans("student.date_of_birth")
                        },
                        on: {
                          selected: function($event) {
                            _vm.enquiryForm.errors.clear(
                              _vm.getDateOfBirthName(index)
                            )
                          }
                        },
                        model: {
                          value: student.date_of_birth,
                          callback: function($$v) {
                            _vm.$set(student, "date_of_birth", $$v)
                          },
                          expression: "student.date_of_birth"
                        }
                      }),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.enquiryForm,
                          "prop-name": _vm.getDateOfBirthName(index)
                        }
                      })
                    ],
                    1
                  )
                ]),
                _vm._v(" "),
                _c("div", { staticClass: "col-12 col-sm-2" }, [
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(
                          _vm._s(
                            _vm.trans("academic.course") +
                              " " +
                              _vm.getDefaultAcademicSession.name
                          )
                        )
                      ]),
                      _vm._v(" "),
                      _c(
                        "v-select",
                        {
                          attrs: {
                            label: "name",
                            "group-values": "courses",
                            "group-label": "course_group",
                            "group-select": false,
                            name: _vm.getCourseName(index),
                            id: _vm.getCourseName(index),
                            options: _vm.courses,
                            placeholder: _vm.trans("academic.select_course")
                          },
                          on: {
                            select: _vm.onCourseSelect,
                            close: function($event) {
                              _vm.enquiryForm.errors.clear(
                                _vm.getCourseName(index)
                              )
                            },
                            remove: _vm.onCourseRemove
                          },
                          model: {
                            value: student.selected_course,
                            callback: function($$v) {
                              _vm.$set(student, "selected_course", $$v)
                            },
                            expression: "student.selected_course"
                          }
                        },
                        [
                          !_vm.courses.length
                            ? _c(
                                "div",
                                {
                                  staticClass: "multiselect__option",
                                  attrs: { slot: "afterList" },
                                  slot: "afterList"
                                },
                                [
                                  _vm._v(
                                    "\n                                    " +
                                      _vm._s(
                                        _vm.trans("general.no_option_found")
                                      ) +
                                      "\n                                "
                                  )
                                ]
                              )
                            : _vm._e()
                        ]
                      ),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.enquiryForm,
                          "prop-name": _vm.getCourseName(index)
                        }
                      })
                    ],
                    1
                  )
                ]),
                _vm._v(" "),
                _c("div", { staticClass: "col-12 col-sm-2" }, [
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(_vm._s(_vm.trans("reception.current_institute")))
                      ]),
                      _vm._v(" "),
                      _c(
                        "v-select",
                        {
                          attrs: {
                            label: "name",
                            name: _vm.getCurrentInstituteName(index),
                            id: _vm.getCurrentInstituteName(index),
                            options: _vm.institutes,
                            placeholder: _vm.trans("academic.select_institute")
                          },
                          on: {
                            select: _vm.onInstituteSelect,
                            close: function($event) {
                              _vm.enquiryForm.errors.clear(
                                _vm.getCurrentInstituteName(index)
                              )
                            },
                            remove: _vm.onInstituteRemove
                          },
                          model: {
                            value: student.selected_institute,
                            callback: function($$v) {
                              _vm.$set(student, "selected_institute", $$v)
                            },
                            expression: "student.selected_institute"
                          }
                        },
                        [
                          !_vm.institutes.length
                            ? _c(
                                "div",
                                {
                                  staticClass: "multiselect__option",
                                  attrs: { slot: "afterList" },
                                  slot: "afterList"
                                },
                                [
                                  _vm._v(
                                    "\n                                    " +
                                      _vm._s(
                                        _vm.trans("general.no_option_found")
                                      ) +
                                      "\n                                "
                                  )
                                ]
                              )
                            : _vm._e()
                        ]
                      ),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.enquiryForm,
                          "prop-name": _vm.getCurrentInstituteName(index)
                        }
                      })
                    ],
                    1
                  )
                ]),
                _vm._v(" "),
                _c("div", { staticClass: "col-12 col-sm-2" }, [
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(
                          "\n                                " +
                            _vm._s(_vm.trans("student.remarks")) +
                            "\n                            "
                        )
                      ]),
                      _vm._v(" "),
                      _c("input", {
                        directives: [
                          {
                            name: "model",
                            rawName: "v-model",
                            value: student.remarks,
                            expression: "student.remarks"
                          }
                        ],
                        staticClass: "form-control",
                        attrs: {
                          type: "text",
                          name: _vm.getRemarkName(index),
                          placeholder: _vm.trans("student.remarks")
                        },
                        domProps: { value: student.remarks },
                        on: {
                          input: function($event) {
                            if ($event.target.composing) {
                              return
                            }
                            _vm.$set(student, "remarks", $event.target.value)
                          }
                        }
                      }),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.enquiryForm,
                          "prop-name": _vm.getRemarkName(index)
                        }
                      })
                    ],
                    1
                  )
                ])
              ])
            }),
            _vm._v(" "),
            _c("div", { staticClass: "row" }, [
              _c("div", { staticClass: "col-12" }, [
                _c("div", { staticClass: "form-group" }, [
                  _c(
                    "button",
                    {
                      staticClass:
                        "btn btn-info btn-sm waves-effect waves-light",
                      attrs: { type: "button" },
                      on: { click: _vm.addRow }
                    },
                    [_vm._v(_vm._s(_vm.trans("student.add_new_student")))]
                  )
                ])
              ])
            ])
          ],
          2
        ),
        _vm._v(" "),
        _c("div", { staticClass: "card-footer text-right" }, [
          _c(
            "button",
            {
              directives: [
                {
                  name: "show",
                  rawName: "v-show",
                  value: _vm.uuid,
                  expression: "uuid"
                }
              ],
              staticClass: "btn btn-danger ",
              attrs: { type: "button" },
              on: {
                click: function($event) {
                  return _vm.$router.push("/reception/enquiry")
                }
              }
            },
            [_vm._v(_vm._s(_vm.trans("general.cancel")))]
          ),
          _vm._v(" "),
          !_vm.uuid
            ? _c(
                "button",
                {
                  staticClass: "btn btn-danger ",
                  attrs: { type: "button" },
                  on: {
                    click: function($event) {
                      return _vm.$emit("cancel")
                    }
                  }
                },
                [_vm._v(_vm._s(_vm.trans("general.cancel")))]
              )
            : _vm._e(),
          _vm._v(" "),
          _c(
            "button",
            {
              staticClass: "btn btn-info waves-effect waves-light",
              attrs: { type: "submit" }
            },
            [_vm._v(_vm._s(_vm.trans("general.save")))]
          )
        ])
      ]
    )
  ])
}
var staticRenderFns = []
render._withStripped = true



/***/ }),

/***/ "./resources/js/views/reception/enquiry/form.vue":
/*!*******************************************************!*\
  !*** ./resources/js/views/reception/enquiry/form.vue ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _form_vue_vue_type_template_id_629b658f___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./form.vue?vue&type=template&id=629b658f& */ "./resources/js/views/reception/enquiry/form.vue?vue&type=template&id=629b658f&");
/* harmony import */ var _form_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./form.vue?vue&type=script&lang=js& */ "./resources/js/views/reception/enquiry/form.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");





/* normalize component */

var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
  _form_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _form_vue_vue_type_template_id_629b658f___WEBPACK_IMPORTED_MODULE_0__["render"],
  _form_vue_vue_type_template_id_629b658f___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var api; }
component.options.__file = "resources/js/views/reception/enquiry/form.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ "./resources/js/views/reception/enquiry/form.vue?vue&type=script&lang=js&":
/*!********************************************************************************!*\
  !*** ./resources/js/views/reception/enquiry/form.vue?vue&type=script&lang=js& ***!
  \********************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/babel-loader/lib??ref--4-0!../../../../../node_modules/vue-loader/lib??vue-loader-options!./form.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/reception/enquiry/form.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); 

/***/ }),

/***/ "./resources/js/views/reception/enquiry/form.vue?vue&type=template&id=629b658f&":
/*!**************************************************************************************!*\
  !*** ./resources/js/views/reception/enquiry/form.vue?vue&type=template&id=629b658f& ***!
  \**************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_template_id_629b658f___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../node_modules/vue-loader/lib??vue-loader-options!./form.vue?vue&type=template&id=629b658f& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/reception/enquiry/form.vue?vue&type=template&id=629b658f&");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_template_id_629b658f___WEBPACK_IMPORTED_MODULE_0__["render"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_template_id_629b658f___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });



/***/ })

}]);
//# sourceMappingURL=index.js.map?id=24f5a0c9f057fa839190