A To do card on server pages and in a device's drawer

- The open jobs about a server (or device) are listed on its page, with a line to add another already about it and a box to tick one off with Undo
- GET /api/todos takes ?targetType=&targetId= to list only those about one thing
- README and ROLES updated

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-20 22:46:12 +02:00
1 parent 18ceed62e8
commit 788b3e073c
10 files changed
+164 -9

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ type Place = { type: "server" | "device"; id: number; name: string };
const today = () => new Date().toISOString().slice(0, 10);
function dueWords(t: TodoItem): { text: string; className: string } | null {
export function dueWords(t: TodoItem): { text: string; className: string } | null {
if (!t.dueDate) return null;
const days = Math.round((Date.parse(`${t.dueDate}T00:00:00Z`) - Date.parse(`${today()}T00:00:00Z`)) / 86_400_000);
if (t.doneAt) return { text: formatDate(new Date(`${t.dueDate}T12:00:00Z`)), className: "text-secondary" };