(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4d06b56c"],{3656:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n("2b0e"),o=n("b42e"),r=n("c637"),s=n("d82f"),a=n("cf75"),c=n("46bc");function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function u(t){for(var e=1;en.bottom)return this.$refs.dropdownMenu.scrollTop=e.offsetTop-(n.height-s)}},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},u={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){for(var t=0;t=0;t--)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},typeAheadDown:function(){for(var t=this.typeAheadPointer+1;t0&&void 0!==arguments[0]?arguments[0]:null;return this.mutableLoading=null==t?!this.mutableLoading:t}}};function d(t,e,n,i,o,r,s,a){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:t,options:l}}var h={Deselect:d({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"}},[e("path",{attrs:{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"}})])}),[],!1,null,null,null).exports,OpenIndicator:d({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"}},[e("path",{attrs:{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"}})])}),[],!1,null,null,null).exports},f={inserted:function(t,e,n){var i=n.context;if(i.appendToBody){var o=i.$refs.toggle.getBoundingClientRect(),r=o.height,s=o.top,a=o.left,c=o.width,l=window.scrollX||window.pageXOffset,u=window.scrollY||window.pageYOffset;t.unbindPosition=i.calculatePosition(t,i,{width:c+"px",left:l+a+"px",top:u+s+r+"px"}),document.body.appendChild(t)}},unbind:function(t,e,n){n.context.appendToBody&&(t.unbindPosition&&"function"==typeof t.unbindPosition&&t.unbindPosition(),t.parentNode&&t.parentNode.removeChild(t))}},b=function(t){var e={};return Object.keys(t).sort().forEach((function(n){e[n]=t[n]})),JSON.stringify(e)},m=0,v=function(){return++m};function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function y(t){for(var e=1;e-1}},filter:{type:Function,default:function(t,e){var n=this;return t.filter((function(t){var i=n.getOptionLabel(t);return"number"==typeof i&&(i=i.toString()),n.filterBy(t,i,e)}))}},createOption:{type:Function,default:function(t){return"object"===s()(this.optionList[0])?c()({},this.label,t):t}},resetOnOptionsChange:{default:!1,validator:function(t){return["function","boolean"].includes(s()(t))}},clearSearchOnBlur:{type:Function,default:function(t){var e=t.clearSearchOnSelect,n=t.multiple;return e&&!n}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:function(){return[13]}},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:function(t,e){return t}},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default:function(t,e,n){var i=n.width,o=n.top,r=n.left;t.style.top=o,t.style.left=r,t.style.width=i}}},data:function(){return{uid:v(),search:"",open:!1,isComposing:!1,pushedTags:[],_value:[]}},watch:{options:function(t,e){var n=this;!this.taggable&&("function"==typeof n.resetOnOptionsChange?n.resetOnOptionsChange(t,e,n.selectedValue):n.resetOnOptionsChange)&&this.clearSelection(),this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value)},value:function(t){this.isTrackingValues&&this.setInternalValueFromOptions(t)},multiple:function(){this.clearSelection()},open:function(t){this.$emit(t?"open":"close")}},created:function(){this.mutableLoading=this.loading,void 0!==this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value),this.$on("option:created",this.pushTag)},methods:{setInternalValueFromOptions:function(t){var e=this;Array.isArray(t)?this.$data._value=t.map((function(t){return e.findOptionFromReducedValue(t)})):this.$data._value=this.findOptionFromReducedValue(t)},select:function(t){this.$emit("option:selecting",t),this.isOptionSelected(t)||(this.taggable&&!this.optionExists(t)&&this.$emit("option:created",t),this.multiple&&(t=this.selectedValue.concat(t)),this.updateValue(t),this.$emit("option:selected",t)),this.onAfterSelect(t)},deselect:function(t){var e=this;this.$emit("option:deselecting",t),this.updateValue(this.selectedValue.filter((function(n){return!e.optionComparator(n,t)}))),this.$emit("option:deselected",t)},clearSelection:function(){this.updateValue(this.multiple?[]:null)},onAfterSelect:function(t){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue:function(t){var e=this;void 0===this.value&&(this.$data._value=t),null!==t&&(t=Array.isArray(t)?t.map((function(t){return e.reduce(t)})):this.reduce(t)),this.$emit("input",t)},toggleDropdown:function(t){var e=t.target!==this.searchEl;e&&t.preventDefault();var n=[].concat(o()(this.$refs.deselectButtons||[]),o()([this.$refs.clearButton]||!1));void 0===this.searchEl||n.filter(Boolean).some((function(e){return e.contains(t.target)||e===t.target}))?t.preventDefault():this.open&&e?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected:function(t){var e=this;return this.selectedValue.some((function(n){return e.optionComparator(n,t)}))},optionComparator:function(t,e){return this.getOptionKey(t)===this.getOptionKey(e)},findOptionFromReducedValue:function(t){var e=this,n=[].concat(o()(this.options),o()(this.pushedTags)).filter((function(n){return JSON.stringify(e.reduce(n))===JSON.stringify(t)}));return 1===n.length?n[0]:n.find((function(t){return e.optionComparator(t,e.$data._value)}))||t},closeSearchOptions:function(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue:function(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){var t=null;this.multiple&&(t=o()(this.selectedValue.slice(0,this.selectedValue.length-1))),this.updateValue(t)}},optionExists:function(t){var e=this;return this.optionList.some((function(n){return e.optionComparator(n,t)}))},normalizeOptionForSlot:function(t){return"object"===s()(t)?t:c()({},this.label,t)},pushTag:function(t){this.pushedTags.push(t)},onEscape:function(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur:function(){if(!this.mousedown||this.searching){var t=this.clearSearchOnSelect,e=this.multiple;return this.clearSearchOnBlur({clearSearchOnSelect:t,multiple:e})&&(this.search=""),void this.closeSearchOptions()}this.mousedown=!1,0!==this.search.length||0!==this.options.length||this.closeSearchOptions()},onSearchFocus:function(){this.open=!0,this.$emit("search:focus")},onMousedown:function(){this.mousedown=!0},onMouseUp:function(){this.mousedown=!1},onSearchKeyDown:function(t){var e=this,n=function(t){return t.preventDefault(),!e.isComposing&&e.typeAheadSelect()},i={8:function(t){return e.maybeDeleteValue()},9:function(t){return e.onTab()},27:function(t){return e.onEscape()},38:function(t){return t.preventDefault(),e.typeAheadUp()},40:function(t){return t.preventDefault(),e.typeAheadDown()}};this.selectOnKeyCodes.forEach((function(t){return i[t]=n}));var o=this.mapKeydown(i,this);if("function"==typeof o[t.keyCode])return o[t.keyCode](t)}},computed:{isTrackingValues:function(){return void 0===this.value||this.$options.propsData.hasOwnProperty("reduce")},selectedValue:function(){var t=this.value;return this.isTrackingValues&&(t=this.$data._value),t?[].concat(t):[]},optionList:function(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl:function(){return this.$scopedSlots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope:function(){var t=this,e={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:y({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":"vs".concat(this.uid,"__combobox"),"aria-controls":"vs".concat(this.uid,"__listbox"),ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":"vs".concat(this.uid,"__option-").concat(this.typeAheadPointer)}:{}),events:{compositionstart:function(){return t.isComposing=!0},compositionend:function(){return t.isComposing=!1},keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:function(e){return t.search=e.target.value}}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.loading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:e,listFooter:e,header:y({},e,{deselect:this.deselect}),footer:y({},e,{deselect:this.deselect})}},childComponents:function(){return y({},h,{},this.components)},stateClasses:function(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching:function(){return!!this.search},dropdownOpen:function(){return!this.noDrop&&this.open&&!this.mutableLoading},searchPlaceholder:function(){if(this.isValueEmpty&&this.placeholder)return this.placeholder},filteredOptions:function(){var t=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return t;var e=this.search.length?this.filter(t,this.search,this):t;if(this.taggable&&this.search.length){var n=this.createOption(this.search);this.optionExists(n)||e.unshift(n)}return e},isValueEmpty:function(){return 0===this.selectedValue.length},showClearButton:function(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}}},j=(n(7),d(O,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-select",class:t.stateClasses,attrs:{dir:t.dir}},[t._t("header",null,null,t.scope.header),t._v(" "),n("div",{ref:"toggle",staticClass:"vs__dropdown-toggle",attrs:{id:"vs"+t.uid+"__combobox",role:"combobox","aria-expanded":t.dropdownOpen.toString(),"aria-owns":"vs"+t.uid+"__listbox","aria-label":"Search for option"},on:{mousedown:function(e){return t.toggleDropdown(e)}}},[n("div",{ref:"selectedOptions",staticClass:"vs__selected-options"},[t._l(t.selectedValue,(function(e){return t._t("selected-option-container",[n("span",{key:t.getOptionKey(e),staticClass:"vs__selected"},[t._t("selected-option",[t._v("\n "+t._s(t.getOptionLabel(e))+"\n ")],null,t.normalizeOptionForSlot(e)),t._v(" "),t.multiple?n("button",{ref:"deselectButtons",refInFor:!0,staticClass:"vs__deselect",attrs:{disabled:t.disabled,type:"button",title:"Deselect "+t.getOptionLabel(e),"aria-label":"Deselect "+t.getOptionLabel(e)},on:{click:function(n){return t.deselect(e)}}},[n(t.childComponents.Deselect,{tag:"component"})],1):t._e()],2)],{option:t.normalizeOptionForSlot(e),deselect:t.deselect,multiple:t.multiple,disabled:t.disabled})})),t._v(" "),t._t("search",[n("input",t._g(t._b({staticClass:"vs__search"},"input",t.scope.search.attributes,!1),t.scope.search.events))],null,t.scope.search)],2),t._v(" "),n("div",{ref:"actions",staticClass:"vs__actions"},[n("button",{directives:[{name:"show",rawName:"v-show",value:t.showClearButton,expression:"showClearButton"}],ref:"clearButton",staticClass:"vs__clear",attrs:{disabled:t.disabled,type:"button",title:"Clear Selected","aria-label":"Clear Selected"},on:{click:t.clearSelection}},[n(t.childComponents.Deselect,{tag:"component"})],1),t._v(" "),t._t("open-indicator",[t.noDrop?t._e():n(t.childComponents.OpenIndicator,t._b({tag:"component"},"component",t.scope.openIndicator.attributes,!1))],null,t.scope.openIndicator),t._v(" "),t._t("spinner",[n("div",{directives:[{name:"show",rawName:"v-show",value:t.mutableLoading,expression:"mutableLoading"}],staticClass:"vs__spinner"},[t._v("Loading...")])],null,t.scope.spinner)],2)]),t._v(" "),n("transition",{attrs:{name:t.transition}},[t.dropdownOpen?n("ul",{directives:[{name:"append-to-body",rawName:"v-append-to-body"}],key:"vs"+t.uid+"__listbox",ref:"dropdownMenu",staticClass:"vs__dropdown-menu",attrs:{id:"vs"+t.uid+"__listbox",role:"listbox",tabindex:"-1"},on:{mousedown:function(e){return e.preventDefault(),t.onMousedown(e)},mouseup:t.onMouseUp}},[t._t("list-header",null,null,t.scope.listHeader),t._v(" "),t._l(t.filteredOptions,(function(e,i){return n("li",{key:t.getOptionKey(e),staticClass:"vs__dropdown-option",class:{"vs__dropdown-option--selected":t.isOptionSelected(e),"vs__dropdown-option--highlight":i===t.typeAheadPointer,"vs__dropdown-option--disabled":!t.selectable(e)},attrs:{role:"option",id:"vs"+t.uid+"__option-"+i,"aria-selected":i===t.typeAheadPointer||null},on:{mouseover:function(n){t.selectable(e)&&(t.typeAheadPointer=i)},mousedown:function(n){n.preventDefault(),n.stopPropagation(),t.selectable(e)&&t.select(e)}}},[t._t("option",[t._v("\n "+t._s(t.getOptionLabel(e))+"\n ")],null,t.normalizeOptionForSlot(e))],2)})),t._v(" "),0===t.filteredOptions.length?n("li",{staticClass:"vs__no-options"},[t._t("no-options",[t._v("Sorry, no matching options.")],null,t.scope.noOptions)],2):t._e(),t._v(" "),t._t("list-footer",null,null,t.scope.listFooter)],2):n("ul",{staticStyle:{display:"none",visibility:"hidden"},attrs:{id:"vs"+t.uid+"__listbox",role:"listbox"}})]),t._v(" "),t._t("footer",null,null,t.scope.footer)],2)}),[],!1,null,null,null).exports),w={ajax:p,pointer:u,pointerScroll:l};n.d(e,"VueSelect",(function(){return j})),n.d(e,"mixins",(function(){return w})),e.default=j}])}))},"5e12":function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var i=n("2b0e"),o=n("b42e"),r=n("c637"),s=n("a723"),a=n("9b76"),c=n("8690"),l=n("365c"),u=n("cf75"),p=n("ccc0"),d=n("3656"),h=n("d190");function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=Object(u["d"])({append:Object(u["c"])(s["t"]),appendHtml:Object(u["c"])(s["t"]),id:Object(u["c"])(s["t"]),prepend:Object(u["c"])(s["t"]),prependHtml:Object(u["c"])(s["t"]),size:Object(u["c"])(s["t"]),tag:Object(u["c"])(s["t"],"div")},r["M"]),m=i["default"].extend({name:r["M"],functional:!0,props:b,render:function(t,e){var n=e.props,i=e.data,r=e.slots,s=e.scopedSlots,u=n.prepend,b=n.prependHtml,m=n.append,v=n.appendHtml,g=n.size,y=s||{},O=r(),j={},w=t(),_=Object(l["a"])(a["E"],y,O);(_||u||b)&&(w=t(d["a"],[_?Object(l["b"])(a["E"],j,y,O):t(h["a"],{domProps:Object(c["a"])(b,u)})]));var C=t(),S=Object(l["a"])(a["a"],y,O);return(S||m||v)&&(C=t(p["a"],[S?Object(l["b"])(a["a"],j,y,O):t(h["a"],{domProps:Object(c["a"])(v,m)})])),t(n.tag,Object(o["a"])(i,{staticClass:"input-group",class:f({},"input-group-".concat(g),g),attrs:{id:n.id||null,role:"group"}}),[w,Object(l["b"])(a["h"],j,y,O),C])}})},7622:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"d-flex justify-content-between align-items-center pt-50 mb-2"},[n("h2",{staticClass:"font-weight-bolder m-0"},[n("span",{on:{click:function(e){return t.$router.go(-1)}}},[n("b-button",{staticClass:"btn-icon rounded-circle mr-50 text-primary bg-white",attrs:{variant:"white"}},[n("feather-icon",{attrs:{icon:"ChevronLeftIcon"}})],1)],1),t._v(" Crear usuario ")])]),n("b-card",[n("validation-observer",{ref:"createUser"},[n("b-form",{staticClass:"mt-2",on:{submit:function(e){return e.preventDefault(),t.handleSubmit.apply(null,arguments)},keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleSubmit.apply(null,arguments)}}},[n("h4",{staticClass:"mb-2 mt-1"},[t._v(" Imagen de perfil ")]),n("b-row",[n("b-col",{staticClass:"mb-2 auth-create-form d-flex justify-content-center",attrs:{cols:"12"}},[n("ImageDropzone",{ref:"images",attrs:{files:t.files}})],1)],1),n("hr"),n("h4",{staticClass:"mb-2 mt-2"},[t._v(" Datos de acceso ")]),n("b-row",[n("b-col",{attrs:{sm:"6"}},[n("validation-provider",{attrs:{name:"Usuario",rules:"required|usernameUnique"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.errors;return[n("b-form-group",{attrs:{label:"Usuario","label-for":"account-e-username"}},[n("b-form-input",{attrs:{name:"username",placeholder:"Usuario"},model:{value:t.username,callback:function(e){t.username=e},expression:"username"}}),n("small",{staticClass:"form-text text-muted"},[t._v(" Este campo servirá para iniciar sesión. Debe ser único por usuario ")])],1),n("small",{staticClass:"text-danger"},[t._v(t._s(i[0]))])]}}])})],1),n("b-col",{attrs:{sm:"6"}},[n("validation-provider",{attrs:{name:"Contraseña",rules:"required|min:8"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.errors;return[n("b-form-group",{attrs:{label:"Contraseña","label-for":"account-password"}},[n("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[n("b-input-group-text",[n("div",{staticClass:"append-text",on:{click:function(e){t.show1=!t.show1}}},[n("span",[n("feather-icon",{attrs:{icon:t.show1?"EyeIcon":"EyeOffIcon","svg-classes":["text-white","h-5 w-5 mt-2"]}})],1)])])]},proxy:!0}],null,!0)},[n("b-form-input",{staticClass:"w-full",attrs:{type:t.show1?"text":"password",name:"input-10-1",placeholder:"Contraseña",hint:"Al menos 8 caracteres",counter:"",outlined:""},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1),n("small",{staticClass:"text-danger"},[t._v(t._s(i[0]))])],1)]}}])})],1)],1),n("hr"),n("h4",{staticClass:"mb-2 mt-2"},[t._v(" Información personal ")]),n("b-row",[n("b-col",{attrs:{sm:"6"}},[n("validation-provider",{attrs:{name:"Nombre",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.errors;return[n("b-form-group",{attrs:{label:"Nombre","label-for":"account-name"}},[n("b-form-input",{attrs:{name:"name",placeholder:"Nombre"},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1),n("small",{staticClass:"text-danger"},[t._v(t._s(i[0]))])]}}])})],1),n("b-col",{attrs:{sm:"6"}},[n("b-form-group",{attrs:{label:"Apellidos","label-for":"account-surname"}},[n("b-form-input",{attrs:{placeholder:"Apellidos",name:"surname"},model:{value:t.surname,callback:function(e){t.surname=e},expression:"surname"}})],1)],1),n("b-col",{attrs:{sm:"6"}},[n("b-form-group",{attrs:{label:"DNI","label-for":"account-dni"}},[n("b-form-input",{attrs:{name:"dni",placeholder:"DNI"},model:{value:t.dni,callback:function(e){t.dni=e},expression:"dni"}})],1)],1),n("b-col",{attrs:{sm:"6"}},[n("b-form-group",{attrs:{label:"Puesto de trabajo","label-for":"account-job"}},[n("b-form-input",{attrs:{name:"job",placeholder:"Puesto de trabajo"},model:{value:t.job,callback:function(e){t.job=e},expression:"job"}})],1)],1),n("b-col",{attrs:{sm:"6"}},[n("validation-provider",{attrs:{name:"Rol",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.errors;return[n("b-form-group",{attrs:{label:"Rol","label-for":"account-rols"}},[n("v-select",{attrs:{label:"display_name",filterable:!1,searchable:!1,options:t.selectRoles,placeholder:"Selecciona un rol"},model:{value:t.roles,callback:function(e){t.roles=e},expression:"roles"}}),n("small",{staticClass:"text-danger"},[t._v(t._s(i[0]))])],1)]}}])})],1)],1),n("hr"),n("h4",{staticClass:"mb-2 mt-2"},[t._v(" Departamentos ")]),n("b-row",[n("b-col",{attrs:{sm:"12"}},[n("b-form-group",{attrs:{label:"Selecciona el departamento que pertenece el usuario","label-for":"account-departments"}},[n("b-row",t._l(t.filteredDepartments,(function(e){return n("b-col",{key:e.id,attrs:{sm:"3"}},[n("b-form-checkbox",{attrs:{value:e.id},model:{value:t.departments,callback:function(e){t.departments=e},expression:"departments"}},[t._v(" "+t._s(e.name)+" ")])],1)})),1)],1)],1)],1),n("hr"),n("h4",{staticClass:"mb-2 mt-2"},[t._v(" Notificaciones ")]),n("b-row",[n("b-col",{attrs:{sm:"6"}},[n("validation-provider",{attrs:{name:"Email",rules:"email|emailUnique"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.errors;return[n("b-form-group",{attrs:{label:"Email","label-for":"account-e-mail"}},[n("b-form-input",{attrs:{name:"email",placeholder:"Email"},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}}),n("small",{staticClass:"form-text text-muted"},[t._v(" Introduce un correo para recibir notificaciones por email. ")]),n("small",{staticClass:"text-danger"},[t._v(t._s(i[0]))])],1)]}}])})],1),n("b-col",{attrs:{sm:"6"}},[n("b-form-group",{attrs:{label:"Telefono","label-for":"account-phone"}},[n("b-form-input",{attrs:{name:"phone",placeholder:"Telefono"},model:{value:t.phone,callback:function(e){t.phone=e},expression:"phone"}}),n("small",{staticClass:"form-text text-muted"},[t._v(" Introduce un teléfono para recibir notificaciones por SMS. Recuerda añadir el prefijo. ")])],1)],1),n("b-col",{attrs:{sm:"6"}},["super_admin"===t.roles.name?n("b-form-checkbox",{staticClass:"d-inline-block mb-2 mt-1",model:{value:t.notifications,callback:function(e){t.notifications=e},expression:"notifications"}},[t._v(" Recibir notificaciones ")]):t._e()],1)],1),n("div",{staticClass:"text-right"},[n("b-button",{staticClass:"mt-2 mr-1",attrs:{type:"submit",variant:"primary"}},[t._v(" "+t._s("Enviar")+" ")])],1)],1)],1)],1)],1)},o=[],r=n("1da1"),s=n("5530"),a=(n("96cf"),n("4de4"),n("d3b7"),n("b0c0"),n("159b"),n("498a"),n("2f62")),c=n("1947"),l=n("d190"),u=n("5e12"),p=n("11de"),d=n("8226"),h=n("4797"),f=n("a15b"),b=n("b28b"),m=n("205f"),v=n("c3e6"),g=n("7bb1"),y=n("8f03"),O=n("e009"),j=n("7189"),w=n("4a7a"),_=n.n(w),C={components:{BButton:c["a"],BInputGroupText:l["a"],BInputGroup:u["a"],BForm:p["a"],BFormGroup:d["a"],BFormInput:h["a"],BRow:f["a"],BCol:b["a"],BCard:m["a"],ImageDropzone:j["a"],ValidationProvider:g["b"],ValidationObserver:g["a"],vSelect:_.a,BFormCheckbox:v["a"]},directives:{Ripple:O["a"]},data:function(){return{roles:{id:3,name:"operario",display_name:"Operario"},departments:[],files:[],profileFile:null,required:y["b"],email:y["a"],userPrepare:!1,disabledClients:!0,surname:"",username:"",name:"",phone:"",dni:"",avatar:"",show1:!1,password:"",job:"",notifications:!1}},computed:Object(s["a"])(Object(s["a"])({},Object(a["c"])({selectRoles:"users/getRoles",departmentsSelect:"departments/getSelectDepartments",currentClient:"clients/getCurrentClient"})),{},{filteredDepartments:function(){return this.departmentsSelect.filter((function(t){return t.active}))}}),methods:Object(s["a"])(Object(s["a"])(Object(s["a"])({},Object(a["b"])({create:"users/create",selectDepartments:"departments/selectDepartments",getRoles:"users/getRoles"})),Object(a["d"])({setSelectDepartments:"departments/setSelectDepartments"})),{},{handleSubmit:function(){var t=this;this.$refs.createUser.validate().then((function(e){if(e){var n=t.createFormData();n&&t.create({user:n})}}))},createFormData:function(){var t=this.$refs.images.getFormData();return this.roles&&(t.append("role",this.roles.name),"super_admin"!==this.roles.name?t.append("notifications",!1):t.append("notifications",this.notifications)),this.departments.length>0?this.departments.forEach((function(e){e&&null!==e&&t.append("departments[]",e)})):t.append("departments",""),t.append("name",this.name),t.append("email",this.email),this.email&&""!==this.email.trim()&&t.append("email",this.email),this.phone&&""!==this.phone.trim()&&t.append("phone",this.phone),this.dni&&""!==this.dni.trim()&&t.append("dni",this.dni),this.surname&&""!==this.surname.trim()&&t.append("surname",this.surname),t.append("password",this.password),this.job&&""!==this.job.trim()&&t.append("job",this.job),t.append("username",this.username),t.append("client_id",this.currentClient.id),t}}),created:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.selectDepartments({client_id:t.currentClient.id});case 2:return e.next=4,t.getRoles();case 4:case"end":return e.stop()}}),e)})))()}},S=C,x=(n("dbd1"),n("2877")),k=Object(x["a"])(S,i,o,!1,null,null,null);e["default"]=k.exports},a953:function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return a}));var i=n("2b0e"),o=n("a723"),r=n("cf75"),s=Object(r["d"])({plain:Object(r["c"])(o["g"],!1)},"formControls"),a=i["default"].extend({props:s,computed:{custom:function(){return!this.plain}}})},a983:function(t,e,n){},c3e6:function(t,e,n){"use strict";n.d(e,"a",(function(){return R}));var i,o,r=n("2b0e"),s=n("c637"),a=n("0056"),c=n("a723"),l=n("7b1e"),u=n("3c21"),p=function(t,e){for(var n=0;n-1:Object(u["a"])(e,t)},isRadio:function(){return!1}},watch:A({},G,(function(t,e){Object(u["a"])(t,e)||this.setIndeterminate(t)})),mounted:function(){this.setIndeterminate(this[G])},methods:{computedLocalCheckedWatcher:function(t,e){if(!Object(u["a"])(t,e)){this.$emit(B,t);var n=this.$refs.input;n&&this.$emit(T,n.indeterminate)}},handleChange:function(t){var e=this,n=t.target,i=n.checked,o=n.indeterminate,r=this.value,s=this.uncheckedValue,c=this.computedLocalChecked;if(Object(l["a"])(c)){var u=p(c,r);i&&u<0?c=c.concat(r):!i&&u>-1&&(c=c.slice(0,u).concat(c.slice(u+1)))}else c=i?r:s;this.computedLocalChecked=c,this.$nextTick((function(){e.$emit(a["d"],c),e.isGroup&&e.bvGroup.$emit(a["d"],c),e.$emit(T,o)}))},setIndeterminate:function(t){Object(l["a"])(this.computedLocalChecked)&&(t=!1);var e=this.$refs.input;e&&(e.indeterminate=t,this.$emit(T,t))}}})},ccc0:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n("2b0e"),o=n("b42e"),r=n("c637"),s=n("d82f"),a=n("cf75"),c=n("46bc");function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function u(t){for(var e=1;e