fix: kanban stage delete UX and hide all-day events in kanban
- Use trash icon instead of X for delete button - Add cancel X next to the red confirm button - Hide all-day calendar events in kanban view v1.48.2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d1d7c4a7b6
commit
30f495733d
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "my-weekly-todo-list",
|
||||
"version": "1.48.1",
|
||||
"version": "1.48.2",
|
||||
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -6211,8 +6211,8 @@ export default function WeeklyView() {
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{/* All-Day Events Section (above position) */}
|
||||
{allDayPosition === "above" && allDaySection}
|
||||
{/* All-Day Events Section (above position) — hidden in kanban */}
|
||||
{viewStyle !== "kanban" && allDayPosition === "above" && allDaySection}
|
||||
|
||||
{/* Kanban Board View */}
|
||||
{viewStyle === "kanban" && (() => {
|
||||
@ -6466,27 +6466,36 @@ export default function WeeklyView() {
|
||||
</span>
|
||||
<span className="kanban-column-count">{stageTasks.length}</span>
|
||||
{kanbanDeleteStageId === stage.id ? (
|
||||
<button
|
||||
onClick={async () => {
|
||||
// Move all tasks in this stage back to "no phase"
|
||||
const tasksInStage = filteredKanbanTasks.filter(tk => tk.kanbanStage === stage.id);
|
||||
for (const tk of tasksInStage) {
|
||||
await updateTaskFields(tk.id, { kanbanStage: null });
|
||||
}
|
||||
saveKanbanStages(kanbanStages.filter((_, i) => i !== idx));
|
||||
setKanbanDeleteStageId(null);
|
||||
}}
|
||||
style={{ padding: "2px 6px", fontSize: "0.65rem", borderRadius: "4px", border: "none", cursor: "pointer", background: "#ef4444", color: "#fff", fontWeight: 600, flexShrink: 0, whiteSpace: "nowrap" }}
|
||||
>
|
||||
{language === "de" ? "Ja, löschen" : "Confirm"}
|
||||
</button>
|
||||
<div style={{ display: "flex", alignItems: "center", gap: "3px", flexShrink: 0 }}>
|
||||
<button
|
||||
onClick={async () => {
|
||||
// Move all tasks in this stage back to "no phase"
|
||||
const tasksInStage = filteredKanbanTasks.filter(tk => tk.kanbanStage === stage.id);
|
||||
for (const tk of tasksInStage) {
|
||||
await updateTaskFields(tk.id, { kanbanStage: null });
|
||||
}
|
||||
saveKanbanStages(kanbanStages.filter((_, i) => i !== idx));
|
||||
setKanbanDeleteStageId(null);
|
||||
}}
|
||||
style={{ padding: "2px 6px", fontSize: "0.65rem", borderRadius: "4px", border: "none", cursor: "pointer", background: "#ef4444", color: "#fff", fontWeight: 600, whiteSpace: "nowrap" }}
|
||||
>
|
||||
{language === "de" ? "Ja, löschen" : "Confirm"}
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setKanbanDeleteStageId(null)}
|
||||
style={{ padding: "2px", background: "none", border: "none", cursor: "pointer", color: "#9ca3af", display: "flex" }}
|
||||
title={language === "de" ? "Abbrechen" : "Cancel"}
|
||||
>
|
||||
<X size={12} />
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<button
|
||||
onClick={() => setKanbanDeleteStageId(stage.id)}
|
||||
className="kanban-column-delete"
|
||||
title={language === "de" ? "Phase löschen" : "Delete stage"}
|
||||
>
|
||||
<X size={12} />
|
||||
<Trash2 size={12} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
@ -7225,8 +7234,8 @@ export default function WeeklyView() {
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
{/* All-Day Events Section (below position) */}
|
||||
{allDayPosition === "below" && allDaySection}
|
||||
{/* All-Day Events Section (below position) — hidden in kanban */}
|
||||
{viewStyle !== "kanban" && allDayPosition === "below" && allDaySection}
|
||||
|
||||
{/* Someday Section */}
|
||||
{showSomeday && (<>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user