Files
ISUP/front/dist/js/213.585dad27.js
2023-09-22 13:05:37 +03:00

2 lines
23 KiB
JavaScript

"use strict";(self["webpackChunkfront"]=self["webpackChunkfront"]||[]).push([[213],{47393:function(){},73905:function(t,e,i){i.d(e,{Z:function(){return h}});var s=i(42240),n=i(16878),r=i(53016),o=i(74338),a=i(7550),l=i(96669),c=i(75352),u=i(67678),h=(0,u.Z)(n.Z,r.Z,a.Z,o.Z,l.Z).extend({name:"v-rating",props:{backgroundColor:{type:String,default:"accent"},color:{type:String,default:"primary"},clearable:Boolean,dense:Boolean,emptyIcon:{type:String,default:"$ratingEmpty"},fullIcon:{type:String,default:"$ratingFull"},halfIcon:{type:String,default:"$ratingHalf"},halfIncrements:Boolean,hover:Boolean,length:{type:[Number,String],default:5},readonly:Boolean,size:[Number,String],value:{type:Number,default:0},iconLabel:{type:String,default:"$vuetify.rating.ariaLabel.icon"}},data(){return{hoverIndex:-1,internalValue:this.value}},computed:{directives(){return this.readonly||!this.ripple?[]:[{name:"ripple",value:{circle:!0}}]},iconProps(){const{dark:t,large:e,light:i,medium:s,small:n,size:r,xLarge:o,xSmall:a}=this.$props;return{dark:t,large:e,light:i,medium:s,size:r,small:n,xLarge:o,xSmall:a}},isHovering(){return this.hover&&this.hoverIndex>=0}},watch:{internalValue(t){t!==this.value&&this.$emit("input",t)},value(t){this.internalValue=t}},methods:{createClickFn(t){return e=>{if(this.readonly)return;const i=this.genHoverIndex(e,t);this.clearable&&this.internalValue===i?this.internalValue=0:this.internalValue=i}},createProps(t){const e={index:t,value:this.internalValue,click:this.createClickFn(t),isFilled:Math.floor(this.internalValue)>t,isHovered:Math.floor(this.hoverIndex)>t};return this.halfIncrements&&(e.isHalfHovered=!e.isHovered&&(this.hoverIndex-t)%1>0,e.isHalfFilled=!e.isFilled&&(this.internalValue-t)%1>0),e},genHoverIndex(t,e){let i=this.isHalfEvent(t);return this.halfIncrements&&this.$vuetify.rtl&&(i=!i),e+(i?.5:1)},getIconName(t){const e=this.isHovering?t.isHovered:t.isFilled,i=this.isHovering?t.isHalfHovered:t.isHalfFilled;return e?this.fullIcon:i?this.halfIcon:this.emptyIcon},getColor(t){if(this.isHovering){if(t.isHovered||t.isHalfHovered)return this.color}else if(t.isFilled||t.isHalfFilled)return this.color;return this.backgroundColor},isHalfEvent(t){if(this.halfIncrements){const e=t.target&&t.target.getBoundingClientRect();if(e&&t.pageX-e.left<e.width/2)return!0}return!1},onMouseEnter(t,e){this.runDelay("open",(()=>{this.hoverIndex=this.genHoverIndex(t,e)}))},onMouseLeave(){this.runDelay("close",(()=>this.hoverIndex=-1))},genItem(t){const e=this.createProps(t);if(this.$scopedSlots.item)return this.$scopedSlots.item(e);const i={click:e.click};return this.hover&&(i.mouseenter=e=>this.onMouseEnter(e,t),i.mouseleave=this.onMouseLeave,this.halfIncrements&&(i.mousemove=e=>this.onMouseEnter(e,t))),this.$createElement(s.Z,this.setTextColor(this.getColor(e),{attrs:{"aria-label":this.$vuetify.lang.t(this.iconLabel,t+1,Number(this.length))},directives:this.directives,props:this.iconProps,on:i}),[this.getIconName(e)])}},render(t){const e=(0,c.MT)(Number(this.length)).map((t=>this.genItem(t)));return t("div",{staticClass:"v-rating",class:{"v-rating--readonly":this.readonly,"v-rating--dense":this.dense}},e)}})},62165:function(t,e,i){i.d(e,{Z:function(){return u}});var s=i(38223),n=i(13037),r=i(4802),o=i(75352),a=i(67678);const l=(0,a.Z)(s.Z,(0,n.d)("windowGroup","v-window-item","v-window"));var c=l.extend().extend().extend({name:"v-window-item",directives:{Touch:r.Z},props:{disabled:Boolean,reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},value:{required:!1}},data(){return{isActive:!1,inTransition:!1}},computed:{classes(){return this.groupClasses},computedTransition(){return this.windowGroup.internalReverse?"undefined"!==typeof this.reverseTransition?this.reverseTransition||"":this.windowGroup.computedTransition:"undefined"!==typeof this.transition?this.transition||"":this.windowGroup.computedTransition}},methods:{genDefaultSlot(){return this.$slots.default},genWindowItem(){return this.$createElement("div",{staticClass:"v-window-item",class:this.classes,directives:[{name:"show",value:this.isActive}],on:this.$listeners},this.genDefaultSlot())},onAfterTransition(){this.inTransition&&(this.inTransition=!1,this.windowGroup.transitionCount>0&&(this.windowGroup.transitionCount--,0===this.windowGroup.transitionCount&&(this.windowGroup.transitionHeight=void 0)))},onBeforeTransition(){this.inTransition||(this.inTransition=!0,0===this.windowGroup.transitionCount&&(this.windowGroup.transitionHeight=(0,o.kb)(this.windowGroup.$el.clientHeight)),this.windowGroup.transitionCount++)},onTransitionCancelled(){this.onAfterTransition()},onEnter(t){this.inTransition&&this.$nextTick((()=>{this.computedTransition&&this.inTransition&&(this.windowGroup.transitionHeight=(0,o.kb)(t.clientHeight))}))}},render(t){return t("transition",{props:{name:this.computedTransition},on:{beforeEnter:this.onBeforeTransition,afterEnter:this.onAfterTransition,enterCancelled:this.onTransitionCancelled,beforeLeave:this.onBeforeTransition,afterLeave:this.onAfterTransition,leaveCancelled:this.onTransitionCancelled,enter:this.onEnter}},this.showLazyContent((()=>[this.genWindowItem()])))}}),u=c.extend({name:"v-tab-item",props:{id:String},methods:{genWindowItem(){const t=c.options.methods.genWindowItem.call(this);return t.data.domProps=t.data.domProps||{},t.data.domProps.id=this.id||this.value,t}}})},45085:function(t,e,i){i.d(e,{Z:function(){return l}});var s=i(4802),n=i(76656),r=i(42240),o=i(13385),a=o.y.extend({name:"v-window",directives:{Touch:s.Z},provide(){return{windowGroup:this}},props:{activeClass:{type:String,default:"v-window-item--active"},continuous:Boolean,mandatory:{type:Boolean,default:!0},nextIcon:{type:[Boolean,String],default:"$next"},prevIcon:{type:[Boolean,String],default:"$prev"},reverse:Boolean,showArrows:Boolean,showArrowsOnHover:Boolean,touch:Object,touchless:Boolean,value:{required:!1},vertical:Boolean},data(){return{changedByDelimiters:!1,internalHeight:void 0,transitionHeight:void 0,transitionCount:0,isBooted:!1,isReverse:!1}},computed:{isActive(){return this.transitionCount>0},classes(){return{...o.y.options.computed.classes.call(this),"v-window--show-arrows-on-hover":this.showArrowsOnHover}},computedTransition(){if(!this.isBooted)return"";const t=this.vertical?"y":"x",e=this.internalReverse?!this.isReverse:this.isReverse,i=e?"-reverse":"";return`v-window-${t}${i}-transition`},hasActiveItems(){return Boolean(this.items.find((t=>!t.disabled)))},hasNext(){return this.continuous||this.internalIndex<this.items.length-1},hasPrev(){return this.continuous||this.internalIndex>0},internalIndex(){return this.items.findIndex(((t,e)=>this.internalValue===this.getValue(t,e)))},internalReverse(){return this.$vuetify.rtl?!this.reverse:this.reverse}},watch:{internalIndex(t,e){this.isReverse=this.updateReverse(t,e)}},mounted(){window.requestAnimationFrame((()=>this.isBooted=!0))},methods:{genDefaultSlot(){return this.$slots.default},genContainer(){const t=[this.genDefaultSlot()];return this.showArrows&&t.push(this.genControlIcons()),this.$createElement("div",{staticClass:"v-window__container",class:{"v-window__container--is-active":this.isActive},style:{height:this.internalHeight||this.transitionHeight}},t)},genIcon(t,e,i){var s,o,a;const l={click:t=>{t.stopPropagation(),this.changedByDelimiters=!0,i()}},c={"aria-label":this.$vuetify.lang.t(`$vuetify.carousel.${t}`)},u=null!==(a=null===(o=(s=this.$scopedSlots)[t])||void 0===o?void 0:o.call(s,{on:l,attrs:c}))&&void 0!==a?a:[this.$createElement(n.Z,{props:{icon:!0},attrs:c,on:l},[this.$createElement(r.Z,{props:{large:!0}},e)])];return this.$createElement("div",{staticClass:`v-window__${t}`},u)},genControlIcons(){const t=[],e=this.$vuetify.rtl?this.nextIcon:this.prevIcon;if(this.hasPrev&&e&&"string"===typeof e){const i=this.genIcon("prev",e,this.prev);i&&t.push(i)}const i=this.$vuetify.rtl?this.prevIcon:this.nextIcon;if(this.hasNext&&i&&"string"===typeof i){const e=this.genIcon("next",i,this.next);e&&t.push(e)}return t},getNextIndex(t){const e=(t+1)%this.items.length,i=this.items[e];return i.disabled?this.getNextIndex(e):e},getPrevIndex(t){const e=(t+this.items.length-1)%this.items.length,i=this.items[e];return i.disabled?this.getPrevIndex(e):e},next(){if(!this.hasActiveItems||!this.hasNext)return;const t=this.getNextIndex(this.internalIndex),e=this.items[t];this.internalValue=this.getValue(e,t)},prev(){if(!this.hasActiveItems||!this.hasPrev)return;const t=this.getPrevIndex(this.internalIndex),e=this.items[t];this.internalValue=this.getValue(e,t)},updateReverse(t,e){const i=this.items.length,s=i-1;return i<=2?t<e:t===s&&0===e||(0!==t||e!==s)&&t<e}},render(t){const e={staticClass:"v-window",class:this.classes,directives:[]};if(!this.touchless){const t=this.touch||{left:()=>{this.$vuetify.rtl?this.prev():this.next()},right:()=>{this.$vuetify.rtl?this.next():this.prev()},end:t=>{t.stopPropagation()},start:t=>{t.stopPropagation()}};e.directives.push({name:"touch",value:t})}return t("div",e,[this.genContainer()])}}),l=a.extend({name:"v-tabs-items",props:{mandatory:{type:Boolean,default:!1}},computed:{classes(){return{...a.options.computed.classes.call(this),"v-tabs-items":!0}},isDark(){return this.rootIsDark}},methods:{getValue(t,e){return t.id||o.y.options.methods.getValue.call(this,t,e)}}})},7550:function(t,e,i){var s=i(37069),n=i(20144);e["Z"]=n["default"].extend({name:"rippleable",directives:{ripple:s.Z},props:{ripple:{type:[Boolean,Object],default:!0}},methods:{genRipple(t={}){return this.ripple?(t.staticClass="v-input--selection-controls__ripple",t.directives=t.directives||[],t.directives.push({name:"ripple",value:{center:!0}}),this.$createElement("div",t)):null}}})},29022:function(t,e,i){i.d(e,{X:function(){return a}});var s=i(40573),n=i(7550),r=i(26174),o=i(67678);function a(t){t.preventDefault()}e["Z"]=(0,o.Z)(s.Z,n.Z,r.Z).extend({name:"selectable",model:{prop:"inputValue",event:"change"},props:{id:String,inputValue:null,falseValue:null,trueValue:null,multiple:{type:Boolean,default:null},label:String},data(){return{hasColor:this.inputValue,lazyValue:this.inputValue}},computed:{computedColor(){if(this.isActive)return this.color?this.color:this.isDark&&!this.appIsDark?"white":"primary"},isMultiple(){return!0===this.multiple||null===this.multiple&&Array.isArray(this.internalValue)},isActive(){const t=this.value,e=this.internalValue;return this.isMultiple?!!Array.isArray(e)&&e.some((e=>this.valueComparator(e,t))):void 0===this.trueValue||void 0===this.falseValue?t?this.valueComparator(t,e):Boolean(e):this.valueComparator(e,this.trueValue)},isDirty(){return this.isActive},rippleState(){return this.isDisabled||this.validationState?this.validationState:void 0}},watch:{inputValue(t){this.lazyValue=t,this.hasColor=t}},methods:{genLabel(){const t=s.Z.options.methods.genLabel.call(this);return t?(t.data.on={click:a},t):t},genInput(t,e){return this.$createElement("input",{attrs:Object.assign({"aria-checked":this.isActive.toString(),disabled:this.isDisabled,id:this.computedId,role:t,type:t},e),domProps:{value:this.value,checked:this.isActive},on:{blur:this.onBlur,change:this.onChange,focus:this.onFocus,keydown:this.onKeydown,click:a},ref:"input"})},onClick(t){this.onChange(),this.$emit("click",t)},onChange(){if(!this.isInteractive)return;const t=this.value;let e=this.internalValue;if(this.isMultiple){Array.isArray(e)||(e=[]);const i=e.length;e=e.filter((e=>!this.valueComparator(e,t))),e.length===i&&e.push(t)}else e=void 0!==this.trueValue&&void 0!==this.falseValue?this.valueComparator(e,this.trueValue)?this.falseValue:this.trueValue:t?this.valueComparator(e,t)?null:t:!e;this.validate(!0,e),this.internalValue=e,this.hasColor=e},onFocus(t){this.isFocused=!0,this.$emit("focus",t)},onBlur(t){this.isFocused=!1,this.$emit("blur",t)},onKeydown(t){}}})},24563:function(t,e,i){var s=i(18241),n=i(20629);const r=(0,n._p)("projectstate");e["Z"]={title:"ui",mixins:[s.Z],computed:{...r.mapGetters(["allpersons"]),checkALL(){return!0}},methods:{searchid(t){try{return this.allpersons.find((e=>e.role.id===t)).user.id}catch{return 0}},respons(t){let e=this.searchid(t);if(e>0){let t=this.searchUserFullName(e,this.allpersons);return t}return 0},exhibitor(t){let e=this.allpersons.filter((e=>e.role.id===t));return e}}}},54634:function(t,e,i){i.d(e,{Z:function(){return p}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-col",{staticClass:"pb-3 pt-1 px-1"},[i("layout-label",{staticClass:"text-nowrap ",attrs:{title:t.title,disabled:t.disabled}},[i("v-text-field",{attrs:{"background-color":"inputcolor","single-line":"",solo:"",dense:"",clearable:"","clear-icon":"mdi-close","hide-details":"true","append-outer-icon":t.appendouter,type:t.type,disabled:t.disabled},on:{input:function(e){return t.$emit("filterreestr")}},model:{value:t.filt,callback:function(e){t.filt=e},expression:"filt"}})],1)],1)},n=[],r={name:"f-input-search",props:{field:{type:[String,Number]},type:{type:String,default:"text"},title:{type:String},appendouter:{type:String,default:""},disabled:{type:Boolean,default:!1}},computed:{filt:{get(){return this.$store.getters[`filterslogic/input/${this.field}`]},set(t){this.$store.dispatch("filterslogic/input/addFilter",{key:this.field,value:t})}}},beforeDestroy(){this.$store.dispatch("filterslogic/input/addFilter",{key:this.field,value:""})}},o=r,a=i(43736),l=i(43453),c=i.n(l),u=i(60266),h=i(17808),d=(0,a.Z)(o,s,n,!1,null,"33e3ee79",null),p=d.exports;c()(d,{VCol:u.Z,VTextField:h.Z})},67761:function(t,e,i){i.d(e,{Z:function(){return p}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-row",{staticClass:"flex-grow-0 mt-0",class:t.rowclass},[i("v-col",{staticClass:"py-1",class:t.myclass,attrs:{xl:t.colls[t.variant].xl,lg:t.colls[t.variant].lg,md:t.colls[t.variant].md,sm:t.colls[t.variant].sm,cols:t.colls[t.variant].cols}},[i("strong",[t._v(" "+t._s(t.title)+" ")])]),i("v-col",{staticClass:"py-1 text-nowrap flex-grow-1 flex-col",class:t.leftcol,on:{click:function(e){return t.$emit(t.stroka)}}},[t._t("leftcol")],2),t.rightcolUsed?i("v-col",{staticClass:"text-nowrap py-1 flex-grow-0 flex-row align-self-center justify-content-end"},[t._t("rightcol")],2):t._e()],1)},n=[],r={name:"row-pirow",data(){return{colls:{36:{xl:4,lg:4,md:6,sm:6,cols:6},0:{xl:0,lg:0,md:0,sm:0,cols:0},12:{xl:12,lg:12,md:12,sm:12,cols:12}}}},props:{rightcolUsed:{type:Boolean,default:!1},title:{type:String,default:""},leftcol:{type:String,default:""},myclass:{type:String,default:""},rowclass:{type:String,default:"pb-1"},variant:{type:Number,default:36},stroka:{type:String,default:""}}},o=r,a=i(43736),l=i(43453),c=i.n(l),u=i(60266),h=i(11713),d=(0,a.Z)(o,s,n,!1,null,null,null),p=d.exports;c()(d,{VCol:u.Z,VRow:h.Z})},13659:function(t,e,i){i.r(e),i.d(e,{default:function(){return N}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-container",{staticClass:"flex-col h-100 w-100 projects",attrs:{fluid:""}},[i("v-row",{staticClass:"flex-grow-0"},[i("v-col",{staticClass:"pa-0"},[i("filters-bar",{staticClass:"pa-1 pb-3",attrs:{header:t.pagetitle},on:{sendData:t.updateData,clear:t.clear},scopedSlots:t._u([{key:"filterslist",fn:function(){return[i("f-input-search",{attrs:{field:"name",title:"Название"}}),i("f-daterange",{attrs:{field:"datestart__gte",title:"Срок начала с:"}}),i("f-daterange",{attrs:{field:"datestart__lte",title:"Срок начала до:"}}),i("f-daterange",{attrs:{field:"dateend__gte",title:"Срок окончания c:"}}),i("f-daterange",{attrs:{field:"dateend__lte",title:"Срок окончания до:"}}),i("f-multi-select",{attrs:{title:"Статус проекта",field:"status",disabled:!1}}),i("f-input-search",{attrs:{field:"user_project__user__sn",title:"Фамилия участника"}}),i("f-multi-select",{attrs:{title:"Роль",field:"user_project__role",disabled:!1}})]},proxy:!0}])})],1)],1),i("v-row",{staticClass:"mt-0 "},[i("v-col",{staticClass:"flex-col pa-1"},[i("v-card",{staticClass:"flex-grow-1"},[i("div",{staticClass:"mt-3 iconInline"},["Проекты"==t.pagetitle?i("BtnsOut",{attrs:{widthi:140,icon:!0,title:"Создать проект",color:"open_icons"},on:{click:t.createproj}}):t._e()],1),i("v-data-table",{staticClass:"grow-table",attrs:{"fixed-header":!0,"disable-pagination":!0,"hide-default-footer":"",headers:t.into_project?t.childHeaders:t.headers,items:t.into_project?t.childList:t.parentList},on:{"dblclick:row":t.clickRow},scopedSlots:t._u([{key:"item.link",fn:function(e){var s=e.item;return[!t.into_project&&s.all>0?i("v-icon",{on:{click:function(e){return e.stopPropagation(),t.toChild(s)}}},[t._v("mdi-chevron-right")]):t.into_project?i("v-icon",{on:{click:function(e){return e.stopPropagation(),t.backParent.apply(null,arguments)}}},[t._v("mdi-chevron-left")]):t._e()]}},{key:"item.user_project",fn:function(e){var i=e.item;return[t._v(" "+t._s(t.find_rp(i.user_project))+" ")]}},t.into_project?{key:"item.id",fn:function(e){var i=e.item;return[t._v(" "+t._s(t.projectid)+"-"+t._s(i.id)+" ")]}}:null,{key:"item.dateend",fn:function(e){var i=e.item;return[t._v(" "+t._s(t.timediff(i.dateend))+" ")]}},{key:"item.lastchanged",fn:function(e){var i=e.item;return[t._v(" "+t._s(t.formatDate(i.lastchanged))+" ")]}},{key:"item.bars",fn:function(e){var s=e.item;return[i("div",{staticClass:"d-flex align-center"},["completed"in s&&s.all>0?[i("v-progress-linear",{staticStyle:{width:"80%"},attrs:{value:s.completed/s.all*100,height:"10","buffer-value":"100"}}),i("div",{staticClass:"ps-2"},[t._v(t._s(s.completed+"/"+s.all))])]:i("div",{staticClass:"mx-auto"},[5==s.status__id?i("v-icon",{staticStyle:{color:"green"}},[t._v("fa-solid fa-square-check")]):t._e()],1),t.superuser?i("v-menu",{attrs:{"offset-x":"",left:""},scopedSlots:t._u([{key:"activator",fn:function(e){var s=e.on,n=e.attrs;return[i("div",t._g(t._b({staticClass:"ms-2 dots-vertical"},"div",n,!1),s),[i("v-icon",[t._v("mdi-dots-vertical")])],1)]}}],null,!0)},[i("v-list",[i("v-list-item",[i("v-list-item-title",[t._v("Удалить")])],1)],1)],1):i("div",{staticStyle:{width:"32px"}}),i("div",{staticClass:"ps-2 dots-vertical",on:{click:function(e){return e.stopPropagation(),t.menu.apply(null,arguments)}}})],2)]}}],null,!0)})],1)],1)],1),i("div",{staticClass:"text-center"},[i("v-dialog",{attrs:{width:"75vw"},model:{value:t.dialog_create_project,callback:function(e){t.dialog_create_project=e},expression:"dialog_create_project"}},[i("project-stepper-pattern",{on:{newproject:t.newproject,showuserinfo:t.showuserinfo,closes:function(e){t.dialog_create_project=!t.dialog_create_project}}})],1),i("infousercard",{attrs:{dialogdetail:t.dialogdetail,person:t.person},on:{dialogdetailoff:function(e){t.dialogdetail=!1}}})],1)],1)},n=[],r=i(30381),o=i.n(r),a=i(20629),l=i(43958),c=i(54634),u=i(45296),h=i(28620),d=i(67761),p=i(32112),v=i(71240),f=i(12655),m=i(81689),g=i(60441),w=i(18241);const{mapMutations:_,mapActions:y}=(0,a._p)("filterslogic"),x=(0,a._p)("globalstore"),k=(0,a._p)("projectstate");var C={components:{FiltersBar:l.Z,FInputSearch:c.Z,rowPirow:d.Z,RolesSingle:p.Z,rolesMany:v.Z,RowsAddremove:f.Z,infousercard:g.Z,ProjectStepperPattern:m.Z},mixins:[h.oE,w.Z],data:()=>({nameproj:"",dialog_create_project:!1,model:"",search:"",ws:null,projectid:null,superuser:!1,childHeaders:[{text:" ",value:"link"},{text:"Код",value:"id"},{text:"Название",value:"name"},{text:"Ответственный",value:"responsible.sn"},{text:"Срок",value:"dateend"},{text:"Статус",value:"status.name"}],headers:[{text:" ",value:"link"},{text:"Код",value:"id"},{text:"Название",value:"name"},{text:"Руководитель",value:"user_project"},{text:"Срок",value:"dateend"},{text:"Статус",value:"status.name"},{text:"Изменено",value:"lastchanged"},{text:"Выполнение",value:"bars"}],into_project:!1,pagetitle:"",menu:!1,childList:[],parentList:[],person:{},dialogdetail:!1}),methods:{...x.mapMutations(["set_assign_id"]),..._(["setFields"]),...y(["clear","getFilters","addFilter","activefilters"]),...x.mapGetters(["getassign_id"]),...k.mapMutations(["setProject","setProjectusers"]),createproj(){console.log("-----------dialog_create_project"),this.dialog_create_project=!0},showuserinfo(t){this.person=this.searchUser(t,this.getProject.users),this.dialogdetail=!0},async newproject(t){let e=await u.be.post("/createproj",t);this.dialog_create_project=!1,this.$router.push(`/project/${e.data.id}`)},timediff(t){return o()(t).isValid()?o()(t).locale("ru").fromNow():"Не установлен"},formatDate(t){return t&&o()(t).isValid()?o()(t).format("DD.MM.YYYY"):""},build(t){this.into_project?this.childList=t.child:t.payload.length>0?(t.payload.forEach((t=>{t["completed"]=t.project_task.filter((t=>5==t.status.id)).length,t["all"]=t.project_task.length})),this.parentList=t.payload):this.parentList=[]},async updateData(){let t=await this.activefilters();for(let e of Object.keys(t))if(["status__in","user_project__role__in"].includes(e)){let i=[];t[e].forEach((t=>{i.push(t.id)})),t[e]=i}this.ws.send({action:"getfilter",payload:t})},find_rp(t){const e=t.find((t=>2==t.role.id));return void 0==e?"Не назначен":e.user.sn},update(){console.log("UPDATE")},titler(t=""){"/projects"==this.$route.path?this.pagetitle=this.into_project?`${t}: Задачи`:"Проекты":"/tasks"==this.$route.path?this.pagetitle=this.into_project?`${t}: Работы`:"Задачи":"/works"==this.$route.path?this.pagetitle=this.into_project?`${t}: Поручения`:"Работы":this.pagetitle="Поручения"},toChild(t){this.projectid=t.id,this.into_project=!0,this.titler(t.name),this.childList=t.project_task},backParent(){this.into_project=!1,this.titler()},clickRow(t,e){let i=this.$route.path,s={"/projects":[{name:"Task",col:"id"},{name:"Project",col:"id"}],"/tasks":[{name:"Work",col:"id"},{name:"Task",col:"id"}],"/works":[{name:"Work",col:"parent"},{name:"Work",col:"id"}],"/assignments":[{name:"Work",col:"parent"},{name:"Work",col:"parent"}]},n=this.into_project?0:1;console.log("новый роут-----",e.item);e.item[s[i][n].col];"/assignments"==i&&1==n||0==n&&"/works"==i?(this.set_assign_id(e.item.id),this.$router.push({path:`/project/${e.item.project}/task/${e.item.task}/work/${e.item.work}`})):1==n&&"/works"==i||0==n&&"/tasks"==i?this.$router.push({path:`/project/${e.item.project}/task/${e.item.task}/work/${e.item.id}`}):1==n&&"/tasks"==i||0==n&&"/projects"==i?this.$router.push({path:`/project/${this.projectid}/task/${e.item.id}`}):this.$router.push({path:`/project/${e.item.id}`})},wsconnect(){this.ws=new this.$pws,this.ws.start(`/reestr${this.$route.path}`),this.ws.addEvent("onmessage",(t=>{const e=JSON.parse(t.data);console.log(e,"dataonmess");try{this[e.action](e)}catch(i){console.log(i)}}))}},watch:{$route(t,e){this.ws.stop(),this.into_project=!1,this.childList=[],this.parentList=[],this.titler(),this.wsconnect()}},mounted(){console.log("this.newproject",this.newproject),this.superuser=this.$store.getters["auth/getSuperUser"],this.setFields({project__status:{module:"mult"},project__type:{module:"mult"},role:{module:"mult"}}),this.getFilters([{role:{name:"role",sort:"id"}},{project__type:{sort:"id",filters:{},exclude:["projects"]}},{project__status:{name:"project__status",sort:"id",related_name:"name"}}],!0).then((async t=>{console.log(t,"data")})),this.wsconnect(),this.titler(),console.log(this.getProject)},destroyed(){this.ws.stop()}},b=C,j=i(43736),$=i(43453),I=i.n($),V=i(34145),Z=i(60266),S=i(82118),B=i(50629),T=i(34061),H=i(4324),P=i(65808),A=i(54525),L=i(79500),D=i(44568),E=i(29592),F=i(11713),M=(0,j.Z)(b,s,n,!1,null,"fa791e78",null),N=M.exports;I()(M,{VCard:V.Z,VCol:Z.Z,VContainer:S.Z,VDataTable:B.Z,VDialog:T.Z,VIcon:H.Z,VList:P.Z,VListItem:A.Z,VListItemTitle:L.V9,VMenu:D.Z,VProgressLinear:E.Z,VRow:F.Z})}}]);
//# sourceMappingURL=213.585dad27.js.map