feat: refine quick wins workflow and calendar layout

This commit is contained in:
2026-04-15 12:17:58 +02:00
parent 4aa4447c01
commit 2f2e543a79
12 changed files with 405 additions and 128 deletions

View File

@@ -88,9 +88,14 @@
</main>
<footer class="app-footer">
<a href="https://git.hnz.io/hnzio/putzliga/releases" target="_blank" rel="noreferrer">Version {{ app_version }}</a>
<span>·</span>
<a href="https://hnz.io" target="_blank" rel="noreferrer">(c) 2026 @hnz.io</a>
<div class="app-footer__left">
<a href="https://git.hnz.io/hnzio/putzliga/releases" target="_blank" rel="noreferrer">Version {{ app_version }}</a>
<span>·</span>
<span>Made with ❤️ in Göttingen.</span>
</div>
<div class="app-footer__right">
<a href="https://hnz.io" target="_blank" rel="noreferrer">© 2026 @ hnz.io</a>
</div>
</footer>
</div>
</div>
@@ -123,54 +128,43 @@
</dialog>
<dialog class="complete-dialog" id="quickTaskDialog">
<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>
<form method="post" action="{{ url_for('tasks.quick_create') }}" class="complete-dialog__surface complete-dialog__surface--task" id="quickWinsForm">
{{ quick_task_form.hidden_tag() }}
<div class="quick-win-dialog-header">
<span class="quick-win-dialog-header__badge" aria-hidden="true">{{ icon_svg('quick-wins-sparkles')|safe }}</span>
<div>
<p class="eyebrow">Quick-Wins</p>
<h2>Schnell Punkte abstauben</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>
</div>
<button type="button" class="button button--ghost" id="quickTaskClose">Abbrechen</button>
</div>
<div class="quick-win-tag-grid">
{% for quick_win in quick_wins %}
<label class="quick-win-tag" data-quick-win-tag>
<input type="checkbox" name="quick_win_ids" value="{{ quick_win.id }}" data-quick-win-input>
<span>{{ quick_win.title }}</span>
</label>
{% endfor %}
<label class="quick-win-tag quick-win-tag--custom" data-quick-win-tag>
<input type="checkbox" name="include_custom" value="1" data-quick-win-custom-toggle>
<span>Sonstiges</span>
</label>
</div>
<div class="quick-win-custom-fields" id="quickWinCustomFields" hidden>
<div class="field">
{{ quick_task_form.title.label }}
{{ quick_task_form.title(placeholder="Zum Beispiel: Flur kurz aufräumen", required=False) }}
</div>
<div class="field">
{{ quick_task_form.effort.label }}
{{ quick_task_form.effort(required=False) }}
</div>
</div>
<div class="dialog-actions dialog-actions--stack">
<button type="submit" class="button button--wide" id="quickWinsSubmit" disabled>Quick-Win sichern</button>
<button type="button" class="button button--ghost button--wide" id="quickTaskClose">Abbrechen</button>
</div>
</form>
</dialog>
<form method="post" class="sr-only" id="completeDialogForm">

View File

@@ -35,20 +35,39 @@
<article class="panel">
<p class="eyebrow">Direkt sichtbar</p>
<h2>Aktive Quick-Wins</h2>
<h2>Aktive Quick-Wins bearbeiten</h2>
<div class="quick-win-list">
{% for quick_win in quick_wins %}
<article class="quick-win-manage-card">
<div>
<strong>{{ quick_win.title }}</strong>
<p class="muted">{{ quick_task_config[quick_win.effort].label }} · von {{ quick_win.created_by_user.name }}</p>
</div>
{% if quick_win.created_by_user_id == current_user.id or current_user.is_admin %}
<form method="post" action="{{ url_for('settings.delete_quick_win', quick_win_id=quick_win.id) }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="button button--ghost">Entfernen</button>
</form>
{% endif %}
<form method="post" action="{{ url_for('settings.update_quick_win', quick_win_id=quick_win.id) }}" class="quick-win-manage-form">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="field">
<label for="quick-win-title-{{ quick_win.id }}">Titel</label>
<input id="quick-win-title-{{ quick_win.id }}" type="text" name="title" value="{{ quick_win.title }}" minlength="2" maxlength="160" required>
</div>
<div class="field">
<label for="quick-win-effort-{{ quick_win.id }}">Aufwand</label>
<select id="quick-win-effort-{{ quick_win.id }}" name="effort" required>
{% for effort_key, effort_values in quick_task_config.items() %}
<option value="{{ effort_key }}" {% if quick_win.effort == effort_key %}selected{% endif %}>{{ effort_values.label }}</option>
{% endfor %}
</select>
</div>
<p class="muted">Von {{ quick_win.created_by_user.name }}</p>
<div class="quick-win-manage-card__actions">
<button type="submit" class="button button--secondary">Speichern</button>
{% if quick_win.created_by_user_id == current_user.id or current_user.is_admin %}
<button
type="submit"
class="button button--ghost"
formaction="{{ url_for('settings.delete_quick_win', quick_win_id=quick_win.id) }}"
formmethod="post"
>
Entfernen
</button>
{% endif %}
</div>
</form>
</article>
{% else %}
<div class="empty-state">Noch keine Quick-Wins angelegt. Der erste steht gleich oben bereit.</div>

View File

@@ -71,14 +71,14 @@
<div class="calendar-mobile-day__tasks">
{% for task in group.tasks %}
<a href="{{ url_for('tasks.edit', task_id=task.id) }}" class="calendar-task calendar-task--{{ task.status }}">
<strong class="calendar-task__title">{{ task.title }}</strong>
<small class="calendar-task__person">
<strong class="calendar-task__title" lang="de">{{ task.title|hyphenate_de }}</strong>
<small class="calendar-task__person" lang="de">
{% if task.completed_by_user %}
{{ task.completed_by_user.name }}
{{ task.completed_by_user.name|hyphenate_de }}
{% elif task.assigned_user %}
{{ task.assigned_user.name }}
{{ task.assigned_user.name|hyphenate_de }}
{% else %}
Ohne Zuweisung
{{ 'Ohne Zuweisung'|hyphenate_de }}
{% endif %}
</small>
</a>
@@ -104,14 +104,14 @@
<div class="calendar-day__tasks">
{% for task in tasks_by_day.get(day, []) %}
<a href="{{ url_for('tasks.edit', task_id=task.id) }}" class="calendar-task calendar-task--{{ task.status }}">
<strong class="calendar-task__title">{{ task.title }}</strong>
<small class="calendar-task__person">
<strong class="calendar-task__title" lang="de">{{ task.title|hyphenate_de }}</strong>
<small class="calendar-task__person" lang="de">
{% if task.completed_by_user %}
{{ task.completed_by_user.name }}
{{ task.completed_by_user.name|hyphenate_de }}
{% elif task.assigned_user %}
{{ task.assigned_user.name }}
{{ task.assigned_user.name|hyphenate_de }}
{% else %}
Ohne Zuweisung
{{ 'Ohne Zuweisung'|hyphenate_de }}
{% endif %}
</small>
</a>