{% extends 'base.html' %} {% block title %}Panel administratora{% endblock %} {% block content %}

⚙️ Panel administratora

← Powrót do strony głównej

👤 Liczba użytkowników: {{ user_count }}

📝 Liczba list zakupowych: {{ list_count }}

🛒 Liczba produktów: {{ item_count }}

✅ Zakupionych produktów: {{ purchased_items_count }}

{% if top_products %}
🔥 Najczęściej kupowane produkty:
    {% for name, count in top_products %}
  • {{ name }} — {{ count }}×
  • {% endfor %}
{% endif %}
💸 Podsumowanie wydatków:
  • Obecny miesiąc: {{ '%.2f'|format(month_expense_sum) }} PLN
  • Obecny rok: {{ '%.2f'|format(year_expense_sum) }} PLN
  • Całkowite: {{ '%.2f'|format(total_expense_sum) }} PLN

📄 Wszystkie listy zakupowe

{% for e in enriched_lists %} {% set l = e.list %} {% endfor %}
ID Tytuł Status Utworzono Właściciel Produkty Wypełnienie Komentarze Paragony Wydatki Akcje
{{ l.id }} {{ l.title }} {% if l.is_archived %} Archiwalna {% elif l.is_temporary and l.expires_at and l.expires_at < now %} Wygasła {% else %} Aktywna {% endif %} {{ l.created_at.strftime('%Y-%m-%d %H:%M') if l.created_at else '-' }} {% if l.owner_id %} {{ l.owner_id }} / {{ l.owner.username if l.owner else 'Brak użytkownika' }} {% else %} - {% endif %} {{ e.total_count }} {{ e.purchased_count }}/{{ e.total_count }} ({{ e.percent }}%) {{ e.comments_count }} {{ e.receipts_count }} {% if e.total_expense > 0 %} {{ '%.2f'|format(e.total_expense) }} PLN {% else %} - {% endif %} ✏️ Edytuj liste 📥 Archiwizuj 🗑️ Usuń
{% block scripts %} {% endblock %} {% endblock %}