/
home
/
techb158
/
ileadtechnology.com
/
SSM
/
public
/
js
/
configuration
/
library
/
bookAuthor
/
/home/techb158/ileadtechnology.com/SSM/public/js/configuration/library/bookAuthor
mkdir
upload
Name
Size
Mode
Actions
edit.js
4652
0644
edit
dl
rm
edit.js.map
193
0644
edit
dl
rm
index.js
10608
0644
edit
dl
rm
index.js.map
186
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/SSM/public/js/configuration/library/bookAuthor/index.js
(10608B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[107],{YNL6:function(t,o,e){"use strict";e.r(o);var r={components:{bookAuthorForm:e("zA3g").a},data:function(){return{book_authors:{total:0,data:[]},filter:{sort_by:"name",order:"asc",page_length:helper.getConfig("page_length")},orderByOptions:[{value:"name",translation:i18n.library.book_author_name}],showCreatePanel:!1,help_topic:""}},mounted:function(){helper.hasPermission("access-configuration")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getBookAuthors()},methods:{getConfig:function(t){return helper.getConfig(t)},getBookAuthors:function(t){var o=this,e=this.$loading.show();"number"!=typeof t&&(t=1);var r=helper.getFilterURL(this.filter);axios.get("/api/library/book/author?page="+t+r).then((function(t){o.book_authors=t,e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},editBookAuthor:function(t){this.$router.push("/configuration/library/book/author/"+t.id+"/edit")},confirmDelete:function(t){var o=this;return function(e){return o.deleteBookAuthor(t)}},deleteBookAuthor:function(t){var o=this,e=this.$loading.show();axios.delete("/api/library/book/author/"+t.id).then((function(t){toastr.success(t.message),o.getBookAuthors(),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},print:function(){var t=this.$loading.show();axios.post("/api/library/book/author/print",{filter:this.filter}).then((function(o){var e=window.open("/print");t.hide(),e.document.write(o)})).catch((function(o){t.hide(),helper.showErrorMsg(o)}))},pdf:function(){var t=this,o=this.$loading.show();axios.post("/api/library/book/author/pdf",{filter:this.filter}).then((function(e){o.hide(),window.open("/download/report/"+e+"?token="+t.authToken)})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))}},filters:{momentDateTime:function(t){return helper.formatDateTime(t)}},watch:{"filter.sort_by":function(t){this.getBookAuthors()},"filter.order":function(t){this.getBookAuthors()},"filter.page_length":function(t){this.getBookAuthors()}},computed:{authToken:function(){return helper.getAuthToken()}}},a=e("KHd+"),s=Object(a.a)(r,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",[e("div",{staticClass:"page-titles"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-sm-6"},[e("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("library.book_author"))+" \n "),t.book_authors.total?e("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.book_authors.total,from:t.book_authors.from,to:t.book_authors.to})))]):e("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),e("div",{staticClass:"col-12 col-sm-6"},[e("div",{staticClass:"action-buttons pull-right"},[t.book_authors.total&&!t.showCreatePanel?e("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(o){t.showCreatePanel=!t.showCreatePanel}}},[e("i",{staticClass:"fas fa-plus"}),t._v(" "),e("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("library.add_new_book_author")))])]):t._e(),t._v(" "),e("sort-by",{attrs:{"order-by-options":t.orderByOptions,"sort-by":t.filter.sort_by,order:t.filter.order},on:{updateSortBy:function(o){t.filter.sort_by=o},updateOrder:function(o){t.filter.order=o}}}),t._v(" "),e("div",{staticClass:"btn-group"},[e("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"}},[e("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),e("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),e("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[e("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[e("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),e("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[e("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))])])]),t._v(" "),e("help-button",{on:{clicked:function(o){t.help_topic="configuration.library.book-author"}}})],1)])])]),t._v(" "),e("div",{staticClass:"container-fluid"},[e("transition",{attrs:{name:"fade"}},[t.showCreatePanel?e("div",{staticClass:"card card-form"},[e("div",{staticClass:"card-body"},[e("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("library.add_new_book_author")))]),t._v(" "),e("book-author-form",{on:{completed:t.getBookAuthors,cancel:function(o){t.showCreatePanel=!t.showCreatePanel}}})],1)]):t._e()]),t._v(" "),e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[t.book_authors.total?e("div",{staticClass:"table-responsive"},[e("table",{staticClass:"table table-sm"},[e("thead",[e("tr",[e("th",[t._v(t._s(t.trans("library.book_author_name")))]),t._v(" "),e("th",[t._v(t._s(t.trans("library.book_author_description")))]),t._v(" "),e("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),e("tbody",t._l(t.book_authors.data,(function(o){return e("tr",[e("td",{domProps:{textContent:t._s(o.name)}}),t._v(" "),e("td",{domProps:{textContent:t._s(o.description)}}),t._v(" "),e("td",{staticClass:"table-option"},[e("div",{staticClass:"btn-group"},[e("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("library.edit_book_author"),expression:"trans('library.edit_book_author')"}],staticClass:"btn btn-info btn-sm",on:{click:function(e){return e.preventDefault(),t.editBookAuthor(o)}}},[e("i",{staticClass:"fas fa-edit"})]),t._v(" "),e("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDelete(o)},expression:"{ok: confirmDelete(book_author)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("library.delete_book_author"),expression:"trans('library.delete_book_author')"}],key:o.id,staticClass:"btn btn-danger btn-sm"},[e("i",{staticClass:"fas fa-trash"})])])])])})),0)])]):t._e(),t._v(" "),t.book_authors.total?t._e():e("module-info",{attrs:{module:"library",title:"book_author_module_title",description:"book_author_module_description",icon:"list"}},[e("div",{attrs:{slot:"btn"},slot:"btn"},[t.showCreatePanel?t._e():e("button",{staticClass:"btn btn-info btn-md",on:{click:function(o){t.showCreatePanel=!t.showCreatePanel}}},[e("i",{staticClass:"fas fa-plus"}),t._v(" "+t._s(t.trans("general.add_new")))])])]),t._v(" "),e("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.book_authors},on:{"update:pageLength":function(o){return t.$set(t.filter,"page_length",o)},"update:page-length":function(o){return t.$set(t.filter,"page_length",o)},updateRecords:t.getBookAuthors},nativeOn:{change:function(o){return t.getBookAuthors(o)}}})],1)])],1),t._v(" "),e("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);o.default=s.exports},zA3g:function(t,o,e){"use strict";var r={data:function(){return{bookAuthorForm: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,o=this.$loading.show();this.bookAuthorForm.post("/api/library/book/author").then((function(e){toastr.success(e.message),t.$emit("completed"),o.hide()})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))},get:function(){var t=this,o=this.$loading.show();axios.get("/api/library/book/author/"+this.id).then((function(e){t.bookAuthorForm.name=e.name,t.bookAuthorForm.description=e.description,o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e),t.$router.push("/configuration/library/book/author")}))},update:function(){var t=this,o=this.$loading.show();this.bookAuthorForm.patch("/api/library/book/author/"+this.id).then((function(e){toastr.success(e.message),o.hide(),t.$router.push("/configuration/library/book/author")})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))}}},a=e("KHd+"),s=Object(a.a)(r,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("form",{on:{submit:function(o){return o.preventDefault(),t.proceed(o)},keydown:function(o){return t.bookAuthorForm.errors.clear(o.target.name)}}},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-sm-6"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("library.book_author_name")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.bookAuthorForm.name,expression:"bookAuthorForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.trans("library.book_author_name")},domProps:{value:t.bookAuthorForm.name},on:{input:function(o){o.target.composing||t.$set(t.bookAuthorForm,"name",o.target.value)}}}),t._v(" "),e("show-error",{attrs:{"form-name":t.bookAuthorForm,"prop-name":"name"}})],1)]),t._v(" "),e("div",{staticClass:"col-12 col-sm-6"},[e("div",{staticClass:"form-group"},[e("label",{attrs:{for:""}},[t._v(t._s(t.trans("library.book_author_description")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.bookAuthorForm.description,expression:"bookAuthorForm.description"}],staticClass:"form-control",attrs:{type:"text",name:"description",placeholder:t.trans("library.book_author_description")},domProps:{value:t.bookAuthorForm.description},on:{input:function(o){o.target.composing||t.$set(t.bookAuthorForm,"description",o.target.value)}}}),t._v(" "),e("show-error",{attrs:{"form-name":t.bookAuthorForm,"prop-name":"description"}})],1)])]),t._v(" "),e("div",{staticClass:"card-footer text-right"},[e("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/author"}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),t.id?t._e():e("button",{staticClass:"btn btn-danger waves-effect waves-light ",attrs:{type:"button"},on:{click:function(o){return t.$emit("cancel")}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),e("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t.id?e("span",[t._v(t._s(t.trans("general.update")))]):e("span",[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null);o.a=s.exports}}]); //# sourceMappingURL=index.js.map?id=100d72ee5256691968b9
Save
cmd:
run