Todo: daily reminders at fixed time, no date, simplified sidebar
Deploy HouseHub / deploy (push) Successful in 2s

- Remove date field; due_time is now required
- Cron repeats daily via notified_date (resets at midnight)
- Remove Today/Upcoming/Overdue smart views from sidebar
- Task card shows bell icon + time instead of date labels
- Creation no longer sends immediate Discord notification (cron only)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
perco
2026-05-12 15:09:46 +02:00
co-authored by Claude Sonnet 4.6
parent 5d5ccf406d
commit 606dcbf3d7
5 changed files with 27 additions and 56 deletions
+3 -6
View File
@@ -122,10 +122,7 @@ if ($action === 'todos') {
$new = $pdo->prepare("SELECT t.*, l.name as list_name, l.color as list_color, l.icon as list_icon FROM pf_todos t LEFT JOIN pf_todo_lists l ON l.id = t.list_id WHERE t.id=?");
$new->execute([$id]);
$row = $new->fetch();
// Only notify immediately if no due_time (otherwise cron sends it at the right time)
if (empty($d['due_time'])) {
discordNotify($pdo, "📋 **Nouvelle tâche** : " . $title . ($row['list_name'] ? " _(". $row['list_name'] .")_" : ""));
}
// Notifications handled by cron at due_time each day
tOk($row);
}
@@ -148,8 +145,8 @@ if ($action === 'todos') {
// Full update
$title = trim($d['title'] ?? ''); if (!$title) tErr('Titre requis');
// Reset notified if due_time changed
$pdo->prepare("UPDATE pf_todos SET list_id=?, title=?, notes=?, due_date=?, due_time=?, priority=?, notified=0, updated_at=NOW() WHERE id=?")
// Reset notified_date so cron fires again today if time changed
$pdo->prepare("UPDATE pf_todos SET list_id=?, title=?, notes=?, due_date=?, due_time=?, priority=?, notified_date=NULL, updated_at=NOW() WHERE id=?")
->execute([$d['list_id'] ?: null, $title, $d['notes'] ?? null, $d['due_date'] ?: null, $d['due_time'] ?: null, $d['priority'] ?? 'none', $id]);
tOk(['updated' => true]);
}