From b96d924d983bc45bf3db7a769d11f47ddf1adb37 Mon Sep 17 00:00:00 2001 From: Birdup <34012548+birdup000@users.noreply.github.com> Date: Tue, 17 Dec 2024 00:06:28 -0600 Subject: [PATCH] checkpoint --- app/components/TaskCard.tsx | 11 ++++++++-- app/components/TaskPanel.tsx | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/app/components/TaskCard.tsx b/app/components/TaskCard.tsx index a692acc..2632b57 100644 --- a/app/components/TaskCard.tsx +++ b/app/components/TaskCard.tsx @@ -81,12 +81,19 @@ export const TaskCard: React.FC = ({ task, index = 0, onClick, on ref={provided.innerRef} {...provided.draggableProps} {...provided.dragHandleProps} - className={`bg-[#333333] border-l-4 p-4 rounded-lg hover:bg-[#383838] transition-colors cursor-pointer ${statusColors[status]} ${isOverdue ? 'ring-2 ring-red-500/50' : ''}`} + className={`bg-[#333333] border-l-4 p-4 rounded-lg hover:bg-[#383838] transition-colors cursor-pointer ${statusColors[status]} ${isOverdue ? 'ring-2 ring-red-500/50' : ''} ${task.recurring && status === 'done' ? 'opacity-75' : ''}`} onClick={onClick} >

- {title} + + {title} + {task.recurring && status === 'done' && ( + + ✓ Completed + + )} + {task.dependsOn && task.dependsOn.length > 0 && ( 🔗 {task.dependsOn.length} diff --git a/app/components/TaskPanel.tsx b/app/components/TaskPanel.tsx index aa66ff2..d0f5971 100644 --- a/app/components/TaskPanel.tsx +++ b/app/components/TaskPanel.tsx @@ -57,6 +57,7 @@ const TaskPanel: React.FC = () => { }; const searchInputRef = React.useRef(null); const [currentTab, setCurrentTab] = React.useState<'tasks' | 'notes'>('tasks'); + const [showCompletedRecurring, setShowCompletedRecurring] = React.useState(true); const [showIntegrations, setShowIntegrations] = React.useState(false); const [isEditorOpen, setIsEditorOpen] = React.useState(false); const { tasks, addTask, updateTask, deleteTask, reorderTasks, importTasks, lists, addList, updateList, deleteList } = useTasks(); @@ -770,6 +771,46 @@ const TaskPanel: React.FC = () => { onReorderTasks={reorderTasks} listId={currentList} /> + + {/* Completed Recurring Tasks Section */} + {filteredTasks().some(t => t.recurring && t.status === 'done') && ( +
+
setShowCompletedRecurring(!showCompletedRecurring)} + > + + + +

Completed Recurring Tasks

+ + ({filteredTasks().filter(t => t.recurring && t.status === 'done').length}) + +
+
+ task.recurring && task.status === 'done')} + onUpdateTask={updateTask} + onTaskClick={(task: Task) => setSelectedTask(task)} + onDeleteTask={(task: Task) => deleteTask(task.id)} + onReorderTasks={reorderTasks} + listId={currentList} + /> +
+
+ )}