/home/techb158/ileadtechnology.com/SSM/public/js/finance/fee/group
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/finance/fee/group/edit.js (5264B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[221],{"d3/T":function(e,t,s){"use strict";var r={components:{},data:function(){return{feeGroupForm:new Form({name:"",description:"",has_transport:!1})}},props:["id"],mounted:function(){helper.hasPermission("create-fee-group")||helper.hasPermission("edit-fee-group")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.id&&this.get()},methods:{proceed:function(){this.id?this.update():this.store()},store:function(){var e=this,t=this.$loading.show();this.feeGroupForm.post("/api/fee/group").then((function(s){toastr.success(s.message),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/group/"+this.id).then((function(s){e.feeGroupForm.name=s.name,e.feeGroupForm.description=s.description,e.feeGroupForm.has_transport=s.options.has_transport,t.hide()})).catch((function(s){t.hide(),helper.showErrorMsg(s),e.$router.push("/finance/fee/group")}))},update:function(){var e=this,t=this.$loading.show();this.feeGroupForm.patch("/api/fee/group/"+this.id).then((function(s){toastr.success(s.message),t.hide(),e.$router.push("/finance/fee/group")})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},getConfig:function(e){return helper.getConfig(e)}}},o=s("KHd+"),a=Object(o.a)(r,(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.feeGroupForm.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_group_name")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.feeGroupForm.name,expression:"feeGroupForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:e.trans("finance.fee_group_name")},domProps:{value:e.feeGroupForm.name},on:{input:function(t){t.target.composing||e.$set(e.feeGroupForm,"name",t.target.value)}}}),e._v(" "),s("show-error",{attrs:{"form-name":e.feeGroupForm,"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_description")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.feeGroupForm.description,expression:"feeGroupForm.description"}],staticClass:"form-control",attrs:{type:"text",name:"description",placeholder:e.trans("finance.fee_group_description")},domProps:{value:e.feeGroupForm.description},on:{input:function(t){t.target.composing||e.$set(e.feeGroupForm,"description",t.target.value)}}}),e._v(" "),s("show-error",{attrs:{"form-name":e.feeGroupForm,"prop-name":"description"}})],1)]),e._v(" "),s("div",{staticClass:"col-12 col-sm-4"},[s("div",{staticClass:"form-group"},[s("div",[e._v(e._s(e.trans("transport.has_transport")))]),e._v(" "),s("switches",{staticClass:"m-t-20",attrs:{theme:"bootstrap",color:"success"},model:{value:e.feeGroupForm.has_transport,callback:function(t){e.$set(e.feeGroupForm,"has_transport",t)},expression:"feeGroupForm.has_transport"}}),e._v(" "),s("show-error",{attrs:{"form-name":e.feeGroupForm,"prop-name":"has_transport"}})],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/group"}},[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=a.exports},qbO6:function(e,t,s){"use strict";s.r(t);var r={components:{feeGroupForm:s("d3/T").a},data:function(){return{id:this.$route.params.id}},mounted:function(){helper.hasPermission("edit-fee-group")||(helper.notAccessibleMsg(),this.$router.push("/dashboard"))}},o=s("KHd+"),a=Object(o.a)(r,(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.edit_fee_group")))])]),e._v(" "),s("div",{staticClass:"col-12 col-sm-6"},[s("div",{staticClass:"action-buttons pull-right"},[s("button",{staticClass:"btn btn-info btn-sm",on:{click:function(t){return e.$router.push("/finance/fee/group")}}},[s("i",{staticClass:"fas fa-list"}),e._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[e._v(e._s(e.trans("finance.edit_fee_group")))])])])])])]),e._v(" "),s("div",{staticClass:"container-fluid"},[s("div",{staticClass:"card card-form"},[s("div",{staticClass:"card-body p-t-20"},[s("fee-group-form",{attrs:{id:e.id}})],1)])])])}),[],!1,null,null,null);t.default=a.exports}}]);
//# sourceMappingURL=edit.js.map?id=631e3b6dad3c250168ab