Software-Sektion + Drucker-Verwaltung + Slot-System + Selbstlern-Loop
Vier zusammenhaengende Iterationen, die das Funktions-Geruest der AG aufbauen.
Alle 6 Migrationen sind idempotent und legen Schema-Erweiterungen + initiale
Seeds an (Mock-Projekte nur, falls Profil 100 existiert — auf prod nicht).
Software-Sektion (Etappe 3):
- software_seite-Tabelle: schlanker Karten-Katalog (slug, titel, urls,
plattform, kategorie, sortierung, Cover-BLOB)
- 7 Initial-Karten (Bambu Studio/Handy, Printables, MakerWorld,
TinkerCAD, Onshape, Gridfinity-Generator)
- Admin-Verwaltung: Liste, Anlegen-Form, Bearbeiten, Aktiv-Toggle,
Hart-Loeschen, Bild-Upload via Crop-Tool (Strg+V/Drag&Drop, 400x400)
Drucker-Verwaltung (Etappe 5-vorgezogen):
- drucker.freigegeben + gesperrt_grund (Lehrer-Sperre fuer Reparatur)
- drucker.manual_url + troubleshooting_url (Override fuer Modell-Defaults)
- SuS-View /drucker (eingeloggt): Kacheln + Sperre-Banner + Belegung
- Admin /admin/drucker: Status-Override (idle/printing/failed/...),
Sperren/Freigeben mit Grund, Inline-Edit fuer URLs
Slot-System / Reservierung (Etappe 7-vorgezogen):
- profil.reservieren_freigeschaltet (Lehrer schaltet manuell frei,
ersetzt L1-Gate-Automatismus)
- services/slots.py: Konflikt-Check, Belegungs-Helper
- SuS-Routen /cockpit/slot/neu (mit Konflikt-Check), /cockpit/slots,
Stornieren
- Admin /admin/slots Uebersicht + /admin/slot/neu (Lehrer reserviert
fuer SuS) + Hart-Loeschen + Profil-Freigabe-Toggle
Selbstlern-Loop (Etappe 6 — Kern):
- projekt-Spalten: 3-Achsen-Eval (Gesamt + Planung + Ausfuehrung),
was_klappte_nicht, cover_blob, modellier_software_slug,
drucker_id_used, makerworld_url
- Regel: max. 1 aktives Projekt pro SuS, neues nur nach Freigabe
(auto bei zufrieden/mittel, Lehrer-Review bei gelernt)
- SuS-Werkstatt-Sektion: Titel + Beschreibung + Software-Dropdown +
Drucker-Dropdown + MakerWorld-URL + Files-Upload (drag&drop,
base64, max 30 MB)
- Cover-Bild via Crop-Tool (Re-use admin_software_bild-Pattern)
- Abschluss-Block: Pflicht Cover + mindestens 1 Datei
- Eval-Form: visuelle 3x3 Radio-Karten + 2 Freitexte
- Lehrer-Review: /admin/projekte mit Filter (wartet/in_arbeit/
abgeschlossen/rueckfrage), Aktionen freigeben/rueckfrage/loeschen
- Oeffentlicher Katalog /projekte: Sortier-Tabelle (Titel/Person/
Status/Erfolg/Datum), aufklappbare Detail mit Cover/Beschreibung/
Datei-Downloads/MakerWorld-Link
- Wiederhol-Logik: "Sowas mache ich auch" via Verknuepfung
(vorlage_projekt_id), bidirektionale Lineage-Banner
Cockpit-Refactoring:
- Projekt-Karte ganz oben (vor Onboarding) mit "Hier weitermachen"
- Check-In-Quick-Actions: nach Auswahl direkt zu /cockpit/projekt/neu,
/drucker, /lektionen, /cockpit/projekt/<aktiv>
- "Modus aendern"-Button im Eingecheckt-Banner
- Admin-Dashboard-Hub mit Karten: SuS-Profile, Software, Lektionen,
Drucker, Reservierungen, Projekte (Badge bei wartenden), Alph
Bug-Fixes:
- Admin-Login redirected jetzt auf /admin/dashboard statt /admin/profile
- app.py: neue Jinja-Filter iso_format + dauer_min
- .gitignore: .claude/ ausschliessen (lokale launch.json)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -99,7 +99,7 @@
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card" style="background: #EAFBF1; border-left: 4px solid var(--success);">
|
||||
<div class="card" style="background: #EAFBF1; border-left: 4px solid var(--success); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;">
|
||||
<p style="margin: 0; font-size: 0.9rem;">
|
||||
<strong>Heute eingecheckt:</strong>
|
||||
{% if status.check_in_heute.modus == 'weiter_wie_bisher' %}Arbeite weiter
|
||||
@@ -110,6 +110,85 @@
|
||||
{% else %}{{ status.check_in_heute.modus }}{% endif %}
|
||||
{% if status.check_in_heute.freitext %} — „{{ status.check_in_heute.freitext }}"{% endif %}
|
||||
</p>
|
||||
<form method="post" action="{{ url_for('profil.check_in_zuruecksetzen') }}" style="margin: 0;">
|
||||
<button class="btn btn-secondary" style="padding: 0.3rem 0.7rem; font-size: 0.8rem;">
|
||||
Modus aendern
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# ====== PROJEKT-KARTE — ganz oben, damit "Hier weitermachen" sofort sichtbar ist ====== #}
|
||||
{% if status.hat_projekte or not status.ist_neu or status.projekt.letztes %}
|
||||
<div class="card" style="margin-top: 1rem;
|
||||
{% if status.projekt.aktiv %}border-left: 4px solid var(--success);{% endif %}">
|
||||
<h2>{% if status.paarung %}Euer Projekt{% else %}Dein Projekt{% endif %}</h2>
|
||||
|
||||
{% if status.projekt.aktiv %}
|
||||
{# === Aktives Projekt: Weitermachen-Karte === #}
|
||||
<div style="display: flex; gap: 1rem; align-items: center; margin-top: 0.5rem; flex-wrap: wrap;">
|
||||
<div style="flex: 0 0 120px;">
|
||||
{% if status.projekt.aktiv.hat_cover %}
|
||||
<img src="{{ url_for('api.projekt_cover', projekt_id=status.projekt.aktiv.id) }}" alt=""
|
||||
style="width: 120px; height: 120px; object-fit: cover; border-radius: 8px;">
|
||||
{% else %}
|
||||
<div style="width: 120px; height: 120px; background: linear-gradient(135deg, #ECF0F1, #D5DBDB);
|
||||
border-radius: 8px; display: flex; align-items: center; justify-content: center;
|
||||
font-size: 2.5rem; color: var(--text-light);">🎯</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div style="flex: 1; min-width: 250px;">
|
||||
<h3 style="margin: 0 0 0.4rem 0;">{{ status.projekt.aktiv.titel }}</h3>
|
||||
{% if status.projekt.aktiv.beschreibung_md %}
|
||||
<div style="font-size: 0.9rem; color: var(--text); max-height: 4.5em; overflow: hidden;">
|
||||
{{ status.projekt.aktiv.beschreibung_md|markdown }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div style="margin-top: 0.8rem; display: flex; gap: 0.5rem; flex-wrap: wrap;">
|
||||
<a href="{{ url_for('profil.projekt_detail', projekt_id=status.projekt.aktiv.id) }}"
|
||||
class="btn btn-primary">Hier weitermachen →</a>
|
||||
<a href="{{ url_for('profil.projekt_abschluss', projekt_id=status.projekt.aktiv.id) }}"
|
||||
class="btn btn-secondary" style="font-size: 0.85rem;">Abschliessen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% elif status.projekt.letztes and status.projekt.letztes.freigabe_status == 'wartet_auf_freigabe' %}
|
||||
<div style="background: #FEF9E7; padding: 0.8rem; border-radius: 6px; border-left: 4px solid var(--warning);">
|
||||
<strong>⏳ Wartet auf Freigabe:</strong>
|
||||
<a href="{{ url_for('profil.projekt_detail', projekt_id=status.projekt.letztes.id) }}">{{ status.projekt.letztes.titel }}</a>
|
||||
<div style="font-size: 0.85rem; margin-top: 0.3rem; color: var(--text-light);">
|
||||
Der Lehrer schaut drueber. Sobald freigegeben, kannst du ein neues Projekt anfangen.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% elif status.projekt.letztes and status.projekt.letztes.freigabe_status == 'rueckfrage' %}
|
||||
<div style="background: #FADBD8; padding: 0.8rem; border-radius: 6px; border-left: 4px solid var(--danger);">
|
||||
<strong>❓ Rueckfrage offen zu:</strong>
|
||||
<a href="{{ url_for('profil.projekt_detail', projekt_id=status.projekt.letztes.id) }}">{{ status.projekt.letztes.titel }}</a>
|
||||
<div style="font-size: 0.85rem; margin-top: 0.3rem;">
|
||||
Siehe Rueckfrage-Banner oben, beantworte sie — dann kann der Lehrer freigeben.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<p style="color: var(--text-light); margin-bottom: 0.8rem;">
|
||||
Du hast gerade kein laufendes Projekt. Bereit fuer was Neues?
|
||||
</p>
|
||||
{% if status.projekt.darf_neues %}
|
||||
<a href="{{ url_for('profil.projekt_neu') }}" class="btn btn-primary">+ Neues Projekt anfangen</a>
|
||||
{% else %}
|
||||
<div style="background: #FEF9E7; padding: 0.6rem 0.8rem; border-radius: 6px; font-size: 0.9rem;">
|
||||
{{ status.projekt.sperr_grund }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if status.projekt.aktiv or status.projekt.letztes %}
|
||||
<div style="margin-top: 0.8rem; font-size: 0.85rem;">
|
||||
<a href="{{ url_for('profil.projekte_liste') }}" style="color: var(--text-light);">Alle meine Projekte ansehen →</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -163,30 +242,6 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# ====== PROJEKT-KARTE (V1: nur wenn Projekte oder Onboarding fertig) ====== #}
|
||||
{% if status.hat_projekte or not status.ist_neu %}
|
||||
<div class="card">
|
||||
<h2>{% if status.paarung %}Euer Projekt{% else %}Dein Projekt{% endif %}</h2>
|
||||
{% if status.aktive_projekte %}
|
||||
{% for p in status.aktive_projekte %}
|
||||
<div style="margin-bottom: 0.8rem;">
|
||||
<strong>{{ p.titel }}</strong>
|
||||
{% if p.beschreibung_md %}
|
||||
<div style="margin-top: 0.3rem; font-size: 0.9rem;">{{ p.beschreibung_md|markdown }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p style="color: var(--text-light);">
|
||||
Du hast noch kein laufendes Projekt.
|
||||
</p>
|
||||
<p style="margin-top: 0.5rem; font-size: 0.85rem; color: var(--text-light);">
|
||||
<em>Projekt-Anlage kommt mit Etappe 6.</em>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# ====== PAARUNG / TEAM-KARTE — immer wenn Paarung aktiv, sonst nur fuer Erfahrene ====== #}
|
||||
{% if status.paarung or not status.ist_neu %}
|
||||
<div class="card">
|
||||
|
||||
Reference in New Issue
Block a user