fix: make kanban cards clickable to open notes/details sidebar

Clicking a kanban card now opens the notes sidebar for editing notes,
subtasks, and other task details. Cards also show subtask count and
notes indicator. Added FileText icon import.

v1.54.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
mARTin 2026-03-21 19:42:20 +01:00
parent bce86aeb9b
commit aece7049c0
2 changed files with 19 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "my-weekly-todo-list", "name": "my-weekly-todo-list",
"version": "1.54.0", "version": "1.54.1",
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -78,6 +78,7 @@ import {
ListTodo, ListTodo,
Filter, Filter,
Pencil, Pencil,
FileText,
} from "lucide-react"; } from "lucide-react";
// Types // Types
@ -6454,6 +6455,13 @@ export default function WeeklyView() {
e.dataTransfer.setData("text/kanban-task", task.id); e.dataTransfer.setData("text/kanban-task", task.id);
e.dataTransfer.effectAllowed = "move"; e.dataTransfer.effectAllowed = "move";
}} }}
onClick={(e) => {
// Don't open notes if clicking checkbox, contentEditable, or buttons
const target = e.target as HTMLElement;
if (target.tagName === "INPUT" || target.contentEditable === "true" || target.closest("button")) return;
setSelectedTaskForNotes(task);
}}
style={{ cursor: "pointer" }}
> >
<div className="kanban-card-header"> <div className="kanban-card-header">
{effectiveShowTaskCheckboxes && ( {effectiveShowTaskCheckboxes && (
@ -6479,6 +6487,16 @@ export default function WeeklyView() {
{task.title} {task.title}
</span> </span>
</div> </div>
{task.subTasks && task.subTasks.length > 0 && (
<div className="kanban-card-subtasks" style={{ fontSize: "0.7rem", color: "#9ca3af", marginTop: "2px" }}>
{task.subTasks.filter(st => st.completed).length}/{task.subTasks.length} {language === "de" ? "Unteraufgaben" : "subtasks"}
</div>
)}
{task.markdownContent && (
<div className="kanban-card-has-notes" style={{ fontSize: "0.65rem", color: "#9ca3af", marginTop: "2px", display: "flex", alignItems: "center", gap: "3px" }}>
<FileText size={10} /> {language === "de" ? "Notizen" : "Notes"}
</div>
)}
{(task.scheduledDate || task.startTime) && ( {(task.scheduledDate || task.startTime) && (
<div className="kanban-card-date"> <div className="kanban-card-date">
{task.scheduledDate && new Date(task.scheduledDate).toLocaleDateString(language, { weekday: "short", month: "short", day: "numeric" })} {task.scheduledDate && new Date(task.scheduledDate).toLocaleDateString(language, { weekday: "short", month: "short", day: "numeric" })}