From 2793ad2c75299a01206eac37c284944f084e5f7e Mon Sep 17 00:00:00 2001 From: Birdup <34012548+birdup000@users.noreply.github.com> Date: Fri, 27 Dec 2024 15:13:11 -0600 Subject: [PATCH] Modified app/components/ModernTaskPanel.tsx --- app/components/ModernTaskPanel.tsx | 98 ++++++++++-------------------- 1 file changed, 31 insertions(+), 67 deletions(-) diff --git a/app/components/ModernTaskPanel.tsx b/app/components/ModernTaskPanel.tsx index 29de9c4..2439728 100644 --- a/app/components/ModernTaskPanel.tsx +++ b/app/components/ModernTaskPanel.tsx @@ -158,28 +158,19 @@ const ModernTaskPanel: React.FC = ({
- <button + + >🔀 Grouping Settings
{/* Right Sidebar */}
{agixtConfig.backendUrl && agixtConfig.authToken && ({ const newTask: Task = { id: Date.now().toString(), title: suggestion.title || '', @@ -328,79 +314,57 @@ const ModernTaskPanel: React.FC = ({ }; onAddTask(newTask); }} - onTaskOptimization={(taskIds) => { + onTaskOptimization={(taskIds) =>{ const optimizedTasks = taskIds - .map(id => tasks.find(t => t.id === id)) + .map(id =>tasks.find(t =>t.id === id)) .filter(Boolean) as Task[]; onReorderTasks(optimizedTasks); }} tasks={tasks} selectedTask={selectedTask} - /> - )} - </div> - </div> - - {/* Modals */} - {isLayoutSettingsOpen && ( - <div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center"> - <LayoutSettingsPanel + />)}
{/* Modals */} + {isLayoutSettingsOpen && (
{ setLayoutSettings(newSettings); setIsLayoutSettingsOpen(false); }} - onClose={() => setIsLayoutSettingsOpen(false)} - /> - </div> - )} + onClose={() =>setIsLayoutSettingsOpen(false)} + />
)} - {isGroupingSettingsOpen && ( - <div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center"> - <GroupingSettingsPanel + {isGroupingSettingsOpen && (
{ setGroupingSettings(newSettings); setIsGroupingSettingsOpen(false); }} - onClose={() => setIsGroupingSettingsOpen(false)} - /> - </div> - )} + onClose={() =>setIsGroupingSettingsOpen(false)} + />
)} - {isAGiXTConfigOpen && ( - <div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center"> - <AGiXTConfig - onClose={() => setIsAGiXTConfigOpen(false)} - onSave={(config) => { + {isAGiXTConfigOpen && (
setIsAGiXTConfigOpen(false)} + onSave={(config) =>{ setAgixtConfig(config); setIsAGiXTConfigOpen(false); }} - /> - </div> - )} + />
)} - {isEditorOpen && ( - <div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center"> - <TaskForm - onSubmit={(task) => { + {isEditorOpen && (
{ onAddTask(task); setIsEditorOpen(false); }} - onCancel={() => setIsEditorOpen(false)} + onCancel={() =>setIsEditorOpen(false)} lists={lists} - /> - </div> - )} + />
)} - {selectedTask && ( - <TaskDetailsPanel + {selectedTask && (setSelectedTask(null)} onUpdateTask={onUpdateTask} allTasks={tasks} className="fixed inset-y-0 right-0 w-[32rem] shadow-xl" - /> + />)} )}