Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e77b4604d | |||
| c06473644a | |||
| 6c855ed9d9 | |||
| b09a6f7720 | |||
| 8c5185bd8c | |||
| 0b30f8463f | |||
| 671a9e8e85 |
+7
-3
@@ -9114,7 +9114,7 @@ def library_item_invoices(item_id):
|
||||
flash('Bibliotheks-Modul ist deaktiviert.', 'error')
|
||||
return redirect(url_for('home_admin'))
|
||||
current_permissions = us.get_effective_permissions(session['username'])
|
||||
|
||||
|
||||
if not current_permissions['pages'].get('library_loans_admin', False):
|
||||
flash('Ihnen fehlen die nötigen Berechtigungen, um diese Aktion auszuführen.', 'error')
|
||||
return redirect(url_for('library_view'))
|
||||
@@ -9135,9 +9135,14 @@ def library_item_invoices(item_id):
|
||||
flash('Bibliotheksmedium nicht gefunden.', 'error')
|
||||
return redirect(url_for('library_loans_admin'))
|
||||
|
||||
# Hole die ID sowohl als ObjectId als auch als String
|
||||
item_id_obj = item_doc.get('_id')
|
||||
item_id_str = str(item_id_obj)
|
||||
|
||||
borrow_docs = list(ausleihungen.find(
|
||||
{
|
||||
'Item': str(item_doc.get('_id')),
|
||||
# $in sucht nach Treffern, egal ob die ID als String oder ObjectId in der DB steht
|
||||
'Item': {'$in': [item_id_str, item_id_obj]},
|
||||
'InvoiceData': {'$exists': True, '$ne': {}}
|
||||
},
|
||||
{
|
||||
@@ -9195,7 +9200,6 @@ def library_item_invoices(item_id):
|
||||
if client:
|
||||
client.close()
|
||||
|
||||
|
||||
@app.route('/admin_reset_user_password', methods=['POST'])
|
||||
def admin_reset_user_password():
|
||||
"""
|
||||
|
||||
@@ -1261,10 +1261,10 @@
|
||||
<li><a class="dropdown-item" href="{{ url_for('admin_school_settings') }}">Schulstammdaten</a></li>
|
||||
{% endif %}
|
||||
{% if current_permissions.pages.get('admin_borrowings', False) %}
|
||||
<li><a class="dropdown-item" href="{{ url_for('admin_borrowings') }}">Ausleihen</a></li>
|
||||
<li><a class="dropdown-item" href="{{ url_for('admin_borrowings') }}">Alle Ausleihen</a></li>
|
||||
{% endif %}
|
||||
{% if current_permissions.pages.get('admin_damaged_items', False) %}
|
||||
<li><a class="dropdown-item" href="{{ url_for('admin_damaged_items') }}">Defekte Items</a></li>
|
||||
<li><a class="dropdown-item" href="{{ url_for('admin_damaged_items') }}">Alle defekten Items</a></li>
|
||||
{% endif %}
|
||||
{% if current_permissions.actions.get('can_view_logs', False) and current_permissions.pages.get('admin_audit_dashboard', False) %}
|
||||
<li><a class="dropdown-item" href="{{ url_for('admin_audit_dashboard') }}">Audit Dashboard</a></li>
|
||||
@@ -1372,7 +1372,7 @@
|
||||
{% if 'username' in session and current_permissions.actions.get('can_manage_settings', False) %}
|
||||
<li><h6 class="dropdown-header">Bibliotheks-Verwaltung</h6></li>
|
||||
{% if current_permissions.pages.get('library_loans_admin', False) %}
|
||||
<li><a class="dropdown-item" href="{{ url_for('library_loans_admin') }}">Ausleihen / Defekte Items</a></li>
|
||||
<li><a class="dropdown-item" href="{{ url_for('library_loans_admin') }}">Alle Ausleihen/Alle Defekten Items</a></li>
|
||||
{% endif %}
|
||||
{% if student_cards_module_enabled %}
|
||||
{% if current_permissions.actions.get('can_manage_users', False) %}
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
</select>
|
||||
<input type="text" id="activeStudentCard" placeholder="Aktiver Ausweis (gescannt)">
|
||||
<input type="text" id="manualItemCode" placeholder="Manueller Mediencode (optional)" style="min-width:180px;">
|
||||
<button id="resetCardBtn" class="button" type="button">Ausweis löschen</button>
|
||||
<button id="resetCardBtn" class="button" type="button">Feld zurücksetzen</button>
|
||||
<button id="toggleScannerBtn" class="button" type="button">Scanner starten</button>
|
||||
<label style="display:flex; align-items:center; gap:8px; margin-left:6px;">
|
||||
<input type="checkbox" id="keyboardScannerToggle">
|
||||
|
||||
Reference in New Issue
Block a user