/
home
/
techb158
/
ileadtechnology.com
/
SSM
/
public
/
js
/
academic
/
batch
/
/home/techb158/ileadtechnology.com/SSM/public/js/academic/batch
mkdir
upload
Name
Size
Mode
Actions
edit~js/
-
0755
rm
edit.js
13781
0644
edit
dl
rm
edit.js.map
157
0644
edit
dl
rm
index.js
22506
0644
edit
dl
rm
index.js.map
150
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/SSM/public/js/academic/batch/edit.js
(13781B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{LJqp:function(e,t,a){"use strict";var s={components:{},data:function(){return{batchForm:new Form({name:"",course_id:"",exam_grade_id:"",exam_observation_id:"",max_strength:"",roll_number_prefix:"",roll_number_digit:0,default_attendance_method:"",description:"",holidays_except:[]}),holiday:"",attendance_methods:[],courses:[],selected_course:null,exam_grades:[],selected_exam_grade:null,exam_observations:[],selected_exam_observation:null}},props:["id"],mounted:function(){helper.hasPermission("create-batch")||helper.hasPermission("edit-batch")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.id&&this.get(),this.getPreRequisite()},methods:{proceed:function(){this.id?this.update():this.store()},getPreRequisite:function(){var e=this,t=this.$loading.show();axios.get("/api/batch/pre-requisite").then((function(a){e.courses=a.courses,e.exam_grades=a.exam_grades,e.exam_observations=a.exam_observations,e.attendance_methods=a.attendance_methods,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},store:function(){var e=this,t=this.$loading.show();this.batchForm.post("/api/batch").then((function(a){toastr.success(a.message),e.selected_course=null,e.$emit("completed"),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},get:function(){var e=this,t=this.$loading.show();axios.get("/api/batch/"+this.id).then((function(a){e.batchForm.name=a.batch.name,e.batchForm.course_id=a.batch.course_id,e.batchForm.exam_grade_id=a.batch.exam_grade_id,e.selected_exam_grade=a.batch.exam_grade_id?{id:a.batch.exam_grade_id,name:a.batch.grade.name}:null,e.batchForm.exam_observation_id=a.batch.exam_observation_id,e.selected_exam_observation=a.batch.exam_observation_id?{id:a.batch.exam_observation_id,name:a.batch.observation.name}:null,e.batchForm.description=a.batch.description,e.batchForm.max_strength=a.batch.options?a.batch.options.max_strength:helper.getConfig("default_max_strength_per_batch"),e.batchForm.default_attendance_method=a.batch.options?a.batch.options.default_attendance_method:"",e.batchForm.roll_number_prefix=a.batch.options?a.batch.options.roll_number_prefix:helper.getConfig("default_roll_number_prefix"),e.batchForm.roll_number_digit=a.batch.options&&a.batch.options.hasOwnProperty("roll_number_digit")?a.batch.options.roll_number_digit:0,e.selected_course=a.selected_course,e.batchForm.holidays_except=a.batch.options.holidays_except||[],t.hide()})).catch((function(a){t.hide(),helper.showErrorMsg(a),e.$router.push("/academic/batch")}))},update:function(){var e=this,t=this.$loading.show();this.batchForm.patch("/api/batch/"+this.id).then((function(a){toastr.success(a.message),t.hide(),e.batchForm.holidays_except=[],e.$router.push("/academic/batch")})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},onCourseSelect:function(e){return this.batchForm.course_id=e.id},onExamGradeSelect:function(e){return this.batchForm.exam_grade_id=e.id},onExamObservationSelect:function(e){return this.batchForm.exam_observation_id=e.id},onSelected:function(e){this.holiday="",e=helper.toDate(e),this.batchForm.holidays_except.indexOf(e)<0&&this.batchForm.holidays_except.push(e),this.batchForm.errors.clear("holidays_except"),this.holiday=""},remove:function(e){var t=this.batchForm.holidays_except.indexOf(e);t<0||(this.batchForm.holidays_except.splice(t,1),this.holiday="")}},filters:{momentWithDay:function(e){return helper.formatDateWithDay(e)}}},r=a("KHd+"),o=Object(r.a)(s,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("form",{on:{submit:function(t){return t.preventDefault(),e.proceed(t)},keydown:function(t){return e.batchForm.errors.clear(t.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("academic.batch_name")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.batchForm.name,expression:"batchForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:e.trans("academic.batch_name")},domProps:{value:e.batchForm.name},on:{input:function(t){t.target.composing||e.$set(e.batchForm,"name",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"name"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("academic.course")))]),e._v(" "),a("v-select",{attrs:{label:"name","group-values":"courses","group-label":"course_group","group-select":!1,name:"course_id",id:"course_id",options:e.courses,placeholder:e.trans("academic.select_course")},on:{select:e.onCourseSelect,close:function(t){return e.batchForm.errors.clear("course_id")},remove:function(t){e.batchForm.course_id=""}},model:{value:e.selected_course,callback:function(t){e.selected_course=t},expression:"selected_course"}},[e.courses.length?e._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"course_id"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("academic.max_strength")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.batchForm.max_strength,expression:"batchForm.max_strength"}],staticClass:"form-control",attrs:{type:"text",name:"max_strength",placeholder:e.trans("academic.max_strength")},domProps:{value:e.batchForm.max_strength},on:{input:function(t){t.target.composing||e.$set(e.batchForm,"max_strength",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"max_strength"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("academic.roll_number_prefix")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.batchForm.roll_number_prefix,expression:"batchForm.roll_number_prefix"}],staticClass:"form-control",attrs:{type:"text",name:"roll_number_prefix",placeholder:e.trans("academic.roll_number_prefix")},domProps:{value:e.batchForm.roll_number_prefix},on:{input:function(t){t.target.composing||e.$set(e.batchForm,"roll_number_prefix",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"roll_number_prefix"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("academic.roll_number_digit")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.batchForm.roll_number_digit,expression:"batchForm.roll_number_digit"}],staticClass:"form-control",attrs:{type:"text",name:"roll_number_digit",placeholder:e.trans("academic.roll_number_digit")},domProps:{value:e.batchForm.roll_number_digit},on:{input:function(t){t.target.composing||e.$set(e.batchForm,"roll_number_digit",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"roll_number_digit"}})],1)])])]),e._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("student.default_attendance_method")))]),e._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:e.batchForm.default_attendance_method,expression:"batchForm.default_attendance_method"}],staticClass:"custom-select col-12",attrs:{name:"default_attendance_method"},on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.batchForm,"default_attendance_method",t.target.multiple?a:a[0])}}},[a("option",{attrs:{value:"",selected:""}},[e._v(e._s(e.trans("general.select_one")))]),e._v(" "),e._l(e.attendance_methods,(function(t){return a("option",{domProps:{value:t.value}},[e._v("\n "+e._s(t.text)+"\n ")])}))],2),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"default_attendance_method"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("academic.batch_description")))]),e._v(" "),a("autosize-textarea",{attrs:{rows:"1",name:"description",placeholder:e.trans("academic.batch_description")},model:{value:e.batchForm.description,callback:function(t){e.$set(e.batchForm,"description",t)},expression:"batchForm.description"}}),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"description"}})],1)])]),e._v(" "),e.exam_observations.length?[a("h4",{staticClass:"card-title"},[e._v(e._s(e.trans("exam.configuration")))]),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("exam.grade"))+" ("+e._s(e.trans("exam.observation"))+")")]),e._v(" "),a("v-select",{attrs:{label:"name",name:"exam_grade_id",id:"exam_grade_id",options:e.exam_grades,placeholder:e.trans("exam.select_grade")},on:{select:e.onExamGradeSelect,close:function(t){return e.batchForm.errors.clear("exam_grade_id")},remove:function(t){e.batchForm.exam_grade_id=""}},model:{value:e.selected_exam_grade,callback:function(t){e.selected_exam_grade=t},expression:"selected_exam_grade"}},[e.exam_grades.length?e._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"exam_grade_id"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("exam.observation")))]),e._v(" "),a("v-select",{attrs:{label:"name",name:"exam_observation_id",id:"exam_observation_id",options:e.exam_observations,placeholder:e.trans("exam.select_observation")},on:{select:e.onExamObservationSelect,close:function(t){return e.batchForm.errors.clear("exam_observation_id")},remove:function(t){e.batchForm.exam_observation_id=""}},model:{value:e.selected_exam_observation,callback:function(t){e.selected_exam_observation=t},expression:"selected_exam_observation"}},[e.exam_observations.length?e._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"exam_observation_id"}})],1)])])]:e._e(),e._v(" "),e.id?[a("h4",{staticClass:"card-title"},[e._v(e._s(e.trans("calendar.holiday_configuration")))]),e._v(" "),a("p",{staticClass:"alert alert-info"},[e._v(e._s(e.trans("academic.batch_holiday_except_date_tip")))]),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("datepicker",{attrs:{bootstrapStyling:!0},on:{selected:e.onSelected},model:{value:e.holiday,callback:function(t){e.holiday=t},expression:"holiday"}}),e._v(" "),a("show-error",{attrs:{"form-name":e.batchForm,"prop-name":"dates"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-9"},[a("div",{staticClass:"form-group"},e._l(e.batchForm.holidays_except,(function(t){return a("span",{staticClass:"label label-info m-r-10 m-b-10 p-10"},[e._v("\n "+e._s(e._f("momentWithDay")(t))+" "),a("i",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("general.remove"),expression:"trans('general.remove')"}],staticClass:"fas fa-times-circle cursor",on:{click:function(a){return e.remove(t)}}})])})),0)])])]:e._e(),e._v(" "),a("div",{staticClass:"card-footer text-right"},[a("router-link",{directives:[{name:"show",rawName:"v-show",value:e.id,expression:"id"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/academic/batch"}},[e._v(e._s(e.trans("general.cancel")))]),e._v(" "),e.id?e._e():a("button",{staticClass:"btn btn-danger waves-effect waves-light ",attrs:{type:"button"},on:{click:function(t){return e.$emit("cancel")}}},[e._v(e._s(e.trans("general.cancel")))]),e._v(" "),a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[e.id?a("span",[e._v(e._s(e.trans("general.update")))]):a("span",[e._v(e._s(e.trans("general.save")))])])],1)],2)}),[],!1,null,null,null);t.a=o.exports},U6Xs:function(e,t,a){"use strict";a.r(t);var s={components:{batchForm:a("LJqp").a},data:function(){return{id:this.$route.params.id}},mounted:function(){helper.hasPermission("edit-batch")||(helper.notAccessibleMsg(),this.$router.push("/dashboard"))}},r=a("KHd+"),o=Object(r.a)(s,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"page-titles"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("h3",{staticClass:"text-themecolor"},[e._v(e._s(e.trans("academic.edit_batch"))+"\n "),a("button",{staticClass:"btn btn-info btn-sm",on:{click:function(t){return e.$router.push("/academic/batch")}}},[a("i",{staticClass:"fas fa-list"}),e._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[e._v(e._s(e.trans("academic.batch")))])])])])])]),e._v(" "),a("div",{staticClass:"container-fluid"},[a("div",{staticClass:"card card-form"},[a("div",{staticClass:"card-body"},[a("batch-form",{attrs:{id:e.id}})],1)])])])}),[],!1,null,null,null);t.default=o.exports}}]); //# sourceMappingURL=edit.js.map?id=b60bb4ca0ca07c2601a5
Save
cmd:
run