From 4abbb50f8cbe0752eadd001c081756387f4cc1d2 Mon Sep 17 00:00:00 2001 From: orejudo Date: Sat, 4 Jul 2026 11:56:12 +0200 Subject: [PATCH] Aufgaben-Tabelle: inline bearbeitbar, Zuweisung direkt sichtbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enddatum und Status lassen sich jetzt direkt in der Tabelle ändern, Zuweisungen können entfernt werden und das Zuweisungsformular ist direkt in der Zugewiesen-Spalte statt versteckt im Verwalten-Bereich, damit auch bei bereits bestehenden Aufgaben nachträglich Mitarbeiter zugewiesen werden können. Zusätzlich verhindert ein Guard doppeltes Duplizieren durch Mehrfachklick. --- client/src/ProjectsPanel.vue | 57 ++++++++++++++++++++++++++++-------- client/src/panel.css | 32 +++++++++++++++++++- 2 files changed, 75 insertions(+), 14 deletions(-) diff --git a/client/src/ProjectsPanel.vue b/client/src/ProjectsPanel.vue index ed602ed..fb4bedd 100644 --- a/client/src/ProjectsPanel.vue +++ b/client/src/ProjectsPanel.vue @@ -7,6 +7,7 @@ const newProject = reactive({ name: '', description: '', start_date: '', end_dat const newTask = reactive({}); const newAssignment = reactive({}); const newDuplicate = reactive({}); +const duplicating = reactive({}); const expanded = reactive({}); async function addProject() { @@ -45,10 +46,16 @@ function duplicateForm(taskId) { } async function duplicateTask(projectId, taskId) { + if (duplicating[taskId]) return; const form = duplicateForm(taskId); if (!form.start_date || !form.end_date) return; - await store.duplicateTask(projectId, taskId, { ...form }); - Object.assign(form, { start_date: '', end_date: '' }); + duplicating[taskId] = true; + try { + await store.duplicateTask(projectId, taskId, { ...form }); + Object.assign(form, { start_date: '', end_date: '' }); + } finally { + duplicating[taskId] = false; + } } @@ -89,13 +96,41 @@ async function duplicateTask(projectId, taskId) { {{ task.name }} {{ formatDate(task.start_date) }} - {{ formatDate(task.end_date) }} + + + {{ task.estimated_hours }} - {{ task.status }} + + + {{ a.employee_name }} ({{ a.allocated_hours_per_week }}h) + +
+ + + +
@@ -118,19 +153,15 @@ async function duplicateTask(projectId, taskId) {
{{ task.name }} -
- - - -
Aufgabe zu anderem Zeitraum wiederholen: - +
diff --git a/client/src/panel.css b/client/src/panel.css index 9dd08d8..21a3bcb 100644 --- a/client/src/panel.css +++ b/client/src/panel.css @@ -212,7 +212,9 @@ button.btn.danger { } .tag { - display: inline-block; + display: inline-flex; + align-items: center; + gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; @@ -221,6 +223,34 @@ button.btn.danger { margin-right: 4px; } +.tag-remove { + border: none; + background: none; + cursor: pointer; + color: inherit; + font-size: 13px; + line-height: 1; + padding: 0; +} + +.assign-inline { + display: flex; + gap: 4px; + align-items: center; + margin-top: 6px; +} + +.assign-inline select, +.assign-inline input { + padding: 4px 6px; + font-size: 12px; +} + +.assign-inline button { + padding: 4px 8px; + font-size: 12px; +} + .muted { color: var(--muted); font-size: 13px;