@@ -94,77 +94,100 @@ const TaskAllocator = ({ workspaceId }) => {
9494
9595 return (
9696 < Box p = { 5 } maxWidth = "1200px" mx = "auto" >
97- < Stack spacing = { 4 } mb = { 8 } >
98- < FormControl id = "heading" isRequired >
99- < FormLabel > Heading</ FormLabel >
100- < Input
101- value = { heading }
102- onChange = { ( e ) => setHeading ( e . target . value ) }
103- maxWidth = "100%"
104- />
105- </ FormControl >
106- < FormControl id = "description" isRequired >
107- < FormLabel > Description</ FormLabel >
108- < Textarea
109- value = { description }
110- onChange = { ( e ) => setDescription ( e . target . value ) }
111- maxWidth = "100%"
112- resize = "vertical"
113- />
114- </ FormControl >
115- < FormControl id = "email" isRequired >
116- < FormLabel > Assignee Email</ FormLabel >
117- < Input
118- value = { email }
119- onChange = { ( e ) => setEmail ( e . target . value ) }
120- maxWidth = "100%"
121- />
122- </ FormControl >
123- < FormControl id = "attachments" >
124- < FormLabel > Attachments</ FormLabel >
125- < Input
126- value = { attachments }
127- onChange = { ( e ) => setAttachments ( e . target . value . split ( "," ) ) }
128- maxWidth = "100%"
129- />
130- </ FormControl >
97+ < Stack
98+ direction = { { base : "column" , md : "row" } } // Column on small screens, row on larger screens
99+ spacing = { { base : 8 , md : 12 } }
100+ align = "center"
101+ >
102+ { /* Left Side - Task Input Form */ }
103+ < Stack spacing = { 4 } w = { { base : "90%" , md : "50%" } } mb = { 0 } textAlign = "center" >
104+ < FormControl id = "heading" isRequired >
105+ < FormLabel > Heading</ FormLabel >
106+ < Input
107+ value = { heading }
108+ onChange = { ( e ) => setHeading ( e . target . value ) }
109+ w = "100%"
110+ />
111+ </ FormControl >
112+ < FormControl id = "description" isRequired >
113+ < FormLabel > Description</ FormLabel >
114+ < Textarea
115+ value = { description }
116+ onChange = { ( e ) => setDescription ( e . target . value ) }
117+ w = "100%"
118+ resize = "vertical"
119+ />
120+ </ FormControl >
121+ < FormControl id = "email" isRequired >
122+ < FormLabel > Assignee Email</ FormLabel >
123+ < Input
124+ value = { email }
125+ onChange = { ( e ) => setEmail ( e . target . value ) }
126+ w = "100%"
127+ />
128+ </ FormControl >
129+ < FormControl id = "attachments" >
130+ < FormLabel > Attachments</ FormLabel >
131+ < Input
132+ value = { attachments }
133+ onChange = { ( e ) => setAttachments ( e . target . value . split ( "," ) ) }
134+ w = "100%"
135+ />
136+ </ FormControl >
137+ < Button
138+ colorScheme = "blue"
139+ size = "md"
140+ width = { { base : "80%" , md : "50%" } } // Wider button on mobile, controlled on larger screens
141+ alignSelf = "center"
142+ mb = { 8 }
143+ onClick = { allocateTask }
144+ >
145+ Allocate Task
146+ </ Button >
147+ </ Stack >
148+
149+ { /* Right Side - Status Panels */ }
150+ < Flex
151+ wrap = "wrap"
152+ direction = "column"
153+ w = { { base : "100%" , md : "50%" } }
154+ align = "center"
155+ gap = { 6 }
156+ >
157+ < Box flex = "1" minWidth = { { base : "80%" , md : "40vh" } } >
158+ < StatusPanel
159+ title = "To Do"
160+ tasks = { tasks . filter ( ( task ) => task . status === "to-do" ) }
161+ fetchTasks = { fetchTasks }
162+ config = { config }
163+ onTaskClick = { handleTaskClick }
164+ />
165+ </ Box >
166+ < Box flex = "1" minWidth = { { base : "80%" , md : "40vh" } } >
167+ < StatusPanel
168+ title = "In Progress"
169+ tasks = { tasks . filter ( ( task ) => task . status === "in-progress" ) }
170+ fetchTasks = { fetchTasks }
171+ config = { config }
172+ onTaskClick = { handleTaskClick }
173+ />
174+ </ Box >
175+ < Box flex = "1" minWidth = { { base : "80%" , md : "40vh" } } >
176+ < StatusPanel
177+ title = "Done"
178+ tasks = { tasks . filter ( ( task ) => task . status === "done" ) }
179+ fetchTasks = { fetchTasks }
180+ config = { config }
181+ onTaskClick = { handleTaskClick }
182+ />
183+ </ Box >
184+ </ Flex >
131185 </ Stack >
132- < Button colorScheme = "blue" mb = { 8 } onClick = { allocateTask } >
133- Allocate Task
134- </ Button >
135- < Flex wrap = "wrap" gap = { 6 } >
136- < Box flex = "1" minWidth = "250px" >
137- < StatusPanel
138- title = "To Do"
139- tasks = { tasks . filter ( ( task ) => task . status === "to-do" ) }
140- fetchTasks = { fetchTasks }
141- config = { config }
142- onTaskClick = { handleTaskClick }
143- />
144- </ Box >
145- < Box flex = "1" minWidth = "250px" >
146- < StatusPanel
147- title = "In Progress"
148- tasks = { tasks . filter ( ( task ) => task . status === "in-progress" ) }
149- fetchTasks = { fetchTasks }
150- config = { config }
151- onTaskClick = { handleTaskClick }
152- />
153- </ Box >
154- < Box flex = "1" minWidth = "250px" >
155- < StatusPanel
156- title = "Done"
157- tasks = { tasks . filter ( ( task ) => task . status === "done" ) }
158- fetchTasks = { fetchTasks }
159- config = { config }
160- onTaskClick = { handleTaskClick }
161- />
162- </ Box >
163- </ Flex >
186+
187+ { /* Allocated Tasks Section */ }
164188 < Box mt = { 8 } >
165189 < AllocatedTasks />
166190 </ Box >
167- { /* Add modal for task details here */ }
168191 </ Box >
169192 ) ;
170193} ;
0 commit comments