Files
ISUP/front/dist/js/689.9ac47325.js
T
2023-09-22 13:05:37 +03:00

2 lines
85 KiB
JavaScript

"use strict";(self["webpackChunkfront"]=self["webpackChunkfront"]||[]).push([[689],{80255:function(e,t,s){var i=s(13037),n=s(54712),o=s(75352),r=s(67678);t["Z"]=(0,r.Z)((0,i.d)("expansionPanels","v-expansion-panel","v-expansion-panels"),(0,n.J)("expansionPanel",!0)).extend({name:"v-expansion-panel",props:{disabled:Boolean,readonly:Boolean},data(){return{content:null,header:null,nextIsActive:!1}},computed:{classes(){return{"v-expansion-panel--active":this.isActive,"v-expansion-panel--next-active":this.nextIsActive,"v-expansion-panel--disabled":this.isDisabled,...this.groupClasses}},isDisabled(){return this.expansionPanels.disabled||this.disabled},isReadonly(){return this.expansionPanels.readonly||this.readonly}},methods:{registerContent(e){this.content=e},unregisterContent(){this.content=null},registerHeader(e){this.header=e,e.$on("click",this.onClick)},unregisterHeader(){this.header=null},onClick(e){e.detail&&this.header.$el.blur(),this.$emit("click",e),this.isReadonly||this.isDisabled||this.toggle()},toggle(){this.$nextTick((()=>this.$emit("change")))}},render(e){return e("div",{staticClass:"v-expansion-panel",class:this.classes,attrs:{"aria-expanded":String(this.isActive)}},(0,o.z9)(this))}})},22348:function(e,t,s){var i=s(77394),n=s(38223),o=s(16878),r=s(54712),a=s(75352),l=s(67678);const c=(0,l.Z)(n.Z,o.Z,(0,r.f)("expansionPanel","v-expansion-panel-content","v-expansion-panel"));t["Z"]=c.extend().extend({name:"v-expansion-panel-content",data:()=>({isActive:!1}),computed:{parentIsActive(){return this.expansionPanel.isActive}},watch:{parentIsActive:{immediate:!0,handler(e,t){e&&(this.isBooted=!0),null==t?this.isActive=e:this.$nextTick((()=>this.isActive=e))}}},created(){this.expansionPanel.registerContent(this)},beforeDestroy(){this.expansionPanel.unregisterContent()},render(e){return e(i.Fx,this.showLazyContent((()=>[e("div",this.setBackgroundColor(this.color,{staticClass:"v-expansion-panel-content",directives:[{name:"show",value:this.isActive}]}),[e("div",{class:"v-expansion-panel-content__wrap"},(0,a.z9)(this))])])))}})},20400:function(e,t,s){var i=s(77394),n=s(42240),o=s(16878),r=s(54712),a=s(37069),l=s(75352),c=s(67678);const d=(0,c.Z)(o.Z,(0,r.f)("expansionPanel","v-expansion-panel-header","v-expansion-panel"));t["Z"]=d.extend().extend({name:"v-expansion-panel-header",directives:{ripple:a.Z},props:{disableIconRotate:Boolean,expandIcon:{type:String,default:"$expand"},hideActions:Boolean,ripple:{type:[Boolean,Object],default:!1}},data:()=>({hasMousedown:!1}),computed:{classes(){return{"v-expansion-panel-header--active":this.isActive,"v-expansion-panel-header--mousedown":this.hasMousedown}},isActive(){return this.expansionPanel.isActive},isDisabled(){return this.expansionPanel.isDisabled},isReadonly(){return this.expansionPanel.isReadonly}},created(){this.expansionPanel.registerHeader(this)},beforeDestroy(){this.expansionPanel.unregisterHeader()},methods:{onClick(e){this.$emit("click",e)},genIcon(){const e=(0,l.z9)(this,"actions")||[this.$createElement(n.Z,this.expandIcon)];return this.$createElement(i.Z5,[this.$createElement("div",{staticClass:"v-expansion-panel-header__icon",class:{"v-expansion-panel-header__icon--disable-rotate":this.disableIconRotate},directives:[{name:"show",value:!this.isDisabled}]},e)])}},render(e){return e("button",this.setBackgroundColor(this.color,{staticClass:"v-expansion-panel-header",class:this.classes,attrs:{tabindex:this.isDisabled?-1:null,type:"button","aria-expanded":this.isActive},directives:[{name:"ripple",value:this.ripple}],on:{...this.$listeners,click:this.onClick,mousedown:()=>this.hasMousedown=!0,mouseup:()=>this.hasMousedown=!1}}),[(0,l.z9)(this,"default",{open:this.isActive},!0),this.hideActions||this.genIcon()])}})},31214:function(e,t,s){s.d(t,{Z:function(){return o}});var i=s(13385),n=s(74808),o=i.y.extend({name:"v-expansion-panels",provide(){return{expansionPanels:this}},props:{accordion:Boolean,disabled:Boolean,flat:Boolean,hover:Boolean,focusable:Boolean,inset:Boolean,popout:Boolean,readonly:Boolean,tile:Boolean},computed:{classes(){return{...i.y.options.computed.classes.call(this),"v-expansion-panels":!0,"v-expansion-panels--accordion":this.accordion,"v-expansion-panels--flat":this.flat,"v-expansion-panels--hover":this.hover,"v-expansion-panels--focusable":this.focusable,"v-expansion-panels--inset":this.inset,"v-expansion-panels--popout":this.popout,"v-expansion-panels--tile":this.tile}}},created(){this.$attrs.hasOwnProperty("expand")&&(0,n.fK)("expand","multiple",this),Array.isArray(this.value)&&this.value.length>0&&"boolean"===typeof this.value[0]&&(0,n.fK)(':value="[true, false, true]"',':value="[0, 2]"',this)},methods:{updateItem(e,t){const s=this.getValue(e,t),i=this.getValue(e,t+1);e.isActive=this.toggleMethod(s),e.nextIsActive=this.toggleMethod(i)}}})},65005:function(e,t,s){var i=s(67678),n=s(32500),o=s(54712);t["Z"]=(0,i.Z)(n.Z,(0,o.J)("form")).extend({name:"v-form",provide(){return{form:this}},inheritAttrs:!1,props:{disabled:Boolean,lazyValidation:Boolean,readonly:Boolean,value:Boolean},data:()=>({inputs:[],watchers:[],errorBag:{}}),watch:{errorBag:{handler(e){const t=Object.values(e).includes(!0);this.$emit("input",!t)},deep:!0,immediate:!0}},methods:{watchInput(e){const t=e=>e.$watch("hasError",(t=>{this.$set(this.errorBag,e._uid,t)}),{immediate:!0}),s={_uid:e._uid,valid:()=>{},shouldValidate:()=>{}};return this.lazyValidation?s.shouldValidate=e.$watch("shouldValidate",(i=>{i&&(this.errorBag.hasOwnProperty(e._uid)||(s.valid=t(e)))})):s.valid=t(e),s},validate(){return 0===this.inputs.filter((e=>!e.validate(!0))).length},reset(){this.inputs.forEach((e=>e.reset())),this.resetErrorBag()},resetErrorBag(){this.lazyValidation&&setTimeout((()=>{this.errorBag={}}),0)},resetValidation(){this.inputs.forEach((e=>e.resetValidation())),this.resetErrorBag()},register(e){this.inputs.push(e),this.watchers.push(this.watchInput(e))},unregister(e){const t=this.inputs.find((t=>t._uid===e._uid));if(!t)return;const s=this.watchers.find((e=>e._uid===t._uid));s&&(s.valid(),s.shouldValidate()),this.watchers=this.watchers.filter((e=>e._uid!==t._uid)),this.inputs=this.inputs.filter((e=>e._uid!==t._uid)),this.$delete(this.errorBag,t._uid)}},render(e){return e("form",{staticClass:"v-form",attrs:{novalidate:!0,...this.attrs$},on:{submit:e=>this.$emit("submit",e)}},this.$slots.default)}})},10626:function(e,t,s){var i=s(13037),n=s(58860),o=s(96669),r=s(75352),a=s(67678);const l=(0,a.Z)(n.Z,(0,i.d)("tabsBar"),o.Z);t["Z"]=l.extend().extend().extend({name:"v-tab",props:{ripple:{type:[Boolean,Object],default:!0}},data:()=>({proxyClass:"v-tab--active"}),computed:{classes(){return{"v-tab":!0,...n.Z.options.computed.classes.call(this),"v-tab--disabled":this.disabled,...this.groupClasses}},value(){let e=this.to||this.href;if(null==e)return e;if(this.$router&&this.to===Object(this.to)){const t=this.$router.resolve(this.to,this.$route,this.append);e=t.href}return e.replace("#","")}},methods:{click(e){this.disabled?e.preventDefault():(this.href&&this.href.indexOf("#")>-1&&e.preventDefault(),e.detail&&this.$el.blur(),this.$emit("click",e),this.to||this.toggle())},toggle(){this.isActive&&(this.tabsBar.mandatory||this.to)||this.$emit("change")}},render(e){const{tag:t,data:s}=this.generateRouteLink();return s.attrs={...s.attrs,"aria-selected":String(this.isActive),role:"tab",tabindex:this.disabled?-1:0},s.on={...s.on,keydown:e=>{e.keyCode===r.Do.enter&&this.click(e),this.$emit("keydown",e)}},e(t,s,this.$slots.default)}})},77771:function(e,t,s){s.d(t,{Z:function(){return k}});var i=s(42240),n=s(77394),o=s(13385),r=s(7388),a=s(46746),l=s(4802),c=s(67678),d=s(75352);function h(e){const t=.501,s=Math.abs(e);return Math.sign(e)*(s/((1/t-2)*(1-s)+1))}function p(e,t,s,i){const n=e.clientWidth,o=s?t.content-e.offsetLeft-n:e.offsetLeft;s&&(i=-i);const r=t.wrapper+i,a=n+o,l=.4*n;return o<=i?i=Math.max(o-l,0):r<=a&&(i=Math.min(i-(r-a-l),t.content-t.wrapper)),s?-i:i}function u(e,t,s){const{offsetLeft:i,clientWidth:n}=e;if(s){const e=t.content-i-n/2-t.wrapper/2;return-Math.min(t.content-t.wrapper,Math.max(0,e))}{const e=i+n/2-t.wrapper/2;return Math.min(t.content-t.wrapper,Math.max(0,e))}}const f=(0,c.Z)(o.y,r.Z).extend({name:"base-slide-group",directives:{Resize:a.Z,Touch:l.Z},props:{activeClass:{type:String,default:"v-slide-item--active"},centerActive:Boolean,nextIcon:{type:String,default:"$next"},prevIcon:{type:String,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>"boolean"===typeof e||["always","desktop","mobile"].includes(e)}},data:()=>({isOverflowing:!1,resizeTimeout:0,startX:0,isSwipingHorizontal:!1,isSwiping:!1,scrollOffset:0,widths:{content:0,wrapper:0}}),computed:{canTouch(){return"undefined"!==typeof window},__cachedNext(){return this.genTransition("next")},__cachedPrev(){return this.genTransition("prev")},classes(){return{...o.y.options.computed.classes.call(this),"v-slide-group":!0,"v-slide-group--has-affixes":this.hasAffixes,"v-slide-group--is-overflowing":this.isOverflowing}},hasAffixes(){switch(this.showArrows){case"always":return!0;case"desktop":return!this.isMobile;case!0:return this.isOverflowing||Math.abs(this.scrollOffset)>0;case"mobile":return this.isMobile||this.isOverflowing||Math.abs(this.scrollOffset)>0;default:return!this.isMobile&&(this.isOverflowing||Math.abs(this.scrollOffset)>0)}},hasNext(){if(!this.hasAffixes)return!1;const{content:e,wrapper:t}=this.widths;return e>Math.abs(this.scrollOffset)+t},hasPrev(){return this.hasAffixes&&0!==this.scrollOffset}},watch:{internalValue:"setWidths",isOverflowing:"setWidths",scrollOffset(e){this.$vuetify.rtl&&(e=-e);let t=e<=0?h(-e):e>this.widths.content-this.widths.wrapper?-(this.widths.content-this.widths.wrapper)+h(this.widths.content-this.widths.wrapper-e):-e;this.$vuetify.rtl&&(t=-t),this.$refs.content.style.transform=`translateX(${t}px)`}},mounted(){if("undefined"!==typeof ResizeObserver){const e=new ResizeObserver((()=>{this.onResize()}));e.observe(this.$el),e.observe(this.$refs.content),this.$on("hook:destroyed",(()=>{e.disconnect()}))}else{let e=0;this.$on("hook:beforeUpdate",(()=>{var t;e=((null===(t=this.$refs.content)||void 0===t?void 0:t.children)||[]).length})),this.$on("hook:updated",(()=>{var t;e!==((null===(t=this.$refs.content)||void 0===t?void 0:t.children)||[]).length&&this.setWidths()}))}},methods:{onScroll(){this.$refs.wrapper.scrollLeft=0},onFocusin(e){if(this.isOverflowing)for(const t of(0,d.iZ)(e))for(const e of this.items)if(e.$el===t)return void(this.scrollOffset=p(e.$el,this.widths,this.$vuetify.rtl,this.scrollOffset))},genNext(){const e=this.$scopedSlots.next?this.$scopedSlots.next({}):this.$slots.next||this.__cachedNext;return this.$createElement("div",{staticClass:"v-slide-group__next",class:{"v-slide-group__next--disabled":!this.hasNext},on:{click:()=>this.onAffixClick("next")},key:"next"},[e])},genContent(){return this.$createElement("div",{staticClass:"v-slide-group__content",ref:"content",on:{focusin:this.onFocusin}},this.$slots.default)},genData(){return{class:this.classes,directives:[{name:"resize",value:this.onResize}]}},genIcon(e){let t=e;this.$vuetify.rtl&&"prev"===e?t="next":this.$vuetify.rtl&&"next"===e&&(t="prev");const s=`${e[0].toUpperCase()}${e.slice(1)}`,n=this[`has${s}`];return this.showArrows||n?this.$createElement(i.Z,{props:{disabled:!n}},this[`${t}Icon`]):null},genPrev(){const e=this.$scopedSlots.prev?this.$scopedSlots.prev({}):this.$slots.prev||this.__cachedPrev;return this.$createElement("div",{staticClass:"v-slide-group__prev",class:{"v-slide-group__prev--disabled":!this.hasPrev},on:{click:()=>this.onAffixClick("prev")},key:"prev"},[e])},genTransition(e){return this.$createElement(n.Z5,[this.genIcon(e)])},genWrapper(){return this.$createElement("div",{staticClass:"v-slide-group__wrapper",directives:[{name:"touch",value:{start:e=>this.overflowCheck(e,this.onTouchStart),move:e=>this.overflowCheck(e,this.onTouchMove),end:e=>this.overflowCheck(e,this.onTouchEnd)}}],ref:"wrapper",on:{scroll:this.onScroll}},[this.genContent()])},calculateNewOffset(e,t,s,i){const n=s?-1:1,o=n*i+("prev"===e?-1:1)*t.wrapper;return n*Math.max(Math.min(o,t.content-t.wrapper),0)},onAffixClick(e){this.$emit(`click:${e}`),this.scrollTo(e)},onResize(){this._isDestroyed||this.setWidths()},onTouchStart(e){const{content:t}=this.$refs;this.startX=this.scrollOffset+e.touchstartX,t.style.setProperty("transition","none"),t.style.setProperty("willChange","transform")},onTouchMove(e){if(this.canTouch){if(!this.isSwiping){const t=e.touchmoveX-e.touchstartX,s=e.touchmoveY-e.touchstartY;this.isSwipingHorizontal=Math.abs(t)>Math.abs(s),this.isSwiping=!0}this.isSwipingHorizontal&&(this.scrollOffset=this.startX-e.touchmoveX,document.documentElement.style.overflowY="hidden")}},onTouchEnd(){if(!this.canTouch)return;const{content:e,wrapper:t}=this.$refs,s=e.clientWidth-t.clientWidth;e.style.setProperty("transition",null),e.style.setProperty("willChange",null),this.$vuetify.rtl?this.scrollOffset>0||!this.isOverflowing?this.scrollOffset=0:this.scrollOffset<=-s&&(this.scrollOffset=-s):this.scrollOffset<0||!this.isOverflowing?this.scrollOffset=0:this.scrollOffset>=s&&(this.scrollOffset=s),this.isSwiping=!1,document.documentElement.style.removeProperty("overflow-y")},overflowCheck(e,t){e.stopPropagation(),this.isOverflowing&&t(e)},scrollIntoView(){if(!this.selectedItem&&this.items.length){const e=this.items[this.items.length-1].$el.getBoundingClientRect(),t=this.$refs.wrapper.getBoundingClientRect();(this.$vuetify.rtl&&t.right<e.right||!this.$vuetify.rtl&&t.left>e.left)&&this.scrollTo("prev")}this.selectedItem&&(0===this.selectedIndex||!this.centerActive&&!this.isOverflowing?this.scrollOffset=0:this.centerActive?this.scrollOffset=u(this.selectedItem.$el,this.widths,this.$vuetify.rtl):this.isOverflowing&&(this.scrollOffset=p(this.selectedItem.$el,this.widths,this.$vuetify.rtl,this.scrollOffset)))},scrollTo(e){this.scrollOffset=this.calculateNewOffset(e,{content:this.$refs.content?this.$refs.content.clientWidth:0,wrapper:this.$refs.wrapper?this.$refs.wrapper.clientWidth:0},this.$vuetify.rtl,this.scrollOffset)},setWidths(){window.requestAnimationFrame((()=>{if(this._isDestroyed)return;const{content:e,wrapper:t}=this.$refs;this.widths={content:e?e.clientWidth:0,wrapper:t?t.clientWidth:0},this.isOverflowing=this.widths.wrapper+1<this.widths.content,this.scrollIntoView()}))}},render(e){return e("div",this.genData(),[this.genPrev(),this.genWrapper(),this.genNext()])}});f.extend({name:"v-slide-group",provide(){return{slideGroup:this}}});var v=s(96669),m=s(29131),g=(0,c.Z)(f,m.Z,v.Z).extend({name:"v-tabs-bar",provide(){return{tabsBar:this}},computed:{classes(){return{...f.options.computed.classes.call(this),"v-tabs-bar":!0,"v-tabs-bar--is-mobile":this.isMobile,"v-tabs-bar--show-arrows":this.showArrows,...this.themeClasses}}},watch:{items:"callSlider",internalValue:"callSlider",$route:"onRouteChange"},methods:{callSlider(){this.isBooted&&this.$emit("call:slider")},genContent(){const e=f.options.methods.genContent.call(this);return e.data=e.data||{},e.data.staticClass+=" v-tabs-bar__content",e},onRouteChange(e,t){if(this.mandatory)return;const s=this.items,i=e.path,n=t.path;let o=!1,r=!1;for(const a of s)if(a.to===n?r=!0:a.to===i&&(o=!0),o&&r)break;!o&&r&&(this.internalValue=void 0)}},render(e){const t=f.options.render.call(this,e);return t.data.attrs={role:"tablist"},t}}),w=s(45085),x=s(16878),y=(0,c.Z)(x.Z).extend({name:"v-tabs-slider",render(e){return e("div",this.setBackgroundColor(this.color,{staticClass:"v-tabs-slider"}))}}),b=s(3457);const _=(0,c.Z)(x.Z,b.Z,v.Z);var k=_.extend().extend({name:"v-tabs",directives:{Resize:a.Z},props:{activeClass:{type:String,default:""},alignWithTitle:Boolean,backgroundColor:String,centerActive:Boolean,centered:Boolean,fixedTabs:Boolean,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,iconsAndText:Boolean,mobileBreakpoint:[String,Number],nextIcon:{type:String,default:"$next"},optional:Boolean,prevIcon:{type:String,default:"$prev"},right:Boolean,showArrows:[Boolean,String],sliderColor:String,sliderSize:{type:[Number,String],default:2},vertical:Boolean},data(){return{resizeTimeout:0,slider:{height:null,left:null,right:null,top:null,width:null},transitionTime:300}},computed:{classes(){return{"v-tabs--align-with-title":this.alignWithTitle,"v-tabs--centered":this.centered,"v-tabs--fixed-tabs":this.fixedTabs,"v-tabs--grow":this.grow,"v-tabs--icons-and-text":this.iconsAndText,"v-tabs--right":this.right,"v-tabs--vertical":this.vertical,...this.themeClasses}},isReversed(){return this.$vuetify.rtl&&this.vertical},sliderStyles(){return{height:(0,d.kb)(this.slider.height),left:this.isReversed?void 0:(0,d.kb)(this.slider.left),right:this.isReversed?(0,d.kb)(this.slider.right):void 0,top:this.vertical?(0,d.kb)(this.slider.top):void 0,transition:null!=this.slider.left?null:"none",width:(0,d.kb)(this.slider.width)}},computedColor(){return this.color?this.color:this.isDark&&!this.appIsDark?"white":"primary"}},watch:{alignWithTitle:"callSlider",centered:"callSlider",centerActive:"callSlider",fixedTabs:"callSlider",grow:"callSlider",iconsAndText:"callSlider",right:"callSlider",showArrows:"callSlider",vertical:"callSlider","$vuetify.application.left":"onResize","$vuetify.application.right":"onResize","$vuetify.rtl":"onResize"},mounted(){if("undefined"!==typeof ResizeObserver){const e=new ResizeObserver((()=>{this.onResize()}));e.observe(this.$el),this.$on("hook:destroyed",(()=>{e.disconnect()}))}this.$nextTick((()=>{window.setTimeout(this.callSlider,30)}))},methods:{callSlider(){return!this.hideSlider&&this.$refs.items&&this.$refs.items.selectedItems.length?(this.$nextTick((()=>{const e=this.$refs.items.selectedItems[0];if(!e||!e.$el)return this.slider.width=0,void(this.slider.left=0);const t=e.$el;this.slider={height:this.vertical?t.scrollHeight:Number(this.sliderSize),left:this.vertical?0:t.offsetLeft,right:this.vertical?0:t.offsetLeft+t.offsetWidth,top:t.offsetTop,width:this.vertical?Number(this.sliderSize):t.scrollWidth}})),!0):(this.slider.width=0,!1)},genBar(e,t){const s={style:{height:(0,d.kb)(this.height)},props:{activeClass:this.activeClass,centerActive:this.centerActive,dark:this.dark,light:this.light,mandatory:!this.optional,mobileBreakpoint:this.mobileBreakpoint,nextIcon:this.nextIcon,prevIcon:this.prevIcon,showArrows:this.showArrows,value:this.internalValue},on:{"call:slider":this.callSlider,change:e=>{this.internalValue=e}},ref:"items"};return this.setTextColor(this.computedColor,s),this.setBackgroundColor(this.backgroundColor,s),this.$createElement(g,s,[this.genSlider(t),e])},genItems(e,t){return e||(t.length?this.$createElement(w.Z,{props:{value:this.internalValue},on:{change:e=>{this.internalValue=e}}},t):null)},genSlider(e){return this.hideSlider?null:(e||(e=this.$createElement(y,{props:{color:this.sliderColor}})),this.$createElement("div",{staticClass:"v-tabs-slider-wrapper",style:this.sliderStyles},[e]))},onResize(){this._isDestroyed||(clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(this.callSlider,0))},parseNodes(){let e=null,t=null;const s=[],i=[],n=this.$slots.default||[],o=n.length;for(let r=0;r<o;r++){const o=n[r];if(o.componentOptions)switch(o.componentOptions.Ctor.options.name){case"v-tabs-slider":t=o;break;case"v-tabs-items":e=o;break;case"v-tab-item":s.push(o);break;default:i.push(o)}else i.push(o)}return{tab:i,slider:t,items:e,item:s}}},render(e){const{tab:t,slider:s,items:i,item:n}=this.parseNodes();return e("div",{staticClass:"v-tabs",class:this.classes,directives:[{name:"resize",modifiers:{quiet:!0},value:this.onResize}]},[this.genBar(t,s),this.genItems(i,n)])}})},31451:function(e,t,s){s.d(t,{Z:function(){return V}});var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-menu",{attrs:{"close-on-content-click":!1,"min-width":"500","max-width":"500"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,n=t.attrs;return[s("div",e._g(e._b({},"div",n,!1),i),[s("BtnsOut",{attrs:{widthi:97,icon:!0,title:e.addtext},scopedSlots:e._u([{key:"icons",fn:function(){return[s("MyIco",{attrs:{size:"large",icons:"mdi-account-plus"}})]},proxy:!0}],null,!0)})],1)]}}]),model:{value:e.isOpened,callback:function(t){e.isOpened=t},expression:"isOpened"}},[s("v-tabs",{staticClass:"menus",attrs:{vertical:"",color:"select_lines_border"},model:{value:e.tab,callback:function(t){e.tab=t},expression:"tab"}},[e._l(e.iconsmenus,(function(t){return s("v-tab",{key:t,attrs:{"active-class":"active"}},[s("v-icon",{attrs:{color:"icons"}},[e._v(" "+e._s(t)+" ")])],1)})),e._l(2,(function(t){return s("v-tab-item",{key:t},[s("Cards",{staticClass:"menus",attrs:{color:e.$vuetify.theme.dark?"auchdark":"auchlight"},scopedSlots:e._u([{key:"cards",fn:function(){return[s("v-card-text",{staticClass:"pa-0"},[1==t?s("div",[s("v-card",{staticClass:"px-2 mb-2"},[s("v-autocomplete",{staticClass:"inputext my-0 iconsh",attrs:{items:e.organization,dense:"","hide-details":"","item-color":"open_icons",color:"primaryicons"},on:{change:e.changeorg},model:{value:e.organization_value,callback:function(t){e.organization_value=t},expression:"organization_value"}})],1),s("v-card",{staticClass:"px-2 mb-2"},[s("v-autocomplete",{staticClass:"inputext my-0 iconsh",attrs:{items:e.department,dense:"","hide-details":"","item-color":"open_icons",color:"primaryicons"},on:{change:e.changedep},model:{value:e.department_value,callback:function(t){e.department_value=t},expression:"department_value"}})],1),s("v-card",{staticClass:"px-2 mb-2 "},[s("v-text-field",{staticClass:"inputext pa-0 pr-1",attrs:{"single-line":"","hide-details":"",dense:"",color:"primaryicons"},scopedSlots:e._u([{key:"append",fn:function(){return[s("MyIco",{staticClass:"pt-1",attrs:{size:"small",color:"primaryicons",icons:"mdi-magnify"}})]},proxy:!0},{key:"label",fn:function(){return[s("span",{staticClass:"inputext passiv_text--text"},[e._v(" Поиск ")])]},proxy:!0}],null,!0),model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1)],1):2==t?s("div",[s("v-card",{staticClass:"px-2 mb-2 "},[s("v-autocomplete",{staticClass:"inputext my-0 iconsh passiv_text--text",attrs:{dense:"",items:e.itemss,loading:e.isLoading,"search-input":e.globalsearch,"item-color":"open_icons",color:"btns",clearable:"","hide-no-data":"","hide-details":"","item-text":"fullname","item-value":"fullname",label:"Глобальный поиск",placeholder:"Начните вводить фамилию","return-object":""},on:{"update:searchInput":function(t){e.globalsearch=t},"update:search-input":function(t){e.globalsearch=t}},model:{value:e.searchbase,callback:function(t){e.searchbase=t},expression:"searchbase"}})],1)],1):e._e(),s("v-data-table",{staticClass:"elevation-1 menus1 overflow-y-auto",attrs:{"hide-default-footer":"","hide-default-header":"",dense:"",headers:e.headers,items:e.fields,"item-key":"id","sort-by":"sn","group-by":"otdel.name",search:e.search},on:{"dblclick:row":e.openPersonalCards},scopedSlots:e._u([{key:"group.header",fn:function(t){var i=t.items,n=t.isOpen,o=t.toggle;return[s("th",{attrs:{colspan:[5,6].includes(e.mod)?1:2}},[s("v-row",[s("v-col",{staticClass:"flex-grow-0 pr-0"},[s("MyIco",{staticClass:"text-center",attrs:{size:"small",color:"primaryicons",icons:n?"mdi-minus":"mdi-plus"},on:{click:o}})],1),s("v-col",[e._v(" "+e._s(i[0].otdel.name)+" ")])],1)],1),[5,6].includes(e.mod)&&0==e.tab?s("th",[s("MyIco",{attrs:{size:"small",color:"primaryicons",icons:e.involv(i)},on:{click:function(t){e.involveall(i[e.notinuserIndex(i)])}}})],1):e._e()]}},{key:"item.involve",fn:function(t){var i=t.item;return[e.notincludesusers(i).result?s("MyIco",{attrs:{size:"large",color:i.involve?"green":"primaryicons",icons:i.involve?"mdi-check":"mdi-plus"},on:{click:function(t){return e.involving(i)}}}):e._e()]}}],null,!0)})],1)]},proxy:!0}],null,!0)}),s("infousercard",{attrs:{dialogdetail:e.dialogdetail,person:e.person},on:{dialogdetailoff:function(t){e.dialogdetail=!1}}})],1)}))],2)],1)},n=[],o=s(20629),r=s(45296),a=s(27114),l=s(69617),c=s(37505),d=s(60441);const h=(0,o._p)("projectstate"),p=(0,o._p)("auth");var u={components:{infousercard:d.Z,MyIco:a.Z,Cards:c.Z},mixins:[l.Z],props:{mod:{type:Number,default:0},addtext:{type:String,default:"Добавить"}},data:()=>({person:{},isOpened:!1,tab:0,entries:[],isLoading:!1,searchbase:null,globalsearch:null,search:"",organization_value:[],organization:[],department_value:[],department:[],settingsFilt:[],iconsmenus:["mdi-account-multiple-plus","mdi-database-search"],headers:[{text:"ФИО ",value:"fullname",groupable:!1},{text:"",value:"involve"}],detailedit:{},detailsextended:{},dialogdetail:!1,users:[]}),computed:{fields:{get(){return 0==this.tab?this.entries:this.searchbase?1==this.tab?this.itemss:void 0:[]}},itemss(){return this.entries.map((e=>Object.assign({},e)))}},watch:{tab(e){1==e?this.entries=[]:this.firstload()},isOpened(e){e&&this.firstload()},globalsearch(e){let t=!1;e&&" "!=e&&(this.itemss.length>0&&(t=this.itemss.some((t=>0===t.fullname.toUpperCase().indexOf(e.toUpperCase().trim())))),this.isLoading||t||(this.isLoading=!0,this.settingsFilt=[{user:{sort:"sn",filters:{sn__istartswith:e.trim()},select_related:["otdel","department","organization","position"]}}],r.be.post("/filters/",this.settingsFilt).then((e=>{this.entries=this.checkinvolving(e.data.user)})).catch((e=>{console.log(e)})).finally((()=>{this.isLoading=!1}))))}},mounted(){},methods:{...h.mapGetters(["getProject","getProjectdirector","getProjectusers","getProjectwatchers","getProjectrp","getProjectcoordinator","getProjectsecretary"]),...p.mapGetters(["getUser"]),...h.mapMutations(["setProject","setProjectdirector","setProjectusers","setProjectwatchers","setProjectrp","setProjectcoordinator","setProjectsecretary"]),notincludesusers(e){let t=!1,s=[];return[6].includes(this.mod)?(this.getProject().users.forEach((e=>{6!=e.role.id&&s.push(e.user.id)})),this.entries.filter((i=>{s.includes(i.id)||e.id==i.id&&(t=!0)}))):t=!0,{result:t,freeuser:s}},involv(e){let t=[],s=[],i=0;return e.filter((i=>{this.notincludesusers(e).freeuser.includes(i.id)||t.push(i.id),1==i.involve&&s.push(i.id)})),i=5==this.mod?e.length:t.length,i==s.length?"mdi-minus-box-multiple-outline":"mdi-plus-box-multiple"},notinuserIndex(e){if([6].includes(this.mod)){let t=[],s=-1;for(let i=0;i<e.length;i++)if(s=t.findIndex((t=>t==e[i].id)),-1==s)return i;return 0}return 0},alreadyinuser(e){return!([6].includes(this.mod)&&this.getProject().users.findIndex((t=>t.user.id==e.id&&t.role.id!=this.mod))>-1)},involvedotdel(e){let t=this.entries.filter((t=>t.otdel.id==e.otdel.id));return t.every((e=>1==e.involve))},involveall(e){let t=this.getProject().users,s=[],i=[],n=[];this.entries.filter((o=>{if(5==this.mod&&(o.otdel.id==e.otdel.id&&s.push(o.id),1==o.involve&&o.otdel.id==e.otdel.id&&i.push(o.id)),!this.notincludesusers(e).freeuser.includes(o.id)){if(6==this.mod&&(o.otdel.id==e.otdel.id&&s.push(o.id),1==o.involve&&o.otdel.id==e.otdel.id&&i.push(o.id)),0==o.involve&&o.otdel.id==e.otdel.id){let e={id:o.id,fullname:o.fullname};n.push(o.id),t.push({role:{id:this.mod},user:e}),o.involve=!0}5==this.mod&&n.map((e=>{let s=t.findIndex((t=>5!=t.role.id&&t.user.id==e));s>-1&&t.splice(s,1)}))}})),s.length==i.length&&s.map((s=>{this.entries.filter((i=>{let n=t.findIndex((e=>e.user.id==s));n>-1&&t.splice(n,1),1==i.involve&&i.otdel.id==e.otdel.id&&(i.involve=!1)}))})),console.log("Запись всех пользователей прошла успешно"),this.setProjectusers(t)},usersplicer(e,t){let s=0;while(s<t.length)e==t[s].user.id&&this.mod==t[s].role.id?t.splice(s,1):s++;return t},singleadd(e){let t=this.getProject().users,s=this.entries.findIndex((t=>1==t.involve&&t.id!=e.id)),i=this.entries.findIndex((t=>t.id==e.id)),n=t.findIndex((t=>[5,6].includes(t.role.id)&&t.user.id==e.id)),o=t.findIndex((t=>t.role.id==this.mod&&t.user.id==e.id)),r=t.findIndex((e=>e.role.id==this.mod)),a={id:e.id,fullname:e.fullname};console.log("users",t),0==e.involve?t.splice(o,1):-1==r&&t.push({role:{id:this.mod},user:a}),n>-1&&t.splice(n,1),s>-1&&((this.entries[s].involve=!1)&&(this.entries[i].involve=!0),this.entries[s].involve=!1,t[r].user=a)},involving(e){e.involve=!e.involve;let t=this.getProject().users;if([5,6].includes(this.mod))if(e.involve){if(t.push({role:{id:this.mod},user:{id:e.id,otgel_id:e.otdel.id,otdel_name:e.otdel.name,fullname:e.fullname}}),5==this.mod){let s=t.findIndex((t=>5!=t.role.id&&t.user.id==e.id));s>-1&&t.splice(s,1)}}else t=this.usersplicer(e.id,t);else this.singleadd(e);console.log("Запись прошла успешно"),this.setProjectusers(t)},async changeorg(e){this.department_value=[],this.department=[],this.users=[],this.settingsFilt=[{department:{sort:"name",filters:{department_user__organization__name:e},exclude:[]}}];let t=await this.getFilters(this.settingsFilt);this.build(t.data),this.department_value=this.department[0],await this.changedep(this.department_value)},async changedep(e){this.settingsFilt=[{user:{sort:"sn",filters:{department__name:e,organization__name:this.organization_value},select_related:["otdel","position"]}}];let t=await this.getFilters(this.settingsFilt);this.build(t.data)},checkinvolving(e){let t=this.getProject().users;return t=[5,6].includes(this.mod)?t.filter((e=>e.role.id==this.mod)):[t.find((e=>e.role.id==this.mod))],e.forEach((e=>{t[0]?e["involve"]=-1!=t.findIndex((t=>t.user.id===e.id)):e["involve"]=!1})),e},openPersonalCards(e,t){this.person=t.item,this.dialogdetail=!0},build(e){this.entries="user"in e?this.checkinvolving(e.user):[];for(let[t,s]of Object.entries(e))"user"!=t&&s.map((e=>{this[t].push(e.name),e.id==this.getUser()[t].id&&(this[`${t}_value`]=e.name)}))},async firstload(){this.settingsFilt=[{organization:{starttable:"organization",sort:"id"}},{department:{sort:"id",filters:{department_user__organization:this.getUser().organization.id}}},{user:{sort:"sn",filters:{department__id:this.getUser().department.id},select_related:["otdel","position"]}}];let e=await this.getFilters(this.settingsFilt);this.build(e.data)}}},f=u,v=s(43736),m=s(43453),g=s.n(m),w=s(344),x=s(34145),y=s(54886),b=s(60266),_=s(50629),k=s(4324),C=s(44568),j=s(11713),$=s(10626),S=s(62165),Z=s(77771),O=s(17808),I=(0,v.Z)(f,i,n,!1,null,null,null),V=I.exports;g()(I,{VAutocomplete:w.Z,VCard:x.Z,VCardText:y.ZB,VCol:b.Z,VDataTable:_.Z,VIcon:k.Z,VMenu:C.Z,VRow:j.Z,VTab:$.Z,VTabItem:S.Z,VTabs:Z.Z,VTextField:O.Z})},81689:function(e,t,s){s.d(t,{Z:function(){return Ye}});var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-card",[s("v-stepper",{model:{value:e.e1,callback:function(t){e.e1=t},expression:"e1"}},[s("v-row",{staticClass:"ma-0 justify-content-end"},[s("div",{staticClass:"align-self-center positionname flex-col flex-grow-1"},[s("span",{staticClass:"px-0 pb-0 hstep text-center text-subtitle-1 font-weight-medium text-uppercase texthead--text"},[e._v(" "+e._s(e.name)+" ")])]),s("v-col",{staticClass:"flex-grow-0 "},[s("MyIco",{attrs:{icons:"mdi-close-thick",color:"close_icons",size:"small"},on:{click:function(t){return e.$emit("closes")}}})],1)],1),s("v-row",{staticClass:"ma-0"},[s("v-col",{staticClass:"flex-grow-0 text-nowrap pa-0 "},[s("v-divider"),e._l(e.projstep,(function(t,i){return[s("v-stepper-step",{key:t,attrs:{complete:e.e1>i+1,step:i+1,color:"open_icons","edit-icon":"mdi-reply"},on:{click:function(t){return e.validstep(i+1)}}},[e._v(" "+e._s(t)+" ")]),s("v-divider",{key:i})]}))],2),s("v-col",{staticClass:"px-0 pt-0 flex-col"},[s("v-row",{staticClass:"flex-grow-0"},[s("v-col",{staticClass:"px-3 "},[s("v-divider")],1)],1),s("v-stepper-items",{class:e.$vuetify.theme.dark?"auchdark":"auchlight"},e._l(e.projstep,(function(t,i){return s("v-stepper-content",{key:i+1,staticClass:"pa-0",attrs:{step:i+1}},[s("v-card",{staticClass:"ma-1",staticStyle:{overflow:"auto"},attrs:{elevation:"2",height:"600"}},[s(["step-one","step-two","step-three","step-four","step-five"][i],{ref:"childform",refInFor:!0,tag:"component",attrs:{newproject:e.newproject},on:{showuserinfo:e.showuserinfo}})],1)],1)})),1),s("v-row",{staticClass:" mt-1"},[s("v-col",{staticClass:"pt-1"},[1!=e.e1?s("MyIco",{attrs:{icons:"mdi-menu-left",color:"btns",size:"32"},on:{click:function(t){e.e1--}}}):e._e()],1),s("v-col",{staticClass:"flex-grow-0",class:e.e1<e.projstep.length?"pt-1":"pt-2"},[s("MyIco",{attrs:{icons:e.e1<e.projstep.length?"mdi-menu-right":"mdi-check",color:e.e1<e.projstep.length?"btns":"open_icons",tooltip:!0,text_tool:e.e1<e.projstep.length?"Далее":"Сохранить проект",size:"32"},on:{click:e.nextstep}})],1)],1)],1),s("v-col",{staticClass:"pa-0 flex-grow-0 pl-0 rama"})],1)],1)],1)},n=[],o=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-form",{ref:"form",staticClass:"pa-3 pt-0 flex-grow-1 flex-col overflow-auto overflow-x-hidden stepper",attrs:{"lazy-validation":""}},[s("row-pirow",{staticClass:"mt-1 ",attrs:{title:"Название:",myclass:"pb-4 align-self-center"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-textarea",{staticClass:"my-0 pt-0 pb-0 textsize",attrs:{"auto-grow":"",rows:"0",rules:e.newproject_rules.longname},model:{value:e.newproject.longname,callback:function(t){e.$set(e.newproject,"longname",t)},expression:"newproject.longname"}})]},proxy:!0}])}),s("row-pirow",{attrs:{title:"Краткое название:",myclass:"pt-2"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-textarea",{staticClass:"mt-0 pt-0 pb-0 textsize",attrs:{"auto-grow":"",rows:"0",flat:"",dense:"",rules:e.newproject_rules.name},model:{value:e.newproject.name,callback:function(t){e.$set(e.newproject,"name",t)},expression:"newproject.name"}})]},proxy:!0}])}),s("row-pirow",{attrs:{title:"Период:",myclass:"pt-3",rowclass:"px-1"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-row",{staticClass:"flex-grow-0"},[s("v-col",{staticClass:"py-0"},[s("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,transition:"scale-transition","offset-y":"","min-width":"auto"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,n=t.attrs;return[s("v-text-field",e._g(e._b({attrs:{value:e.formatDate(e.newproject.datestart),rules:e.newproject_rules.datestart}},"v-text-field",n,!1),i))]}}]),model:{value:e.menu_project_dates[0],callback:function(t){e.$set(e.menu_project_dates,0,t)},expression:"menu_project_dates[0]"}},[s("v-date-picker",{attrs:{max:e.newproject.tasks.length>0?e.projectmaxStartdate:void 0},on:{input:function(t){e.menu_project_dates[0]=!1}},model:{value:e.newproject.datestart,callback:function(t){e.$set(e.newproject,"datestart",t)},expression:"newproject.datestart"}})],1)],1),s("v-col",{staticClass:"py-0"},[s("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,transition:"scale-transition","offset-y":"","min-width":"auto"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,n=t.attrs;return[s("v-text-field",e._g(e._b({attrs:{value:e.formatDate(e.newproject.dateend),rules:e.newproject_rules.dateend}},"v-text-field",n,!1),i))]}}]),model:{value:e.menu_project_dates[1],callback:function(t){e.$set(e.menu_project_dates,1,t)},expression:"menu_project_dates[1]"}},[s("v-date-picker",{attrs:{min:e.newproject.tasks.length>0?e.projectminEnddate:void 0},on:{input:function(t){e.menu_project_dates[1]=!1}},model:{value:e.newproject.dateend,callback:function(t){e.$set(e.newproject,"dateend",t)},expression:"newproject.dateend"}})],1)],1)],1)]},proxy:!0}])}),s("row-pirow",{staticClass:"pt-1",attrs:{title:"Сложность проекта:"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("div",{staticClass:" ml-n2"},[s("v-rating",{attrs:{color:"warning","empty-icon":"mdi-star-outline","full-icon":"mdi-star","half-icon":"mdi-star-half-full",hover:"",length:"5",size:"16"},model:{value:e.newproject.difficult,callback:function(t){e.$set(e.newproject,"difficult",t)},expression:"newproject.difficult"}})],1)]},proxy:!0}])}),s("row-pirow",{staticClass:"py-2",attrs:{title:"Тип:"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-autocomplete",{staticClass:"inputext pointer mt-n1 iconsh ",attrs:{dense:"",items:e.$store.getters["filterslogic/mult/mult_project__type"],"return-object":"","item-text":"name","item-value":"id","hide-no-data":"","item-color":"open_icons",color:"primaryicons",rules:e.newproject_rules.ptype},model:{value:e.newproject.ptype,callback:function(t){e.$set(e.newproject,"ptype",t)},expression:"newproject.ptype"}})]},proxy:!0}])}),s("row-pirow",{staticClass:"pt-6",attrs:{title:"Сфера организации Проекта:",myclass:"pb-5 align-self-center"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-textarea",{staticClass:"pt-0 pb-2 textsize",attrs:{"auto-grow":"",rows:"0",flat:"",dense:"",required:""},model:{value:e.newproject.info.project_sphere,callback:function(t){e.$set(e.newproject.info,"project_sphere",t)},expression:"newproject.info.project_sphere"}})]},proxy:!0}])}),s("row-pirow",{staticClass:"pt-3",attrs:{title:"Дата утверждения паспорта Проекта:",myclass:"pt-0"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("div",{staticClass:" mt-n3 "},[s("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,transition:"scale-transition","offset-y":"","min-width":"auto"},scopedSlots:e._u([{key:"activator",fn:function(t){var i=t.on,n=t.attrs;return[s("v-text-field",e._g(e._b({attrs:{type:"date-local",readonly:"",placeholder:"дд.мм.гггг",flat:"",dense:"","auto-grow":"",rows:"0",value:e.formatDate(e.newproject.info.passport_last_date)}},"v-text-field",n,!1),i))]}}]),model:{value:e.menupassport_last_date,callback:function(t){e.menupassport_last_date=t},expression:"menupassport_last_date"}},[s("v-date-picker",{attrs:{placeholder:"дд.мм.гггг",min:e.newproject.datestart,max:e.newproject.dateend},on:{input:function(t){e.menupassport_last_date=!1}},model:{value:e.newproject.info.passport_last_date,callback:function(t){e.$set(e.newproject.info,"passport_last_date",t)},expression:"newproject.info.passport_last_date"}})],1)],1)]},proxy:!0}])}),s("row-pirow",{staticClass:"pt-4",attrs:{title:"Дополнительная информация:",myclass:"pb-6 align-self-center"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-textarea",{staticClass:"mt-n1 pt-0 pb-2 textsize",attrs:{"auto-grow":"",rows:"0",flat:"",dense:""},model:{value:e.newproject.info.dop_info,callback:function(t){e.$set(e.newproject.info,"dop_info",t)},expression:"newproject.info.dop_info"}})]},proxy:!0}])}),s("row-pirow",{attrs:{title:"Финансовое обеспечение расходных обязательств, связанных с реализацией настоящего приказа:",myclass:"align-self-center pb-4"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-textarea",{staticClass:"mt-0 pt-2 pb-0",attrs:{"hide-details":"","auto-grow":"",rows:"0",flat:"",dense:""},model:{value:e.newproject.info.financial_support,callback:function(t){e.$set(e.newproject.info,"financial_support",t)},expression:"newproject.info.financial_support"}})]},proxy:!0}])}),s("row-pirow",{staticClass:"pt-4",attrs:{title:"Основания для инициализации проекта:",myclass:"pb-0 align-self-center"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-textarea",{staticClass:"mt-0 pt-0 pb-0",attrs:{"auto-grow":"",rows:"0",dense:"",flat:"","hide-details":""},model:{value:e.newproject.info.grounds,callback:function(t){e.$set(e.newproject.info,"grounds",t)},expression:"newproject.info.grounds"}})]},proxy:!0}])})],1)},r=[],a=s(30381),l=s.n(a),c=s(67761),d=s(35241),h={name:"step-one",components:{rowPirow:c.Z},mixins:[d.Z],props:{newproject:{type:Object,default:()=>{}}},data:()=>({menupassport_last_date:!1,menu_project_dates:[!1,!1],newproject_rules:{name:[e=>!!e||"Обязательно для заполнения"],longname:[e=>!!e||"Обязательно для заполнения",e=>e.length>4||"Полное название должно содержать в себе более 4х символов"],datestart:[e=>!!e||"Обязательно для заполнения",e=>l()(e,"DD.MM.YYYY").isValid()||"Дата указана неверно"],dateend:[e=>!!e||"Обязательно для заполнения",e=>l()(e,"DD.MM.YYYY").isValid()||"Дата указана неверно"],ptype:[e=>!!e||"Обязательно для заполнения"]}}),computed:{projectmaxStartdate(){let e=this.newproject.tasks.reduce(((e,t)=>l()(e.datestart).isBefore(t.datestart)?e.datestart:t.datestart));return l()(this.newproject.dateend).isBefore(e)?this.newproject.dateend:e},projectminEnddate(){let e=this.newproject.tasks.reduce(((e,t)=>l()(e.dateend).isAfter(t.dateend)?e.dateend:t.dateend));return l()(this.newproject.datstart).isAfter(e)?this.newproject.datestart:e}}},p=h,u=s(43736),f=s(43453),v=s.n(f),m=s(344),g=s(60266),w=s(71030),x=s(65005),y=s(44568),b=s(73905),_=s(11713),k=s(17808),C=s(92648),j=(0,u.Z)(p,o,r,!1,null,null,null),$=j.exports;v()(j,{VAutocomplete:m.Z,VCol:g.Z,VDatePicker:w.Z,VForm:x.Z,VMenu:y.Z,VRating:b.Z,VRow:_.Z,VTextField:k.Z,VTextarea:C.Z});var S=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-form",{ref:"form",staticClass:"pa-3 pt-0 flex-grow-1 flex-col overflow-x-hidden stepper"},[s("v-row",{staticClass:"mb-2 mt-0 flex-grow-0 font-weight-bold text-overline main_theme"},[s("v-col",{staticClass:"py-0",attrs:{lg:"4"}},[e._v("Роли")]),s("v-col",{staticClass:"py-0",attrs:{lg:"4"}},[e._v("Сотрудники")]),s("v-col",{staticClass:"py-0"},[e._v("Процент занятости")]),s("v-col",{staticClass:"text-end py-0"},[e._v("Добавить/удалить")])],1),s("v-divider",{staticClass:"mb-3 mt-1"}),s("roles-single",{attrs:{show:!0},on:{showuserinfo:e.showuserinfo}}),s("v-divider",{staticClass:"my-2"}),s("roles-many",{attrs:{roles:5,show:!0},on:{showuserinfo:e.showuserinfo}}),s("v-divider",{staticClass:"mt-5"}),s("roles-many",{attrs:{show:!0},on:{showuserinfo:e.showuserinfo}}),s("v-divider",{staticClass:"mt-5"})],1)},Z=[],O=s(32112),I=s(71240),V={name:"step-two",components:{RolesSingle:O.Z,rolesMany:I.Z},props:{newproject:{type:Object,default:()=>{}}},methods:{showuserinfo(e){this.$emit("showuserinfo",e)}}},A=V,P=s(99223),B=(0,u.Z)(A,S,Z,!1,null,null,null),T=B.exports;v()(B,{VCol:g.Z,VDivider:P.Z,VForm:x.Z,VRow:_.Z});var E=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-form",{ref:"form",staticClass:"pa-3 pt-0 flex-grow-1 flex-col overflow-auto overflow-x-hidden stepper"},[s("exp-panel",{attrs:{completion:!0,addremrow:e.addremrow,newproject:e.newproject},on:{remove:e.remove,addRows:e.addRows}})],1)},D=[],z=s(17550),M={name:"step-three",components:{ExpPanel:z.Z},props:{newproject:{type:Object,default:()=>{}}},data:()=>({addremrow:[{field:"target",text:"Цель (цели) проекта"},{field:"result",text:"Результат (результаты) проекта"},{field:"criteria",text:"Критерии успеха проекта"},{field:"risks",text:"Риски реализации проекта"},{field:"interactions",text:"Взаимосвязи с другими проектами и программами"}]}),methods:{addRows(e){this.newproject.info[e].push("")},remove(e){this.newproject.info[e.field].splice(e.key,1)}}},R=M,L=(0,u.Z)(R,E,D,!1,null,null,null),N=L.exports;v()(L,{VForm:x.Z});var F=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-form",{ref:"form",staticClass:" d-flex pa-3 pt-0 flex-grow-1 flex-col overflow-auto overflow-x-hidden stepper",staticStyle:{height:"100%"},attrs:{"lazy-validation":""}},[s("v-row",{staticClass:"d-flex flex-grow-1 ",staticStyle:{height:"100%"}},[s("v-col",{staticClass:"flex-col justify-space-between"},[s("v-treeview",{attrs:{active:e.selection,items:e.newproject.tasks,"selection-type":"leaf","item-key":"fakeid",hoverable:"",activatable:"","return-object":"","item-children":"task_work","open-all":""},on:{"update:active":function(t){e.selection=t}}}),s("v-btn",{on:{click:e.addtask}},[e._v("Добавить задачу")])],1),s("v-divider",{attrs:{vertical:""}}),s("v-col",{staticClass:"flex-col flex-grow-1 justify-space-between",class:e.selection.length?"justify-space-between":"justify-space-around",staticStyle:{height:"100%"},attrs:{cols:"6"}},[e.selection.length?[s("div",{ref:"selection",staticClass:"d-flex flex-grow-1 flex-col"},[e._l(e.selection,(function(t){return s("div",{key:t.id,staticClass:"d-flex flex-grow-1 flex-col"},[s("row-pirow",{attrs:{title:"Название:",myclass:"pt-3",rowclass:"px-1"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-textarea",{staticClass:"mt-0 pt-0 pb-2",attrs:{"auto-grow":"",rows:"0",dense:"",flat:""},model:{value:t.longname,callback:function(s){e.$set(t,"longname",s)},expression:"node.longname"}})]},proxy:!0}],null,!0)}),s("row-pirow",{attrs:{title:"Короткое название:",myclass:"pt-2",rowclass:"px-1"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-textarea",{staticClass:"mt-0 pt-0 pb-2",attrs:{"auto-grow":"",rows:"0",dense:"",flat:"",rules:e.selection_rules.name},model:{value:t.name,callback:function(s){e.$set(t,"name",s)},expression:"node.name"}})]},proxy:!0}],null,!0)}),s("row-pirow",{attrs:{title:"Период:",myclass:"pt-3",rowclass:"px-1"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-row",{staticClass:"flex-grow-0"},[s("v-col",{staticClass:"py-0"},[s("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,transition:"scale-transition","offset-y":"","min-width":"auto"},scopedSlots:e._u([{key:"activator",fn:function(i){var n=i.on,o=i.attrs;return[s("v-text-field",e._g(e._b({attrs:{value:e.formatDate(t.datestart),rules:e.selection_rules.datestart}},"v-text-field",o,!1),n))]}}],null,!0),model:{value:e.menudatestart,callback:function(t){e.menudatestart=t},expression:"menudatestart"}},[s("v-date-picker",{attrs:{min:e.findStartMinDate,max:e.findStartMaxdate},on:{input:function(t){e.menudatestart=!1}},model:{value:t.datestart,callback:function(s){e.$set(t,"datestart",s)},expression:"node.datestart"}})],1)],1),s("v-col",{staticClass:"py-0"},[s("v-menu",{attrs:{"close-on-content-click":!1,"nudge-right":40,transition:"scale-transition","offset-y":"","min-width":"auto"},scopedSlots:e._u([{key:"activator",fn:function(i){var n=i.on,o=i.attrs;return[s("v-text-field",e._g(e._b({attrs:{value:e.formatDate(t.dateend),rules:e.selection_rules.datestart,readonly:""}},"v-text-field",o,!1),n))]}}],null,!0),model:{value:e.menudateend,callback:function(t){e.menudateend=t},expression:"menudateend"}},[s("v-date-picker",{attrs:{min:e.findEndMinDate,max:e.findEndMaxdate},on:{input:function(t){e.menudateend=!1}},model:{value:t.dateend,callback:function(s){e.$set(t,"dateend",s)},expression:"node.dateend"}})],1)],1)],1)]},proxy:!0}],null,!0)}),s("row-pirow",{staticClass:"mt-2",attrs:{title:"Сложность:",rowclass:"px-1"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-rating",{staticClass:" ml-n3 star",attrs:{color:"warning","empty-icon":"mdi-star-outline","full-icon":"mdi-star","half-icon":"mdi-star-half-full",hover:"",length:"5",size:"16"},model:{value:t.difficult,callback:function(s){e.$set(t,"difficult",s)},expression:"node.difficult"}})]},proxy:!0}],null,!0)}),s("row-pirow",{staticClass:"pt-2",attrs:{title:"Ответсвенный:",rowclass:"px-1"},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-autocomplete",{staticClass:"inputext pointer mt-n1 iconsh font-weight-medium",attrs:{dense:"",items:e.getprojectuniquePersons,"return-object":"","item-text":"fullname","item-value":"id","item-color":"open_icons",color:"primaryicons",rules:e.selection_rules.responsible},model:{value:t.responsible,callback:function(s){e.$set(t,"responsible",s)},expression:"node.responsible"}})]},proxy:!0}],null,!0)}),s("strong",{staticClass:"px-1"},[e._v("Описание:")]),s("v-textarea",{staticClass:"mt-0 pt-0 pb-2",attrs:{"no-resize":"",rows:"10",solo:"","hide-details":""},model:{value:t.description,callback:function(s){e.$set(t,"description",s)},expression:"node.description"}})],1)})),s("div",{staticClass:"d-felx flex-grow-0"},[s("div",{staticClass:"d-felx flex-row justify-space-around"},["task_work"in e.selection[0]?s("v-btn",{on:{click:e.addwork}},[e._v("Добавить работу")]):e._e(),s("v-btn",{staticClass:"white--text",attrs:{color:"red "},on:{click:e.deltasksworks}},[e._v("Удалить "+e._s("task_work"in e.selection[0]?"Задачу":"Работу"))])],1)])],2)]:[s("div",{staticClass:"align-self-center "},[e._v(" Ничего не выбрано")])]],2)],1)],1)},W=[],K=s(20629);const U=(0,K._p)("projectstate");var G={name:"step-four",mixins:[d.Z],components:{rowPirow:c.Z},props:{newproject:{type:Object,default:()=>{}}},data:()=>({deletion:{deltasks:[],delworks:[]},menudatestart:!1,menudateend:!1,selection:[],selection_rules:{name:[e=>!!e||"Обязательно для заполнения"],datestart:[e=>!!e||"Обязательно для заполнения"],responsible:[e=>!!e||"Обязательно для заполнения"]}}),computed:{...U.mapGetters(["getProject","getprojectuniquePersons"]),findStartMaxdate(){if("task_work"in this.selection[0]){if(this.selection[0].task_work.length>0){let e=this.selection[0].task_work.reduce(((e,t)=>l()(e.datestart).isBefore(t.datestart)?e.datestart:t.datestart));return l()(this.newproject.dateend).isBefore(e)?this.newproject.dateend:e}return"dateend"in this.newproject?this.newproject.dateend:void 0}{let e=this.newproject.tasks.find((e=>e.id==this.selection[0].parent.id));return e.dateend}},findStartMinDate(){if("task_work"in this.selection[0])return this.newproject.datestart;{let e=this.newproject.tasks.find((e=>e.id==this.selection[0].parent.id));return e.datestart}},findEndMinDate(){if("task_work"in this.selection[0]){if(this.selection[0].task_work.length>0){let e=this.selection[0].task_work.reduce(((e,t)=>l()(e.dateend).isAfter(t.dateend)?e.dateend:t.dateend));if(l()(e).isValid())return l()(this.newproject.datestart).isAfter(e)?this.newproject.datestart:e}return this.newproject.datestart}{let e=this.newproject.tasks.find((e=>e.id==this.selection[0].parent.id));return l()(e.datestart).isValid()?e.datestart:void 0}},findEndMaxdate(){if("task_work"in this.selection[0])return this.newproject.dateend;{let e=this.newproject.tasks.find((e=>e.id==this.selection[0].parent.id));return e.dateend}}},methods:{addtask(){if(this.selection&&!this.$refs.form.validate())return;let e=-1*this.newproject.tasks.length;this.newproject.tasks.push({fakeid:`t-${e}`,id:e,longname:"",name:"Новая задача",description:"",datestart:null,dateend:null,responsible:null,task_work:[]}),this.selection=[this.newproject.tasks[this.newproject.tasks.length-1]]},addwork(){if(this.selection&&!this.$refs.form.validate())return;let e=-1*this.selection[0].task_work.length;this.selection[0].task_work.push({fakeid:`w-${e}`,id:e,parent:{id:this.selection[0].id},longname:"",name:"Новая работа",description:"",datestart:"",dateend:"",responsible:""}),this.selection=[this.selection[0].task_work[this.selection[0].task_work.length-1]]},deltasksworks(){if(this.selection.length>0){if("task_work"in this.selection[0])this.selection[0].id>0&&this.deletion.deltasks.push(this.selection[0].id),this.selection[0].task_work.forEach((e=>{e.id>0&&this.deletion.delworks.push(e.id)})),this.newproject.tasks.splice(this.newproject.tasks.findIndex((e=>e.id==this.selection[0].id)),1),this.selection=[];else{this.selection[0].id>0&&this.deletion.delworks.push(this.selection[0].id);let e=this.newproject.tasks.findIndex((e=>e.id==this.selection[0].parent.id));this.newproject.tasks[e].task_work.splice(this.newproject.tasks[e].task_work.findIndex((e=>e.id==this.selection[0].id)),1),this.selection=[]}this.newproject.deletion=this.deletion}}}},Y=G,q=s(16190),H=s(77394),X=s(4324),J=s(54712),Q=s(16878),ee=s(67678),te=s(75352);const se=(0,ee.Z)(Q.Z,(0,J.f)("treeview")),ie={activatable:Boolean,activeClass:{type:String,default:"v-treeview-node--active"},color:{type:String,default:"primary"},disablePerNode:Boolean,expandIcon:{type:String,default:"$subgroup"},indeterminateIcon:{type:String,default:"$checkboxIndeterminate"},itemChildren:{type:String,default:"children"},itemDisabled:{type:String,default:"disabled"},itemKey:{type:String,default:"id"},itemText:{type:String,default:"name"},loadChildren:Function,loadingIcon:{type:String,default:"$loading"},offIcon:{type:String,default:"$checkboxOff"},onIcon:{type:String,default:"$checkboxOn"},openOnClick:Boolean,rounded:Boolean,selectable:Boolean,selectedColor:{type:String,default:"accent"},shaped:Boolean,transition:Boolean,selectionType:{type:String,default:"leaf",validator:e=>["leaf","independent"].includes(e)}},ne=se.extend().extend({name:"v-treeview-node",inject:{treeview:{default:null}},props:{level:Number,item:{type:Object,default:()=>null},parentIsDisabled:Boolean,...ie},data:()=>({hasLoaded:!1,isActive:!1,isIndeterminate:!1,isLoading:!1,isOpen:!1,isSelected:!1}),computed:{disabled(){return(0,te.vO)(this.item,this.itemDisabled)||!this.disablePerNode&&this.parentIsDisabled&&"leaf"===this.selectionType},key(){return(0,te.vO)(this.item,this.itemKey)},children(){const e=(0,te.vO)(this.item,this.itemChildren);return e&&e.filter((e=>!this.treeview.isExcluded((0,te.vO)(e,this.itemKey))))},text(){return(0,te.vO)(this.item,this.itemText)},scopedProps(){return{item:this.item,leaf:!this.children,selected:this.isSelected,indeterminate:this.isIndeterminate,active:this.isActive,open:this.isOpen}},computedIcon(){return this.isIndeterminate?this.indeterminateIcon:this.isSelected?this.onIcon:this.offIcon},hasChildren(){return!!this.children&&(!!this.children.length||!!this.loadChildren)}},created(){this.treeview.register(this)},beforeDestroy(){this.treeview.unregister(this)},methods:{checkChildren(){return new Promise((e=>{if(!this.children||this.children.length||!this.loadChildren||this.hasLoaded)return e();this.isLoading=!0,e(this.loadChildren(this.item))})).then((()=>{this.isLoading=!1,this.hasLoaded=!0}))},open(){this.isOpen=!this.isOpen,this.treeview.updateOpen(this.key,this.isOpen),this.treeview.emitOpen()},genLabel(){const e=[];return this.$scopedSlots.label?e.push(this.$scopedSlots.label(this.scopedProps)):e.push(this.text),this.$createElement("div",{slot:"label",staticClass:"v-treeview-node__label"},e)},genPrependSlot(){return this.$scopedSlots.prepend?this.$createElement("div",{staticClass:"v-treeview-node__prepend"},this.$scopedSlots.prepend(this.scopedProps)):null},genAppendSlot(){return this.$scopedSlots.append?this.$createElement("div",{staticClass:"v-treeview-node__append"},this.$scopedSlots.append(this.scopedProps)):null},genContent(){const e=[this.genPrependSlot(),this.genLabel(),this.genAppendSlot()];return this.$createElement("div",{staticClass:"v-treeview-node__content"},e)},genToggle(){return this.$createElement(X.Z,{staticClass:"v-treeview-node__toggle",class:{"v-treeview-node__toggle--open":this.isOpen,"v-treeview-node__toggle--loading":this.isLoading},slot:"prepend",on:{click:e=>{e.stopPropagation(),this.isLoading||this.checkChildren().then((()=>this.open()))}}},[this.isLoading?this.loadingIcon:this.expandIcon])},genCheckbox(){return this.$createElement(X.Z,{staticClass:"v-treeview-node__checkbox",props:{color:this.isSelected||this.isIndeterminate?this.selectedColor:void 0,disabled:this.disabled},on:{click:e=>{e.stopPropagation(),this.isLoading||this.checkChildren().then((()=>{this.$nextTick((()=>{this.isSelected=!this.isSelected,this.isIndeterminate=!1,this.treeview.updateSelected(this.key,this.isSelected),this.treeview.emitSelected()}))}))}}},[this.computedIcon])},genLevel(e){return(0,te.MT)(e).map((()=>this.$createElement("div",{staticClass:"v-treeview-node__level"})))},genNode(){const e=[this.genContent()];return this.selectable&&e.unshift(this.genCheckbox()),this.hasChildren?e.unshift(this.genToggle()):e.unshift(...this.genLevel(1)),e.unshift(...this.genLevel(this.level)),this.$createElement("div",this.setTextColor(this.isActive&&this.color,{staticClass:"v-treeview-node__root",class:{[this.activeClass]:this.isActive},on:{click:()=>{this.openOnClick&&this.hasChildren?this.checkChildren().then(this.open):this.activatable&&!this.disabled&&(this.isActive=!this.isActive,this.treeview.updateActive(this.key,this.isActive),this.treeview.emitActive())}}}),e)},genChild(e,t){return this.$createElement(ne,{key:(0,te.vO)(e,this.itemKey),props:{activatable:this.activatable,activeClass:this.activeClass,item:e,selectable:this.selectable,selectedColor:this.selectedColor,color:this.color,disablePerNode:this.disablePerNode,expandIcon:this.expandIcon,indeterminateIcon:this.indeterminateIcon,offIcon:this.offIcon,onIcon:this.onIcon,loadingIcon:this.loadingIcon,itemKey:this.itemKey,itemText:this.itemText,itemDisabled:this.itemDisabled,itemChildren:this.itemChildren,loadChildren:this.loadChildren,transition:this.transition,openOnClick:this.openOnClick,rounded:this.rounded,shaped:this.shaped,level:this.level+1,selectionType:this.selectionType,parentIsDisabled:t},scopedSlots:this.$scopedSlots})},genChildrenWrapper(){if(!this.isOpen||!this.children)return null;const e=[this.children.map((e=>this.genChild(e,this.disabled)))];return this.$createElement("div",{staticClass:"v-treeview-node__children"},e)},genTransition(){return this.$createElement(H.Fx,[this.genChildrenWrapper()])}},render(e){const t=[this.genNode()];return this.transition?t.push(this.genTransition()):t.push(this.genChildrenWrapper()),e("div",{staticClass:"v-treeview-node",class:{"v-treeview-node--leaf":!this.hasChildren,"v-treeview-node--click":this.openOnClick,"v-treeview-node--disabled":this.disabled,"v-treeview-node--rounded":this.rounded,"v-treeview-node--shaped":this.shaped,"v-treeview-node--selected":this.isSelected},attrs:{"aria-expanded":String(this.isOpen)}},t)}});var oe=ne,re=s(96669),ae=s(74808);function le(e,t,s){const i=(0,te.vO)(e,s);return i.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())>-1}function ce(e,t,s,i,n,o,r){if(e(t,s,n))return!0;const a=(0,te.vO)(t,o);if(a){let t=!1;for(let l=0;l<a.length;l++)ce(e,a[l],s,i,n,o,r)&&(t=!0);if(t)return!0}return r.add((0,te.vO)(t,i)),!1}var de=(0,ee.Z)((0,J.J)("treeview"),re.Z).extend({name:"v-treeview",provide(){return{treeview:this}},props:{active:{type:Array,default:()=>[]},dense:Boolean,disabled:Boolean,filter:Function,hoverable:Boolean,items:{type:Array,default:()=>[]},multipleActive:Boolean,open:{type:Array,default:()=>[]},openAll:Boolean,returnObject:{type:Boolean,default:!1},search:String,value:{type:Array,default:()=>[]},...ie},data:()=>({level:-1,activeCache:new Set,nodes:{},openCache:new Set,selectedCache:new Set}),computed:{excludedItems(){const e=new Set;if(!this.search)return e;for(let t=0;t<this.items.length;t++)ce(this.filter||le,this.items[t],this.search,this.itemKey,this.itemText,this.itemChildren,e);return e}},watch:{items:{handler(){const e=Object.keys(this.nodes).map((e=>(0,te.vO)(this.nodes[e].item,this.itemKey))),t=this.getKeys(this.items),s=(0,te.tX)(t,e);if(!s.length&&t.length<e.length)return;s.forEach((e=>delete this.nodes[e]));const i=[...this.selectedCache];this.selectedCache=new Set,this.activeCache=new Set,this.openCache=new Set,this.buildTree(this.items),(0,te.vZ)(i,[...this.selectedCache])||this.emitSelected()},deep:!0},active(e){this.handleNodeCacheWatcher(e,this.activeCache,this.updateActive,this.emitActive)},value(e){this.handleNodeCacheWatcher(e,this.selectedCache,this.updateSelected,this.emitSelected)},open(e){this.handleNodeCacheWatcher(e,this.openCache,this.updateOpen,this.emitOpen)}},created(){const e=e=>this.returnObject?(0,te.vO)(e,this.itemKey):e;this.buildTree(this.items);for(const t of this.value.map(e))this.updateSelected(t,!0,!0);for(const t of this.active.map(e))this.updateActive(t,!0)},mounted(){(this.$slots.prepend||this.$slots.append)&&(0,ae.Kd)("The prepend and append slots require a slot-scope attribute",this),this.openAll?this.updateAll(!0):(this.open.forEach((e=>this.updateOpen(this.returnObject?(0,te.vO)(e,this.itemKey):e,!0))),this.emitOpen())},methods:{updateAll(e){Object.keys(this.nodes).forEach((t=>this.updateOpen((0,te.vO)(this.nodes[t].item,this.itemKey),e))),this.emitOpen()},getKeys(e,t=[]){for(let s=0;s<e.length;s++){const i=(0,te.vO)(e[s],this.itemKey);t.push(i);const n=(0,te.vO)(e[s],this.itemChildren);n&&t.push(...this.getKeys(n))}return t},buildTree(e,t=null){var s;for(let i=0;i<e.length;i++){const n=e[i],o=(0,te.vO)(n,this.itemKey),r=null!==(s=(0,te.vO)(n,this.itemChildren))&&void 0!==s?s:[],a=this.nodes.hasOwnProperty(o)?this.nodes[o]:{isSelected:!1,isIndeterminate:!1,isActive:!1,isOpen:!1,vnode:null},l={vnode:a.vnode,parent:t,children:r.map((e=>(0,te.vO)(e,this.itemKey))),item:n};if(this.buildTree(r,o),"independent"!==this.selectionType&&null!==t&&!this.nodes.hasOwnProperty(o)&&this.nodes.hasOwnProperty(t)?l.isSelected=this.nodes[t].isSelected:(l.isSelected=a.isSelected,l.isIndeterminate=a.isIndeterminate),l.isActive=a.isActive,l.isOpen=a.isOpen,this.nodes[o]=l,r.length&&"independent"!==this.selectionType){const{isSelected:e,isIndeterminate:t}=this.calculateState(o,this.nodes);l.isSelected=e,l.isIndeterminate=t}!this.nodes[o].isSelected||"independent"!==this.selectionType&&0!==l.children.length||this.selectedCache.add(o),this.nodes[o].isActive&&this.activeCache.add(o),this.nodes[o].isOpen&&this.openCache.add(o),this.updateVnodeState(o)}},calculateState(e,t){const s=t[e].children,i=s.reduce(((e,s)=>(e[0]+=+Boolean(t[s].isSelected),e[1]+=+Boolean(t[s].isIndeterminate),e)),[0,0]),n=!!s.length&&i[0]===s.length,o=!n&&(i[0]>0||i[1]>0);return{isSelected:n,isIndeterminate:o}},emitOpen(){this.emitNodeCache("update:open",this.openCache)},emitSelected(){this.emitNodeCache("input",this.selectedCache)},emitActive(){this.emitNodeCache("update:active",this.activeCache)},emitNodeCache(e,t){this.$emit(e,this.returnObject?[...t].map((e=>this.nodes[e].item)):[...t])},handleNodeCacheWatcher(e,t,s,i){e=this.returnObject?e.map((e=>(0,te.vO)(e,this.itemKey))):e;const n=[...t];(0,te.vZ)(n,e)||(n.forEach((e=>s(e,!1))),e.forEach((e=>s(e,!0))),i())},getDescendants(e,t=[]){const s=this.nodes[e].children;t.push(...s);for(let i=0;i<s.length;i++)t=this.getDescendants(s[i],t);return t},getParents(e){let t=this.nodes[e].parent;const s=[];while(null!==t)s.push(t),t=this.nodes[t].parent;return s},register(e){const t=(0,te.vO)(e.item,this.itemKey);this.nodes[t].vnode=e,this.updateVnodeState(t)},unregister(e){const t=(0,te.vO)(e.item,this.itemKey);this.nodes[t]&&(this.nodes[t].vnode=null)},isParent(e){return this.nodes[e].children&&this.nodes[e].children.length},updateActive(e,t){if(!this.nodes.hasOwnProperty(e))return;this.multipleActive||this.activeCache.forEach((e=>{this.nodes[e].isActive=!1,this.updateVnodeState(e),this.activeCache.delete(e)}));const s=this.nodes[e];s&&(t?this.activeCache.add(e):this.activeCache.delete(e),s.isActive=t,this.updateVnodeState(e))},updateSelected(e,t,s=!1){if(!this.nodes.hasOwnProperty(e))return;const i=new Map;if("independent"!==this.selectionType){for(const o of this.getDescendants(e))(0,te.vO)(this.nodes[o].item,this.itemDisabled)&&!s||(this.nodes[o].isSelected=t,this.nodes[o].isIndeterminate=!1,i.set(o,t));const n=this.calculateState(e,this.nodes);this.nodes[e].isSelected=t,this.nodes[e].isIndeterminate=n.isIndeterminate,i.set(e,t);for(const t of this.getParents(e)){const e=this.calculateState(t,this.nodes);this.nodes[t].isSelected=e.isSelected,this.nodes[t].isIndeterminate=e.isIndeterminate,i.set(t,e.isSelected)}}else this.nodes[e].isSelected=t,this.nodes[e].isIndeterminate=!1,i.set(e,t);for(const[n,o]of i.entries())this.updateVnodeState(n),"leaf"===this.selectionType&&this.isParent(n)||(!0===o?this.selectedCache.add(n):this.selectedCache.delete(n))},updateOpen(e,t){if(!this.nodes.hasOwnProperty(e))return;const s=this.nodes[e],i=(0,te.vO)(s.item,this.itemChildren);i&&!i.length&&s.vnode&&!s.vnode.hasLoaded?s.vnode.checkChildren().then((()=>this.updateOpen(e,t))):i&&i.length&&(s.isOpen=t,s.isOpen?this.openCache.add(e):this.openCache.delete(e),this.updateVnodeState(e))},updateVnodeState(e){const t=this.nodes[e];t&&t.vnode&&(t.vnode.isSelected=t.isSelected,t.vnode.isIndeterminate=t.isIndeterminate,t.vnode.isActive=t.isActive,t.vnode.isOpen=t.isOpen)},isExcluded(e){return!!this.search&&this.excludedItems.has(e)}},render(e){const t=this.items.length?this.items.filter((e=>!this.isExcluded((0,te.vO)(e,this.itemKey)))).map((e=>{const t=oe.options.methods.genChild.bind(this);return t(e,this.disabled||(0,te.vO)(e,this.itemDisabled))})):this.$slots.default;return e("div",{staticClass:"v-treeview",class:{"v-treeview--hoverable":this.hoverable,"v-treeview--dense":this.dense,...this.themeClasses}},t)}}),he=(0,u.Z)(Y,F,W,!1,null,null,null),pe=he.exports;v()(he,{VAutocomplete:m.Z,VBtn:q.Z,VCol:g.Z,VDatePicker:w.Z,VDivider:P.Z,VForm:x.Z,VMenu:y.Z,VRating:b.Z,VRow:_.Z,VTextField:k.Z,VTextarea:C.Z,VTreeview:de});var ue=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-row",{staticClass:"d-flex justify-content-center"},[s("v-col",{staticClass:"flex-col",attrs:{lg:"4"}},[s("v-row",{staticClass:"flex-grow-0 "},[s("v-col",{staticClass:"flex-col mt-4 text-center"},[s("strong",[e._v("Дата отчета о статусе проекта")])])],1),s("v-divider",{staticClass:"my-5"}),s("v-row",[s("v-col",{staticClass:" flex-col align-self-center"},[s("v-date-picker",{staticClass:"chekpoin",attrs:{multiple:"","no-title":"",min:e.newproject.datestart,max:e.newproject.dateend,"first-day-of-week":"1",scrollable:"","show-adjacent-months":""},model:{value:e.newproject.project_checkpoint,callback:function(t){e.$set(e.newproject,"project_checkpoint",t)},expression:"newproject.project_checkpoint"}})],1)],1),s("v-divider",{staticClass:"mt-5"}),s("v-row",{staticClass:"flex-grow-0"},[s("v-col",{staticClass:" flex-col pa-0"},[s("v-radio-group",{staticClass:"flex-col",attrs:{row:""},model:{value:e.frequency,callback:function(t){e.frequency=t},expression:"frequency"}},[s("v-row",{staticClass:" inyand"},e._l(e.frequencyf,(function(e){return s("v-col",{key:e.v,staticClass:"caption text-nowrap pa-0",attrs:{cols:"6"}},[s("v-row",{staticClass:"pa-2 align-items-center inyand"},[s("v-col",{staticClass:"flex-grow-0 "},[s("v-radio",{staticClass:"radios",attrs:{color:"btns",label:e.name,value:e.v}})],1)],1)],1)})),1)],1)],1)],1),s("v-row",e._l(e.weekdays,(function(t,i){return s("v-col",{key:i,staticClass:"flex-col pa-0"},[s("v-chip",{staticClass:"ma-2 justify-content-center inyand--text",attrs:{outlined:"",color:"btns"},on:{click:function(t){return e.month(i+1)}}},[e._v(" "+e._s(t)+" ")])],1)})),1)],1)],1)},fe=[],ve={name:"step-five",props:{newproject:{type:Object,default:()=>{}}},data:()=>({frequency:1,selectUpdate:[],weekdays:["пн","вт","ср","чт","пт"],frequencyf:[{name:"Еженедельно",v:1},{name:"Раз в две недели",v:2},{name:"Раз в три недели",v:3},{name:"Ежемесячно",v:4}]}),methods:{month(e){let t=new Date(this.newproject.datestart),s=new Date(this.newproject.dateend);if(this.selectUpdate.includes(e))this.newproject.project_checkpoint=this.newproject.project_checkpoint.filter((t=>new Date(t).getDay()!=e)),this.selectUpdate=this.selectUpdate.filter((t=>t!=e));else{let i=new Set(this.newproject.project_checkpoint);for(let s=0;s<7;s++){if(t.getDay()==e){i.add(l()(t).locale("Ru").format("YYYY-MM-DD")),this.selectUpdate.push(e);break}t.setDate(t.getDate()+1)}while(t<=s)i.add(l()(t).locale("Ru").format("YYYY-MM-DD")),t.setDate(t.getDate()+7*this.frequency);this.newproject.project_checkpoint=Array.from(i)}}}},me=ve,ge=s(44127),we=s(4738),xe=s(42240),ye=s(40573),be=s(32500),_e=s(13037),ke=s(7550),Ce=s(29022),je=s(51767);const $e=(0,ee.Z)(be.Z,Q.Z,ke.Z,(0,_e.d)("radioGroup"),re.Z);var Se=$e.extend().extend({name:"v-radio",inheritAttrs:!1,props:{disabled:Boolean,id:String,label:String,name:String,offIcon:{type:String,default:"$radioOff"},onIcon:{type:String,default:"$radioOn"},readonly:Boolean,value:{default:null}},data:()=>({isFocused:!1}),computed:{classes(){return{"v-radio--is-disabled":this.isDisabled,"v-radio--is-focused":this.isFocused,...this.themeClasses,...this.groupClasses}},computedColor(){if(!this.isDisabled)return Ce.Z.options.computed.computedColor.call(this)},computedIcon(){return this.isActive?this.onIcon:this.offIcon},computedId(){return ye.Z.options.computed.computedId.call(this)},hasLabel:ye.Z.options.computed.hasLabel,hasState(){return(this.radioGroup||{}).hasState},isDisabled(){return this.disabled||!!this.radioGroup&&this.radioGroup.isDisabled},isReadonly(){return this.readonly||!!this.radioGroup&&this.radioGroup.isReadonly},computedName(){return this.name||!this.radioGroup?this.name:this.radioGroup.name||`radio-${this.radioGroup._uid}`},rippleState(){return Ce.Z.options.computed.rippleState.call(this)},validationState(){return(this.radioGroup||{}).validationState||this.computedColor}},methods:{genInput(e){return Ce.Z.options.methods.genInput.call(this,"radio",e)},genLabel(){return this.hasLabel?this.$createElement(we.Z,{on:{click:Ce.X},attrs:{for:this.computedId},props:{color:this.validationState,focused:this.hasState}},(0,te.z9)(this,"label")||this.label):null},genRadio(){const{title:e,...t}=this.attrs$;return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.$createElement(xe.Z,this.setTextColor(this.validationState,{props:{dense:this.radioGroup&&this.radioGroup.dense}}),this.computedIcon),this.genInput({name:this.computedName,value:this.value,...t}),this.genRipple(this.setTextColor(this.rippleState))])},onFocus(e){this.isFocused=!0,this.$emit("focus",e)},onBlur(e){this.isFocused=!1,this.$emit("blur",e)},onChange(){this.isDisabled||this.isReadonly||this.isActive||this.toggle()},onKeydown:()=>{}},render(e){const t={staticClass:"v-radio",class:this.classes,on:(0,je.bp)({click:this.onChange},this.listeners$),attrs:{title:this.attrs$.title}};return e("div",t,[this.genRadio(),this.genLabel()])}}),Ze=(s(47393),s(13385));const Oe=(0,ee.Z)(Ze.y,ye.Z);var Ie=Oe.extend({name:"v-radio-group",provide(){return{radioGroup:this}},props:{column:{type:Boolean,default:!0},height:{type:[Number,String],default:"auto"},name:String,row:Boolean,value:null},computed:{classes(){return{...ye.Z.options.computed.classes.call(this),"v-input--selection-controls v-input--radio-group":!0,"v-input--radio-group--column":this.column&&!this.row,"v-input--radio-group--row":this.row}}},methods:{genDefaultSlot(){return this.$createElement("div",{staticClass:"v-input--radio-group__input",attrs:{id:this.id,role:"radiogroup","aria-labelledby":this.computedId}},ye.Z.options.methods.genDefaultSlot.call(this))},genInputSlot(){const e=ye.Z.options.methods.genInputSlot.call(this);return delete e.data.on.click,e},genLabel(){const e=ye.Z.options.methods.genLabel.call(this);return e?(e.data.attrs.id=this.computedId,delete e.data.attrs.for,e.tag="legend",e):null},onClick:Ze.y.options.methods.onClick},render(e){const t=ye.Z.options.render.call(this,e);return this._b(t.data,"div",this.attrs$),t}}),Ve=(0,u.Z)(me,ue,fe,!1,null,null,null),Ae=Ve.exports;v()(Ve,{VChip:ge.Z,VCol:g.Z,VDatePicker:w.Z,VDivider:P.Z,VRadio:Se,VRadioGroup:Ie,VRow:_.Z});const Pe=(0,K._p)("projectstate");var Be={name:"project_stepper_pattern",components:{stepOne:$,stepTwo:T,stepThree:N,stepFour:pe,stepFive:Ae},props:{name:{type:String,default:"Новый проект"}},data:()=>({e1:1,projstep:["Основные положения","Персоны","Идея проекта","Задачи/работы","Отчетные даты"],newproject:{longname:"",name:"",difficult:0,datestart:void 0,dateend:void 0,ptype:{id:2},project_checkpoint:[],info:{financial_support:"",project_sphere:"",passport_last_date:"",influence:"",grounds:"",target:[],result:[],criteria:[],risks:[],interactions:[],dop_info:""},users:[],tasks:[]}}),methods:{nextstep(){this.e1<this.projstep.length&&this.$refs.childform[0].$refs.form.validate()?this.e1++:this.e1==this.projstep.length&&this.create_or_update()},validstep(e){this.$refs.childform[0].$refs.form.validate()&&(this.e1=e)},setpercent(e){console.log(e,"VAAAAAAAA"),this.newproject.users.find((t=>t.role.id==e.id)).percent=e.percent},showuserinfo(e){this.$emit("showuserinfo",e)},create_or_update(){console.log(this.newproject,"ddddddddddddddddddd");let e=this.newproject.deletion;this.newproject.users=this.getProject.users,delete this.newproject.history,delete this.newproject.project_files,delete this.newproject.deletion,delete this.newproject.datachat,console.log(this.newproject,"ddddddddddddddddddd"),this.$emit("newproject",{project:this.newproject,delete:e})}},mounted(){this.newproject=JSON.parse(JSON.stringify(this.getProject)),console.log("----------this.newproject.tasks 22------",this.newproject),this.newproject.tasks.length<1?this.newproject.tasks=[]:(this.newproject.tasks.forEach((e=>{e.fakeid=`t-${e.id}`,e.task_work.forEach((e=>e.fakeid=`w-${e.id}`))})),console.log(this.newproject.tasks,"fake"))},computed:{...Pe.mapGetters(["getProject","getprojectuniqueusers","getprojectuniquePersons"])}},Te=Be,Ee=s(34145),De=s(83434),ze=s(3457);const Me=(0,ee.Z)(De.Z,(0,J.J)("stepper"),ze.Z);var Re=Me.extend({name:"v-stepper",provide(){return{stepClick:this.stepClick,isVertical:this.vertical}},props:{altLabels:Boolean,nonLinear:Boolean,flat:Boolean,vertical:Boolean},data(){const e={isBooted:!1,steps:[],content:[],isReverse:!1};return e.internalLazyValue=null!=this.value?this.value:(e[0]||{}).step||1,e},computed:{classes(){return{"v-stepper--flat":this.flat,"v-stepper--is-booted":this.isBooted,"v-stepper--vertical":this.vertical,"v-stepper--alt-labels":this.altLabels,"v-stepper--non-linear":this.nonLinear,...De.Z.options.computed.classes.call(this)}},styles(){return{...De.Z.options.computed.styles.call(this)}}},watch:{internalValue(e,t){this.isReverse=Number(e)<Number(t),t&&(this.isBooted=!0),this.updateView()}},created(){this.$listeners.input&&(0,ae.fK)("@input","@change",this)},mounted(){this.updateView()},methods:{register(e){"v-stepper-step"===e.$options.name?this.steps.push(e):"v-stepper-content"===e.$options.name&&(e.isVertical=this.vertical,this.content.push(e))},unregister(e){"v-stepper-step"===e.$options.name?this.steps=this.steps.filter((t=>t!==e)):"v-stepper-content"===e.$options.name&&(e.isVertical=this.vertical,this.content=this.content.filter((t=>t!==e)))},stepClick(e){this.$nextTick((()=>this.internalValue=e))},updateView(){for(let e=this.steps.length;--e>=0;)this.steps[e].toggle(this.internalValue);for(let e=this.content.length;--e>=0;)this.content[e].toggle(this.internalValue,this.isReverse)}},render(e){return e(this.tag,{staticClass:"v-stepper",class:this.classes,style:this.styles},this.$slots.default)}});const Le=(0,ee.Z)((0,J.f)("stepper","v-stepper-content","v-stepper"));var Ne=Le.extend().extend({name:"v-stepper-content",inject:{isVerticalProvided:{from:"isVertical"}},props:{step:{type:[Number,String],required:!0}},data(){return{height:0,isActive:null,isReverse:!1,isVertical:this.isVerticalProvided}},computed:{computedTransition(){const e=this.$vuetify.rtl?!this.isReverse:this.isReverse;return e?H.YV:H.n6},styles(){return this.isVertical?{height:(0,te.kb)(this.height)}:{}}},watch:{isActive(e,t){e&&null==t?this.height="auto":this.isVertical&&(this.isActive?this.enter():this.leave())}},mounted(){this.$refs.wrapper.addEventListener("transitionend",this.onTransition,!1),this.stepper&&this.stepper.register(this)},beforeDestroy(){this.$refs.wrapper.removeEventListener("transitionend",this.onTransition,!1),this.stepper&&this.stepper.unregister(this)},methods:{onTransition(e){this.isActive&&"height"===e.propertyName&&(this.height="auto")},enter(){let e=0;requestAnimationFrame((()=>{e=this.$refs.wrapper.scrollHeight})),this.height=0,setTimeout((()=>this.isActive&&(this.height=e||"auto")),450)},leave(){this.height=this.$refs.wrapper.clientHeight,setTimeout((()=>this.height=0),10)},toggle(e,t){this.isActive=e.toString()===this.step.toString(),this.isReverse=t}},render(e){const t={staticClass:"v-stepper__content"},s={staticClass:"v-stepper__wrapper",style:this.styles,ref:"wrapper"};this.isVertical||(t.directives=[{name:"show",value:this.isActive}]);const i=e("div",s,[this.$slots.default]),n=e("div",t,[i]);return e(this.computedTransition,{on:this.$listeners},[n])}}),Fe=s(37069);const We=(0,ee.Z)(Q.Z,(0,J.f)("stepper","v-stepper-step","v-stepper"));var Ke=We.extend().extend({name:"v-stepper-step",directives:{ripple:Fe.Z},inject:["stepClick"],props:{color:{type:String,default:"primary"},complete:Boolean,completeIcon:{type:String,default:"$complete"},editable:Boolean,editIcon:{type:String,default:"$edit"},errorIcon:{type:String,default:"$error"},rules:{type:Array,default:()=>[]},step:[Number,String]},data(){return{isActive:!1,isInactive:!0}},computed:{classes(){return{"v-stepper__step--active":this.isActive,"v-stepper__step--editable":this.editable,"v-stepper__step--inactive":this.isInactive,"v-stepper__step--error error--text":this.hasError,"v-stepper__step--complete":this.complete}},hasError(){return this.rules.some((e=>!0!==e()))}},mounted(){this.stepper&&this.stepper.register(this)},beforeDestroy(){this.stepper&&this.stepper.unregister(this)},methods:{click(e){e.stopPropagation(),this.$emit("click",e),this.editable&&this.stepClick(this.step)},genIcon(e){return this.$createElement(xe.Z,e)},genLabel(){return this.$createElement("div",{staticClass:"v-stepper__label"},this.$slots.default)},genStep(){const e=!(this.hasError||!this.complete&&!this.isActive)&&this.color;return this.$createElement("span",this.setBackgroundColor(e,{staticClass:"v-stepper__step__step"}),this.genStepContent())},genStepContent(){const e=[];return this.hasError?e.push(this.genIcon(this.errorIcon)):this.complete?this.editable?e.push(this.genIcon(this.editIcon)):e.push(this.genIcon(this.completeIcon)):e.push(String(this.step)),e},keyboardClick(e){e.keyCode===te.Do.space&&this.click(e)},toggle(e){this.isActive=e.toString()===this.step.toString(),this.isInactive=Number(e)<Number(this.step)}},render(e){return e("div",{attrs:{tabindex:this.editable?0:-1},staticClass:"v-stepper__step",class:this.classes,directives:[{name:"ripple",value:this.editable}],on:{click:this.click,keydown:this.keyboardClick}},[this.genStep(),this.genLabel()])}});(0,te.Ji)("v-stepper__header");const Ue=(0,te.Ji)("v-stepper__items");var Ge=(0,u.Z)(Te,i,n,!1,null,null,null),Ye=Ge.exports;v()(Ge,{VCard:Ee.Z,VCol:g.Z,VDivider:P.Z,VRow:_.Z,VStepper:Re,VStepperContent:Ne,VStepperItems:Ue,VStepperStep:Ke})},17550:function(e,t,s){s.d(t,{Z:function(){return _}});var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-expansion-panels",{staticClass:"exp_panels",attrs:{multiple:"",flat:"",focusable:"",accordion:""},model:{value:e.panel,callback:function(t){e.panel=t},expression:"panel"}},e._l(e.addremrow,(function(t,i){return s("v-expansion-panel",{key:i,staticClass:"align-self-start bord_bot "},[s("v-expansion-panel-header",{staticClass:"pl-0",attrs:{color:"exppanel"},scopedSlots:e._u([e.completion?{key:"default",fn:function(i){var n=i.open;return[s("v-row",{staticClass:"align-center",attrs:{"no-gutters":""}},[s("v-col",{staticClass:"flex-grow-0 pr-2"},[s("v-fade-transition",{attrs:{"leave-absolute":""}},[s("v-icon",n?{attrs:{color:"open_icons",small:""},on:{click:function(s){return s.stopPropagation(),e.$emit("addRows",t.field)}}}:{attrs:{color:"open_icons",small:""},on:{click:function(s){return e.$emit("addRows",t.field)}}},[e._v(" mdi-plus ")])],1)],1),s("v-col",{staticClass:"font-weight-medium"},[e._v(" "+e._s(t.text)+" ")])],1)]}}:{key:"default",fn:function(i){return s("span",[s("span",{staticClass:" font-weight-medium"},[e._v(" "+e._s(t.text)+" ")])])}}],null,!0)}),s("v-expansion-panel-content",{class:e.completion?"":"expsplo"},e._l(e.newproject.info[t.field],(function(i,n){return s("v-row",{key:n,staticClass:"ma-0 flex-grow-0",class:n>0?"mb-1":""},[s("v-col",{staticClass:"pa-0"},[s("v-textarea",{attrs:{"auto-grow":"",rows:"0",dense:"",flat:"",solo:!e.completion,readonly:!e.completion,"hide-details":""},model:{value:e.newproject.info[t.field][n],callback:function(s){e.$set(e.newproject.info[t.field],n,s)},expression:"newproject.info[x.field][key]"}}),!e.completion&&e.newproject.info[t.field].length>0?s("v-divider",{class:n>=1?"my-3":"mb-3"}):e._e()],1),e.completion?s("v-col",{staticClass:"pa-0 flex-grow-0 align-self-end"},[s("MyIco",{attrs:{icons:"mdi-delete",color:"btns",size:"small"},on:{click:function(s){return e.$emit("remove",{field:t.field,key:n})}}})],1):e._e()],1)})),1)],1)})),1)},n=[],o=s(12655),r={components:{rowsAddremove:o.Z},name:"expPanel",props:{completion:{type:Boolean,default:!1},newproject:{type:Object,default:()=>{}},addremrow:{type:Array,default:[]}},data(){return{panel:[],items:5}}},a=r,l=s(43736),c=s(43453),d=s.n(c),h=s(60266),p=s(99223),u=s(80255),f=s(22348),v=s(20400),m=s(31214),g=s(77394),w=s(4324),x=s(11713),y=s(92648),b=(0,l.Z)(a,i,n,!1,null,null,null),_=b.exports;d()(b,{VCol:h.Z,VDivider:p.Z,VExpansionPanel:u.Z,VExpansionPanelContent:f.Z,VExpansionPanelHeader:v.Z,VExpansionPanels:m.Z,VFadeTransition:g.Z5,VIcon:w.Z,VRow:x.Z,VTextarea:y.Z})},71240:function(e,t,s){s.d(t,{Z:function(){return x}});var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("v-row",{staticClass:"flex-grow-0 pb-1",class:5==e.roles?" mt-0":" mt-3"},[s("v-col",{staticClass:"align-self-center py-1",attrs:{xl:"4",lg:"4",md:"6",sm:"6,",cols:"6"}},[s("strong",[e._v(" "+e._s(e.nameroles)+" ")])]),e.exhibitor(e.roles).length>0?s("v-col",{staticClass:"pb-1 pt-0 text-nowrap flex-grow-1 flex-col"},e._l(e.exhibitor(e.roles),(function(t){return s("v-row",{key:t.id,staticClass:"mt-0"},[s("v-col",{staticClass:"card-text pt-2 pb-1",attrs:{lg:"8"}},[s("span",{staticClass:"pointer",on:{click:function(s){return e.$emit("showuserinfo",t.user.id)}}},[e._v(" "+e._s(e.searchUserFullName(t.user.id,e.allpersons))+" ")])]),s("v-col",{staticClass:"pa-0 pt-2",attrs:{lg:"1"}},[e.show?s("v-text-field",{staticClass:"mt-n1 text-last-center",attrs:{dense:"",type:"number",value:e.getProject.users.find((function(s){return s.role.id==e.roles&&s.user.id==t.user.id})).percent,rules:[e.percentrule.minmax]},on:{input:e.perce,focus:function(s){e.input=t.user.id}}}):s("span",[e._v(" "+e._s(e.getProject.users.find((function(s){return s.role.id==e.roles&&s.user.id==t.user.id})).percent)+"% ")])],1)],1)})),1):s("v-col",{staticClass:"flex-grow-1 text-nowrap"},[e._v(" Не назначены ")]),s("v-col",{staticClass:"text-nowrap py-1 flex-grow-0 flex-row align-self-center justify-content-end"},[e.show?s("SelectUserMenu",{attrs:{mod:e.roles,addtext:0==e.exhibitor(e.roles).length?"Добавить":"Изменить"}}):e._e()],1)],1)],1)},n=[],o=s(24563),r=s(18241),a=s(31451),l=s(20629);const c=(0,l._p)("projectstate");var d={name:"rolesMany",mixins:[o.Z,r.Z],props:{roles:{type:Number,default:6},show:{type:Boolean,default:!1}},data:()=>({input:0,percentrule:{minmax:e=>e>0&&e<=100}}),components:{SelectUserMenu:a.Z},computed:{...c.mapGetters(["getProject"]),nameroles(){return 5==this.roles?1==this.exhibitor(this.roles).length?"Участник:":"Участники:":6==this.roles?1==this.exhibitor(this.roles).length?"Наблюдатель:":"Наблюдатели:":void 0}},methods:{...c.mapMutations(["setProjectUserPercentId"]),perce(e){this.setProjectUserPercentId({id:this.input,percent:e,role:this.roles})}}},h=d,p=s(43736),u=s(43453),f=s.n(u),v=s(60266),m=s(11713),g=s(17808),w=(0,p.Z)(h,i,n,!1,null,null,null),x=w.exports;f()(w,{VCol:v.Z,VRow:m.Z,VTextField:g.Z})},32112:function(e,t,s){s.d(t,{Z:function(){return x}});var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",e._l(e.roleusers,(function(t){return s("row-pirow",{key:t.id,attrs:{title:t.name+":",rightcolUsed:!0},scopedSlots:e._u([{key:"leftcol",fn:function(){return[s("v-row",{staticClass:"flex-grow-1"},[s("v-col",{attrs:{lg:"8"}},[s("span",{staticClass:"pointer",on:{click:function(s){e.searchid(t.id)>0&&e.$emit("showuserinfo",e.searchid(t.id))}}},[e._v(" "+e._s(0==e.searchid(t.id)?"Не назначен":e.respons(t.id))+" ")])]),e.searchid(t.id)>0?s("v-col",{staticClass:"px-0",attrs:{lg:"1"}},[e.show?s("v-text-field",{staticClass:"mt-n1 text-last-center",attrs:{dense:"",type:"number",value:e.getProject.users.find((function(e){return e.role.id==t.id})).percent,rules:[e.percentrule.minmax]},on:{input:e.perce,focus:function(s){e.input=t.id}}}):s("span",[e._v(" "+e._s(e.getProject.users.find((function(e){return e.role.id==t.id})).percent)+"% ")])],1):e._e()],1)]},proxy:!0},{key:"rightcol",fn:function(){return[e.show?s("SelectUserMenu",{attrs:{mod:t.id,addtext:0==e.respons(t.id)?"Добавить":"Изменить"}}):e._e()]},proxy:!0}],null,!0)})})),1)},n=[],o=s(67761),r=s(24563),a=s(31451),l=s(20629);const c=(0,l._p)("projectstate");var d={name:"rolesSingle",mixins:[r.Z],props:{show:{type:Boolean,default:!1}},data:()=>({input:0,percentrule:{minmax:e=>e>0&&e<=100}}),components:{rowPirow:o.Z,SelectUserMenu:a.Z},computed:{...c.mapGetters(["getProject"]),roleusers(){let e=this.$store.getters["filterslogic/mult/mult_role"],t=e.filter((e=>e.id<5));return console.log(e,"without---------------"),t}},methods:{...c.mapMutations(["setProjectUserPercent"]),perce(e){this.setProjectUserPercent({id:this.input,percent:e})}}},h=d,p=s(43736),u=s(43453),f=s.n(u),v=s(60266),m=s(11713),g=s(17808),w=(0,p.Z)(h,i,n,!1,null,null,null),x=w.exports;f()(w,{VCol:v.Z,VRow:m.Z,VTextField:g.Z})},12655:function(e,t,s){s.d(t,{Z:function(){return v}});var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("v-row",{staticClass:"flex-grow-0 pt-2 pb-1 mt-0"},[e.textOn?s("v-col",{staticClass:"py-1",attrs:{xl:"4",lg:"4",md:"6",sm:"6",cols:"6"}},[s("strong",[e._v(" "+e._s(e.addrem.text)+" ")]),s("v-icon",{staticClass:"wicon",attrs:{color:"open_icons",small:""},on:{click:function(t){return e.$emit("addRows",e.addrem.field)}}},[e._v(" mdi-plus ")])],1):e._e(),s("v-col",{staticClass:"flex-col pa-0 d-flex"},e._l(e.newproject.info[e.addrem.field],(function(t,i){return s("v-row",{key:i,staticClass:"ma-0"},[s("v-col",{staticClass:"py-1"},[s("v-textarea",{staticClass:"mt-0 pt-0 pb-2",attrs:{"auto-grow":"",rows:"0",dense:"",flat:"","hide-details":""},model:{value:e.newproject.info[e.addrem.field][i],callback:function(t){e.$set(e.newproject.info[e.addrem.field],i,t)},expression:"newproject.info[addrem.field][key]"}})],1),s("v-col",{staticClass:"py-1 px-1 pt-2 flex-grow-0 align-self-center"},[s("MyIco",{attrs:{icons:"mdi-minus",color:"close_icons",size:"small"},on:{click:function(t){return e.$emit("remove",{field:e.addrem.field,key:i})}}})],1)],1)})),1)],1)},n=[],o={name:"rowsAddremove",props:{newproject:{type:Object,default:()=>{}},addrem:{type:Object,default:()=>({field:"",text:"Пусто"})},textOn:{type:Boolean,default:!0}}},r=o,a=s(43736),l=s(43453),c=s.n(l),d=s(60266),h=s(4324),p=s(11713),u=s(92648),f=(0,a.Z)(r,i,n,!1,null,null,null),v=f.exports;c()(f,{VCol:d.Z,VIcon:h.Z,VRow:p.Z,VTextarea:u.Z})}}]);
//# sourceMappingURL=689.9ac47325.js.map