(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["js/resource/syllabus/create~js/resource/syllabus/edit~js/resource/syllabus/index"],{

/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/resource/syllabus/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/resource/syllabus/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: {},
  data: function data() {
    return {
      syllabusForm: new Form({
        title: '',
        description: '',
        batch_id: '',
        subject_id: '',
        details: [],
        topics: [],
        upload_token: ''
      }),
      batches: [],
      selected_batch: null,
      subjects: [],
      selected_subject: null,
      subject_detail: [],
      module_id: '',
      clearAttachment: true
    };
  },
  props: ['uuid'],
  mounted: function mounted() {
    if (!helper.hasPermission('create-syllabus') && !helper.hasPermission('edit-syllabus')) {
      helper.notAccessibleMsg();
      this.$router.push('/dashboard');
    }

    if (this.uuid) this.get();else {
      this.addDetailRow();
      this.addTopicRow();
      this.syllabusForm.upload_token = this.$uuid.v4();
    }
    this.getPreRequisite();
  },
  methods: {
    hasPermission: function hasPermission(permission) {
      return helper.hasPermission(permission);
    },
    addDetailRow: function addDetailRow() {
      var new_index = this.syllabusForm.details.push({
        title: '',
        description: ''
      });
    },
    confirmDeleteDetail: function confirmDeleteDetail(index) {
      var _this = this;

      return function (dialog) {
        return _this.deleteDetail(index);
      };
    },
    deleteDetail: function deleteDetail(index) {
      this.syllabusForm.details.splice(index, 1);
    },
    getDetailTitleName: function getDetailTitleName(index) {
      return index + '_detail_title';
    },
    getDetailDescriptionName: function getDetailDescriptionName(index) {
      return index + '_detail_description';
    },
    addTopicRow: function addTopicRow() {
      var new_index = this.syllabusForm.topics.push({
        title: '',
        start_date: '',
        end_date: '',
        description: ''
      });
    },
    confirmDeleteTopic: function confirmDeleteTopic(index) {
      var _this2 = this;

      return function (dialog) {
        return _this2.deleteTopic(index);
      };
    },
    deleteTopic: function deleteTopic(index) {
      this.syllabusForm.topics.splice(index, 1);
    },
    getTopicTitleName: function getTopicTitleName(index) {
      return index + '_topic_title';
    },
    getTopicDescriptionName: function getTopicDescriptionName(index) {
      return index + '_topic_description';
    },
    getTopicStartDateName: function getTopicStartDateName(index) {
      return index + '_topic_start_date';
    },
    getTopicEndDateName: function getTopicEndDateName(index) {
      return index + '_topic_end_date';
    },
    getPreRequisite: function getPreRequisite() {
      var _this3 = this;

      var loader = this.$loading.show();
      axios.get('/api/syllabus/pre-requisite').then(function (response) {
        _this3.batches = response.batches;
        loader.hide();
      })["catch"](function (error) {
        loader.hide();
        helper.showErrorMsg(error);
      });
    },
    getSubjects: function getSubjects() {
      var _this4 = this;

      if (!this.uuid) {
        this.syllabusForm.subject_id = '';
        this.selected_subject = null;
      }

      var loader = this.$loading.show();
      axios.post('/api/batch/' + this.syllabusForm.batch_id + '/subjects').then(function (response) {
        _this4.subjects = response.subjects;
        _this4.subject_details = response.subject_details;
        loader.hide();
      })["catch"](function (error) {
        loader.hide();
        helper.showErrorMsg(error);
      });
    },
    proceed: function proceed() {
      if (this.uuid) this.update();else this.store();
    },
    store: function store() {
      var _this5 = this;

      var loader = this.$loading.show();
      this.syllabusForm.post('/api/syllabus').then(function (response) {
        toastr.success(response.message);
        _this5.clearAttachment = !_this5.clearAttachment;
        _this5.syllabusForm.upload_token = _this5.$uuid.v4();
        _this5.selected_batch = null;
        _this5.selected_subject = null;
        _this5.syllabusForm.details = [];
        _this5.syllabusForm.topics = [];

        _this5.addRow();

        _this5.$emit('completed');

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

      var loader = this.$loading.show();
      axios.get('/api/syllabus/' + this.uuid).then(function (response) {
        var syllabus = response.syllabus;
        _this6.syllabusForm.title = syllabus.title;
        _this6.syllabusForm.description = syllabus.description;
        _this6.syllabusForm.batch_id = syllabus.subject.batch_id;
        _this6.syllabusForm.subject_id = syllabus.subject_id;
        _this6.selected_batch = _this6.syllabusForm.batch_id ? {
          id: syllabus.subject.batch_id,
          name: syllabus.subject.batch.course.name + ' ' + syllabus.subject.batch.name
        } : null;
        _this6.selected_subject = syllabus.subject_id ? {
          id: syllabus.subject_id,
          name: syllabus.subject.name + ' (' + syllabus.subject.code + ')'
        } : null;
        _this6.syllabusForm.upload_token = syllabus.upload_token;
        syllabus.syllabus_details.forEach(function (syllabus_detail) {
          _this6.syllabusForm.details.push({
            title: syllabus_detail.title,
            description: syllabus_detail.description
          });
        });
        syllabus.syllabus_topics.forEach(function (syllabus_topic) {
          _this6.syllabusForm.topics.push({
            title: syllabus_topic.title,
            start_date: syllabus_topic.start_date,
            end_date: syllabus_topic.end_date,
            description: syllabus_topic.description
          });
        });
        _this6.module_id = syllabus.id;
        loader.hide();
      })["catch"](function (error) {
        loader.hide();
        helper.showErrorMsg(error);

        _this6.$router.push('/resource/syllabus');
      });
    },
    update: function update() {
      var _this7 = this;

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

        _this7.$router.push('/resource/syllabus');
      })["catch"](function (error) {
        loader.hide();
        helper.showErrorMsg(error);
      });
    },
    onBatchSelect: function onBatchSelect(selectedOption) {
      this.syllabusForm.batch_id = selectedOption.id;
    },
    onSubjectSelect: function onSubjectSelect(selectedOption) {
      this.syllabusForm.subject_id = selectedOption.id;
    }
  },
  watch: {
    'syllabusForm.batch_id': function syllabusFormBatch_id(val) {
      if (val) {
        this.getSubjects();
      }
    }
  }
});

/***/ }),

/***/ "./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/resource/syllabus/form.vue?vue&type=style&index=0&lang=css&":
/*!*************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader??ref--13-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--13-2!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/views/resource/syllabus/form.vue?vue&type=style&index=0&lang=css& ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(/*! ../../../../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
// imports


// module
exports.push([module.i, "\n.loading-overlay.is-full-page{\n    z-index: 1060;\n}\n", ""]);

// exports


/***/ }),

/***/ "./node_modules/style-loader/index.js!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/resource/syllabus/form.vue?vue&type=style&index=0&lang=css&":
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/style-loader!./node_modules/css-loader??ref--13-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--13-2!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/views/resource/syllabus/form.vue?vue&type=style&index=0&lang=css& ***!
  \*****************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../../../../node_modules/css-loader??ref--13-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src??ref--13-2!../../../../../node_modules/vue-loader/lib??vue-loader-options!./form.vue?vue&type=style&index=0&lang=css& */ "./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/resource/syllabus/form.vue?vue&type=style&index=0&lang=css&");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../../../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/resource/syllabus/form.vue?vue&type=template&id=53e900a8&":
/*!********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/views/resource/syllabus/form.vue?vue&type=template&id=53e900a8& ***!
  \********************************************************************************************************************************************************************************************************************/
/*! 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.syllabusForm.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("academic.batch")) + " ")
                ]),
                _vm._v(" "),
                _c(
                  "v-select",
                  {
                    attrs: {
                      label: "name",
                      "group-values": "batches",
                      "group-label": "course_group",
                      "group-select": false,
                      name: "batch_id",
                      id: "batch_id",
                      options: _vm.batches,
                      placeholder: _vm.trans("academic.select_batch")
                    },
                    on: {
                      select: _vm.onBatchSelect,
                      close: function($event) {
                        return _vm.syllabusForm.errors.clear("batch_id")
                      },
                      remove: function($event) {
                        _vm.syllabusForm.batch_id = ""
                      }
                    },
                    model: {
                      value: _vm.selected_batch,
                      callback: function($$v) {
                        _vm.selected_batch = $$v
                      },
                      expression: "selected_batch"
                    }
                  },
                  [
                    !_vm.batches.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.syllabusForm,
                    "prop-name": "batch_id"
                  }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-3" }, [
            _vm.syllabusForm.batch_id
              ? _c(
                  "div",
                  { staticClass: "form-group" },
                  [
                    _c("label", { attrs: { for: "" } }, [
                      _vm._v(_vm._s(_vm.trans("academic.subject")) + " ")
                    ]),
                    _vm._v(" "),
                    _c(
                      "v-select",
                      {
                        attrs: {
                          label: "name",
                          name: "subject_id",
                          id: "subject_id",
                          options: _vm.subjects,
                          placeholder: _vm.trans("resource.select_subject")
                        },
                        on: {
                          select: _vm.onSubjectSelect,
                          close: function($event) {
                            return _vm.syllabusForm.errors.clear("subject_id")
                          },
                          remove: function($event) {
                            _vm.syllabusForm.subject_id = ""
                          }
                        },
                        model: {
                          value: _vm.selected_subject,
                          callback: function($$v) {
                            _vm.selected_subject = $$v
                          },
                          expression: "selected_subject"
                        }
                      },
                      [
                        !_vm.subjects.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.syllabusForm,
                        "prop-name": "subject_id"
                      }
                    })
                  ],
                  1
                )
              : _vm._e()
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12 col-sm-6" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("resource.syllabus_title")))
                ]),
                _vm._v(" "),
                _c("input", {
                  directives: [
                    {
                      name: "model",
                      rawName: "v-model",
                      value: _vm.syllabusForm.title,
                      expression: "syllabusForm.title"
                    }
                  ],
                  staticClass: "form-control",
                  attrs: {
                    type: "text",
                    name: "title",
                    placeholder: _vm.trans("resource.syllabus_title")
                  },
                  domProps: { value: _vm.syllabusForm.title },
                  on: {
                    input: function($event) {
                      if ($event.target.composing) {
                        return
                      }
                      _vm.$set(_vm.syllabusForm, "title", $event.target.value)
                    }
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: { "form-name": _vm.syllabusForm, "prop-name": "title" }
                })
              ],
              1
            )
          ]),
          _vm._v(" "),
          _c("div", { staticClass: "col-12" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("label", { attrs: { for: "" } }, [
                  _vm._v(_vm._s(_vm.trans("resource.syllabus_description")))
                ]),
                _vm._v(" "),
                _c("autosize-textarea", {
                  attrs: {
                    rows: "2",
                    name: "description",
                    placeholder: _vm.trans("resource.syllabus_description")
                  },
                  model: {
                    value: _vm.syllabusForm.description,
                    callback: function($$v) {
                      _vm.$set(_vm.syllabusForm, "description", $$v)
                    },
                    expression: "syllabusForm.description"
                  }
                }),
                _vm._v(" "),
                _c("show-error", {
                  attrs: {
                    "form-name": _vm.syllabusForm,
                    "prop-name": "description"
                  }
                })
              ],
              1
            )
          ])
        ]),
        _vm._v(" "),
        _c("div", { staticClass: "row" }, [
          _c(
            "div",
            { staticClass: "col-12 col-sm-6" },
            [
              _c("h4", { staticClass: "card-title" }, [
                _vm._v(_vm._s(_vm.trans("resource.syllabus_detail")))
              ]),
              _vm._v(" "),
              _vm._l(_vm.syllabusForm.details, function(detail, index) {
                return [
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(
                          _vm._s(_vm.trans("resource.syllabus_detail_title")) +
                            " \n                        "
                        ),
                        _c(
                          "button",
                          {
                            directives: [
                              {
                                name: "confirm",
                                rawName: "v-confirm",
                                value: { ok: _vm.confirmDeleteDetail(index) },
                                expression: "{ok: confirmDeleteDetail(index)}"
                              },
                              {
                                name: "tooltip",
                                rawName: "v-tooltip",
                                value: _vm.trans("general.delete"),
                                expression: "trans('general.delete')"
                              }
                            ],
                            key: index + "_delete_detail",
                            staticClass: "btn btn-xs btn-danger m-l-20",
                            attrs: { type: "button" }
                          },
                          [_c("i", { staticClass: "fas fa-times" })]
                        )
                      ]),
                      _vm._v(" "),
                      _c("input", {
                        directives: [
                          {
                            name: "model",
                            rawName: "v-model",
                            value: detail.title,
                            expression: "detail.title"
                          }
                        ],
                        staticClass: "form-control",
                        attrs: {
                          type: "text",
                          name: _vm.getDetailTitleName(index),
                          placeholder: _vm.trans(
                            "resource.syllabus_detail_title"
                          )
                        },
                        domProps: { value: detail.title },
                        on: {
                          input: function($event) {
                            if ($event.target.composing) {
                              return
                            }
                            _vm.$set(detail, "title", $event.target.value)
                          }
                        }
                      }),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.syllabusForm,
                          "prop-name": _vm.getDetailTitleName(index)
                        }
                      })
                    ],
                    1
                  ),
                  _vm._v(" "),
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(
                          _vm._s(
                            _vm.trans("resource.syllabus_detail_description")
                          )
                        )
                      ]),
                      _vm._v(" "),
                      _c("autosize-textarea", {
                        attrs: {
                          rows: "2",
                          name: _vm.getDetailDescriptionName(index),
                          placeholder: _vm.trans(
                            "resource.syllabus_detail_description"
                          )
                        },
                        model: {
                          value: detail.description,
                          callback: function($$v) {
                            _vm.$set(detail, "description", $$v)
                          },
                          expression: "detail.description"
                        }
                      }),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.syllabusForm,
                          "prop-name": _vm.getDetailDescriptionName(index)
                        }
                      })
                    ],
                    1
                  )
                ]
              }),
              _vm._v(" "),
              _c("div", { staticClass: "form-group" }, [
                _c(
                  "button",
                  {
                    staticClass: "btn btn-info btn-sm waves-effect waves-light",
                    attrs: { type: "button" },
                    on: { click: _vm.addDetailRow }
                  },
                  [
                    _vm._v(
                      _vm._s(_vm.trans("resource.syllabus_add_new_detail"))
                    )
                  ]
                )
              ])
            ],
            2
          ),
          _vm._v(" "),
          _c(
            "div",
            { staticClass: "col-12 col-sm-6" },
            [
              _c("h4", { staticClass: "card-title" }, [
                _vm._v(_vm._s(_vm.trans("resource.syllabus_topic")))
              ]),
              _vm._v(" "),
              _vm._l(_vm.syllabusForm.topics, function(topic, index) {
                return [
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(
                          _vm._s(_vm.trans("resource.syllabus_topic_title")) +
                            " \n                            "
                        ),
                        _c(
                          "button",
                          {
                            directives: [
                              {
                                name: "confirm",
                                rawName: "v-confirm",
                                value: { ok: _vm.confirmDeleteTopic(index) },
                                expression: "{ok: confirmDeleteTopic(index)}"
                              },
                              {
                                name: "tooltip",
                                rawName: "v-tooltip",
                                value: _vm.trans("general.delete"),
                                expression: "trans('general.delete')"
                              }
                            ],
                            key: index + "_delete_topic",
                            staticClass: "btn btn-xs btn-danger m-l-20",
                            attrs: { type: "button" }
                          },
                          [_c("i", { staticClass: "fas fa-times" })]
                        )
                      ]),
                      _vm._v(" "),
                      _c("input", {
                        directives: [
                          {
                            name: "model",
                            rawName: "v-model",
                            value: topic.title,
                            expression: "topic.title"
                          }
                        ],
                        staticClass: "form-control",
                        attrs: {
                          type: "text",
                          name: _vm.getTopicTitleName(index),
                          placeholder: _vm.trans(
                            "resource.syllabus_topic_title"
                          )
                        },
                        domProps: { value: topic.title },
                        on: {
                          input: function($event) {
                            if ($event.target.composing) {
                              return
                            }
                            _vm.$set(topic, "title", $event.target.value)
                          }
                        }
                      }),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.syllabusForm,
                          "prop-name": _vm.getTopicTitleName(index)
                        }
                      })
                    ],
                    1
                  ),
                  _vm._v(" "),
                  _c("div", { staticClass: "row" }, [
                    _c("div", { staticClass: "col-12 col-sm-6" }, [
                      _c(
                        "div",
                        { staticClass: "form-group" },
                        [
                          _c("label", { attrs: { for: "" } }, [
                            _vm._v(
                              _vm._s(
                                _vm.trans("resource.syllabus_topic_start_date")
                              )
                            )
                          ]),
                          _vm._v(" "),
                          _c("datepicker", {
                            attrs: {
                              bootstrapStyling: true,
                              placeholder: _vm.trans(
                                "resource.syllabus_start_date"
                              )
                            },
                            on: {
                              selected: function($event) {
                                _vm.syllabusForm.errors.clear(
                                  _vm.getTopicStartDateName(index)
                                )
                              }
                            },
                            model: {
                              value: topic.start_date,
                              callback: function($$v) {
                                _vm.$set(topic, "start_date", $$v)
                              },
                              expression: "topic.start_date"
                            }
                          }),
                          _vm._v(" "),
                          _c("show-error", {
                            attrs: {
                              "form-name": _vm.syllabusForm,
                              "prop-name": _vm.getTopicStartDateName(index)
                            }
                          })
                        ],
                        1
                      )
                    ]),
                    _vm._v(" "),
                    _c("div", { staticClass: "col-12 col-sm-6" }, [
                      _c(
                        "div",
                        { staticClass: "form-group" },
                        [
                          _c("label", { attrs: { for: "" } }, [
                            _vm._v(
                              _vm._s(
                                _vm.trans("resource.syllabus_topic_end_date")
                              )
                            )
                          ]),
                          _vm._v(" "),
                          _c("datepicker", {
                            attrs: {
                              bootstrapStyling: true,
                              placeholder: _vm.trans(
                                "resource.syllabus_end_date"
                              )
                            },
                            on: {
                              selected: function($event) {
                                _vm.syllabusForm.errors.clear(
                                  _vm.getTopicEndDateName(index)
                                )
                              }
                            },
                            model: {
                              value: topic.end_date,
                              callback: function($$v) {
                                _vm.$set(topic, "end_date", $$v)
                              },
                              expression: "topic.end_date"
                            }
                          }),
                          _vm._v(" "),
                          _c("show-error", {
                            attrs: {
                              "form-name": _vm.syllabusForm,
                              "prop-name": _vm.getTopicEndDateName(index)
                            }
                          })
                        ],
                        1
                      )
                    ])
                  ]),
                  _vm._v(" "),
                  _c(
                    "div",
                    { staticClass: "form-group" },
                    [
                      _c("label", { attrs: { for: "" } }, [
                        _vm._v(
                          _vm._s(
                            _vm.trans("resource.syllabus_topic_description")
                          )
                        )
                      ]),
                      _vm._v(" "),
                      _c("autosize-textarea", {
                        attrs: {
                          rows: "2",
                          name: _vm.getTopicDescriptionName(index),
                          placeholder: _vm.trans(
                            "resource.syllabus_topic_description"
                          )
                        },
                        model: {
                          value: topic.description,
                          callback: function($$v) {
                            _vm.$set(topic, "description", $$v)
                          },
                          expression: "topic.description"
                        }
                      }),
                      _vm._v(" "),
                      _c("show-error", {
                        attrs: {
                          "form-name": _vm.syllabusForm,
                          "prop-name": _vm.getTopicDescriptionName(index)
                        }
                      })
                    ],
                    1
                  )
                ]
              }),
              _vm._v(" "),
              _c("div", { staticClass: "form-group" }, [
                _c(
                  "button",
                  {
                    staticClass: "btn btn-info btn-sm waves-effect waves-light",
                    attrs: { type: "button" },
                    on: { click: _vm.addTopicRow }
                  },
                  [_vm._v(_vm._s(_vm.trans("resource.syllabus_add_new_topic")))]
                )
              ])
            ],
            2
          ),
          _vm._v(" "),
          _c("div", { staticClass: "col-12" }, [
            _c(
              "div",
              { staticClass: "form-group" },
              [
                _c("file-upload-input", {
                  attrs: {
                    "button-text": _vm.trans("general.upload_document"),
                    token: _vm.syllabusForm.upload_token,
                    module: "syllabus",
                    "clear-file": _vm.clearAttachment,
                    "module-id": _vm.module_id
                  }
                })
              ],
              1
            )
          ])
        ]),
        _vm._v(" "),
        _c(
          "div",
          { staticClass: "card-footer text-right" },
          [
            _c(
              "router-link",
              {
                staticClass: "btn btn-danger waves-effect waves-light ",
                attrs: { to: "/resource/syllabus" }
              },
              [_vm._v(_vm._s(_vm.trans("general.cancel")))]
            ),
            _vm._v(" "),
            _c(
              "button",
              {
                staticClass: "btn btn-info waves-effect waves-light",
                attrs: { type: "submit" }
              },
              [
                _vm.uuid
                  ? _c("span", [_vm._v(_vm._s(_vm.trans("general.update")))])
                  : _c("span", [_vm._v(_vm._s(_vm.trans("general.save")))])
              ]
            )
          ],
          1
        )
      ]
    )
  ])
}
var staticRenderFns = []
render._withStripped = true



/***/ }),

/***/ "./resources/js/views/resource/syllabus/form.vue":
/*!*******************************************************!*\
  !*** ./resources/js/views/resource/syllabus/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_53e900a8___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./form.vue?vue&type=template&id=53e900a8& */ "./resources/js/views/resource/syllabus/form.vue?vue&type=template&id=53e900a8&");
/* 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/resource/syllabus/form.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport *//* harmony import */ var _form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./form.vue?vue&type=style&index=0&lang=css& */ "./resources/js/views/resource/syllabus/form.vue?vue&type=style&index=0&lang=css&");
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __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_3__["default"])(
  _form_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _form_vue_vue_type_template_id_53e900a8___WEBPACK_IMPORTED_MODULE_0__["render"],
  _form_vue_vue_type_template_id_53e900a8___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  false,
  null,
  null,
  null
  
)

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

/***/ }),

/***/ "./resources/js/views/resource/syllabus/form.vue?vue&type=script&lang=js&":
/*!********************************************************************************!*\
  !*** ./resources/js/views/resource/syllabus/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/resource/syllabus/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/resource/syllabus/form.vue?vue&type=style&index=0&lang=css&":
/*!****************************************************************************************!*\
  !*** ./resources/js/views/resource/syllabus/form.vue?vue&type=style&index=0&lang=css& ***!
  \****************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_13_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_13_2_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../node_modules/style-loader!../../../../../node_modules/css-loader??ref--13-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src??ref--13-2!../../../../../node_modules/vue-loader/lib??vue-loader-options!./form.vue?vue&type=style&index=0&lang=css& */ "./node_modules/style-loader/index.js!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/resource/syllabus/form.vue?vue&type=style&index=0&lang=css&");
/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_13_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_13_2_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_13_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_13_2_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_13_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_13_2_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_13_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_13_2_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_13_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_13_2_node_modules_vue_loader_lib_index_js_vue_loader_options_form_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ "./resources/js/views/resource/syllabus/form.vue?vue&type=template&id=53e900a8&":
/*!**************************************************************************************!*\
  !*** ./resources/js/views/resource/syllabus/form.vue?vue&type=template&id=53e900a8& ***!
  \**************************************************************************************/
/*! 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_53e900a8___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=53e900a8& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/views/resource/syllabus/form.vue?vue&type=template&id=53e900a8&");
/* 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_53e900a8___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_53e900a8___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });



/***/ })

}]);
//# sourceMappingURL=index.js.map?id=09d67f0a019b26413653