/home/techb158/ileadtechnology.com/SSM/public/js/academic/subject
NameSizeModeActions
edit~js/-0755rm
edit.js97110644editdlrm
edit.js.map1610644editdlrm
index.js234150644editdlrm
index.js.map1540644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/academic/subject/index.js (23415B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{"0+TA":function(t,e,s){"use strict";var a={components:{},data:function(){return{subjectForm:new Form({name:"",group:"",batch_id:"",code:"",shortcode:"",max_class_per_week:"",is_elective:!1,has_no_exam:!1,description:""}),batches:[],selected_batch:null}},props:["id"],mounted:function(){helper.hasPermission("create-subject")||helper.hasPermission("edit-subject")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.id&&this.get(),this.getPreRequisite()},methods:{getPreRequisite:function(){var t=this,e=this.$loading.show();axios.get("/api/subject/pre-requisite").then((function(s){t.batches=s.batches,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.subjectForm.post("/api/subject").then((function(s){toastr.success(s.message),t.selected_batch=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/subject/"+this.id).then((function(s){t.subjectForm.name=s.subject.name,t.subjectForm.code=s.subject.code,t.subjectForm.shortcode=s.subject.shortcode,t.subjectForm.batch_id=s.subject.batch_id,t.subjectForm.description=s.subject.description,t.subjectForm.max_class_per_week=s.subject.max_class_per_week,t.subjectForm.is_elective=s.subject.is_elective,t.subjectForm.has_no_exam=s.subject.has_no_exam,t.subjectForm.group=s.subject.options.group,t.selected_batch=s.selected_batch,e.hide()})).catch((function(s){e.hide(),helper.showErrorMsg(s),t.$router.push("/academic/subject")}))},update:function(){var t=this,e=this.$loading.show();this.subjectForm.patch("/api/subject/"+this.id).then((function(s){toastr.success(s.message),e.hide(),t.$router.push("/academic/subject")})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onBatchSelect:function(t){this.subjectForm.batch_id=t.id}}},o=s("KHd+"),r=Object(o.a)(a,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("form",{on:{submit:function(e){return e.preventDefault(),t.proceed(e)},keydown:function(e){return t.subjectForm.errors.clear(e.target.name)}}},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.batch")))]),t._v(" "),s("v-select",{attrs:{label:"name","group-values":"batches","group-label":"course_group","group-select":!1,name:"batch_id",id:"batch_id",options:t.batches,placeholder:t.trans("academic.select_batch")},on:{select:t.onBatchSelect,close:function(e){return t.subjectForm.errors.clear("batch_id")},remove:function(e){t.subjectForm.batch_id=""}},model:{value:t.selected_batch,callback:function(e){t.selected_batch=e},expression:"selected_batch"}},[t.batches.length?t._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])]),t._v(" "),s("show-error",{attrs:{"form-name":t.subjectForm,"prop-name":"batch_id"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.subject_name")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.subjectForm.name,expression:"subjectForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.trans("academic.subject_name")},domProps:{value:t.subjectForm.name},on:{input:function(e){e.target.composing||t.$set(t.subjectForm,"name",e.target.value)}}}),t._v(" "),s("show-error",{attrs:{"form-name":t.subjectForm,"prop-name":"name"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.subject_group")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.subjectForm.group,expression:"subjectForm.group"}],staticClass:"form-control",attrs:{type:"text",name:"group",placeholder:t.trans("academic.subject_group")},domProps:{value:t.subjectForm.group},on:{input:function(e){e.target.composing||t.$set(t.subjectForm,"group",e.target.value)}}}),t._v(" "),s("show-error",{attrs:{"form-name":t.subjectForm,"prop-name":"group"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.subject_code")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.subjectForm.code,expression:"subjectForm.code"}],staticClass:"form-control",attrs:{type:"text",name:"code",placeholder:t.trans("academic.subject_code")},domProps:{value:t.subjectForm.code},on:{input:function(e){e.target.composing||t.$set(t.subjectForm,"code",e.target.value)}}}),t._v(" "),s("show-error",{attrs:{"form-name":t.subjectForm,"prop-name":"code"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.subject_shortcode")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.subjectForm.shortcode,expression:"subjectForm.shortcode"}],staticClass:"form-control",attrs:{type:"text",name:"shortcode",placeholder:t.trans("academic.subject_shortcode")},domProps:{value:t.subjectForm.shortcode},on:{input:function(e){e.target.composing||t.$set(t.subjectForm,"shortcode",e.target.value)}}}),t._v(" "),s("show-error",{attrs:{"form-name":t.subjectForm,"prop-name":"shortcode"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.subject_max_class_per_week")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.subjectForm.max_class_per_week,expression:"subjectForm.max_class_per_week"}],staticClass:"form-control",attrs:{type:"text",name:"max_class_per_week",placeholder:t.trans("academic.subject_max_class_per_week")},domProps:{value:t.subjectForm.max_class_per_week},on:{input:function(e){e.target.composing||t.$set(t.subjectForm,"max_class_per_week",e.target.value)}}}),t._v(" "),s("show-error",{attrs:{"form-name":t.subjectForm,"prop-name":"max_class_per_week"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-2"},[s("div",{staticClass:"form-group"},[s("div",[t._v(t._s(t.trans("academic.subject_is_elective")))]),t._v(" "),s("switches",{staticClass:"m-t-20",attrs:{theme:"bootstrap",color:"success"},model:{value:t.subjectForm.is_elective,callback:function(e){t.$set(t.subjectForm,"is_elective",e)},expression:"subjectForm.is_elective"}}),t._v(" "),s("show-error",{attrs:{"form-name":t.subjectForm,"prop-name":"is_elective"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-2"},[s("div",{staticClass:"form-group"},[s("div",[t._v(t._s(t.trans("academic.subject_has_no_exam")))]),t._v(" "),s("switches",{staticClass:"m-t-20",attrs:{theme:"bootstrap",color:"success"},model:{value:t.subjectForm.has_no_exam,callback:function(e){t.$set(t.subjectForm,"has_no_exam",e)},expression:"subjectForm.has_no_exam"}}),t._v(" "),s("show-error",{attrs:{"form-name":t.subjectForm,"prop-name":"has_no_exam"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-8"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.subject_description")))]),t._v(" "),s("autosize-textarea",{attrs:{rows:"1",name:"description",placeholder:t.trans("academic.subject_description")},model:{value:t.subjectForm.description,callback:function(e){t.$set(t.subjectForm,"description",e)},expression:"subjectForm.description"}}),t._v(" "),s("show-error",{attrs:{"form-name":t.subjectForm,"prop-name":"description"}})],1)])]),t._v(" "),s("div",{staticClass:"card-footer text-right"},[s("router-link",{directives:[{name:"show",rawName:"v-show",value:t.id,expression:"id"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/academic/subject"}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),t.id?t._e():s("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(" "),s("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t.id?s("span",[t._v(t._s(t.trans("general.update")))]):s("span",[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null);e.a=r.exports},QaXi:function(t,e,s){"use strict";s.r(e);var a={components:{subjectForm:s("0+TA").a},data:function(){return{batches:{total:0,data:[]},batch:{},batch_id:null,filter:{sort_by:"name",order:"asc",course_id:[],page_length:helper.getConfig("page_length")},orderByOptions:[{value:"name",translation:i18n.academic.subject_name}],courses:[],selected_courses:null,showFilterPanel:!1,showCreatePanel:!1,subject_list:[],showReorderModal:!1,help_topic:""}},mounted:function(){helper.hasPermission("list-subject")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getSubjects(),helper.showDemoNotification(["academic"])},methods:{hasPermission:function(t){return helper.hasPermission(t)},showReorderAction:function(t){this.showReorderModal=!0,this.getSubjectList(t)},getSubjectList:function(t){var e=this;this.subject_list=[],this.batch=t,t.subjects.forEach((function(t){e.subject_list.push(t.name)}))},getSubjects:function(t){var e=this,s=this.$loading.show();this.batch_id=null,"number"!=typeof t&&(t=1);var a=helper.getFilterURL(this.filter);axios.get("/api/subject?page="+t+a).then((function(t){e.batches=t.batches,e.courses=t.filters.courses,s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},editSubject:function(t){this.$router.push("/academic/subject/"+t.id+"/edit")},confirmDelete:function(t){var e=this;return function(s){return e.deleteSubject(t)}},deleteSubject:function(t){var e=this,s=this.$loading.show();axios.delete("/api/subject/"+t.id).then((function(t){toastr.success(t.message),e.getSubjects(),s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},confirmCopyBatchSubject:function(t){var e=this;return function(s){return e.copySubject(t)}},copySubject:function(t){var e=this,s=this.$loading.show();axios.post("/api/subject/"+t.id+"/copy").then((function(t){toastr.success(t.message),e.getSubjects(),s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},confirmDeleteBatchSubject:function(t){var e=this;return function(s){return e.deleteBatchSubject(t)}},deleteBatchSubject:function(t){var e=this;axios.delete("/api/subject/"+t.id+"/delete").then((function(t){toastr.success(t.message),e.getSubjects()})).catch((function(t){helper.showErrorMsg(t)}))},getConfig:function(t){return helper.getConfig(t)},getElectiveData:function(t){return t.is_elective?'':''},getExamData:function(t){return t.has_no_exam?'':''},print:function(){var t=this.$loading.show();axios.post("/api/subject/print",{filter:this.filter}).then((function(e){var s=window.open("/print");t.hide(),s.document.write(e)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/subject/pdf",{filter:this.filter}).then((function(s){e.hide(),window.open("/download/report/"+s+"?token="+t.authToken)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onCourseSelect:function(t){this.filter.course_id.push(t.id)},onCourseRemove:function(t){this.filter.course_id.splice(this.filter.course_id.indexOf(t.id),1)},reorderSubject:function(){var t=this;axios.post("/api/batch/"+this.batch.id+"/subject/reorder",{list:this.subject_list}).then((function(e){toastr.success(e.message),t.showReorderModal=!1,t.getSubjects()})).catch((function(t){helper.showErrorMsg(t)}))}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)}},watch:{"filter.sort_by":function(t){this.getSubjects()},"filter.order":function(t){this.getSubjects()},"filter.page_length":function(t){this.getSubjects()}}},o=s("KHd+"),r=Object(o.a)(a,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"page-titles"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-6"},[s("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("academic.batch_wise_subject"))+" \n "),t.batches.total?s("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.batches.total,from:t.batches.from,to:t.batches.to})))]):s("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-6"},[s("div",{staticClass:"action-buttons pull-right"},[t.batches.total&&!t.showCreatePanel&&t.hasPermission("create-subject")?s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.add_new"),expression:"trans('general.add_new')"}],staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[s("i",{staticClass:"fas fa-plus"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("academic.add_new_subject")))])]):t._e(),t._v(" "),t.showFilterPanel?t._e():s("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showFilterPanel=!t.showFilterPanel}}},[s("i",{staticClass:"fas fa-filter"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("general.filter")))])]),t._v(" "),s("sort-by",{attrs:{"order-by-options":t.orderByOptions,"sort-by":t.filter.sort_by,order:t.filter.order},on:{updateSortBy:function(e){t.filter.sort_by=e},updateOrder:function(e){t.filter.order=e}}}),t._v(" "),s("div",{staticClass:"btn-group"},[s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.more_option"),expression:"trans('general.more_option')"}],staticClass:"btn btn-info btn-sm dropdown-toggle no-caret ",attrs:{type:"button",role:"menu",id:"moreOption","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[s("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),s("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[s("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[s("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))])])]),t._v(" "),s("help-button",{on:{clicked:function(e){t.help_topic="academic.subject"}}})],1)])])]),t._v(" "),s("div",{staticClass:"container-fluid"},[s("transition",{attrs:{name:"fade"}},[t.showFilterPanel?s("div",{staticClass:"card card-form"},[s("div",{staticClass:"card-body"},[s("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("general.filter"))+"\n ")]),t._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-4"},[s("div",{staticClass:"form-group"},[s("v-select",{attrs:{label:"name","track-by":"id","group-values":"courses","group-label":"course_group","group-select":!1,name:"course_id",id:"course_id",options:t.courses,placeholder:t.trans("academic.select_course"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_courses},on:{select:t.onCourseSelect,remove:t.onCourseRemove},model:{value:t.selected_courses,callback:function(e){t.selected_courses=e},expression:"selected_courses"}},[t.courses.length?t._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)])]),t._v(" "),s("div",{staticClass:"card-footer text-right"},[s("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){t.showFilterPanel=!1}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),s("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:t.getSubjects}},[t._v(t._s(t.trans("general.filter")))])])])]):t._e()]),t._v(" "),t.hasPermission("create-subject")?s("transition",{attrs:{name:"fade"}},[t.showCreatePanel?s("div",{staticClass:"card card-form"},[s("div",{staticClass:"card-body"},[s("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("academic.add_new_subject")))]),t._v(" "),s("subject-form",{on:{completed:t.getSubjects,cancel:function(e){t.showCreatePanel=!t.showCreatePanel}}})],1)]):t._e()]):t._e(),t._v(" "),s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[t.batches.total?s("div",{staticClass:"table-responsive"},[s("table",{staticClass:"table table-sm"},[s("thead",[s("tr",[s("th",[t._v(t._s(t.trans("academic.course")))]),t._v(" "),s("th",[t._v(t._s(t.trans("academic.batch")))]),t._v(" "),s("th",[t._v(t._s(t.trans("academic.subject")))])])]),t._v(" "),s("tbody",t._l(t.batches.data,(function(e){return s("tr",[s("td",[t._v("\n "+t._s(e.course.name)+" "),s("br"),t._v(" "),t.hasPermission("edit-subject")?s("div",{staticClass:"dropdown"},[s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.option"),expression:"trans('general.option')"}],staticClass:"btn btn-info btn-sm",attrs:{type:"button",href:"#",role:"button",id:"moreSubOption","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[s("i",{staticClass:"fas fa-ellipsis-h"})]),t._v(" "),s("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreSubOption"}},[t.hasPermission("edit-subject")?s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("academic.reorder_subject"),expression:"trans('academic.reorder_subject')"}],key:"reorder_"+e.id,staticClass:"dropdown-item custom-dropdown",on:{click:function(s){return s.preventDefault(),t.showReorderAction(e)}}},[s("i",{staticClass:"fas fa-arrows-alt"}),t._v(" "+t._s(t.trans("academic.reorder_subject")))]):t._e(),t._v(" "),t.hasPermission("create-subject")?s("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmCopyBatchSubject(e)},expression:"{ok: confirmCopyBatchSubject(batch)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("academic.copy_batch_subjects"),expression:"trans('academic.copy_batch_subjects')"}],key:"copy_"+e.id,staticClass:"dropdown-item custom-dropdown"},[s("i",{staticClass:"fas fa-copy"}),t._v(" "+t._s(t.trans("general.copy")))]):t._e(),t._v(" "),t.hasPermission("delete-subject")?s("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDeleteBatchSubject(e)},expression:"{ok: confirmDeleteBatchSubject(batch)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("academic.delete_batch_subjects"),expression:"trans('academic.delete_batch_subjects')"}],key:"delete_"+e.id,staticClass:"dropdown-item custom-dropdown"},[s("i",{staticClass:"fas fa-trash"}),t._v(" "+t._s(t.trans("general.delete")))]):t._e()])]):t._e()]),t._v(" "),s("td",{domProps:{textContent:t._s(e.name)}}),t._v(" "),s("td",[e.subjects?s("div",{staticClass:"table-responsive"},[s("table",{staticClass:"table table-hover"},[s("thead",[s("tr",[s("th",[t._v(t._s(t.trans("academic.subject_name")))]),t._v(" "),s("th",[t._v(t._s(t.trans("academic.subject_code")))]),t._v(" "),s("th",[t._v(t._s(t.trans("academic.subject_max_class_per_week")))]),t._v(" "),s("th",[t._v(t._s(t.trans("academic.subject_is_elective")))]),t._v(" "),s("th",[t._v(t._s(t.trans("academic.subject_has_no_exam")))]),t._v(" "),s("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),s("tbody",t._l(e.subjects,(function(e){return s("tr",[s("td",[t._v("\n "+t._s(e.name)+"\n "),e.options&&e.options.group?s("span",[t._v("("+t._s(e.options.group)+")")]):t._e()]),t._v(" "),s("td",[t._v("\n "+t._s(e.code)+" "),e.shortcode?s("span",[t._v("("+t._s(e.shortcode)+")")]):t._e()]),t._v(" "),s("td",{domProps:{textContent:t._s(e.max_class_per_week)}}),t._v(" "),s("td",{domProps:{innerHTML:t._s(t.getElectiveData(e))}}),t._v(" "),s("td",{domProps:{innerHTML:t._s(t.getExamData(e))}}),t._v(" "),s("td",{staticClass:"table-option"},[s("div",{staticClass:"btn-group"},[t.hasPermission("edit-subject")?s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("academic.edit_subject"),expression:"trans('academic.edit_subject')"}],staticClass:"btn btn-info btn-xs",on:{click:function(s){return s.preventDefault(),t.editSubject(e)}}},[s("i",{staticClass:"fas fa-edit"})]):t._e(),t._v(" "),t.hasPermission("delete-subject")?s("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDelete(e)},expression:"{ok: confirmDelete(subject)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("academic.delete_subject"),expression:"trans('academic.delete_subject')"}],key:e.id,staticClass:"btn btn-danger btn-xs"},[s("i",{staticClass:"fas fa-trash"})]):t._e()])])])})),0)])]):t._e()])])})),0)])]):t._e(),t._v(" "),t.batches.total?t._e():s("module-info",{attrs:{module:"academic",title:"subject_module_title",description:"subject_module_description",icon:"list"}},[s("div",{attrs:{slot:"btn"},slot:"btn"},[!t.showCreatePanel&&t.hasPermission("create-subject")?s("button",{staticClass:"btn btn-info btn-md",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[s("i",{staticClass:"fas fa-plus"}),t._v(" "+t._s(t.trans("general.add_new")))]):t._e()])]),t._v(" "),s("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.batches},on:{"update:pageLength":function(e){return t.$set(t.filter,"page_length",e)},"update:page-length":function(e){return t.$set(t.filter,"page_length",e)},updateRecords:t.getSubjects}})],1)])],1),t._v(" "),t.hasPermission("edit-subject")&&t.showReorderModal?s("transition",{attrs:{name:"modal"}},[s("div",{staticClass:"modal-mask"},[s("div",{staticClass:"modal-wrapper"},[s("div",{staticClass:"modal-container modal-lg"},[s("div",{staticClass:"modal-header"},[t._t("header",[t._v("\n "+t._s(t.trans("academic.reorder_subject"))+"\n "),s("span",{staticClass:"float-right pointer",on:{click:function(e){t.showReorderModal=!1}}},[t._v("x")])])],2),t._v(" "),s("div",{staticClass:"modal-body"},[t._t("body",[s("draggable",{staticClass:"list-group",on:{start:function(e){t.drag=!0},end:function(e){t.drag=!1}},model:{value:t.subject_list,callback:function(e){t.subject_list=e},expression:"subject_list"}},t._l(t.subject_list,(function(e){return s("div",{key:e.id,staticClass:"list-group-item pointer"},[s("i",{staticClass:"fas fa-arrows-alt"}),t._v(" "+t._s(e))])})),0),t._v(" "),s("button",{staticClass:"btn btn-info pull-right m-t-10",attrs:{type:"button"},on:{click:t.reorderSubject}},[t._v(t._s(t.trans("general.save")))])])],2)])])])]):t._e(),t._v(" "),s("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);e.default=r.exports}}]); //# sourceMappingURL=index.js.map?id=4d84facb029b8f685a22