1"use strict";(self["webpackChunkclient"]=self["webpackChunkclient"]||[]).push([[2889],{92889:function(e,t,a){a.r(t),a.d(t,{default:function(){return I}});var r=a(20641),s=a(53751),o=a(90033);const i={key:0,class:"project-header"},n={class:"project-header-inner"},c={class:"header-left"},l={key:0,class:"project-header-emoji"},d={class:"project-meta"},u={class:"project-title"},p={key:0,class:"header-breadcrumb"},h={class:"breadcrumb-current"},j={key:0,class:"header-right"},g={class:"icon"},k={class:"action-label"},v={class:"icon"},b={class:"action-label"},m={key:0,class:"tabs-pill"},P={class:"tabs"},C=["onClick"],y={key:0,class:"ml-2"},w={key:1,class:"drop-overlay"},$={class:"drop-overlay-content"},f={key:2,class:"project-content"},D={key:3,class:"project-loading"};function E(e,t,a,E,T,L){const G=(0,r.g2)("font-awesome-icon"),F=(0,r.g2)("router-link"),X=(0,r.g2)("router-view"),V=(0,r.g2)("b-loading");return(0,r.uX)(),(0,r.CE)("div",{class:"project-layout",onDragover:t[3]||(t[3]=(0,s.D$)((...e)=>L.onDragOver&&L.onDragOver(...e),["prevent"])),onDragenter:t[4]||(t[4]=(0,s.D$)((...e)=>L.onDragEnter&&L.onDragEnter(...e),["prevent"])),onDragleave:t[5]||(t[5]=(0,s.D$)((...e)=>L.onDragLeave&&L.onDragLeave(...e),["prevent"])),onDrop:t[6]||(t[6]=(0,s.D$)((...e)=>L.onDropFiles&&L.onDropFiles(...e),["prevent"]))},[T.project?((0,r.uX)(),(0,r.CE)("header",i,[(0,r.Lk)("div",n,[(0,r.Lk)("div",c,["settings"===L.currentView?((0,r.uX)(),(0,r.Wv)(F,{key:0,to:{name:"ProjectOverview",params:{id:T.project.uuid}},class:"back-to-project-link"},{default:(0,r.k6)(()=>[(0,r.bF)(G,{icon:"fa-light fa-chevron-left"}),(0,r.Lk)("span",null,(0,o.v_)(e.$t("Back to project")),1)]),_:1},8,["to"])):((0,r.uX)(),(0,r.CE)(r.FK,{key:1},[(0,r.bF)(F,{to:{name:"ProjectOverview",params:{id:T.project.uuid}},class:"project-identity"},{default:(0,r.k6)(()=>[T.project.icon&&L.isEmoji(T.project.icon)?((0,r.uX)(),(0,r.CE)("span",l,(0,o.v_)(T.project.icon),1)):((0,r.uX)(),(0,r.CE)("span",{key:1,class:"project-header-bullet",style:(0,o.Tr)({backgroundColor:L.resolvedProjectColor})},null,4)),(0,r.Lk)("div",d,[(0,r.Lk)("h1",u,(0,o.v_)(T.project.name),1)])]),_:1},8,["to"]),L.isDetailView?((0,r.uX)(),(0,r.CE)("div",p,[t[7]||(t[7]=(0,r.Lk)("span",{class:"breadcrumb-separator"},"/",-1)),(0,r.Lk)("span",h,(0,o.v_)(L.currentViewLabel),1)])):(0,r.Q3)("",!0)],64))]),"settings"!==L.currentView?((0,r.uX)(),(0,r.CE)("div",j,[L.canEdit&&T.project.settings?.hasGoals?((0,r.uX)(),(0,r.CE)("button",{key:0,class:(0,o.C4)(["header-action-btn",{"is-active":"goals"===L.currentView}]),onClick:t[0]||(t[0]=(...e)=>L.manageGoals&&L.manageGoals(...e))},[(0,r.Lk)("span",g,[(0,r.bF)(G,{icon:"fa-light fa-bullseye-arrow"})]),(0,r.Lk)("span",k,(0,o.v_)(T.project.objectivesEnabled?e.$t("Objectives & Goals"):e.$t("Goals")),1)],2)):(0,r.Q3)("",!0),L.canEdit?((0,r.uX)(),(0,r.CE)("button",{key:1,class:(0,o.C4)(["header-action-btn",{"is-active":"settings"===L.currentView}]),onClick:t[1]||(t[1]=(...e)=>L.editProject&&L.editProject(...e))},[(0,r.Lk)("span",v,[(0,r.bF)(G,{icon:"fa-light fa-cog"})]),(0,r.Lk)("span",b,(0,o.v_)(e.$t("Settings")),1)],2)):(0,r.Q3)("",!0)])):(0,r.Q3)("",!0)]),L.isDetailView||"settings"===L.currentView?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("div",m,[(0,r.Lk)("div",P,[(0,r.Lk)("ul",null,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(L.projectTabs,e=>((0,r.uX)(),(0,r.CE)("li",{key:e.key,class:(0,o.C4)({"is-active":L.activeTab===e.key}),onClick:t=>L.onTabChange(e.key)},[(0,r.Lk)("a",null,[(0,r.Lk)("span",null,(0,o.v_)(e.label),1),e.badge?((0,r.uX)(),(0,r.CE)("span",y,(0,o.v_)(e.badge),1)):(0,r.Q3)("",!0)])],10,C))),128))])])]))])):(0,r.Q3)("",!0),T.isDragging?((0,r.uX)(),(0,r.CE)("div",w,[(0,r.Lk)("div",$,[(0,r.bF)(G,{icon:"fa-light fa-cloud-arrow-up",class:"drop-overlay-icon"}),(0,r.Lk)("span",null,(0,o.v_)(e.$t("Drop to create a task")),1)])])):(0,r.Q3)("",!0),T.project?((0,r.uX)(),(0,r.CE)("main",f,[((0,r.uX)(),(0,r.Wv)(X,{key:L.childViewKey,project:T.project,goals:T.goals,"can-edit":L.canEdit,"pending-files":T.pendingFiles,onTaskCountUpdated:L.updateTaskCount,onGoalsUpdated:L.loadGoals,onProjectUpdated:L.loadProject,onFilesConsumed:t[2]||(t[2]=e=>T.pendingFiles=null)},null,8,["project","goals","can-edit","pending-files","onTaskCountUpdated","onGoalsUpdated","onProjectUpdated"]))])):((0,r.uX)(),(0,r.CE)("div",D,[(0,r.bF)(V,{"is-full-page":!1,active:!0})]))],32)}a(44114);var T=a(40834),L=a(28994),G=a(95256),F={name:"ProjectShow",mixins:[L.A],data(){return{project:null,goals:[],taskCount:0,isDragging:!1,dragCounter:0,pendingFiles:null}},computed:{...(0,T.L8)(["tenant","user","isGranted"]),projectId(){return this.$route.params.id},childViewKey(){return this.$route.params.taskId||null},currentView(){const e=this.$route.name;return"ProjectGoals"===e?"goals":"ProjectSettings"===e?"settings":"ProjectTasks"===e?"tasks":"ProjectBoard"===e?"board":"ProjectGantt"===e?"gantt":"ProjectAbout"===e?"about":"overview"}
1,isDetailView(){return["goals"].includes(this.currentView)},backRoute(){return this.isDetailView||"ProjectTaskShow"===this.$route.name?{name:"ProjectOverview",params:{id:this.project.uuid}}:{name:"ProjectList"}},currentViewLabel(){const e={goals:this.project?.objectivesEnabled?this.$t("Objectives & Goals"):this.$t("Goals"),settings:this.$t("Settings")};return e[this.currentView]||""},activeTab(){const e=this.$route.name;return"ProjectTasks"===e||"ProjectTaskShow"===e?"tasks":"ProjectBoard"===e?"board":"ProjectGantt"===e?"gantt":"ProjectAbout"===e?"about":"overview"},projectTabs(){const e=[{key:"overview",label:this.$t("Overview")},{key:"tasks",label:this.$t("tasks")},{key:"board",label:this.$t("Board")},{key:"gantt",label:this.$t("Gantt")}];return this.project&&this.project.description&&this.project.description.replace(/<[^>]*>/g,"").trim()&&e.push({key:"about",label:this.$t("About")}),e},canEdit(){return!!this.project&&(!!this.isGranted("ADMIN_TENANT")||!(!this.project.owner||this.project.owner.id!==this.user.id))},resolvedProjectColor(){const e=this.project?.color||"indigo";if(e.startsWith("#"))return e;const t="dark"===this.$store.state.theme;return t?`var(--${e}-400, var(--${e}-200))`:`var(--${e}-500, var(--${e}-200))`}},watch:{projectId:{immediate:!0,handler(e,t){e&&e!==t&&(this.loadProject(),this.loadGoals())}},"$route.name":{immediate:!0,handler(e){const t={ProjectOverview:"overview",ProjectTasks:"tasks",ProjectTaskShow:"tasks",ProjectBoard:"board",ProjectGantt:"gantt",ProjectAbout:"about"},a=t[e];a&&this.projectId&&this.$store.commit("setProjectLastTab",{projectId:this.projectId,tab:a})}}},methods:{onTabChange(e){const t={overview:"ProjectOverview",tasks:"ProjectTasks",board:"ProjectBoard",gantt:"ProjectGantt",about:"ProjectAbout"};this.$router.push({name:t[e],params:{id:this.project.uuid}})},isEmoji:G.Ve,loadProject(){this.$http.plain.get("/projects/"+this.projectId).then(e=>{this.project=e.data}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Project not found"),type:"is-danger"}),this.$router.push({name:"ProjectList"})})},loadGoals(){this.$http.plain.get("/goals",{params:{project:this.projectId,"order[position]":"asc"}}).then(e=>{this.goals=e.data["hydra:member"]||[]}).catch(e=>{console.error(e)})},updateTaskCount(e){this.taskCount=e},editProject(){this.$router.push({name:"ProjectSettings",params:{id:this.projectId}})},manageGoals(){this.$router.push({name:"ProjectGoals",params:{id:this.projectId}})},onDragOver(e){e.dataTransfer&&e.dataTransfer.types.includes("Files")&&(e.dataTransfer.dropEffect="copy")},onDragEnter(e){e.dataTransfer&&e.dataTransfer.types.includes("Files")&&(this.dragCounter++,this.isDragging=!0)},onDragLeave(){this.dragCounter--,this.dragCounter<=0&&(this.dragCounter=0,this.isDragging=!1)},onDropFiles(e){this.isDragging=!1,this.dragCounter=0;const t=Array.from(e.dataTransfer.files||[]);t.length&&(this.pendingFiles=t,"ProjectTasks"!==this.$route.name&&this.$router.push({name:"ProjectTasks",params:{id:this.projectId},query:{create:"1"}}))}}},X=a(66262);const V=(0,X.A)(F,[["render",E],["__scopeId","data-v-b81a2710"]]);var I=V}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.