/home/techb158/ileadtechnology.com/SSM/public/js/configuration/misc/bloodGroup
NameSizeModeActions
edit.js45510644editdlrm
edit.js.map1870644editdlrm
index.js104650644editdlrm
index.js.map1800644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/configuration/misc/bloodGroup/index.js (10465B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{"8uaz":function(t,o,e){"use strict";e.r(o);var s={components:{bloodGroupForm:e("yIqK").a},data:function(){return{blood_groups:{total:0,data:[]},filter:{sort_by:"name",order:"asc",page_length:helper.getConfig("page_length")},orderByOptions:[{value:"name",translation:i18n.misc.blood_group_name}],showCreatePanel:!1,help_topic:""}},mounted:function(){helper.hasPermission("access-configuration")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getBloodGroups()},methods:{getConfig:function(t){return helper.getConfig(t)},getBloodGroups:function(t){var o=this,e=this.$loading.show();"number"!=typeof t&&(t=1);var s=helper.getFilterURL(this.filter);axios.get("/api/misc/blood/group?page="+t+s).then((function(t){o.blood_groups=t,e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},editBloodGroup:function(t){this.$router.push("/configuration/misc/blood/group/"+t.id+"/edit")},confirmDelete:function(t){var o=this;return function(e){return o.deleteBloodGroup(t)}},deleteBloodGroup:function(t){var o=this,e=this.$loading.show();axios.delete("/api/misc/blood/group/"+t.id).then((function(t){toastr.success(t.message),o.getBloodGroups(),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},print:function(){var t=this.$loading.show();axios.post("/api/misc/blood/group/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/misc/blood/group/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.getBloodGroups()},"filter.order":function(t){this.getBloodGroups()},"filter.page_length":function(t){this.getBloodGroups()}},computed:{authToken:function(){return helper.getAuthToken()}}},n=e("KHd+"),r=Object(n.a)(s,(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("misc.blood_group"))+" \n "),t.blood_groups.total?e("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.blood_groups.total,from:t.blood_groups.from,to:t.blood_groups.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.blood_groups.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("misc.add_new_blood_group")))])]):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.misc.blood-group"}}})],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("misc.add_new_blood_group")))]),t._v(" "),e("blood-group-form",{on:{completed:t.getBloodGroups,cancel:function(o){t.showCreatePanel=!t.showCreatePanel}}})],1)]):t._e()]),t._v(" "),e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[t.blood_groups.total?e("div",{staticClass:"table-responsive"},[e("table",{staticClass:"table table-sm"},[e("thead",[e("tr",[e("th",[t._v(t._s(t.trans("misc.blood_group_name")))]),t._v(" "),e("th",[t._v(t._s(t.trans("misc.blood_group_description")))]),t._v(" "),e("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),e("tbody",t._l(t.blood_groups.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("misc.edit_blood_group"),expression:"trans('misc.edit_blood_group')"}],staticClass:"btn btn-info btn-sm",on:{click:function(e){return e.preventDefault(),t.editBloodGroup(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(blood_group)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("misc.delete_blood_group"),expression:"trans('misc.delete_blood_group')"}],key:o.id,staticClass:"btn btn-danger btn-sm"},[e("i",{staticClass:"fas fa-trash"})])])])])})),0)])]):t._e(),t._v(" "),t.blood_groups.total?t._e():e("module-info",{attrs:{module:"misc",title:"blood_group_module_title",description:"blood_group_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.blood_groups},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.getBloodGroups},nativeOn:{change:function(o){return t.getBloodGroups(o)}}})],1)])],1),t._v(" "),e("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);o.default=r.exports},yIqK:function(t,o,e){"use strict";var s={data:function(){return{bloodGroup: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.bloodGroup.post("/api/misc/blood/group").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/misc/blood/group/"+this.id).then((function(e){t.bloodGroup.name=e.name,t.bloodGroup.description=e.description,o.hide()})).catch((function(e){o.hide(),helper.showErrorMsg(e),t.$router.push("/configuration/misc/blood/group")}))},update:function(){var t=this,o=this.$loading.show();this.bloodGroup.patch("/api/misc/blood/group/"+this.id).then((function(e){toastr.success(e.message),o.hide(),t.$router.push("/configuration/misc/blood/group")})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))}}},n=e("KHd+"),r=Object(n.a)(s,(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.bloodGroup.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("misc.blood_group_name")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.bloodGroup.name,expression:"bloodGroup.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.trans("misc.blood_group_name")},domProps:{value:t.bloodGroup.name},on:{input:function(o){o.target.composing||t.$set(t.bloodGroup,"name",o.target.value)}}}),t._v(" "),e("show-error",{attrs:{"form-name":t.bloodGroup,"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("misc.blood_group_description")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.bloodGroup.description,expression:"bloodGroup.description"}],staticClass:"form-control",attrs:{type:"text",name:"description",placeholder:t.trans("misc.blood_group_description")},domProps:{value:t.bloodGroup.description},on:{input:function(o){o.target.composing||t.$set(t.bloodGroup,"description",o.target.value)}}}),t._v(" "),e("show-error",{attrs:{"form-name":t.bloodGroup,"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/misc/blood/group"}},[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=r.exports}}]); //# sourceMappingURL=index.js.map?id=002fb755ab1c7b05b8d0