(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-125df582"],{"2e29":function(e,t,i){},b73d:function(e,t,i){"use strict";i("94a7"),i("2e29");var n=i("5368"),r=i("c341"),s=i("0789"),o=i("490a"),a=i("80d2"),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e};t["a"]={name:"v-switch",directives:{Touch:r["a"]},mixins:[n["a"]],props:{loading:{type:[Boolean,String],default:!1}},computed:{classes:function(){return{"v-input--selection-controls v-input--switch":!0}},switchData:function(){return this.setTextColor(this.loading?void 0:this.computedColor,{class:this.themeClasses})}},methods:{genDefaultSlot:function(){return[this.genSwitch(),this.genLabel()]},genSwitch:function(){return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.genInput("checkbox",this.$attrs),this.genRipple(this.setTextColor(this.computedColor,{directives:[{name:"touch",value:{left:this.onSwipeLeft,right:this.onSwipeRight}}]})),this.$createElement("div",c({staticClass:"v-input--switch__track"},this.switchData)),this.$createElement("div",c({staticClass:"v-input--switch__thumb"},this.switchData),[this.genProgress()])])},genProgress:function(){return this.$createElement(s["b"],{},[!1===this.loading?null:this.$slots.progress||this.$createElement(o["a"],{props:{color:!0===this.loading||""===this.loading?this.color||"primary":this.loading,size:16,width:2,indeterminate:!0}})])},onSwipeLeft:function(){this.isActive&&this.onChange()},onSwipeRight:function(){this.isActive||this.onChange()},onKeydown:function(e){(e.keyCode===a["q"].left&&this.isActive||e.keyCode===a["q"].right&&!this.isActive)&&this.onChange()}}}},bd90:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("w-form-dialog",{ref:"wFormDialog",attrs:{formTitle:"Origen Fondos",headers:e.headers,items:e.origenFondos,loading:e.loading,permisos:e.permisos},on:{New:e.New,save:e.save,update:e.update,editItem:e.editItem}},[i("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[i("v-text-field",{directives:[{name:"validate",rawName:"v-validate",value:"required|max:50",expression:"'required|max:50'"}],attrs:{label:"Descripción",color:"secondary",name:"Descripción",counter:"50"},model:{value:e.item.orFoDescripcion,callback:function(t){e.$set(e.item,"orFoDescripcion",t)},expression:"item.orFoDescripcion"}}),i("span",{staticClass:"red--text"},[e._v(" "+e._s(e.errors.first("Descripción"))+" ")])],1),i("v-flex",{attrs:{xs12:"",sm12:"",md12:""}},[i("v-switch",{attrs:{label:"Activo",color:"secondary"},model:{value:e.item.estatus,callback:function(t){e.$set(e.item,"estatus",t)},expression:"item.estatus"}})],1),i("v-dialog",{attrs:{"max-width":500,persistent:""},model:{value:e.dialogExisteDescripcion,callback:function(t){e.dialogExisteDescripcion=t},expression:"dialogExisteDescripcion"}},[i("v-toolbar",{attrs:{color:"warning",dark:""}},[i("v-icon",[e._v("mdi-alert")]),i("v-card-title",[e._v(" "+e._s("Advertencia")+" ")])],1),i("v-card",[i("v-card-text",[i("v-card-text",{staticClass:"text--primary"},[i("v-container",{attrs:{"grid-list-xl":"",fixed:""}},[i("v-layout",{attrs:{wrap:""}},[i("br"),e._v(" "+e._s("Este origen de fondo ya existe, favor elegir otro.")+" "),e._t("default")],2)],1)],1),i("v-divider"),i("v-card-actions",[i("v-spacer"),i("v-btn",{attrs:{color:"error",text:""},on:{click:function(t){t.stopPropagation(),e.dialogExisteDescripcion=!1}}},[e._v(e._s("Cerrar")+" ")])],1)],1)],1)],1)],1)},r=[],s=(i("8e6e"),i("ac6a"),i("456d"),i("96cf"),i("3b8d")),o=i("bd86"),a=(i("7514"),i("2f62")),c=i("34c0"),u=i("2b0e");function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){Object(o["a"])(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p={data:function(){return{dialogExisteDescripcion:!1,existeDescripcion:!1,headers:[{text:"Descripción",value:"orFoDescripcion"},{text:"Estatus",value:"estatus"},{text:"Acciones",value:"acciones"}],item:{origenFondoId:null,companyId:this.$store.state.Login.user.companyId,orFoDescripcion:"",estatus:!0},permisos:this.$store.state.Login.menu.find((function(e){return e.url===window.location.pathname}))}},computed:l({},Object(a["d"])("OrigenFondos",["origenFondos","loading"])),mounted:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.fetchOrigenFondos();case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:l({},Object(a["b"])({fetchOrigenFondos:"OrigenFondos/fetchOrigenFondos",postOrigenFondos:"OrigenFondos/postOrigenFondos",putOrigenFondos:"OrigenFondos/putOrigenFondos"}),{New:function(){this.$refs.wFormDialog.cleanForm(this.item),this.item.companyId=this.$store.state.Login.user.companyId,this.item.estatus=!0,this.item.origenFondoId=0},editItem:function(e){Object.assign(this.item,e),this.$emit("editItemDone")},save:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.validarDescripcion();case 2:if(!this.existeDescripcion){e.next=6;break}this.dialogExisteDescripcion=!0,e.next=9;break;case 6:return e.next=8,this.postOrigenFondos(this.item);case 8:this.$emit("saveDone");case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),update:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.validarDescripcion();case 2:if(!this.existeDescripcion){e.next=6;break}this.dialogExisteDescripcion=!0,e.next=9;break;case 6:return e.next=8,this.putOrigenFondos(this.item);case 8:this.$emit("updateDone");case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),validarDescripcion:function(){var e=Object(s["a"])(regeneratorRuntime.mark((function e(){var t,i,n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u["default"].axios({url:"api/investigacion/origen-fondos/validarDescripcion/".concat(this.item.orFoDescripcion,"/").concat(this.item.origenFondoId)});case 3:t=e.sent,i=t.data,this.existeDescripcion=i,e.next=16;break;case 8:return e.prev=8,e.t0=e["catch"](0),n=e.t0.response&&e.t0.response.status||e.t0.message,this.error=n,e.next=14,this.$store.dispatch("verifyToken",e.t0.response);case 14:r=e.sent,r&&(this.existeDescripcion=r);case 16:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}()}),components:{"w-form-dialog":c["a"]}},h=p,m=i("2877"),g=i("6544"),v=i.n(g),f=i("8336"),x=i("b0af"),b=i("99d9"),w=i("12b2"),O=i("a523"),D=i("169a"),y=i("ce7e"),F=i("0e8f"),k=i("132d"),j=i("a722"),C=i("9910"),$=i("b73d"),_=i("2677"),E=i("71d9"),V=Object(m["a"])(h,n,r,!1,null,null,null);t["default"]=V.exports;v()(V,{VBtn:f["a"],VCard:x["a"],VCardActions:b["a"],VCardText:b["b"],VCardTitle:w["a"],VContainer:O["a"],VDialog:D["a"],VDivider:y["a"],VFlex:F["a"],VIcon:k["a"],VLayout:j["a"],VSpacer:C["a"],VSwitch:$["a"],VTextField:_["a"],VToolbar:E["a"]})}}]);