/home/techb158/ileadtechnology.com/SSM/public/js/finance/fee/allocation
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/finance/fee/allocation/index.js (12535B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[217],{v1Ig:function(t,e,a){"use strict";a.r(e);var n={components:{},data:function(){return{fee_allocations:{total:0,data:[]},filter:{sort_by:"created_at",order:"asc",batch_id:[],page_length:helper.getConfig("page_length")},orderByOptions:[{value:"created_at",translation:i18n.general.created_at}],batches:[],selected_batches:null,showFilterPanel:!1,help_topic:""}},mounted:function(){helper.hasPermission("list-fee-allocation")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getFeeAllocations(),helper.showDemoNotification(["finance_fee_allocation"])},methods:{getConfig:function(t){return helper.getConfig(t)},hasPermission:function(t){return helper.hasPermission(t)},getFeeAllocations:function(t){var e=this,a=this.$loading.show();"number"!=typeof t&&(t=1);var n=helper.getFilterURL(this.filter);axios.get("/api/fee/allocation?page="+t+n).then((function(t){e.fee_allocations=t.fee_allocations,e.batches=t.filters.batches,a.hide()})).catch((function(t){a.hide(),helper.showErrorMsg(t)}))},editFeeAllocation:function(t){this.$router.push("/finance/fee/allocation/"+t.uuid+"/edit")},confirmDelete:function(t){var e=this;return function(a){return e.deleteFeeAllocation(t)}},deleteFeeAllocation:function(t){var e=this,a=this.$loading.show();axios.delete("/api/fee/allocation/"+t.uuid).then((function(t){toastr.success(t.message),e.getFeeAllocations(),a.hide()})).catch((function(t){a.hide(),helper.showErrorMsg(t)}))},confirmCopy:function(t){var e=this;return function(a){return e.copyFeeAllocation(t)}},copyFeeAllocation:function(t){var e=this,a=this.$loading.show();axios.post("/api/fee/allocation/"+t.uuid+"/copy").then((function(t){toastr.success(t.message),e.getFeeAllocations(),a.hide()})).catch((function(t){a.hide(),helper.showErrorMsg(t)}))},print:function(){var t=this.$loading.show();axios.post("/api/fee/allocation/print",{filter:this.filter}).then((function(e){var a=window.open("/print");t.hide(),a.document.write(e)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/fee/allocation/pdf",{filter:this.filter}).then((function(a){e.hide(),window.open("/download/report/"+a+"?token="+t.authToken)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onBatchSelect:function(t){this.filter.batch_id.push(t.id)},onBatchRemove:function(t){this.filter.batch_id.splice(this.filter.batch_id.indexOf(t.id),1)}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)}},watch:{"filter.sort_by":function(t){this.getFeeAllocations()},"filter.order":function(t){this.getFeeAllocations()},"filter.page_length":function(t){this.getFeeAllocations()}},computed:{authToken:function(){return helper.getAuthToken()}}},o=a("KHd+"),s=Object(o.a)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;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"},[t._v(t._s(t.trans("finance.fee_allocation"))+" \n "),t.fee_allocations.total?a("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.fee_allocations.total,from:t.fee_allocations.from,to:t.fee_allocations.to})))]):a("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"action-buttons pull-right"},[t.fee_allocations.total&&t.hasPermission("create-fee-allocation")?a("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){return t.$router.push("/finance/fee/allocation/create")}}},[a("i",{staticClass:"fas fa-plus"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("finance.add_new_fee_allocation")))])]):t._e(),t._v(" "),t.showFilterPanel?t._e():a("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showFilterPanel=!t.showFilterPanel}}},[a("i",{staticClass:"fas fa-filter"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("general.filter")))])]),t._v(" "),a("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(" "),a("div",{staticClass:"btn-group"},[a("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"}},[a("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),a("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[a("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[a("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),a("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[a("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))]),t._v(" "),t.hasPermission("list-fee-group")?a("button",{staticClass:"dropdown-item custom-dropdown",on:{click:function(e){return t.$router.push("/finance/fee/group")}}},[a("i",{staticClass:"fas fa-object-group"}),t._v(" "+t._s(t.trans("finance.fee_group")))]):t._e(),t._v(" "),t.hasPermission("list-fee-head")?a("button",{staticClass:"dropdown-item custom-dropdown",on:{click:function(e){return t.$router.push("/finance/fee/head")}}},[a("i",{staticClass:"fas fa-list"}),t._v(" "+t._s(t.trans("finance.fee_head")))]):t._e()])]),t._v(" "),a("help-button",{on:{clicked:function(e){t.help_topic="finance.fee.allocation"}}})],1)])])]),t._v(" "),a("div",{staticClass:"container-fluid"},[a("transition",{attrs:{name:"fade"}},[t.showFilterPanel?a("div",{staticClass:"card card-form"},[a("div",{staticClass:"card-body"},[a("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("general.filter"))+"\n ")]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("v-select",{attrs:{label:"name","track-by":"id","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"),multiple:!0,"close-on-select":!1,"clear-on-select":!1,"hide-selected":!0,selected:t.selected_batches},on:{select:t.onBatchSelect,remove:t.onBatchRemove},model:{value:t.selected_batches,callback:function(e){t.selected_batches=e},expression:"selected_batches"}},[t.batches.length?t._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n "+t._s(t.trans("general.no_option_found"))+"\n ")])])],1)])]),t._v(" "),a("div",{staticClass:"card-footer text-right"},[a("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(" "),a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:t.getFeeAllocations}},[t._v(t._s(t.trans("general.filter")))])])])]):t._e()]),t._v(" "),a("div",{staticClass:"card"},[a("div",{staticClass:"card-body"},[t.fee_allocations.total?a("div",{staticClass:"table-responsive"},[a("table",{staticClass:"table table-sm"},[a("thead",[a("tr",[a("th",[t._v(t._s(t.trans("academic.course")+"/"+t.trans("academic.batch")))]),t._v(" "),a("th"),t._v(" "),a("th",[t._v(t._s(t.trans("general.created_at")))]),t._v(" "),a("th",[t._v(t._s(t.trans("general.updated_at")))]),t._v(" "),a("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),a("tbody",t._l(t.fee_allocations.data,(function(e){return a("tr",[a("td",[e.course_id?a("span",[t._v(t._s(e.course.name))]):a("span",[t._v(t._s(e.batch.course.name+" "+e.batch.name))])]),t._v(" "),a("td",[a("ul",{staticStyle:{"list-style":"none",padding:"0",margin:"0"}},t._l(e.fee_allocation_groups,(function(e){return a("li",[a("small",[a("i",{staticClass:"fas fa-check"}),t._v(" "+t._s(e.fee_group.name+" ("+e.fee_installments.length+" "+t.trans("finance.installment")+")"))])])})),0)]),t._v(" "),a("td",[t._v(t._s(t._f("momentDateTime")(e.created_at)))]),t._v(" "),a("td",[t._v(t._s(t._f("momentDateTime")(e.updated_at)))]),t._v(" "),a("td",{staticClass:"table-option"},[a("div",{staticClass:"btn-group"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("finance.view_fee_allocation"),expression:"trans('finance.view_fee_allocation')"}],staticClass:"btn btn-info btn-sm",on:{click:function(a){return t.$router.push("/finance/fee/allocation/"+e.uuid)}}},[e.paid_count?a("i",{staticClass:"fas fa-lock"}):a("i",{staticClass:"fas fa-arrow-circle-right"}),t._v(" "+t._s(t.trans("general.view"))+"\n ")]),t._v(" "),t._m(0,!0),t._v(" "),a("div",{staticClass:"dropdown-menu"},[e.paid_count?t._e():[t.hasPermission("edit-fee-allocation")?a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("finance.edit_fee_allocation"),expression:"trans('finance.edit_fee_allocation')"}],staticClass:"dropdown-item custom-dropdown-menu",on:{click:function(a){return a.preventDefault(),t.editFeeAllocation(e)}}},[a("i",{staticClass:"fas fa-edit"}),t._v(" "+t._s(t.trans("general.edit")))]):t._e(),t._v(" "),t.hasPermission("create-fee-allocation")&&!e.course_id?a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("finance.copy_batch_fee_allocation"),expression:"trans('finance.copy_batch_fee_allocation')"},{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmCopy(e)},expression:"{ok: confirmCopy(fee_allocation)}"}],key:"copy_"+e.id,staticClass:"dropdown-item custom-dropdown-menu"},[a("i",{staticClass:"fas fa-copy"}),t._v(" "+t._s(t.trans("general.copy")))]):t._e(),t._v(" "),t.hasPermission("delete-fee-allocation")?a("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDelete(e)},expression:"{ok: confirmDelete(fee_allocation)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("finance.delete_fee_allocation"),expression:"trans('finance.delete_fee_allocation')"}],key:"delete_"+e.id,staticClass:"dropdown-item custom-dropdown-menu"},[a("i",{staticClass:"fas fa-trash"}),t._v(" "+t._s(t.trans("general.delete")))]):t._e()],t._v(" "),t.hasPermission("create-fee-allocation")?a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("finance.duplicate_fee_allocation"),expression:"trans('finance.duplicate_fee_allocation')"}],staticClass:"dropdown-item custom-dropdown-menu",on:{click:function(a){return t.$router.push("/finance/fee/allocation/create/"+e.uuid)}}},[a("i",{staticClass:"fas fa-clone"}),t._v(" "+t._s(t.trans("finance.duplicate_fee_allocation")))]):t._e()],2)])])])})),0)])]):t._e(),t._v(" "),t.fee_allocations.total?t._e():a("module-info",{attrs:{module:"finance",title:"fee_allocation_module_title",description:"fee_allocation_module_description",icon:"list"}},[a("div",{attrs:{slot:"btn"},slot:"btn"},[t.hasPermission("create-fee-allocation")?a("button",{staticClass:"btn btn-info btn-md",on:{click:function(e){return t.$router.push("/finance/fee/allocation/create")}}},[a("i",{staticClass:"fas fa-plus"}),t._v(" "+t._s(t.trans("general.add_new")))]):t._e()])]),t._v(" "),a("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.fee_allocations},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.getFeeAllocations}})],1)])],1),t._v(" "),a("right-panel",{attrs:{topic:t.help_topic}})],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-sm btn-info dropdown-toggle dropdown-toggle-split",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[e("span",{staticClass:"sr-only"},[this._v("Toggle Dropdown")])])}],!1,null,null,null);e.default=s.exports}}]);
//# sourceMappingURL=index.js.map?id=188f9cec2dbdf97c872a