Permet de copier une journée vers un autre jour

Bouton copier sur l'en-tête de chaque jour : les entrées affichées sont
recopiées à la date choisie avec les mêmes heures, projet et note
(POST /ui/jours/{date}/dupliquer, tout ou rien). L'entrée en cours est
ignorée ; projet archivé ou même jour refusés.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Romulus21andClaude Opus 5.5 committed 2026-11-13 19:31:00 +01:00
1 parent 3164fa8048
commit e6a1dd7e4b
7 files changed
+204 -2

No files matched your search

+3
View File
@@ -142,6 +142,9 @@ tr:last-child td { border-bottom: 0; }
.project-link:hover { color: var(--accent); text-decoration-color: currentColor; }
tr.running { background: var(--running); }
tr.day-head th { color: var(--text); font-weight: 600; font-size: .9rem; padding-top: 1.1rem; }
tr.day-head th.actions { padding-top: .6rem; text-align: right; }
tr.day-copy td { background: var(--bg); }
tr.day-copy .row { justify-content: flex-end; flex-wrap: wrap; }
tbody:first-of-type tr.day-head th { padding-top: .6rem; }
tr.editing td { background: var(--bg); }
tr.editing input, tr.editing select { width: 100%; }
+7
View File
@@ -57,6 +57,13 @@ document.body.addEventListener("htmx:beforeCleanupElement", (event) => {
event.target._flatpickr?.destroy();
});
// Shows/hides the "copy this day" form under a day header.
function toggleDayCopy(button) {
const row = button.closest("tbody").querySelector(".day-copy");
row.hidden = !row.hidden;
if (!row.hidden) row.querySelector('input[type="date"]').focus();
}
// Removes a row without a request (e.g. cancelling a duplicate).
function removeRow(button) {
const row = button.closest("tr");