feat: add shared quick wins workflow

This commit is contained in:
2026-04-15 11:49:46 +02:00
parent 07ab0461e9
commit 4aa4447c01
14 changed files with 437 additions and 137 deletions

View File

@@ -105,7 +105,7 @@
{% endfor %}
</nav>
<button type="button" class="fab-quick-task" id="quickTaskOpen" aria-label="Schnellaufgabe anlegen">
<button type="button" class="fab-quick-task" id="quickTaskOpen" aria-label="Quick-Wins öffnen">
{{ nav_icon('plus') }}
</button>
@@ -123,25 +123,54 @@
</dialog>
<dialog class="complete-dialog" id="quickTaskDialog">
<form method="post" action="{{ url_for('tasks.quick_create') }}" class="complete-dialog__surface complete-dialog__surface--task">
{{ quick_task_form.hidden_tag() }}
<p class="eyebrow">Schnellaufgabe</p>
<h2>Direkt etwas für dich anlegen</h2>
<p class="muted">Titel und Aufwand reichen. Die Aufgabe wird automatisch dir zugewiesen und auf heute gesetzt.</p>
<div class="field">
{{ quick_task_form.title.label }}
{{ quick_task_form.title(placeholder="Zum Beispiel: Küche kurz aufräumen") }}
<div class="complete-dialog__surface complete-dialog__surface--task">
<p class="eyebrow">Quick-Wins</p>
<h2>Schnell etwas abhaken</h2>
<p class="muted">Alle Quick-Wins sind für das ganze Team sichtbar. Für „Sonstiges“ kannst du Titel und Aufwand frei wählen.</p>
<div class="quick-win-grid">
{% for quick_win in quick_wins %}
<article class="quick-win-card">
<div>
<strong>{{ quick_win.title }}</strong>
<p>{{ quick_task_config[quick_win.effort].label }}</p>
</div>
<form method="post" action="{{ url_for('tasks.quick_create') }}" class="quick-win-card__actions">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="quick_mode" value="preset">
<input type="hidden" name="quick_win_id" value="{{ quick_win.id }}">
<button type="submit" class="button button--secondary" name="quick_action" value="save">Speichern</button>
<button type="submit" class="button" name="quick_action" value="complete">Direkt erledigt</button>
</form>
</article>
{% endfor %}
<details class="quick-win-custom">
<summary class="quick-win-card quick-win-card--custom">
<div>
<strong>Sonstiges (bitte auch nutzen)</strong>
<p>Eigener Titel und freier Aufwand</p>
</div>
{{ nav_icon('plus') }}
</summary>
<form method="post" action="{{ url_for('tasks.quick_create') }}" class="quick-win-custom__body">
{{ quick_task_form.hidden_tag() }}
<input type="hidden" name="quick_mode" value="custom">
<div class="field">
{{ quick_task_form.title.label }}
{{ quick_task_form.title(placeholder="Zum Beispiel: Flur kurz aufräumen") }}
</div>
<div class="field">
{{ quick_task_form.effort.label }}
{{ quick_task_form.effort() }}
</div>
<div class="dialog-actions">
<button type="submit" class="button" name="quick_action" value="save">Aufgabe speichern</button>
<button type="submit" class="button button--secondary" name="quick_action" value="complete">Aufgabe als erledigt speichern</button>
</div>
</form>
</details>
</div>
<div class="field">
{{ quick_task_form.effort.label }}
{{ quick_task_form.effort() }}
</div>
<div class="dialog-actions">
<button type="submit" class="button" name="quick_action" value="save">Aufgabe speichern</button>
<button type="submit" class="button button--secondary" name="quick_action" value="complete">Aufgabe als erledigt speichern</button>
<button type="button" class="button button--ghost" id="quickTaskClose">Abbrechen</button>
</div>
</form>
<button type="button" class="button button--ghost" id="quickTaskClose">Abbrechen</button>
</div>
</dialog>
<form method="post" class="sr-only" id="completeDialogForm">