/home/techb158/ileadtechnology.com/SSM/public/js/configuration/library/bookPublisher
NameSizeModeActions
edit.js47450644editdlrm
edit.js.map1990644editdlrm
index.js108210644editdlrm
index.js.map1920644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/configuration/library/bookPublisher/index.js (10821B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[113],{dV6n:function(t,e,o){"use strict";o.r(e);var s={components:{bookPublisherForm:o("s3fX").a},data:function(){return{book_publishers:{total:0,data:[]},filter:{sort_by:"name",order:"asc",page_length:helper.getConfig("page_length")},orderByOptions:[{value:"name",translation:i18n.library.book_publisher_name}],showCreatePanel:!1,help_topic:""}},mounted:function(){helper.hasPermission("access-configuration")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getBookPublishers()},methods:{getConfig:function(t){return helper.getConfig(t)},getBookPublishers:function(t){var e=this,o=this.$loading.show();"number"!=typeof t&&(t=1);var s=helper.getFilterURL(this.filter);axios.get("/api/library/book/publisher?page="+t+s).then((function(t){e.book_publishers=t,o.hide()})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))},editBookPublisher:function(t){this.$router.push("/configuration/library/book/publisher/"+t.id+"/edit")},confirmDelete:function(t){var e=this;return function(o){return e.deleteBookPublisher(t)}},deleteBookPublisher:function(t){var e=this,o=this.$loading.show();axios.delete("/api/library/book/publisher/"+t.id).then((function(t){toastr.success(t.message),e.getBookPublishers(),o.hide()})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))},print:function(){var t=this.$loading.show();axios.post("/api/library/book/publisher/print",{filter:this.filter}).then((function(e){var o=window.open("/print");t.hide(),o.document.write(e)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/library/book/publisher/pdf",{filter:this.filter}).then((function(o){e.hide(),window.open("/download/report/"+o+"?token="+t.authToken)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))}},filters:{momentDateTime:function(t){return helper.formatDateTime(t)}},watch:{"filter.sort_by":function(t){this.getBookPublishers()},"filter.order":function(t){this.getBookPublishers()},"filter.page_length":function(t){this.getBookPublishers()}},computed:{authToken:function(){return helper.getAuthToken()}}},r=o("KHd+"),i=Object(r.a)(s,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{staticClass:"page-titles"},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-6"},[o("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("library.book_publisher"))+" \n "),t.book_publishers.total?o("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.book_publishers.total,from:t.book_publishers.from,to:t.book_publishers.to})))]):o("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"action-buttons pull-right"},[t.book_publishers.total&&!t.showCreatePanel?o("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}}},[o("i",{staticClass:"fas fa-plus"}),t._v(" "),o("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("library.add_new_book_publisher")))])]):t._e(),t._v(" "),o("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(" "),o("div",{staticClass:"btn-group"},[o("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"}},[o("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),o("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),o("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[o("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[o("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),o("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[o("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))])])]),t._v(" "),o("help-button",{on:{clicked:function(e){t.help_topic="configuration.library.book-publisher"}}})],1)])])]),t._v(" "),o("div",{staticClass:"container-fluid"},[o("transition",{attrs:{name:"fade"}},[t.showCreatePanel?o("div",{staticClass:"card card-form"},[o("div",{staticClass:"card-body"},[o("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("library.add_new_book_publisher")))]),t._v(" "),o("book-publisher-form",{on:{completed:t.getBookPublishers,cancel:function(e){t.showCreatePanel=!t.showCreatePanel}}})],1)]):t._e()]),t._v(" "),o("div",{staticClass:"card"},[o("div",{staticClass:"card-body"},[t.book_publishers.total?o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table table-sm"},[o("thead",[o("tr",[o("th",[t._v(t._s(t.trans("library.book_publisher_name")))]),t._v(" "),o("th",[t._v(t._s(t.trans("library.book_publisher_description")))]),t._v(" "),o("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),o("tbody",t._l(t.book_publishers.data,(function(e){return o("tr",[o("td",{domProps:{textContent:t._s(e.name)}}),t._v(" "),o("td",{domProps:{textContent:t._s(e.description)}}),t._v(" "),o("td",{staticClass:"table-option"},[o("div",{staticClass:"btn-group"},[o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("library.edit_book_publisher"),expression:"trans('library.edit_book_publisher')"}],staticClass:"btn btn-info btn-sm",on:{click:function(o){return o.preventDefault(),t.editBookPublisher(e)}}},[o("i",{staticClass:"fas fa-edit"})]),t._v(" "),o("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDelete(e)},expression:"{ok: confirmDelete(book_publisher)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("library.delete_book_publisher"),expression:"trans('library.delete_book_publisher')"}],key:e.id,staticClass:"btn btn-danger btn-sm"},[o("i",{staticClass:"fas fa-trash"})])])])])})),0)])]):t._e(),t._v(" "),t.book_publishers.total?t._e():o("module-info",{attrs:{module:"library",title:"book_publisher_module_title",description:"book_publisher_module_description",icon:"list"}},[o("div",{attrs:{slot:"btn"},slot:"btn"},[t.showCreatePanel?t._e():o("button",{staticClass:"btn btn-info btn-md",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[o("i",{staticClass:"fas fa-plus"}),t._v(" "+t._s(t.trans("general.add_new")))])])]),t._v(" "),o("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.book_publishers},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.getBookPublishers},nativeOn:{change:function(e){return t.getBookPublishers(e)}}})],1)])],1),t._v(" "),o("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);e.default=i.exports},s3fX:function(t,e,o){"use strict";var s={data:function(){return{bookPublisherForm:new Form({name:"",description:""})}},props:["id"],mounted:function(){this.id&&this.get()},methods:{proceed:function(){this.id?this.update():this.store()},store:function(){var t=this,e=this.$loading.show();this.bookPublisherForm.post("/api/library/book/publisher").then((function(o){toastr.success(o.message),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/library/book/publisher/"+this.id).then((function(o){t.bookPublisherForm.name=o.name,t.bookPublisherForm.description=o.description,e.hide()})).catch((function(o){e.hide(),helper.showErrorMsg(o),t.$router.push("/configuration/library/book/publisher")}))},update:function(){var t=this,e=this.$loading.show();this.bookPublisherForm.patch("/api/library/book/publisher/"+this.id).then((function(o){toastr.success(o.message),e.hide(),t.$router.push("/configuration/library/book/publisher")})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))}}},r=o("KHd+"),i=Object(r.a)(s,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("form",{on:{submit:function(e){return e.preventDefault(),t.proceed(e)},keydown:function(e){return t.bookPublisherForm.errors.clear(e.target.name)}}},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("library.book_publisher_name")))]),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.bookPublisherForm.name,expression:"bookPublisherForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.trans("library.book_publisher_name")},domProps:{value:t.bookPublisherForm.name},on:{input:function(e){e.target.composing||t.$set(t.bookPublisherForm,"name",e.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.bookPublisherForm,"prop-name":"name"}})],1)]),t._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("library.book_publisher_description")))]),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.bookPublisherForm.description,expression:"bookPublisherForm.description"}],staticClass:"form-control",attrs:{type:"text",name:"description",placeholder:t.trans("library.book_publisher_description")},domProps:{value:t.bookPublisherForm.description},on:{input:function(e){e.target.composing||t.$set(t.bookPublisherForm,"description",e.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.bookPublisherForm,"prop-name":"description"}})],1)])]),t._v(" "),o("div",{staticClass:"card-footer text-right"},[o("router-link",{directives:[{name:"show",rawName:"v-show",value:t.id,expression:"id"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/configuration/library/book/publisher"}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),t.id?t._e():o("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(" "),o("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t.id?o("span",[t._v(t._s(t.trans("general.update")))]):o("span",[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null);e.a=i.exports}}]); //# sourceMappingURL=index.js.map?id=93912e39063b1ed78e78