dodatki i funckje

This commit is contained in:
Mateusz Gruszczyński
2025-08-16 22:34:45 +02:00
parent bf57b6b4e3
commit d526f392b8
4 changed files with 183 additions and 146 deletions

View File

@@ -83,9 +83,11 @@
<div class="row mb-4">
<div class="col-md-6">
<label class="form-label">📆 Utworzono</label>
<p class="form-control-plaintext text-white">
{{ list.created_at.strftime('%Y-%m-%d') }}
</p>
<div>
<span class="badge rounded-pill bg-success rounded-pill text-dark ms-1">
{{ list.created_at.strftime('%Y-%m-%d') }}
</span>
</div>
</div>
<div class="col-md-6">
<label class="form-label">📁 Przenieś do miesiąca (format: rok-miesiąc np 2026-01)</label>

View File

@@ -26,6 +26,10 @@
<div class="card-body text-center">
<p class="small text-truncate mb-1">{{ r.filename }}</p>
<p class="small mb-1">Wgrano: {{ r.uploaded_at.strftime('%Y-%m-%d %H:%M') }}</p>
<p class="small mb-1">
Uploader: {{ r.uploaded_by_user.username if r.uploaded_by_user else "?" }}
</p>
{% if r.filesize and r.filesize >= 1024 * 1024 %}
<p class="small mb-1">Rozmiar: {{ (r.filesize / 1024 / 1024) | round(2) }} MB</p>
{% elif r.filesize %}

View File

@@ -37,11 +37,16 @@
<th>ID</th>
<th>Login</th>
<th>Rola</th>
<th>Listy</th>
<th>Produkty</th>
<th>Paragony</th>
<th>Akcje</th>
</tr>
</thead>
<tbody>
{% for user in users %}
{% for entry in user_data %}
{% set user = entry.user %}
<tr>
<td>{{ user.id }}</td>
<td class="fw-bold">{{ user.username }}</td>
@@ -52,6 +57,9 @@
<span class="badge rounded-pill bg-secondary">Użytkownik</span>
{% endif %}
</td>
<td>{{ entry.list_count }}</td>
<td>{{ entry.item_count }}</td>
<td>{{ entry.receipt_count }}</td>
<td>
<button class="btn btn-sm btn-outline-warning me-1" data-bs-toggle="modal"
data-bs-target="#resetPasswordModal" data-user-id="{{ user.id }}" data-username="{{ user.username }}">