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

2 lines
23 KiB
JavaScript

"use strict";(self["webpackChunkfront"]=self["webpackChunkfront"]||[]).push([[435],{306:function(t,e,s){s.d(e,{Z:function(){return g}});var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("v-row",[s("v-col",{staticClass:"py-0"},[t._v(" Внимание! Это действие приведет к тому, что все данные поручения (в том числе файлы и чаты, будут удалены) ")])],1)],1)},i=[],n={name:"delAssigment"},r=n,o=s(43736),l=s(43453),d=s.n(l),c=s(60266),h=s(11713),m=(0,o.Z)(r,a,i,!1,null,null,null),g=m.exports;d()(m,{VCol:c.Z,VRow:h.Z})},69430:function(t,e,s){s.d(e,{Z:function(){return d}});var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div")},i=[],n={name:"postpone",props:{comment:{type:String,default:""}},computed:{comment1:{get(){return this.comment},set(t){this.$emit("comm",t)}}}},r=n,o=s(43736),l=(0,o.Z)(r,a,i,!1,null,null,null),d=l.exports},78986:function(t,e,s){s.d(e,{Z:function(){return Z}});var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"gant"}},[s("div",{},[s("DxGantt",{ref:t.ganttRef,attrs:{"show-row-lines":!1,"start-date-range":t.startDateRange,"end-date-range":t.endDateRange,"first-day-of-week":1,"task-list-width":0,height:350,"scale-type":t.scale,"task-content-template":"taskContentTemplate","task-tooltip-content-template":"TooltipContentTemplate","on-custom-command":t.onCustomCommandClick,"on-context-menu-preparing":t.onContextMenuPreparing},on:{"task-dbl-click":t.onTaskDblClick},scopedSlots:t._u([{key:"TooltipContentTemplate",fn:function(e){var a=e.data;return[0!=t.statuser(a.id)?s("div",{staticClass:"custom-task-edit-tooltip pa-2"},[s("div",{staticClass:"custom-tooltip-title"},[t._v('"'+t._s(a.title)+'"')]),s("div",[t._v(" Дата начала: "+t._s(a.start.toLocaleDateString())+" ")]),s("div",[t._v("Дата окончания: "+t._s(a.end.toLocaleDateString()))]),s("div",[t._v("Статус: "+t._s(t.statuser(a.id)))])]):t._e()]}},{key:"taskContentTemplate",fn:function(e){var a=e.data;return[s("div",{staticClass:"custom-task",class:t.getTaskColor(a.taskData.id),style:{width:a.taskSize.width+"px"}},[s("div",{staticClass:"custom-task-wrapper"},[s("div",{staticClass:"custom-task-row"},[t._v(" "+t._s(a.taskData.title)+" -- "+t._s(a&&"taskResources"in a&&a.taskResources.length?a.taskResources[0].text:""))])])])]}}])},[s("DxContextMenu",{attrs:{items:t.contextMenuItems}}),s("DxScaleTypeRange",{attrs:{min:"days",max:"years"}}),s("DxToolbar",[s("DxItem",{scopedSlots:t._u([{key:"default",fn:function(){return[s("v-btn",{staticClass:"mx-auto px-auto pl-1",attrs:{icon:"","x-small":"",color:"btns"},on:{click:function(e){return e.stopPropagation(),t.$emit("changegantview")}}},[s("v-icon",{attrs:{color:"primary"}},[t._v("mdi-close")])],1)]},proxy:!0}])}),s("DxItem",{attrs:{name:"undo"}}),s("DxItem",{attrs:{name:"redo"}}),s("DxItem",{attrs:{name:"separator"}}),s("DxItem",{attrs:{name:"collapseAll"}}),s("DxItem",{attrs:{name:"expandAll"}}),s("DxItem",{attrs:{name:"separator"}}),s("DxItem",{attrs:{name:"zoomIn"}}),s("DxItem",{attrs:{name:"zoomOut"}}),s("DxItem",{attrs:{name:"fullScreen"}}),s("DxItem",{attrs:{name:"separator"}}),s("DxItem",{scopedSlots:t._u([{key:"default",fn:function(){return[s("v-btn",{staticClass:"inyand--text",attrs:{"x-small":"",color:"btns"},on:{click:function(e){return e.stopPropagation(),t.createAssignment.apply(null,arguments)}}},[t._v(" Создать поручение")])]},proxy:!0}])})],1),s("DxTasks",{attrs:{"data-source":t.tasks}}),s("DxResources",{attrs:{"data-source":t.resources}}),s("DxResourceAssignments",{attrs:{"data-source":t.resourceAssignments}}),s("DxEditing",{attrs:{enabled:!1}}),t._v(" :allow-resource-adding = false :allow-resource-deleting = false "),s("DxColumn",{attrs:{"data-field":"title",caption:"",width:1}})],1)],1),s("v-dialog",{attrs:{"overlay-opacity":".1","max-width":"700px"},model:{value:t.dialog,callback:function(e){t.dialog=e},expression:"dialog"}},[s("DialogNewAssigment",{staticClass:"dialog_gantWork_create_assignment",attrs:{text:t.actionmethod.text,ma:"heightCard"},scopedSlots:t._u([{key:"textarea",fn:function(){return[s("add-assigment",{attrs:{actionmethod:t.actionmethod,resources:t.resources,dialoginfo:t.dialoginfo},on:{changeddialog:t.changeddialog}})]},proxy:!0},{key:"btn1",fn:function(){return[s("BtnsOut",{attrs:{title:"Отмена"},on:{click:function(e){t.dialog=!1}}})]},proxy:!0},{key:"btn2",fn:function(){return[s("BtnsOut",{attrs:{title:"Сохранить"},on:{click:t.saveit}})]},proxy:!0}])})],1),s("v-dialog",{attrs:{"overlay-opacity":".1","max-width":"490px"},model:{value:t.deldialog,callback:function(e){t.deldialog=e},expression:"deldialog"}},[s("DialogNewAssigment",{attrs:{text:"Удалить поручение"},scopedSlots:t._u([{key:"textarea",fn:function(){return[s("delAssigment")]},proxy:!0},{key:"btn1",fn:function(){return[s("BtnsOut",{attrs:{title:"Отмена",outlined:!0},on:{click:t.back}})]},proxy:!0},{key:"btn2",fn:function(){return[s("BtnsOut",{attrs:{outlined:!0,text:!0,title:"Удалить"},on:{click:t.saveit}})]},proxy:!0}])})],1)],1)},i=[],n=s(55188),r=s(23575),o=s(20629),l=s(22233),d=s(24624),c=s(4646),h=s(43593),m=s(306);const g="gantt",u=(0,o._p)("projectstate"),k=(0,o._p)("taskstate"),p=(0,o._p)("workstate"),w=(0,o._p)("assignmentstate");var f={components:{DxScaleTypeRange:c.DxScaleTypeRange,DxContextMenu:c.DxContextMenu,DxGantt:c.DxGantt,DxTasks:c.DxTasks,DxDependencies:c.DxDependencies,DxResources:c.DxResources,DxResourceAssignments:c.DxResourceAssignments,DxColumn:c.DxColumn,DxEditing:c.DxEditing,DxToolbar:c.DxToolbar,DxItem:c.DxItem,DialogNewAssigment:h.Z,addAssigment:n.Z,delAssigment:m.Z},mixins:[r.Z],data(){return{dialoginfo:{},scale:"year",selectedkey:"",ganttRef:g,actionmethod:{method:"addWork",text:"Создание работы",dateendstore:"",datestartstore:"",min:"",max:"",level:"work"},dialog:!1,deldialog:!1,tasks:[],asgmnts:[],work:[{name:"editwork",text:"Редактировать работу"},{name:"createAssignment",text:"Создать поручение"},{name:"delwork",text:"Удалить"}],ass:[{name:"editasygmnt",text:"Редактировать поручение"},{name:"delasygmnt",text:"Удалить"}],contextMenuItems:[],resourceAssignments:[],disableContextMenu:!1}},created(){(0,d.EV)(l),(0,d.SP)(navigator.language)},computed:{responsible:{get(){return this.gettasks().responsible},set(t){this.settasksresponsible(t)}},gantt:function(){return this.scale=this.date_watch(this.startDateRange,this.endDateRange),this.$refs[g].instance},resources:{get(){return this.getprojectuniqueusers().filter((t=>6!=t.role.id))}},tasksOR(){return this.getworks().work_assignment},startDateRange(){return this.tasks[0]?this.tasks[0].start:new Date},endDateRange(){return this.tasks[0]?this.tasks[0].end:new Date}},watch:{tasksOR(t){if(this.tasks=[],this.tasks[0]=this.topline(this.getworkidname(),this.getWorkdatestart(),this.getWorkdateend()),this.resourceAssignments=[{id:-1,taskId:`parent-${this.getworkidname().id}`,resourceId:this.getworkidname().resp}],t.length)for(let e=0;e<t.length;e++)this.tasks.push({id:`ass-${t[e].id}`,title:t[e].name,parentId:this.tasks[0].id,start:new Date(t[e].datestart),end:new Date(t[e].dateend),status:t[e].status}),this.resourceAssignments.push({id:e,taskId:`ass-${t[e].id}`,resourceId:t[e].responsible.id});this.gantt.refresh()}},methods:{...u.mapGetters(["getprojectuniqueusers","getprojectTasks","getprojectWorks","getProjectdatestart","getProjectdateend","getprojectIdName","getProjectrp","getProject"]),...k.mapGetters(["getTaskdatestart","getTaskdateend","gettasks"]),...k.mapMutations(["setTaskdateend","setTaskdatestart","settasks","settasksresponsible","settasksname"]),...p.mapGetters(["getWorkdatestart","getWorkdateend","getworks","getworkidname"]),...p.mapMutations(["setWorkdateend","setWorkdatestart","setWorks","setworksresponsible","setworksname"]),...w.mapGetters(["getAssignments","getAssignmentdatestart","getAssignmentdateend"]),...w.mapMutations(["setAssignmentdescript","setAssignments","setAssignmentname","setAssignmentdateend","setAssignmentdatestart","setAssignmentresponsible"]),statuser(t){try{let e=this.tasks.find((e=>e.id==t));return e.status.name}catch{return!1}},back(){this.deldialog=!1},onTaskDblClick(t){if(t.cancel=!0,["parent","ass"].includes(t.data.id.split("-")[0])){if("ass"==t.data.id.split("-")[0]){let e=t.data.id.split("-")[1];this.$emit("changetab",e)}}else this.$router.push(`/${t.data.id.split("-").join("/")}`)},getTaskColor(t){let e=this.tasks.find((e=>e.id==t));return e.id.startsWith("parent")&&(e=this.getworks()),`custom-task-color-${e.status.id}`},delasygmnt(){this.setAssignments(this.getworks().work_assignment.find((t=>t.id==Number(this.selectedkey.id.split("-")[1])))),this.dialoginfo=this.getAssignments(),this.actionmethod={method:"delasygmnt",level:"Assignments",text:"Удаление поручения",datestartstore:"Assignmentdatestart",dateendstore:"Assignmentdateend"},this.deldialog=!0},createAssignment(){this.setAssignments({name:"",longname:"",difficult:0,parent:this.getworks().id,responsible:{},datestart:"",dateend:""}),this.dialoginfo=this.getAssignments(),this.actionmethod={method:"createasygmnt",level:"Assignments",responsible_text:"Исполнитель",text:"Создание поручения",min:this.getWorkdatestart(),max:this.getWorkdateend(),datestartstore:"Assignmentdatestart",dateendstore:"Assignmentdateend"},this.dialog=!0},editasygmnt(){let t=this.getworks().work_assignment.find((t=>t.id==this.selectedkey.id.split("-")[1]&&"ass"==this.selectedkey.id.split("-")[0]));console.log(t),this.setAssignments(t),this.dialoginfo=this.getAssignments(),this.actionmethod={method:"editasygmnt",level:"Assignments",text:"Редактирование поручения",responsible_text:"Исполнитель",min:this.getWorkdatestart(),max:this.getWorkdateend(),datestartstore:"Assignmentdatestart",dateendstore:"Assignmentdateend"},this.dialog=!0}}},v=f,x=s(43736),b=s(43453),_=s.n(b),y=s(16190),C=s(34061),D=s(4324),A=(0,x.Z)(v,a,i,!1,null,null,null),Z=A.exports;_()(A,{VBtn:y.Z,VDialog:C.Z,VIcon:D.Z})},67501:function(t,e,s){s.r(e),s.d(e,{default:function(){return Q}});var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("work-task-ass-project",{attrs:{cards:t.$options.name,chatview:t.chatview,show:t.show,tabProj:"1",title:t.work.name,breadcrumbs:t.breadcrumbs},on:{afterLeave:t.afterLeave,afterEnter:t.afterEnter,createnewass:t.createnewass,listchangetab:t.listchangetab,allCard:t.allCard},scopedSlots:t._u([{key:"spisok",fn:function(){return[s("left-list",{attrs:{level:3},on:{listchangetab:t.listchangetab,confirmation:t.confirmation}}),s("v-row",{staticClass:"flex-grow-0 "},[s("v-col",{staticClass:"pa-0"},[s("v-divider")],1)],1),s("v-row",{staticClass:"flex-grow-0 justify-end"},[s("v-col",{staticClass:"flex-grow-0"},[s("MyIco",{attrs:{icons:"mdi-chart-gantt",size:"large"},on:{click:t.gantviewer}})],1),s("v-col",{staticClass:"flex-grow-0"})],1),s("v-slide-x-reverse-transition",[s("v-card",{directives:[{name:"show",rawName:"v-show",value:t.gantview,expression:"gantview"}],staticClass:"gantPosition"},[s("gant-work",{ref:"gantwork",staticClass:"pa-1",attrs:{startlevel:"work"},on:{saver:t.gantsaver,changetab:t.changetab,changegantview:t.changegantview}})],1)],1)]},proxy:!0},{key:"informations",fn:function(){return[s("informationorders",{attrs:{chat:t.activedCh,chatview:t.chatview,indx:t.tab,level:0==t.tab?3:4,breadcrumbs:t.breadcrumbs},on:{changetab:t.changetab,chatviewer:t.chatviewer,createtabchat:t.createtabchat,changestatus:t.changestatus,listchangetab:t.listchangetab}})]},proxy:!0},{key:"chat",fn:function(){return[s("mMessegeListRight",{directives:[{name:"show",rawName:"v-show",value:Object.keys(t.activedCh).length>0,expression:"Object.keys(activedCh).length>0"}],ref:"mychat",staticClass:"box2",attrs:{chatplace:"rightchat",header:!1,chat:t.activedCh,waiter:t.waiter},on:{waiting:function(e){t.waiter=!0}}})]},proxy:!0},{key:"filess",fn:function(){return[s("filelist",{attrs:{files:t.work.work_files,level:t.level,status:t.work.status.id,currentid:[t.work].concat(t.work.work_assignment)[t.tab].id},on:{uploadfile:t.uploadfile,deletefile:t.deletefile,VisSwitcher:t.VisSwitcher}})]},proxy:!0},{key:"graphic",fn:function(){return[s("work-pie-chart",{attrs:{title:"Статусы поручений в работе",data:t.ass_statuses_calc}})]},proxy:!0}])},[s("v-dialog",{attrs:{"overlay-opacity":".1","max-width":"490px"},model:{value:t.delete_dialog,callback:function(e){t.delete_dialog=e},expression:"delete_dialog"}},[s("DialogNewAssigment",{attrs:{text:"Удалить поручение"},scopedSlots:t._u([{key:"textarea",fn:function(){return[s("delAssigment")]},proxy:!0},{key:"btn1",fn:function(){return[s("v-btn",{attrs:{color:"green darken-1",text:""},on:{click:function(e){t.delete_dialog=!1}}},[t._v(" Отменить ")])]},proxy:!0},{key:"btn2",fn:function(){return[s("v-btn",{attrs:{color:"green darken-1",text:""},on:{click:t.assignment_del_run}},[t._v(" Удалить ")])]},proxy:!0}])})],1)],1)},i=[],n=s(78986),r=s(30381),o=s.n(r),l=s(20629),d=s(45296),c=s(10507),h=s(53502),m=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("Cards",{staticClass:"ma-1 nameAssidnment unip height_informationorders overflow-auto",attrs:{color:"inyand",elevation:0},scopedSlots:t._u([{key:"cards",fn:function(){return[s("v-row",{staticClass:"flex-grow-0"},[s("v-col",[s("strong",[t._v("Поручения")])])],1),s("v-divider"),t._l(t.getworks.work_assignment,(function(e,a){return s("v-row",{key:a,staticClass:"flex-grow-0"},[s("v-col",{class:0==a?"mt-2":""},[s("span",{staticClass:"align-self-center"},[t._v(t._s(e.name)+" - "),s("strong",[t._v(t._s(e.status.name))]),t._v(" - Срок до: "+t._s(t.momentedDay(e.dateend))+" ("+t._s(e.responsible.sn)+")")])]),s("v-col",{attrs:{xl:"1"}},[s("v-menu",{attrs:{"min-width":e.comment.length>0?"900px":"600px","close-on-content-click":!1},scopedSlots:t._u([{key:"activator",fn:function(a){var i=a.on,n=a.attrs;return[s("v-btn",t._g(t._b({directives:[{name:"show",rawName:"v-show",value:e.status.id<5&&t.getworks.status.id<3,expression:"elm.status.id<5 && getworks.status.id<3"}],staticClass:"ml-auto",attrs:{"x-small":"",icon:"",fab:"",color:3!=e.status.id?"orange accent-3":"orange darken-2"}},"v-btn",n,!1),i),[s("v-icon",[t._v(t._s(3!=e.status.id?"mdi-progress-clock":"mdi-play-speed"))])],1)]}}],null,!0)},[s("v-card",[s("v-card-title",[t._v(" "+t._s(3!=e.status.id?"Отложить":"Открыть")+" поручение ")]),s("v-card-text",[s("v-textarea",{staticClass:"mx-2",attrs:{placeholder:"Комментарий"}})],1),s("v-card-actions",[s("v-btn",{attrs:{text:""},on:{click:function(s){3!=e.status.id?t.$emit("confirmation",{elm:e,res:3,text:"Отложено"}):t.$emit("confirmation",{elm:e,res:2,text:"Открыто"})}}},[t._v(" "+t._s(3!=e.status.id?"Отложить":"Открыть")+" ")])],1)],1)],1)],1)],1)}))]},proxy:!0}])})},g=[],u=s(18241);const{mapGetters:k}=(0,l._p)("auth"),p=(0,l._p)("workstate");var w={name:"assignment",mixins:[u.Z],data:()=>({comment:""}),computed:{...k(["getUser"]),...p.mapGetters(["getworks"])},methods:{...p.mapMutations(["setWorks"])}},f=w,v=s(43736),x=s(43453),b=s.n(x),_=s(16190),y=s(34145),C=s(54886),D=s(60266),A=s(99223),Z=s(4324),j=s(44568),I=s(11713),T=s(92648),$=(0,v.Z)(f,m,g,!1,null,null,null),R=$.exports;b()($,{VBtn:_.Z,VCard:y.Z,VCardActions:C.h7,VCardText:C.ZB,VCardTitle:C.EB,VCol:D.Z,VDivider:A.Z,VIcon:Z.Z,VMenu:j.Z,VRow:I.Z,VTextarea:T.Z});var V=s(56922),P=s(43803),S=s(306),W=s(69430),M=s(54417),E=s(54355),G=s(87941),N=s(1313);const B=(0,l._p)("globalstore"),O=(0,l._p)("assignmentstate"),L=(0,l._p)("projectstate"),z=(0,l._p)("taskstate"),q=(0,l._p)("workstate"),{mapGetters:J}=(0,l._p)("auth");var U={name:"work",mixins:[u.Z,N.Z],components:{GantWork:n.Z,informationorders:c.Z,assignment:R,mMessegeListRight:P.Z,filelist:h.Z,delAssigment:S.Z,Postpone:W.Z,workPieChart:M.Z,WorkTaskAssProject:E["default"],LeftList:G.Z},data:()=>({myid:null,currentid:0,waiter:!1,delete_dialog:!1,assign_del_id:null,activedCh:{},chatview:!0,gantview:!1,breadcrumbs:[{href:"",disabled:!0,text:""}],comment:"",level:3,task:{name:"",task_work:[],datestart:"",dateend:"",responsible:{id:""},status:{id:0,name:""},description:""},show:!0,tab:0,nedotab:0,ws:null,work:{name:"",parent:{name:""},status:{name:""},comment:[],responsible:{fullname:"",position:{name:""}},work_assignment:[{name:"",status:{name:""},comment:[],author:{fullname:"",position:{name:""}},responsible:{fullname:"",position:{name:""}}}]}}),computed:{...J(["getUser"]),...B.mapGetters(["getassign_id"]),fullinfo(){return[this.work,...this.work.work_assignment]},ass_statuses_calc(){return this.pie_statuses_calc(this.work.work_assignment)}},mounted(){o().locales("ru"),this.ws=new this.$pws,this.ws.start(this.$route.fullPath),this.ws.addEvent("onmessage",(t=>{const e=JSON.parse(t.data);if("action"in e)try{this[e.action](e.payload)}catch(s){console.log(s),console.log(e.action)}else console.log(e)}))},methods:{...B.mapMutations(["set_assign_id"]),...L.mapMutations(["setProject","clearProject"]),...L.mapGetters(["getProject","getprojectuniqueusers"]),...q.mapGetters(["getworks"]),...q.mapMutations(["setWorks"]),...z.mapMutations(["settasks"]),...O.mapGetters(["getAssignments","getAssignmentdatestart","getAssignmentdateend"]),newmessageincome(t){console.log("payload",t);let e=this.mychats.findIndex((e=>e.id==t.chat.id));0!=this.mychats[e].lastmessage.length&&this.mychats[e].lastmessage[this.mychats[e].lastmessage.length-1].id==t.id||this.mychats[e].lastmessage.push(t),this.$refs.mychat.scrollbottom(t.id)},filerenew(t){t.forEach(((e,s)=>t[s].visible=e.visible.split(""))),this.work.work_files=t},fileupdated(t){let e=this.work.work_files.findIndex((e=>e.id==t.id));this.work.work_files[e].visible=t.visible.split("")},takeprev(t){let e=this.mychats.findIndex((e=>e.id==t.chat));this.mychats[e].lastmessage.length<20?(this.mychats[e].lastmessage=t.res,this.mychats[e].lastmessage=this.mychats[e].lastmessage):this.mychats[e].lastmessage=t.res.concat(this.mychats[e].lastmessage),this.waiter=!1},messagedeleted(t){try{let e=this.mychats.findIndex((e=>e.id==t.chat)),s=this.mychats[e].lastmessage.findIndex((e=>e.id==t.id));this.mychats[e].lastmessage.splice(s,1),console.log(this.mychats[e].lastmessage,"slice")}catch{}},assupdate(t){t.bigbuild&&this.rebuild();let e=this.work.work_assignment.findIndex((e=>e.id==t.assignment.id));for(let[s,a]of Object.entries(t.assignment))this.work.work_assignment[e][s]=a},tab0update(t){this.work.status=t.status},renew(t){this.ws.stop(),console.log("aaaaad"),this.ws.start(this.$route.fullPath),this.activeChat()},filedeleted(t){console.log("pl");let e=this.work.work_files.findIndex((e=>e.id==t.id));this.work.work_files.splice(e,1)},listchangetab(t){this.tab!=Number(t)&&(this.show=!1,this.nedotab=Number(t)),this.afterLeave(),this.level=0==this.tab?3:4},afterEnter(){console.log("@after-enter=")},afterLeave(){this.tab=this.nedotab,console.log("afterLeave",this.tab,this.work),this.currentid=0==this.tab?this.work.id:this.work.work_assignment[this.tab-1].id,this.activeChat(),this.show=!0,this.breadcrumbsBuildier()},createnewass(){this.$refs.gantwork.createAssignment()},changegantview(){this.gantview=!1},chatviewer(){this.chatview=!this.chatview},createtabchat(){let t=this.work.name,e=3,s=this.work.id,a=new Set;0==this.tab?(this.work.work_assignment.forEach((t=>a.add(t.responsible.id).add(t.author.id))),a.add(this.work.responsible.id)):(e=4,s=this.fullinfo[this.tab].id,a.add(this.fullinfo[this.tab].responsible.id).add(this.fullinfo[this.tab].author.id),t=this.fullinfo[this.tab].name),this.chatview=!0,V.$.$emit("supogrammchatcreate",{users:Array.from(a),name:t,level:e,parent:s})},gantviewer(){this.gantview=!this.gantview,this.gantview&&this.$refs.gantwork.rebuild()},changetab(t){let e=this.work.work_assignment.findIndex((e=>e.id==t))+1;this.listchangetab(e)},gantsaver(t){delete t.val.history,this.ws.send({action:t.am.method,payload:t.val})},changestatus(t){console.log(t);let e="workstatus",s={id:t.val.id,status:t.action,comment:t.comment,ididit:t.ididit,h_action:t.h_action},a=this.getProject();s["project_status_update"]=3==a.status.id,s["task_status_update"]=this.task.status.id<2,this.tab>0&&(s["work_status_update"]=this.work.status.id<2,e="assignmentstatus"),this.ws.send({action:e,payload:s})},build(t){console.log(t),"project"in t&&this.setProject(t.project),this.myid=null!=this.getassign_id?this.getassign_id.id:null,this.set_assign_id(null);t.work.work_files.forEach(((e,s)=>t.work.work_files[s].visible=e.visible.split(""))),this.setWorks(t.work),this.work=this.getworks(),this.task=t.task,this.settasks(t.task),console.log("------------------fullinfo",this.fullinfo,this.tab),null!=this.myid&&this.changetab(this.myid),this.currentid=0==this.tab?this.work.id:this.work.work_assignment[this.tab-1].id,this.breadcrumbsBuildier(),this.mychats=t["datachat"],this.activeChat(),this.level=0==this.tab?3:4},breadcrumbsBuildier(){this.breadcrumbs=[{text:this.getProject().name,disabled:!1,href:`/project/${this.getProject().id}`},{text:this.task.name,disabled:!1,href:`/project/${this.getProject().id}/task/${this.task.id}`}],this.tab>0&&this.breadcrumbs.push({text:this.work.name,disabled:!1,href:""})},activeChat(){let t=0==this.tab?3:4;console.log(this.currentid,"currentid");try{this.activedCh=this.mychats.find((e=>e.parent==this.currentid&&e.level==t)),console.log("измененный чат",this.activedCh),this.activedCh.lastmessage.length>0&&this.$refs.mychat.scrollbottom(this.activedCh.lastmessage[this.activedCh.lastmessage.length-1].id)}catch{this.activedCh={}}this.chatview="id"in this.activedCh},confirmation(t){this.work.work_assignment.forEach((t=>{t.menu=!1,t.action_confirm=!1})),t["work_status_update"]=this.work.work_assignment.every((e=>e.id==t.id&&5==t.status||5==e.status.id))?{res:!0,project:this.getProject().id}:{res:!1},this.ws.send({action:"confirmation",payload:t})},VisSwitcher(t){this.ws.send({action:"updateFile",payload:{id:t.id,visible:t.visible.join("")}})},assignment_del_run(){this.ws.send({action:"delasygmnt",payload:this.assign_del_id}),this.assign_del_id=null,this.delete_dialog=!1},rebuild(){this.ws.send({action:"rebuild",payload:this.work.id})},async uploadfile(t){let e={project:this.getProject().id,work:this.work.id,task:this.work.parent.id,visible:"0010"};this.tab>0&&(e["assignment"]=this.work.work_assignment[this.tab-1].id,e.visible="0001"),t.append("info",JSON.stringify(e));let s=await d.be.post("/main/uploader",t,{headers:{"Content-Type":"multipart/form-data"}});"created"in s.data&&this.ws.send({action:"fileuploaded",payload:this.work.id})}},beforeDestroy(){this.clearProject()}},F=U,X=s(34061),H=s(77394),K=(0,v.Z)(F,a,i,!1,null,null,null),Q=K.exports;b()(K,{VBtn:_.Z,VCard:y.Z,VCol:D.Z,VDialog:X.Z,VDivider:A.Z,VRow:I.Z,VSlideXReverseTransition:H.Zy})}}]);
//# sourceMappingURL=435.fab11f8a.js.map