/home/techb158/ileadtechnology.com/SSM/public/js/finance/fee/head
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/finance/fee/head/index.js (14592B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[224],{ETq1:function(e,t,s){"use strict";var a={components:{},data:function(){return{feeHeadForm:new Form({name:"",fee_group_id:"",description:""}),fee_groups:[],selected_fee_group:null}},props:["id"],mounted:function(){helper.hasPermission("create-fee-head")||helper.hasPermission("edit-fee-head")||(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/fee/head/pre-requisite").then((function(s){e.fee_groups=s,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},store:function(){var e=this,t=this.$loading.show();this.feeHeadForm.post("/api/fee/head").then((function(s){toastr.success(s.message),e.selected_fee_group=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/fee/head/"+this.id).then((function(s){e.feeHeadForm.name=s.fee_head.name,e.feeHeadForm.fee_group_id=s.fee_head.fee_group_id,e.feeHeadForm.description=s.fee_head.description,e.selected_fee_group=s.selected_fee_group,t.hide()})).catch((function(s){t.hide(),helper.showErrorMsg(s),e.$router.push("/finance/fee/head")}))},update:function(){var e=this,t=this.$loading.show();this.feeHeadForm.patch("/api/fee/head/"+this.id).then((function(s){toastr.success(s.message),t.hide(),e.$router.push("/finance/fee/head")})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},onFeeGroupSelect:function(e){this.feeHeadForm.fee_group_id=e.id}}},n=s("KHd+"),o=Object(n.a)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("form",{on:{submit:function(t){return t.preventDefault(),e.proceed(t)},keydown:function(t){return e.feeHeadForm.errors.clear(t.target.name)}}},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-4"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[e._v(e._s(e.trans("finance.fee_head_name")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.feeHeadForm.name,expression:"feeHeadForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:e.trans("finance.fee_head_name")},domProps:{value:e.feeHeadForm.name},on:{input:function(t){t.target.composing||e.$set(e.feeHeadForm,"name",t.target.value)}}}),e._v(" "),s("show-error",{attrs:{"form-name":e.feeHeadForm,"prop-name":"name"}})],1)]),e._v(" "),s("div",{staticClass:"col-12 col-sm-4"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[e._v(e._s(e.trans("finance.fee_group")))]),e._v(" "),s("v-select",{attrs:{label:"name",name:"fee_group_id",id:"fee_group_id",options:e.fee_groups,placeholder:e.trans("finance.select_fee_group")},on:{select:e.onFeeGroupSelect,close:function(t){return e.feeHeadForm.errors.clear("fee_group_id")},remove:function(t){e.feeHeadForm.fee_group_id=""}},model:{value:e.selected_fee_group,callback:function(t){e.selected_fee_group=t},expression:"selected_fee_group"}},[e.fee_groups.length?e._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),s("show-error",{attrs:{"form-name":e.feeHeadForm,"prop-name":"fee_group_id"}})],1)]),e._v(" "),s("div",{staticClass:"col-12 col-sm-4"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[e._v(e._s(e.trans("finance.fee_head_description")))]),e._v(" "),s("autosize-textarea",{attrs:{rows:"1",name:"description",placeholder:e.trans("finance.fee_head_description")},model:{value:e.feeHeadForm.description,callback:function(t){e.$set(e.feeHeadForm,"description",t)},expression:"feeHeadForm.description"}}),e._v(" "),s("show-error",{attrs:{"form-name":e.feeHeadForm,"prop-name":"description"}})],1)])]),e._v(" "),s("div",{staticClass:"card-footer text-right"},[s("router-link",{directives:[{name:"show",rawName:"v-show",value:e.id,expression:"id"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/finance/fee/head"}},[e._v(e._s(e.trans("general.cancel")))]),e._v(" "),e.id?e._e():s("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(" "),s("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[e.id?s("span",[e._v(e._s(e.trans("general.update")))]):s("span",[e._v(e._s(e.trans("general.save")))])])],1)])}),[],!1,null,null,null);t.a=o.exports},iatj:function(e,t,s){"use strict";s.r(t);var a={components:{feeHeadForm:s("ETq1").a},data:function(){return{fee_heads:{total:0,data:[]},filter:{sort_by:"name",order:"asc",fee_group_id:[],page_length:helper.getConfig("page_length")},orderByOptions:[{value:"name",translation:i18n.finance.fee_head_name}],fee_groups:[],selected_fee_groups:null,showCreatePanel:!1,showFilterPanel:!1,help_topic:""}},mounted:function(){helper.hasPermission("list-fee-head")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getFeeHeads(),helper.showDemoNotification(["finance"])},methods:{getConfig:function(e){return helper.getConfig(e)},hasPermission:function(e){return helper.hasPermission(e)},getFeeHeads:function(e){var t=this,s=this.$loading.show();"number"!=typeof e&&(e=1);var a=helper.getFilterURL(this.filter);axios.get("/api/fee/head?page="+e+a).then((function(e){t.fee_heads=e.fee_heads,t.fee_groups=e.filters.fee_groups,s.hide()})).catch((function(e){s.hide(),helper.showErrorMsg(e)}))},editFeeHead:function(e){this.$router.push("/finance/fee/head/"+e.id+"/edit")},confirmDelete:function(e){var t=this;return function(s){return t.deleteFeeHead(e)}},deleteFeeHead:function(e){var t=this,s=this.$loading.show();axios.delete("/api/fee/head/"+e.id).then((function(e){toastr.success(e.message),t.getFeeHeads(),s.hide()})).catch((function(e){s.hide(),helper.showErrorMsg(e)}))},print:function(){var e=this.$loading.show();axios.post("/api/fee/head/print",{filter:this.filter}).then((function(t){var s=window.open("/print");e.hide(),s.document.write(t)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},pdf:function(){var e=this,t=this.$loading.show();axios.post("/api/fee/head/pdf",{filter:this.filter}).then((function(s){t.hide(),window.open("/download/report/"+s+"?token="+e.authToken)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},onFeeGroupSelect:function(e){this.filter.fee_group_id.push(e.id)},onFeeGroupRemove:function(e){this.filter.fee_group_id.splice(this.filter.fee_group_id.indexOf(e.id),1)}},filters:{moment:function(e){return helper.formatDate(e)},momentDateTime:function(e){return helper.formatDateTime(e)}},watch:{"filter.sort_by":function(e){this.getFeeHeads()},"filter.order":function(e){this.getFeeHeads()},"filter.page_length":function(e){this.getFeeHeads()}},computed:{authToken:function(){return helper.getAuthToken()}}},n=s("KHd+"),o=Object(n.a)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;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"},[e._v(e._s(e.trans("finance.fee_head"))+" \n "),e.fee_heads.total?s("span",{staticClass:"card-subtitle d-none d-sm-inline"},[e._v(e._s(e.trans("general.total_result_found",{count:e.fee_heads.total,from:e.fee_heads.from,to:e.fee_heads.to})))]):s("span",{staticClass:"card-subtitle d-none d-sm-inline"},[e._v(e._s(e.trans("general.no_result_found")))])])]),e._v(" "),s("div",{staticClass:"col-12 col-sm-6"},[s("div",{staticClass:"action-buttons pull-right"},[e.fee_heads.total&&!e.showCreatePanel&&e.hasPermission("create-fee-head")?s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("general.add_new"),expression:"trans('general.add_new')"}],staticClass:"btn btn-info btn-sm",on:{click:function(t){e.showCreatePanel=!e.showCreatePanel}}},[s("i",{staticClass:"fas fa-plus"}),e._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[e._v(e._s(e.trans("finance.add_new_fee_head")))])]):e._e(),e._v(" "),e.showFilterPanel?e._e():s("button",{staticClass:"btn btn-info btn-sm",on:{click:function(t){e.showFilterPanel=!e.showFilterPanel}}},[s("i",{staticClass:"fas fa-filter"}),e._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[e._v(e._s(e.trans("general.filter")))])]),e._v(" "),s("sort-by",{attrs:{"order-by-options":e.orderByOptions,"sort-by":e.filter.sort_by,order:e.filter.order},on:{updateSortBy:function(t){e.filter.sort_by=t},updateOrder:function(t){e.filter.order=t}}}),e._v(" "),s("div",{staticClass:"btn-group"},[s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.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"}),e._v(" "),s("span",{staticClass:"d-none d-sm-inline"})]),e._v(" "),s("div",{class:["dropdown-menu","ltr"==e.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:e.print}},[s("i",{staticClass:"fas fa-print"}),e._v(" "+e._s(e.trans("general.print")))]),e._v(" "),s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:e.pdf}},[s("i",{staticClass:"fas fa-file-pdf"}),e._v(" "+e._s(e.trans("general.generate_pdf")))]),e._v(" "),e.hasPermission("list-fee-group")?s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:function(t){return e.$router.push("/finance/fee/group")}}},[s("i",{staticClass:"fas fa-object-group"}),e._v(" "+e._s(e.trans("finance.fee_group")))]):e._e(),e._v(" "),e.hasPermission("list-fee-allocation")?s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:function(t){return e.$router.push("/finance/fee/allocation")}}},[s("i",{staticClass:"fas fa-box-open"}),e._v(" "+e._s(e.trans("finance.fee_allocation")))]):e._e()])]),e._v(" "),s("help-button",{on:{clicked:function(t){e.help_topic="finance.fee.head"}}})],1)])])]),e._v(" "),s("div",{staticClass:"container-fluid"},[s("transition",{attrs:{name:"fade"}},[e.showFilterPanel?s("div",{staticClass:"card card-form"},[s("div",{staticClass:"card-body"},[s("h4",{staticClass:"card-title"},[e._v(e._s(e.trans("general.filter")))]),e._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",name:"fee_group_id",id:"fee_group_id",options:e.fee_groups,placeholder:e.trans("academic.select_fee_group"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:e.selected_fee_groups},on:{select:e.onFeeGroupSelect,remove:e.onFeeGroupRemove},model:{value:e.selected_fee_groups,callback:function(t){e.selected_fee_groups=t},expression:"selected_fee_groups"}},[e.fee_groups.length?e._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])])],1)])]),e._v(" "),s("div",{staticClass:"card-footer text-right"},[s("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(t){e.showFilterPanel=!1}}},[e._v(e._s(e.trans("general.cancel")))]),e._v(" "),s("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:e.getFeeHeads}},[e._v(e._s(e.trans("general.filter")))])])])]):e._e()]),e._v(" "),e.hasPermission("create-fee-head")?s("transition",{attrs:{name:"fade"}},[e.showCreatePanel?s("div",{staticClass:"card card-form"},[s("div",{staticClass:"card-body"},[s("h4",{staticClass:"card-title"},[e._v(e._s(e.trans("finance.add_new_fee_head")))]),e._v(" "),s("fee-head-form",{on:{completed:e.getFeeHeads,cancel:function(t){e.showCreatePanel=!e.showCreatePanel}}})],1)]):e._e()]):e._e(),e._v(" "),s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[e.fee_heads.total?s("div",{staticClass:"table-responsive"},[s("table",{staticClass:"table table-sm"},[s("thead",[s("tr",[s("th",[e._v(e._s(e.trans("finance.fee_head_name")))]),e._v(" "),s("th",[e._v(e._s(e.trans("finance.fee_group")))]),e._v(" "),s("th",[e._v(e._s(e.trans("finance.fee_head_description")))]),e._v(" "),s("th",{staticClass:"table-option"},[e._v(e._s(e.trans("general.action")))])])]),e._v(" "),s("tbody",e._l(e.fee_heads.data,(function(t){return s("tr",[s("td",{domProps:{textContent:e._s(t.name)}}),e._v(" "),s("td",{domProps:{textContent:e._s(t.fee_group.name)}}),e._v(" "),s("td",{domProps:{textContent:e._s(t.description)}}),e._v(" "),s("td",{staticClass:"table-option"},[s("div",{staticClass:"btn-group"},[e.hasPermission("edit-fee-head")?s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("finance.edit_fee_head"),expression:"trans('finance.edit_fee_head')"}],staticClass:"btn btn-info btn-sm",on:{click:function(s){return s.preventDefault(),e.editFeeHead(t)}}},[s("i",{staticClass:"fas fa-edit"})]):e._e(),e._v(" "),e.hasPermission("delete-fee-head")?s("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:e.confirmDelete(t)},expression:"{ok: confirmDelete(fee_head)}"},{name:"tooltip",rawName:"v-tooltip",value:e.trans("finance.delete_fee_head"),expression:"trans('finance.delete_fee_head')"}],key:t.id,staticClass:"btn btn-danger btn-sm"},[s("i",{staticClass:"fas fa-trash"})]):e._e()])])])})),0)])]):e._e(),e._v(" "),e.fee_heads.total?e._e():s("module-info",{attrs:{module:"finance",title:"fee_head_module_title",description:"fee_head_module_description",icon:"list"}},[s("div",{attrs:{slot:"btn"},slot:"btn"},[!e.showCreatePanel&&e.hasPermission("create-fee-head")?s("button",{staticClass:"btn btn-info btn-md",on:{click:function(t){e.showCreatePanel=!e.showCreatePanel}}},[s("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("general.add_new")))]):e._e()])]),e._v(" "),s("pagination-record",{attrs:{"page-length":e.filter.page_length,records:e.fee_heads},on:{"update:pageLength":function(t){return e.$set(e.filter,"page_length",t)},"update:page-length":function(t){return e.$set(e.filter,"page_length",t)},updateRecords:e.getFeeHeads}})],1)])],1),e._v(" "),s("right-panel",{attrs:{topic:e.help_topic}})],1)}),[],!1,null,null,null);t.default=o.exports}}]);
//# sourceMappingURL=index.js.map?id=8f55a2d50a1137aaaa6d