/home/techb158/ileadtechnology.com/SSM/public/js/transport/vehicle
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/transport/vehicle/index.js (35552B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[368],{HHVZ:function(e,t,a){"use strict";a.r(t);var r={components:{vehicleForm:a("P4dv").a},data:function(){return{vehicles:{total:0,data:[]},filter:{sort_by:"name",order:"asc",name:"",registration_number:"",status:"",type:"",page_length:helper.getConfig("page_length")},orderByOptions:[{value:"name",translation:i18n.transport.vehicle_name},{value:"registration_number",translation:i18n.transport.vehicle_registration_number},{value:"created_at",translation:i18n.general.created_at}],vehicle_types:[{text:i18n.transport.vehicle_owned,value:"owned"},{text:i18n.transport.vehicle_contract,value:"contract"}],vehicle_statuses:[{text:i18n.transport.vehicle_active,value:"active"},{text:i18n.transport.vehicle_inactive,value:"inactive"}],showCreatePanel:!1,showFilterPanel:!1,help_topic:""}},mounted:function(){helper.hasPermission("list-vehicle")&&helper.hasPermission("create-vehicle")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),helper.hasPermission("list-vehicle")&&this.getVehicles()},methods:{getConfig:function(e){return helper.getConfig(e)},hasPermission:function(e){return helper.hasPermission(e)},getVehicles:function(e){var t=this,a=this.$loading.show();"number"!=typeof e&&(e=1);var r=helper.getFilterURL(this.filter);axios.get("/api/vehicle?page="+e+r).then((function(e){t.vehicles=e,a.hide()})).catch((function(e){a.hide(),helper.showErrorMsg(e)}))},editVehicle:function(e){this.$router.push("/transport/vehicle/"+e.id+"/edit")},confirmDelete:function(e){var t=this;return function(a){return t.deleteVehicle(e)}},deleteVehicle:function(e){var t=this,a=this.$loading.show();axios.delete("/api/vehicle/"+e.id).then((function(e){toastr.success(e.message),t.getVehicles(),a.hide()})).catch((function(e){a.hide(),helper.showErrorMsg(e)}))},print:function(){var e=this.$loading.show();axios.post("/api/vehicle/print",{filter:this.filter}).then((function(t){var a=window.open("/print");e.hide(),a.document.write(t)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},pdf:function(){var e=this,t=this.$loading.show();axios.post("/api/vehicle/pdf",{filter:this.filter}).then((function(a){t.hide(),window.open("/download/report/"+a+"?token="+e.authToken)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))}},filters:{moment:function(e){return helper.formatDate(e)},momentDateTime:function(e){return helper.formatDateTime(e)}},watch:{"filter.sort_by":function(e){this.getVehicles()},"filter.order":function(e){this.getVehicles()},"filter.page_length":function(e){this.getVehicles()}},computed:{authToken:function(){return helper.getAuthToken()}}},s=a("KHd+"),o=Object(s.a)(r,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"page-titles"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("h3",{staticClass:"text-themecolor"},[e._v(e._s(e.trans("transport.vehicle"))+" \n "),e.vehicles.total?a("span",{staticClass:"card-subtitle d-none d-sm-inline"},[e._v(e._s(e.trans("general.total_result_found",{count:e.vehicles.total,from:e.vehicles.from,to:e.vehicles.to})))]):a("span",{staticClass:"card-subtitle d-none d-sm-inline"},[e._v(e._s(e.trans("general.no_result_found")))])])]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"action-buttons pull-right"},[e.vehicles.total&&!e.showCreatePanel&&e.hasPermission("create-vehicle")?a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("general.add_new"),expression:"trans('general.add_new')"}],staticClass:"btn btn-info btn-sm",on:{click:function(t){e.showCreatePanel=!e.showCreatePanel}}},[a("i",{staticClass:"fas fa-plus"}),e._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[e._v(e._s(e.trans("transport.add_new_vehicle")))])]):e._e(),e._v(" "),e.showFilterPanel?e._e():a("button",{staticClass:"btn btn-info btn-sm",on:{click:function(t){e.showFilterPanel=!e.showFilterPanel}}},[a("i",{staticClass:"fas fa-filter"}),e._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[e._v(e._s(e.trans("general.filter")))])]),e._v(" "),a("sort-by",{attrs:{"order-by-options":e.orderByOptions,"sort-by":e.filter.sort_by,order:e.filter.order},on:{updateSortBy:function(t){e.filter.sort_by=t},updateOrder:function(t){e.filter.order=t}}}),e._v(" "),a("div",{staticClass:"btn-group"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.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"}},[a("i",{staticClass:"fas fa-ellipsis-h"}),e._v(" "),a("span",{staticClass:"d-none d-sm-inline"})]),e._v(" "),a("div",{class:["dropdown-menu","ltr"==e.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[a("button",{staticClass:"dropdown-item custom-dropdown",on:{click:e.print}},[a("i",{staticClass:"fas fa-print"}),e._v(" "+e._s(e.trans("general.print")))]),e._v(" "),a("button",{staticClass:"dropdown-item custom-dropdown",on:{click:e.pdf}},[a("i",{staticClass:"fas fa-file-pdf"}),e._v(" "+e._s(e.trans("general.generate_pdf")))])])]),e._v(" "),a("help-button",{on:{clicked:function(t){e.help_topic="transport.vehicle"}}})],1)])])]),e._v(" "),a("div",{staticClass:"container-fluid"},[a("transition",{attrs:{name:"fade"}},[e.showFilterPanel?a("div",{staticClass:"card card-form"},[a("div",{staticClass:"card-body"},[a("h4",{staticClass:"card-title"},[e._v(e._s(e.trans("general.filter")))]),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_name")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.name,expression:"filter.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:e.trans("transport.vehicle_name")},domProps:{value:e.filter.name},on:{input:function(t){t.target.composing||e.$set(e.filter,"name",t.target.value)}}})])]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_registration_number")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.registration_number,expression:"filter.registration_number"}],staticClass:"form-control",attrs:{type:"text",name:"registration_number",placeholder:e.trans("transport.vehicle_registration_number")},domProps:{value:e.filter.registration_number},on:{input:function(t){t.target.composing||e.$set(e.filter,"registration_number",t.target.value)}}})])]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_type")))]),e._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:e.filter.type,expression:"filter.type"}],staticClass:"custom-select col-12",on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.filter,"type",t.target.multiple?a:a[0])}}},[a("option",{attrs:{value:"null",selected:""}},[e._v(e._s(e.trans("general.select_one")))]),e._v(" "),e._l(e.vehicle_types,(function(t){return a("option",{domProps:{value:t.value}},[e._v("\n "+e._s(t.text)+"\n ")])}))],2)])]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_status")))]),e._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:e.filter.status,expression:"filter.status"}],staticClass:"custom-select col-12",on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.filter,"status",t.target.multiple?a:a[0])}}},[a("option",{attrs:{value:"null",selected:""}},[e._v(e._s(e.trans("general.select_one")))]),e._v(" "),e._l(e.vehicle_statuses,(function(t){return a("option",{domProps:{value:t.value}},[e._v("\n "+e._s(t.text)+"\n ")])}))],2)])])]),e._v(" "),a("div",{staticClass:"card-footer text-right"},[a("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(t){e.showFilterPanel=!1}}},[e._v(e._s(e.trans("general.cancel")))]),e._v(" "),a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:e.getVehicles}},[e._v(e._s(e.trans("general.filter")))])])])]):e._e()]),e._v(" "),e.hasPermission("create-vehicle")?a("transition",{attrs:{name:"fade"}},[e.showCreatePanel?a("div",{staticClass:"card card-form"},[a("div",{staticClass:"card-body"},[a("h4",{staticClass:"card-title"},[e._v(e._s(e.trans("transport.add_new_vehicle")))]),e._v(" "),a("vehicle-form",{on:{completed:e.getVehicles,cancel:function(t){e.showCreatePanel=!e.showCreatePanel}}})],1)]):e._e()]):e._e(),e._v(" "),a("div",{staticClass:"card"},[a("div",{staticClass:"card-body"},[e.vehicles.total?a("div",{staticClass:"table-responsive"},[a("table",{staticClass:"table table-sm"},[a("thead",[a("tr",[a("th",[e._v(e._s(e.trans("transport.vehicle_name")))]),e._v(" "),a("th",[e._v(e._s(e.trans("transport.vehicle_registration_number")))]),e._v(" "),a("th",[e._v(e._s(e.trans("transport.vehicle_model")))]),e._v(" "),a("th",[a("small",[e._v(e._s(e.trans("transport.vehicle_max_seating_capacity")))])]),e._v(" "),a("th",[e._v(e._s(e.trans("transport.vehicle_max_allowed")))]),e._v(" "),a("th",[e._v(e._s(e.trans("transport.vehicle_owner")))]),e._v(" "),a("th",{staticClass:"table-option"},[e._v(e._s(e.trans("general.action")))])])]),e._v(" "),a("tbody",e._l(e.vehicles.data,(function(t){return a("tr",[a("td",[e._v("\n "+e._s(t.name)+" "),t.is_active?a("span",{staticClass:"label label-success"},[e._v(e._s(e.trans("transport.vehicle_active")))]):a("span",{staticClass:"label label-danger"},[e._v(e._s(e.trans("transport.vehicle_inactive")))])]),e._v(" "),a("td",{domProps:{textContent:e._s(t.registration_number)}}),e._v(" "),a("td",[e._v("\n "+e._s(t.model)+" "),t.make?a("span",[e._v(e._s("("+e.trans("transport.vehicle_make")+": "+t.make+")"))]):e._e()]),e._v(" "),a("td",{domProps:{textContent:e._s(t.max_seating_capacity)}}),e._v(" "),a("td",{domProps:{textContent:e._s(t.max_allowed)}}),e._v(" "),a("td",[t.is_owned?a("span",{staticClass:"label label-info"},[e._v(e._s(e.trans("transport.vehicle_owned")))]):a("span",{staticClass:"label label-warning"},[e._v(e._s(e.trans("transport.vehicle_contract")))]),e._v(" "),a("ul",{staticStyle:{"list-style":"none",padding:"0",margin:"0"}},[a("li",[a("strong",[e._v(e._s(e.trans("transport.vehicle_owner_name"))+":")]),e._v(" "+e._s(t.owner_name))]),e._v(" "),a("li",[a("strong",[e._v(e._s(e.trans("transport.vehicle_owner_company_name"))+":")]),e._v(" "+e._s(t.owner_company_name))]),e._v(" "),a("li",[a("strong",[e._v(e._s(e.trans("transport.vehicle_owner_phone"))+":")]),e._v(" "+e._s(t.owner_phone))]),e._v(" "),a("li",[a("strong",[e._v(e._s(e.trans("transport.vehicle_owner_email"))+":")]),e._v(" "+e._s(t.owner_email))])])]),e._v(" "),a("td",{staticClass:"table-option"},[a("div",{staticClass:"btn-group"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.trans("transport.edit_vehicle"),expression:"trans('transport.edit_vehicle')"}],staticClass:"btn btn-info btn-sm",on:{click:function(a){return a.preventDefault(),e.editVehicle(t)}}},[a("i",{staticClass:"fas fa-edit"})]),e._v(" "),a("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:e.confirmDelete(t)},expression:"{ok: confirmDelete(vehicle)}"},{name:"tooltip",rawName:"v-tooltip",value:e.trans("transport.delete_vehicle"),expression:"trans('transport.delete_vehicle')"}],key:t.id,staticClass:"btn btn-danger btn-sm"},[a("i",{staticClass:"fas fa-trash"})])])])])})),0)])]):e._e(),e._v(" "),e.vehicles.total?e._e():a("module-info",{attrs:{module:"transport",title:"vehicle_module_title",description:"vehicle_module_description",icon:"list"}},[a("div",{attrs:{slot:"btn"},slot:"btn"},[!e.showCreatePanel&&e.hasPermission("create-vehicle")?a("button",{staticClass:"btn btn-info btn-md",on:{click:function(t){e.showCreatePanel=!e.showCreatePanel}}},[a("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.trans("general.add_new")))]):e._e()])]),e._v(" "),a("pagination-record",{attrs:{"page-length":e.filter.page_length,records:e.vehicles},on:{"update:pageLength":function(t){return e.$set(e.filter,"page_length",t)},"update:page-length":function(t){return e.$set(e.filter,"page_length",t)},updateRecords:e.getVehicles}})],1)])],1),e._v(" "),a("right-panel",{attrs:{topic:e.help_topic}})],1)}),[],!1,null,null,null);t.default=o.exports},P4dv:function(e,t,a){"use strict";var r={components:{},data:function(){return{vehicleForm:new Form({name:"",registration_number:"",make:"",model:"",max_seating_capacity:"",max_allowed:"",is_owned:"",owner_name:"",owner_company_name:"",owner_phone:"",owner_email:"",vehicle_fuel_type_id:"",max_fuel_capacity:"",is_active:!1,advance_info:!1,disposal_info:!1,chasis_number:"",engine_number:"",cubic_capacity:"",class:"",registration_date:"",registration_place:"",sale_date:"",selling_price:"",buyer_name:"",buyer_contact_number:"",buyer_address:""}),vehicle_fuel_types:[],selected_vehicle_fuel_type:null}},props:["id"],mounted:function(){this.id&&this.getVehicle(),this.getPreRequisite()},methods:{getPreRequisite:function(){var e=this,t=this.$loading.show();axios.get("/api/vehicle/pre-requisite").then((function(a){e.vehicle_fuel_types=a.vehicle_fuel_types,t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},proceed:function(){this.id?this.updateVehicle():this.storeVehicle()},storeVehicle:function(){var e=this,t=this.$loading.show();this.vehicleForm.make=moment(this.vehicleForm.make).format("YYYY-MM"),this.vehicleForm.post("/api/vehicle").then((function(a){toastr.success(a.message),e.$emit("completed"),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},getVehicle:function(){var e=this,t=this.$loading.show();axios.get("/api/vehicle/"+this.id).then((function(a){e.vehicleForm.name=a.name,e.vehicleForm.registration_number=a.registration_number,e.vehicleForm.make=a.make,e.vehicleForm.model=a.model,e.vehicleForm.is_owned=a.is_owned,e.vehicleForm.max_seating_capacity=a.max_seating_capacity,e.vehicleForm.max_allowed=a.max_allowed,e.vehicleForm.owner_name=a.owner_name,e.vehicleForm.owner_company_name=a.owner_company_name,e.vehicleForm.owner_phone=a.owner_phone,e.vehicleForm.owner_email=a.owner_email,e.vehicleForm.vehicle_fuel_type_id=a.vehicle_fuel_type_id,e.selected_vehicle_fuel_type=a.vehicle_fuel_type_id?{id:a.vehicle_fuel_type_id,name:a.vehicle_fuel_type.name}:null,e.vehicleForm.max_fuel_capacity=a.max_fuel_capacity,e.vehicleForm.is_active=a.is_active;var r=a.options&&a.options.hasOwnProperty("advance")?a.options.advance:{chasis_number:"",engine_number:"",cubic_capacity:"",class:"",registration_date:"",registration_place:""},s=a.options&&a.options.hasOwnProperty("disposal")?a.options.disposal:{sale_date:"",selling_price:"",buyer_name:"",buyer_contact_number:"",buyer_address:""};e.vehicleForm.chasis_number=r.chasis_number,e.vehicleForm.engine_number=r.engine_number,e.vehicleForm.cubic_capacity=r.cubic_capacity,e.vehicleForm.class=r.class,e.vehicleForm.registration_date=r.registration_date,e.vehicleForm.registration_place=r.registration_place,e.vehicleForm.sale_date=s.sale_date,e.vehicleForm.selling_price=s.selling_price,e.vehicleForm.buyer_name=s.buyer_name,e.vehicleForm.buyer_contact_number=s.buyer_contact_number,e.vehicleForm.buyer_address=s.buyer_address,t.hide()})).catch((function(a){t.hide(),e.$router.push("/transport/vehicle")}))},updateVehicle:function(){var e=this,t=this.$loading.show();this.vehicleForm.make=moment(this.vehicleForm.make).format("YYYY-MM"),this.vehicleForm.patch("/api/vehicle/"+this.id).then((function(a){toastr.success(a.message),t.hide(),e.$router.push("/transport/vehicle")})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},onFuelTypeSelect:function(e){this.vehicleForm.vehicle_fuel_type_id=e.id},onVehicleSelect:function(e){this.vehicleForm.vehicle_id=e.id}}},s=a("KHd+"),o=Object(s.a)(r,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("form",{on:{submit:function(t){return t.preventDefault(),e.proceed(t)},keydown:function(t){return e.vehicleForm.errors.clear(t.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_name")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.name,expression:"vehicleForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:e.trans("transport.vehicle_name")},domProps:{value:e.vehicleForm.name},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"name",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"name"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_registration_number")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.registration_number,expression:"vehicleForm.registration_number"}],staticClass:"form-control",attrs:{type:"text",name:"registration_number",placeholder:e.trans("transport.vehicle_registration_number")},domProps:{value:e.vehicleForm.registration_number},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"registration_number",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"registration_number"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_max_seating_capacity")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.max_seating_capacity,expression:"vehicleForm.max_seating_capacity"}],staticClass:"form-control",attrs:{type:"text",name:"max_seating_capacity",placeholder:e.trans("transport.vehicle_max_seating_capacity")},domProps:{value:e.vehicleForm.max_seating_capacity},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"max_seating_capacity",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"max_seating_capacity"}})],1),e._v(" "),a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_max_allowed")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.max_allowed,expression:"vehicleForm.max_allowed"}],staticClass:"form-control",attrs:{type:"text",name:"max_allowed",placeholder:e.trans("transport.vehicle_max_allowed")},domProps:{value:e.vehicleForm.max_allowed},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"max_allowed",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"max_allowed"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_make")))]),e._v(" "),a("vue-monthly-picker",{attrs:{name:"make",placeHolder:e.trans("transport.vehicle_make"),dateFormat:"YYYY-MM "},model:{value:e.vehicleForm.make,callback:function(t){e.$set(e.vehicleForm,"make",t)},expression:"vehicleForm.make"}})],1),e._v(" "),a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_model")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.model,expression:"vehicleForm.model"}],staticClass:"form-control",attrs:{type:"text",name:"model",placeholder:e.trans("transport.vehicle_model")},domProps:{value:e.vehicleForm.model},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"model",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"model"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("div",[e._v(e._s(e.trans("transport.vehicle_is_active")))]),e._v(" "),a("switches",{staticClass:"m-t-10",attrs:{theme:"bootstrap",color:"success"},model:{value:e.vehicleForm.is_active,callback:function(t){e.$set(e.vehicleForm,"is_active",t)},expression:"vehicleForm.is_active"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"form-group"},[a("div",{staticClass:"radio radio-success"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.is_owned,expression:"vehicleForm.is_owned"}],attrs:{type:"radio",value:"1",id:"owned",name:"is_owned"},domProps:{checked:e.vehicleForm.is_owned,checked:e._q(e.vehicleForm.is_owned,"1")},on:{click:function(t){return e.vehicleForm.errors.clear("is_owned")},change:function(t){return e.$set(e.vehicleForm,"is_owned","1")}}}),e._v(" "),a("label",{attrs:{for:"owned"}},[e._v(e._s(e.trans("transport.vehicle_owned")))])]),e._v(" "),a("div",{staticClass:"radio radio-success"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.is_owned,expression:"vehicleForm.is_owned"}],attrs:{type:"radio",value:"0",id:"contract",name:"is_owned"},domProps:{checked:!e.vehicleForm.is_owned,checked:e._q(e.vehicleForm.is_owned,"0")},on:{click:function(t){return e.vehicleForm.errors.clear("is_owned")},change:function(t){return e.$set(e.vehicleForm,"is_owned","0")}}}),e._v(" "),a("label",{attrs:{for:"contract"}},[e._v(e._s(e.trans("transport.vehicle_contract")))])]),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"is_owned"}})],1)])])]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_owner_name")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.owner_name,expression:"vehicleForm.owner_name"}],staticClass:"form-control",attrs:{type:"text",name:"owner_name",placeholder:e.trans("transport.vehicle_owner_name")},domProps:{value:e.vehicleForm.owner_name},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"owner_name",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"owner_name"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_owner_company_name")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.owner_company_name,expression:"vehicleForm.owner_company_name"}],staticClass:"form-control",attrs:{type:"text",name:"owner_company_name",placeholder:e.trans("transport.vehicle_owner_company_name")},domProps:{value:e.vehicleForm.owner_company_name},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"owner_company_name",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"owner_company_name"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_owner_phone")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.owner_phone,expression:"vehicleForm.owner_phone"}],staticClass:"form-control",attrs:{type:"text",name:"owner_phone",placeholder:e.trans("transport.vehicle_owner_phone")},domProps:{value:e.vehicleForm.owner_phone},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"owner_phone",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"owner_phone"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_owner_email")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.owner_email,expression:"vehicleForm.owner_email"}],staticClass:"form-control",attrs:{type:"text",name:"owner_email",placeholder:e.trans("transport.vehicle_owner_email")},domProps:{value:e.vehicleForm.owner_email},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"owner_email",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"owner_email"}})],1)])]),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_fuel_type")))]),e._v(" "),a("v-select",{attrs:{label:"name",name:"vehicle_fuel_type_id",id:"vehicle_fuel_type_id",options:e.vehicle_fuel_types,placeholder:e.trans("general.select_one")},on:{select:e.onFuelTypeSelect,close:function(t){return e.vehicleForm.errors.clear("vehicle_fuel_type_id")},remove:function(t){e.vehicleForm.vehicle_fuel_type_id=""}},model:{value:e.selected_vehicle_fuel_type,callback:function(t){e.selected_vehicle_fuel_type=t},expression:"selected_vehicle_fuel_type"}},[e.vehicle_fuel_types.length?e._e():a("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[e._v("\n "+e._s(e.trans("general.no_option_found"))+"\n ")])]),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"vehicle_fuel_type_id"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.max_fuel_capacity")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.max_fuel_capacity,expression:"vehicleForm.max_fuel_capacity"}],staticClass:"form-control",attrs:{type:"text",name:"max_fuel_capacity",placeholder:e.trans("transport.max_fuel_capacity")},domProps:{value:e.vehicleForm.max_fuel_capacity},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"max_fuel_capacity",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"max_fuel_capacity"}})],1)])])])]),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("div",[e._v(e._s(e.trans("transport.vehicle_advance_info")))]),e._v(" "),a("switches",{staticClass:"m-t-10",attrs:{theme:"bootstrap",color:"success"},model:{value:e.vehicleForm.advance_info,callback:function(t){e.$set(e.vehicleForm,"advance_info",t)},expression:"vehicleForm.advance_info"}})],1)]),e._v(" "),e.vehicleForm.advance_info?[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_chasis_number")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.chasis_number,expression:"vehicleForm.chasis_number"}],staticClass:"form-control",attrs:{type:"text",name:"chasis_number",placeholder:e.trans("transport.vehicle_chasis_number")},domProps:{value:e.vehicleForm.chasis_number},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"chasis_number",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"chasis_number"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_engine_number")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.engine_number,expression:"vehicleForm.engine_number"}],staticClass:"form-control",attrs:{type:"text",name:"engine_number",placeholder:e.trans("transport.vehicle_engine_number")},domProps:{value:e.vehicleForm.engine_number},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"engine_number",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"engine_number"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_cubic_capacity")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.cubic_capacity,expression:"vehicleForm.cubic_capacity"}],staticClass:"form-control",attrs:{type:"text",name:"cubic_capacity",placeholder:e.trans("transport.vehicle_cubic_capacity")},domProps:{value:e.vehicleForm.cubic_capacity},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"cubic_capacity",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"cubic_capacity"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_class")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.class,expression:"vehicleForm.class"}],staticClass:"form-control",attrs:{type:"text",name:"class",placeholder:e.trans("transport.vehicle_class")},domProps:{value:e.vehicleForm.class},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"class",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"class"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_registration_place")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.registration_place,expression:"vehicleForm.registration_place"}],staticClass:"form-control",attrs:{type:"text",name:"registration_place",placeholder:e.trans("transport.vehicle_registration_place")},domProps:{value:e.vehicleForm.registration_place},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"registration_place",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"registration_place"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_registration_date")))]),e._v(" "),a("datepicker",{attrs:{bootstrapStyling:!0,placeholder:e.trans("transport.vehicle_registration_date")},on:{selected:function(t){return e.vehicleForm.errors.clear("registration_date")}},model:{value:e.vehicleForm.registration_date,callback:function(t){e.$set(e.vehicleForm,"registration_date",t)},expression:"vehicleForm.registration_date"}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"registration_date"}})],1)])]:e._e()],2),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("div",[e._v(e._s(e.trans("transport.vehicle_disposal_info")))]),e._v(" "),a("switches",{staticClass:"m-t-10",attrs:{theme:"bootstrap",color:"success"},model:{value:e.vehicleForm.disposal_info,callback:function(t){e.$set(e.vehicleForm,"disposal_info",t)},expression:"vehicleForm.disposal_info"}})],1)]),e._v(" "),e.vehicleForm.disposal_info?[a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_sale_date")))]),e._v(" "),a("datepicker",{attrs:{bootstrapStyling:!0,placeholder:e.trans("transport.vehicle_sale_date")},on:{selected:function(t){return e.vehicleForm.errors.clear("sale_date")}},model:{value:e.vehicleForm.sale_date,callback:function(t){e.$set(e.vehicleForm,"sale_date",t)},expression:"vehicleForm.sale_date"}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"sale_date"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_selling_price")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.selling_price,expression:"vehicleForm.selling_price"}],staticClass:"form-control",attrs:{type:"text",name:"selling_price",placeholder:e.trans("transport.vehicle_selling_price")},domProps:{value:e.vehicleForm.selling_price},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"selling_price",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"selling_price"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_buyer_name")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.buyer_name,expression:"vehicleForm.buyer_name"}],staticClass:"form-control",attrs:{type:"text",name:"buyer_name",placeholder:e.trans("transport.vehicle_buyer_name")},domProps:{value:e.vehicleForm.buyer_name},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"buyer_name",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"buyer_name"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_buyer_contact_number")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.buyer_contact_number,expression:"vehicleForm.buyer_contact_number"}],staticClass:"form-control",attrs:{type:"text",name:"buyer_contact_number",placeholder:e.trans("transport.vehicle_buyer_contact_number")},domProps:{value:e.vehicleForm.buyer_contact_number},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"buyer_contact_number",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"buyer_contact_number"}})],1)]),e._v(" "),a("div",{staticClass:"col-12 col-sm-3"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[e._v(e._s(e.trans("transport.vehicle_buyer_address")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.vehicleForm.buyer_address,expression:"vehicleForm.buyer_address"}],staticClass:"form-control",attrs:{type:"text",name:"buyer_address",placeholder:e.trans("transport.vehicle_buyer_address")},domProps:{value:e.vehicleForm.buyer_address},on:{input:function(t){t.target.composing||e.$set(e.vehicleForm,"buyer_address",t.target.value)}}}),e._v(" "),a("show-error",{attrs:{"form-name":e.vehicleForm,"prop-name":"buyer_address"}})],1)])]:e._e()],2),e._v(" "),a("div",{staticClass:"card-footer text-right"},[a("router-link",{directives:[{name:"show",rawName:"v-show",value:e.id,expression:"id"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/transport/vehicle"}},[e._v(e._s(e.trans("general.cancel")))]),e._v(" "),e.id?e._e():a("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(" "),a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[e.id?a("span",[e._v(e._s(e.trans("general.update")))]):a("span",[e._v(e._s(e.trans("general.save")))])])],1)])}),[],!1,null,null,null);t.a=o.exports}}]);
//# sourceMappingURL=index.js.map?id=e7ffb26a21d204868f6c