/home/techb158/ileadtechnology.com/SSM/public/js/configuration/exam/term
NameSizeModeActions
edit~js/-0755rm
edit.js57660644editdlrm
edit.js.map1750644editdlrm
index.js141710644editdlrm
index.js.map1680644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/configuration/exam/term/edit.js (5766B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[99],{"0EKD":function(t,e,r){"use strict";r.r(e);var s={components:{termForm:r("c7AO").a},data:function(){return{id:this.$route.params.id}},mounted:function(){helper.hasPermission("access-configuration")||(helper.notAccessibleMsg(),this.$router.push("/dashboard"))}},o=r("KHd+"),a=Object(o.a)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"page-titles"},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-12 col-sm-6"},[r("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("exam.edit_term")))])]),t._v(" "),r("div",{staticClass:"col-12 col-sm-6"},[r("div",{staticClass:"action-buttons pull-right"},[r("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){return t.$router.push("/configuration/exam/term")}}},[r("i",{staticClass:"fas fa-list"}),t._v(" "),r("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("exam.term")))])])])])])]),t._v(" "),r("div",{staticClass:"container-fluid"},[r("div",{staticClass:"card card-form"},[r("div",{staticClass:"card-body p-t-20"},[r("term-form",{attrs:{id:t.id}})],1)])])])}),[],!1,null,null,null);e.default=a.exports},c7AO:function(t,e,r){"use strict";var s={data:function(){return{termForm:new Form({name:"",course_group_id:"",description:""}),course_groups:[],selected_course_group:null}},props:["id"],mounted:function(){this.getPreRequisite()},methods:{getPreRequisite:function(){var t=this,e=this.$loading.show();axios.get("/api/exam/term/pre-requisite").then((function(r){t.course_groups=r,t.id&&t.get(),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},proceed:function(){this.id?this.update():this.store()},store:function(){var t=this,e=this.$loading.show();this.termForm.post("/api/exam/term").then((function(r){toastr.success(r.message),t.selected_course_group=null,t.$emit("completed"),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},get:function(){var t=this,e=this.$loading.show();axios.get("/api/exam/term/"+this.id).then((function(r){t.termForm.name=r.name,t.termForm.course_group_id=r.course_group_id,t.termForm.description=r.description,e.hide()})).catch((function(r){e.hide(),helper.showErrorMsg(r),t.$router.push("/configuration/exam/term")}))},update:function(){var t=this,e=this.$loading.show();this.termForm.patch("/api/exam/term/"+this.id).then((function(r){toastr.success(r.message),e.hide(),t.$router.push("/configuration/exam/term")})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onCourseGroupSelect:function(t){this.termForm.course_group_id=t.id}}},o=r("KHd+"),a=Object(o.a)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("form",{on:{submit:function(e){return e.preventDefault(),t.proceed(e)},keydown:function(e){return t.termForm.errors.clear(e.target.name)}}},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-12 col-sm-3"},[r("div",{staticClass:"form-group"},[r("label",{attrs:{for:""}},[t._v(t._s(t.trans("exam.term_name")))]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.termForm.name,expression:"termForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.trans("exam.term_name")},domProps:{value:t.termForm.name},on:{input:function(e){e.target.composing||t.$set(t.termForm,"name",e.target.value)}}}),t._v(" "),r("show-error",{attrs:{"form-name":t.termForm,"prop-name":"name"}})],1)]),t._v(" "),r("div",{staticClass:"col-12 col-sm-3"},[r("div",{staticClass:"form-group"},[r("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.course_group"))+" ")]),t._v(" "),r("v-select",{attrs:{label:"name",name:"course_group_id",id:"course_group_id",options:t.course_groups,placeholder:t.trans("academic.select_course_group")},on:{select:t.onCourseGroupSelect,close:function(e){return t.termForm.errors.clear("course_group_id")},remove:function(e){t.termForm.course_group_id=""}},model:{value:t.selected_course_group,callback:function(e){t.selected_course_group=e},expression:"selected_course_group"}},[t.course_groups.length?t._e():r("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),r("show-error",{attrs:{"form-name":t.termForm,"prop-name":"course_group_id"}})],1)]),t._v(" "),r("div",{staticClass:"col-12 col-sm-6"},[r("div",{staticClass:"form-group"},[r("label",{attrs:{for:""}},[t._v(t._s(t.trans("exam.term_description")))]),t._v(" "),r("input",{directives:[{name:"model",rawName:"v-model",value:t.termForm.description,expression:"termForm.description"}],staticClass:"form-control",attrs:{type:"text",name:"description",placeholder:t.trans("exam.term_description")},domProps:{value:t.termForm.description},on:{input:function(e){e.target.composing||t.$set(t.termForm,"description",e.target.value)}}}),t._v(" "),r("show-error",{attrs:{"form-name":t.termForm,"prop-name":"description"}})],1)])]),t._v(" "),r("div",{staticClass:"card-footer text-right"},[r("router-link",{directives:[{name:"show",rawName:"v-show",value:t.id,expression:"id"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/configuration/exam/term"}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),t.id?t._e():r("button",{staticClass:"btn btn-danger waves-effect waves-light ",attrs:{type:"button"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),r("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t.id?r("span",[t._v(t._s(t.trans("general.update")))]):r("span",[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null);e.a=a.exports}}]); //# sourceMappingURL=edit.js.map?id=3aca61fe1555b573298d