1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1101],{61101:(t,e,i)=>{i.r(e),i.d(e,{default:()=>a});const s={name:"Input-Editable",props:{name:{type:String,required:!0},type:{type:String,required:!1,default:"text"},routeSave:{type:String,required:!0},method:{type:String,required:!1,default:"POST"},id:{type:String,required:!1},value:{type:String|Number,required:!1},placeholder:{type:String,required:!1}},data:function(){return{editing:!1,target:this.value,loading:!1}},methods:{startEdit:function(){this.editing=!0,this.$nextTick((function(){this.$refs.editableTarget.focus()}))},dataInputted:function(t){13===t.keyCode?this.submitForm():this.$emit("input",t)},submitForm:function(){var t=this;this.loading=!0;var e={_method:this.method,_token:this.$store.state.csrfToken};e[this.name]=this.target,this.$http.post(this.routeSave,e).then((function(e){t.$d("response"),t.$d(e),e.data.hasErrors?t.$store.commit("errors",e.data.errors):!0===e.data.success?(t.editing=!1,t.$store.commit("success","Successfully Updated"),t.$emit("changed",t.target)):t.$store.commit("error",e.data.message),t.loading=!1})).catch((function(e){t.$displayError(e),t.loading=!1}))}},mounted:function(){this.$emit("mounted")}};const a=(0,i(14486).A)(s,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"field has-addons"},[e("div",{directives:[{name:"show",rawName:"v-show",value:!t.editing,expression:" ! editing "}],staticClass:"control is-expanded"},[e("input",{staticClass:"input",attrs:{placeholder:t.placeholder,type:t.type,name:t.name,readonly:""},domProps:{value:t.target}})]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.editing,expression:" ! editing "}],staticClass:"control"},[e("button",{staticClass:"button",attrs:{type:"button"},on:{click:t.startEdit}},[e("i",{staticClass:"fas fa-pen"})])]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.editing,expression:" editing "}],staticClass:"control is-expanded"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.target,expression:"target"}],ref:"editableTarget",staticClass:"input",attrs:{placeholder:t.placeholder,type:"text",id:t.id,name:t.name},domProps:{value:t.target},on:{keyup:t.dataInputted,input:function(e){e.target.composing||(t.target=e.target.value)}}})]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.editing,expression:" editing "}],staticClass:"control"},[e("button",{staticClass:"button is-primary",attrs:{disabled:t.loading,type:"button"},on:{click:t.submitForm}},[e("i",{staticClass:"fas fa-save"})])])])}),[],!1,null,null,null).exports}}]); 2//# sourceMappingURL=1101.js.map?id=41c000aff1349ee3
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.