1- " use client"
1+ ' use client'
22
3- import { useState } from "react"
4- import { motion , AnimatePresence } from "motion/react"
5- import { DigitalColleageusLayout } from "../DigitalColleagues/DigitalColleageusLayout"
6- import { type BusinessUnit } from "../DigitalColleagues/types"
7- import {
8- mockSidebarItems ,
9- mockNotifications ,
10- } from "../DigitalColleagues/test-data"
3+ import { useState } from 'react'
4+ import { motion , AnimatePresence } from 'motion/react'
5+ import { DigitalColleageusLayout } from '../DigitalColleagues/DigitalColleageusLayout'
6+ import { type BusinessUnit } from '../DigitalColleagues/types'
7+ import { mockSidebarItems , mockNotifications } from '../DigitalColleagues/test-data'
118
12- import type { App , RecentFile } from " ../DigitalColleagues/types"
13- import type { Epic , Sprint , Project , Task } from " @/components/Projects/ProjectView"
9+ import type { App , RecentFile } from ' ../DigitalColleagues/types'
10+ import type { Epic , Sprint , Project , Task } from ' @/components/Projects/ProjectView'
1411
15- import ProjectView from " ./ProjectView"
12+ import ProjectView from ' ./ProjectView'
1613const AnimatedCircles = ( ) => (
1714 < motion . div
1815 animate = { { rotate : 360 } }
19- transition = { { duration : 50 , repeat : Number . POSITIVE_INFINITY , ease : " linear" } }
16+ transition = { { duration : 50 , repeat : Number . POSITIVE_INFINITY , ease : ' linear' } }
2017 className = "relative h-40 w-40"
2118 >
2219 < div className = "absolute inset-0 rounded-full bg-white/10 backdrop-blur-md" />
@@ -29,42 +26,43 @@ const AnimatedCircles = () => (
2926
3027interface HomeProps {
3128 title ?: string
32- businessUnits : BusinessUnit [ ]
29+ businessUnits : BusinessUnit [ ]
3330
34- projects : Project [ ] ;
35- epics : Epic [ ] ;
36- sprints : Sprint [ ] ;
37- tasks : Task [ ] ;
38- currentView : 'kanban' | 'planning' | 'documentation' | 'epics' ;
39- // Task handlers
40- onAddTask ?: ( newTask : Omit < Task , 'id' | 'createdAt' > ) => void ;
41- onUpdateTask ?: ( taskId : string , updates : Partial < Task > ) => void ;
42- onDeleteTask ?: ( taskId : string ) => void ;
43- onTaskClick ?: ( task : Task ) => void ;
44- // Epic handlers
45- onAddEpic ?: ( ) => void ;
46- onUpdateEpic ?: ( epicId : string , updates : Partial < Epic > ) => void ;
47- onDeleteEpic ?: ( epicId : string ) => void ;
48- onAddTaskToEpic ?: ( epicId : string ) => void ;
49- // Sprint handlers
50- onAddSprint ?: ( sprint : Omit < Sprint , 'id' > ) => void ;
51- onUpdateSprint ?: ( sprintId : string , updates : Partial < Sprint > ) => void ;
52- onDeleteSprint ?: ( sprintId : string ) => void ;
53- // Project handlers
54- onAddProject ?: ( project : Omit < Project , 'id' > ) => void ;
55- onUpdateProject ?: ( projectId : string , updates : Partial < Project > ) => void ;
56- onDeleteProject ?: ( projectId : string ) => void ;
57- // View handlers
58- onViewChange ?: ( view : 'kanban' | 'planning' | 'tasks' | 'files' | 'epics' ) => void ;
59- mobileMenuOpen ?: boolean ;
60- onToggleMobileMenu ?: ( ) => void ;
61- // Team handlers
62- onTeamClick ?: ( teamId : string ) => void ;
63- onTeamChange ?: ( team : any ) => void ;
64- onCopilotClick ?: ( ) => void ;
31+ projects : Project [ ]
32+ epics : Epic [ ]
33+ sprints : Sprint [ ]
34+ tasks : Task [ ]
35+ currentView : 'kanban' | 'planning' | 'documentation' | 'epics'
36+ // Task handlers
37+ onAddTask ?: ( newTask : Omit < Task , 'id' | 'createdAt' > ) => void
38+ onUpdateTask ?: ( taskId : string , updates : Partial < Task > ) => Promise < Task >
39+ onDeleteTask ?: ( taskId : string ) => void
40+ onTaskClick ?: ( task : Task ) => void
41+ // Epic handlers
42+ onAddEpic ?: ( ) => void
43+ onUpdateEpic ?: ( epicId : string , updates : Partial < Epic > ) => void
44+ onDeleteEpic ?: ( epicId : string ) => void
45+ onAddTaskToEpic ?: ( epicId : string ) => void
46+ // Sprint handlers
47+ onAddSprint ?: ( sprint : Omit < Sprint , 'id' > ) => void
48+ onUpdateSprint ?: ( sprintId : string , updates : Partial < Sprint > ) => void
49+ onDeleteSprint ?: ( sprintId : string ) => void
50+ // Project handlers
51+ onAddProject ?: ( project : Omit < Project , 'id' > ) => void
52+ onUpdateProject ?: ( projectId : string , updates : Partial < Project > ) => void
53+ onDeleteProject ?: ( projectId : string ) => void
54+ // View handlers
55+ onViewChange ?: ( view : 'kanban' | 'planning' | 'tasks' | 'files' | 'epics' ) => void
56+ mobileMenuOpen ?: boolean
57+ onToggleMobileMenu ?: ( ) => void
58+ // Team handlers
59+ onTeamClick ?: ( teamId : string ) => void
60+ onTeamChange ?: ( team : any ) => void
61+ onCopilotClick ?: ( ) => void
6562}
6663
67- export default function ProjectPage ( { title = "" ,
64+ export default function ProjectPage ( {
65+ title = '' ,
6866 projects,
6967 businessUnits,
7068 epics,
@@ -97,75 +95,74 @@ export default function ProjectPage({ title = "",
9795 onTeamClick,
9896 onTeamChange,
9997 onCopilotClick,
100- } : HomeProps ) {
101- const [ activeTab , setActiveTab ] = useState ( " projects" )
98+ } : HomeProps ) {
99+ const [ activeTab , setActiveTab ] = useState ( ' projects' )
102100 const [ currentBusinessUnit , setCurrentBusinessUnit ] = useState < BusinessUnit > ( businessUnits [ 0 ] ) // Default to Design
103101
104102 // Mock handlers
105103 const handleAppOpen = ( app : App ) => {
106- console . log ( " Opening app:" , app . name )
104+ console . log ( ' Opening app:' , app . name )
107105 }
108106
109107 const handleAppFavorite = ( app : App ) => {
110- console . log ( " Favoriting app:" , app . name )
108+ console . log ( ' Favoriting app:' , app . name )
111109 }
112110
113111 const handleFileClick = ( file : RecentFile ) => {
114- console . log ( " Opening file:" , file . name )
112+ console . log ( ' Opening file:' , file . name )
115113 }
116114
117115 const handleFileShare = ( file : RecentFile ) => {
118- console . log ( " Sharing file:" , file . name )
116+ console . log ( ' Sharing file:' , file . name )
119117 }
120118
121119 const handleProjectOpen = ( project : Project ) => {
122- console . log ( " Opening project:" , project . name )
120+ console . log ( ' Opening project:' , project . name )
123121 }
124122
125123 const handleProjectShare = ( project : Project ) => {
126- console . log ( " Sharing project:" , project . name )
124+ console . log ( ' Sharing project:' , project . name )
127125 }
128126
129127 const handleBusinessUnitChange = ( unit : BusinessUnit ) => {
130128 // setCurrentBusinessUnit(unit)
131- console . log ( " Business unit changed to:" , unit . name )
129+ console . log ( ' Business unit changed to:' , unit . name )
132130 }
133131
134132 const renderTabContent = ( ) => {
135133 switch ( activeTab ) {
136-
137- case "projects" :
134+ case 'projects' :
138135 return (
139- < ProjectView
140- initialProjects = { projects }
141- initialEpics = { epics }
142- initialSprints = { sprints }
143- initialTasks = { tasks }
144- // Task handlers
145- onAddTask = { onAddTask }
146- onUpdateTask = { onUpdateTask }
147- onDeleteTask = { onDeleteTask }
148- onTaskClick = { onTaskClick }
149- // Epic handlers
150- onAddEpic = { onAddEpic }
151- onUpdateEpic = { onUpdateEpic }
152- onDeleteEpic = { onDeleteEpic }
153- onAddTaskToEpic = { onAddTaskToEpic }
154- // Sprint handlers
155- onAddSprint = { onAddSprint }
156- onUpdateSprint = { onUpdateSprint }
157- onDeleteSprint = { onDeleteSprint }
158- // Project handlers
159- onAddProject = { onAddProject }
160- onUpdateProject = { onUpdateProject }
161- onDeleteProject = { onDeleteProject }
162- // View handlers
163- onViewChange = { onViewChange }
164- onToggleMobileMenu = { onToggleMobileMenu }
165- // Team handlers
166- onTeamClick = { onTeamClick }
167- onTeamChange = { onTeamChange }
168- onCopilotClick = { onCopilotClick }
136+ < ProjectView
137+ initialProjects = { projects }
138+ initialEpics = { epics }
139+ initialSprints = { sprints }
140+ initialTasks = { tasks }
141+ // Task handlers
142+ onAddTask = { onAddTask }
143+ onUpdateTask = { onUpdateTask }
144+ onDeleteTask = { onDeleteTask }
145+ onTaskClick = { onTaskClick }
146+ // Epic handlers
147+ onAddEpic = { onAddEpic }
148+ onUpdateEpic = { onUpdateEpic }
149+ onDeleteEpic = { onDeleteEpic }
150+ onAddTaskToEpic = { onAddTaskToEpic }
151+ // Sprint handlers
152+ onAddSprint = { onAddSprint }
153+ onUpdateSprint = { onUpdateSprint }
154+ onDeleteSprint = { onDeleteSprint }
155+ // Project handlers
156+ onAddProject = { onAddProject }
157+ onUpdateProject = { onUpdateProject }
158+ onDeleteProject = { onDeleteProject }
159+ // View handlers
160+ onViewChange = { onViewChange }
161+ onToggleMobileMenu = { onToggleMobileMenu }
162+ // Team handlers
163+ onTeamClick = { onTeamClick }
164+ onTeamChange = { onTeamChange }
165+ onCopilotClick = { onCopilotClick }
169166 />
170167 )
171168 default :
0 commit comments