/
home
/
techb158
/
ileadtechnology.com
/
SSM
/
public
/
js
/
transport
/
stoppage
/
/home/techb158/ileadtechnology.com/SSM/public/js/transport/stoppage
mkdir
upload
Name
Size
Mode
Actions
edit.js
4549
0644
edit
dl
rm
edit.js.map
165
0644
edit
dl
rm
index.js
12728
0644
edit
dl
rm
index.js.map
158
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/SSM/public/js/transport/stoppage/edit.js
(4549B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[360],{isEB:function(t,s,e){"use strict";var a={data:function(){return{stoppageForm: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,s=this.$loading.show();this.stoppageForm.post("/api/transport/stoppage").then((function(e){toastr.success(e.message),t.$emit("completed"),s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},get:function(){var t=this,s=this.$loading.show();axios.get("/api/transport/stoppage/"+this.id).then((function(e){t.stoppageForm.name=e.name,t.stoppageForm.description=e.description,s.hide()})).catch((function(e){s.hide(),helper.showErrorMsg(e),t.$router.push("/transport/stoppage")}))},update:function(){var t=this,s=this.$loading.show();this.stoppageForm.patch("/api/transport/stoppage/"+this.id).then((function(e){toastr.success(e.message),s.hide(),t.$router.push("/transport/stoppage")})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))}}},o=e("KHd+"),r=Object(o.a)(a,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("form",{on:{submit:function(s){return s.preventDefault(),t.proceed(s)},keydown:function(s){return t.stoppageForm.errors.clear(s.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("transport.stoppage_name")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.stoppageForm.name,expression:"stoppageForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.trans("transport.stoppage_name")},domProps:{value:t.stoppageForm.name},on:{input:function(s){s.target.composing||t.$set(t.stoppageForm,"name",s.target.value)}}}),t._v(" "),e("show-error",{attrs:{"form-name":t.stoppageForm,"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("transport.stoppage_description")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.stoppageForm.description,expression:"stoppageForm.description"}],staticClass:"form-control",attrs:{type:"text",name:"description",placeholder:t.trans("transport.stoppage_description")},domProps:{value:t.stoppageForm.description},on:{input:function(s){s.target.composing||t.$set(t.stoppageForm,"description",s.target.value)}}}),t._v(" "),e("show-error",{attrs:{"form-name":t.stoppageForm,"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:"/transport/stoppage"}},[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(s){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);s.a=r.exports},tLw8:function(t,s,e){"use strict";e.r(s);var a={components:{stoppageForm:e("isEB").a},data:function(){return{id:this.$route.params.id}},mounted:function(){helper.hasPermission("edit-transport-stoppage")||(helper.notAccessibleMsg(),this.$router.push("/dashboard"))}},o=e("KHd+"),r=Object(o.a)(a,(function(){var t=this,s=t.$createElement,e=t._self._c||s;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("transport.edit_stoppage")))])]),t._v(" "),e("div",{staticClass:"col-12 col-sm-6"},[e("div",{staticClass:"action-buttons pull-right"},[e("button",{staticClass:"btn btn-info btn-sm",on:{click:function(s){return t.$router.push("/transport/stoppage")}}},[e("i",{staticClass:"fas fa-list"}),t._v(" "),e("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("transport.stoppage")))])])])])])]),t._v(" "),e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"card card-form"},[e("div",{staticClass:"card-body p-t-20"},[e("stoppage-form",{attrs:{id:t.id}})],1)])])])}),[],!1,null,null,null);s.default=r.exports}}]); //# sourceMappingURL=edit.js.map?id=2843331fbb7b23075509
Save
cmd:
run