Compare commits
3 Commits
v1.0.4-dev.1
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 0409813cbe | |||
| 95e02b7a75 | |||
| 3b0d499958 |
@@ -133,6 +133,34 @@
|
||||
background: var(--ui-surface);
|
||||
}
|
||||
|
||||
/* Blue edge styling for inputs and action button */
|
||||
#activeStudentCard,
|
||||
#manualItemCode {
|
||||
border: 2px solid #3b82f6 !important;
|
||||
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
|
||||
}
|
||||
|
||||
#activeStudentCard:focus,
|
||||
#manualItemCode:focus {
|
||||
outline: none;
|
||||
border-color: #2563eb !important;
|
||||
box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25) !important;
|
||||
}
|
||||
|
||||
#manualActionBtn {
|
||||
background: #4f46e5 !important;
|
||||
color: white !important;
|
||||
border: 2px solid #3b82f6 !important;
|
||||
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
|
||||
}
|
||||
|
||||
#manualActionBtn:hover {
|
||||
background: #4338ca !important;
|
||||
border-color: #2563eb !important;
|
||||
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
|
||||
}
|
||||
|
||||
.library-scan-status {
|
||||
margin-top: 10px;
|
||||
font-size: 0.92em;
|
||||
@@ -605,7 +633,6 @@
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
|
||||
.detail-gallery-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -665,18 +692,18 @@
|
||||
<div class="library-scan-controls">
|
||||
<select id="scanModeSelect" aria-label="Scan-Modus">
|
||||
<option value="card_only">Nur Ausweis erfassen</option>
|
||||
<option value="quick_toggle">Schnellmodus: Ausweis + Mediencode</option>
|
||||
<option value="quick_toggle">Schnellmodus: 1x Ausweis + 1x Mediencode</option>
|
||||
<option value="continuous">Dauermodus: 1x Ausweis, dann N Medien</option>
|
||||
<option value="return_only">Nur Rückgabe (nur Mediencode)</option>
|
||||
</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">Feld zurücksetzen</button>
|
||||
<button id="toggleScannerBtn" class="button" type="button">Scanner starten</button>
|
||||
<button id="toggleScannerBtn" class="button" type="button">Handyscanner starten</button>
|
||||
<button id="physicalScannerBtn" class="button" type="button" style="margin-left:6px;">
|
||||
Physischer Scanner starten
|
||||
</button>
|
||||
<button id="manualActionBtn" class="button" type="button" style="margin-left:6px; background:#4f46e5; color:white;">Code verarbeiten</button>
|
||||
<button id="manualActionBtn" class="button" type="button" style="margin-left:6px;">Code verarbeiten</button>
|
||||
</div>
|
||||
|
||||
<div class="library-scan-reader-wrap" id="scanReaderWrap" style="display: none; margin-top: 15px;">
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
<!--
|
||||
Copyright 2025-2026 AIIrondev
|
||||
|
||||
Licensed under the Inventarsystem EULA (Endbenutzer-Lizenzvertrag).
|
||||
See Legal/LICENSE for the full license text.
|
||||
Unauthorized commercial use, SaaS hosting, or removal of branding is prohibited.
|
||||
For commercial licensing inquiries: https://github.com/AIIrondev
|
||||
-->
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Bibliotheksausweise - Inventarsystem{% endblock %}
|
||||
@@ -21,7 +13,6 @@
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
/* Neu strukturiertes Layout für Formular & Import */
|
||||
.dashboard-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
@@ -145,6 +136,38 @@
|
||||
background: #5a6268;
|
||||
}
|
||||
|
||||
/* Filter Controls Styling */
|
||||
.filter-bar {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-bottom: 15px;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
background: var(--ui-bg);
|
||||
padding: 12px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.filter-bar input,
|
||||
.filter-bar select {
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.filter-bar input {
|
||||
flex: 1;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.filter-counter {
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.cards-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
@@ -255,7 +278,8 @@
|
||||
}
|
||||
|
||||
:root[data-theme="dark"] .student-card-form,
|
||||
:root[data-theme="dark"] .import-card {
|
||||
:root[data-theme="dark"] .import-card,
|
||||
:root[data-theme="dark"] .filter-bar {
|
||||
background: var(--ui-surface) !important;
|
||||
color: var(--ui-text) !important;
|
||||
border-color: var(--ui-border) !important;
|
||||
@@ -269,7 +293,8 @@
|
||||
:root[data-theme="dark"] .import-card p,
|
||||
:root[data-theme="dark"] .rollover-hint,
|
||||
:root[data-theme="dark"] .empty-state,
|
||||
:root[data-theme="dark"] .empty-state p {
|
||||
:root[data-theme="dark"] .empty-state p,
|
||||
:root[data-theme="dark"] .filter-counter {
|
||||
color: var(--ui-text-muted) !important;
|
||||
}
|
||||
|
||||
@@ -286,6 +311,8 @@
|
||||
:root[data-theme="dark"] .form-group input,
|
||||
:root[data-theme="dark"] .form-group select,
|
||||
:root[data-theme="dark"] .form-group textarea,
|
||||
:root[data-theme="dark"] .filter-bar input,
|
||||
:root[data-theme="dark"] .filter-bar select,
|
||||
:root[data-theme="dark"] .export-buttons form,
|
||||
:root[data-theme="dark"] .export-buttons select {
|
||||
background: var(--ui-bg) !important;
|
||||
@@ -297,6 +324,8 @@
|
||||
:root[data-theme="dark"] .form-group input:focus,
|
||||
:root[data-theme="dark"] .form-group select:focus,
|
||||
:root[data-theme="dark"] .form-group textarea:focus,
|
||||
:root[data-theme="dark"] .filter-bar input:focus,
|
||||
:root[data-theme="dark"] .filter-bar select:focus,
|
||||
:root[data-theme="dark"] .export-buttons select:focus {
|
||||
border-color: #60a5fa !important;
|
||||
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22) !important;
|
||||
@@ -334,6 +363,16 @@
|
||||
.export-buttons > a {
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
.filter-bar {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.filter-counter {
|
||||
margin-left: 0;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
@@ -474,6 +513,7 @@
|
||||
<h3 style="margin:0 0 8px 0;">Excel-Import</h3>
|
||||
<p style="margin:0 0 12px 0; color:#555; font-size:13px; line-height:1.4;">
|
||||
Laden Sie eine <strong>.xlsx</strong>- oder <strong>.csv</strong>-Datei hoch (z. B. aus <strong>ASV</strong>). Erkannt werden Rufame, Nachname, Klasse*, Ausweis-ID*, lokales Differenzierungsmerkmal*, Notizen* & Ausleihdauer*.
|
||||
Hinweis: Die Daten werden Validiert und müssen dann noch einmal aus sicherheits gründen hochgeladen werden!
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -503,7 +543,20 @@
|
||||
<div>
|
||||
<h2 style="margin-bottom: 15px;">Registrierte Ausweise</h2>
|
||||
{% if student_cards %}
|
||||
<table class="cards-table">
|
||||
<!-- Filter Options -->
|
||||
<div class="filter-bar">
|
||||
<input type="text" id="cardSearchInput" placeholder="🔍 Name oder Ausweis-ID suchen...">
|
||||
<select id="classFilterSelect">
|
||||
<option value="">Alle Klassen</option>
|
||||
{% for cls in available_classes %}
|
||||
<option value="{{ cls }}">{{ cls }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="button" id="clearFilterBtn" class="btn-cancel" style="padding: 8px 12px; font-size: 13px;">Zurücksetzen</button>
|
||||
<span class="filter-counter" id="filterCounter">Angezeigt: {{ student_cards|length }} / {{ student_cards|length }}</span>
|
||||
</div>
|
||||
|
||||
<table class="cards-table" id="cardsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Ausweis-ID</th>
|
||||
@@ -516,7 +569,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for card in student_cards %}
|
||||
<tr>
|
||||
<tr class="card-row" data-id="{{ card.AusweisId|lower }}" data-name="{{ card.SchülerName|lower }}" data-class="{{ card.Klasse or '' }}">
|
||||
<td><strong>{{ card.AusweisId }}</strong></td>
|
||||
<td>{{ card.SchülerName }}</td>
|
||||
<td>{{ card.Klasse or '—' }}</td>
|
||||
@@ -546,6 +599,10 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="noResultsMsg" class="empty-state" style="display: none;">
|
||||
<p>Keine passende Ausweise für diesen Filter gefunden.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-state">
|
||||
<p>Keine Bibliotheksausweise registriert.</p>
|
||||
@@ -557,7 +614,56 @@
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/qrcode.js"></script>
|
||||
<script>
|
||||
// All PDF exports now go through backend routes
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const searchInput = document.getElementById('cardSearchInput');
|
||||
const classSelect = document.getElementById('classFilterSelect');
|
||||
const clearBtn = document.getElementById('clearFilterBtn');
|
||||
const filterCounter = document.getElementById('filterCounter');
|
||||
const rows = document.querySelectorAll('.card-row');
|
||||
const noResultsMsg = document.getElementById('noResultsMsg');
|
||||
const totalRows = rows.length;
|
||||
|
||||
function filterCards() {
|
||||
const query = searchInput ? searchInput.value.toLowerCase().trim() : '';
|
||||
const selectedClass = classSelect ? classSelect.value : '';
|
||||
let visibleCount = 0;
|
||||
|
||||
rows.forEach(row => {
|
||||
const id = row.getAttribute('data-id') || '';
|
||||
const name = row.getAttribute('data-name') || '';
|
||||
const cardClass = row.getAttribute('data-class') || '';
|
||||
|
||||
const matchesQuery = !query || id.includes(query) || name.includes(query);
|
||||
const matchesClass = !selectedClass || cardClass === selectedClass;
|
||||
|
||||
if (matchesQuery && matchesClass) {
|
||||
row.style.display = '';
|
||||
visibleCount++;
|
||||
} else {
|
||||
row.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
if (filterCounter) {
|
||||
filterCounter.textContent = `Angezeigt: ${visibleCount} / ${totalRows}`;
|
||||
}
|
||||
|
||||
if (noResultsMsg) {
|
||||
noResultsMsg.style.display = (visibleCount === 0 && totalRows > 0) ? 'block' : 'none';
|
||||
}
|
||||
}
|
||||
|
||||
if (searchInput) searchInput.addEventListener('input', filterCards);
|
||||
if (classSelect) classSelect.addEventListener('change', filterCards);
|
||||
|
||||
if (clearBtn) {
|
||||
clearBtn.addEventListener('click', function() {
|
||||
if (searchInput) searchInput.value = '';
|
||||
if (classSelect) classSelect.value = '';
|
||||
filterCards();
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
@@ -738,7 +738,7 @@
|
||||
{% if show_library_features %}
|
||||
<div class="upload-import-panel" style="border:1px solid #dbe4ee; border-radius:8px; padding:14px; margin-bottom:16px; background:#f8fbff;">
|
||||
<h3 style="margin:0 0 8px 0;">Excel-Import Bibliothek (Mehrere Bücher)</h3>
|
||||
<p style="margin:0 0 10px 0; color:#555;">Laden Sie eine <strong>.xlsx</strong>- oder <strong>.csv</strong>-Datei hoch. Spalten werden automatisch erkannt (z.B. Name, Ort, Beschreibung, ISBN, Code, Anzahl). Für den Bibliotheksimport ist eine gültige ISBN je Zeile erforderlich.</p>
|
||||
<p style="margin:0 0 10px 0; color:#555;">Laden Sie eine <strong>.xlsx</strong>- oder <strong>.csv</strong>-Datei hoch. Spalten werden automatisch erkannt (z.B. Name, Ort, Beschreibung, ISBN, Code, Anzahl). Für den Bibliotheksimport ist eine gültige ISBN je Zeile erforderlich. Hinweis: Die Daten werden Validiert und müssen dann noch einmal aus sicherheits gründen hochgeladen werden!</p>
|
||||
<form method="POST" action="{{ url_for('upload_library_excel') }}" enctype="multipart/form-data" style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
|
||||
<input type="file" name="library_excel" accept=".xlsx,.csv" required>
|
||||
<button type="button" class="btn btn-link" onclick="downloadSampleCsv('library')">Beispiel-CSV herunterladen</button>
|
||||
@@ -750,7 +750,7 @@
|
||||
{% else %}
|
||||
<div class="upload-import-panel" style="border:1px solid #dbe4ee; border-radius:8px; padding:14px; margin-bottom:16px; background:#f8fbff;">
|
||||
<h3 style="margin:0 0 8px 0;">Excel-Import Inventar (Mehrere Artikel)</h3>
|
||||
<p style="margin:0 0 10px 0; color:#555;">Laden Sie eine <strong>.xlsx</strong>- oder <strong>.csv</strong>-Datei hoch. Spalten werden automatisch erkannt (z.B. Name, Ort, Beschreibung, Filter1/2/3, Kosten, Jahr, Code, Anzahl).</p>
|
||||
<p style="margin:0 0 10px 0; color:#555;">Laden Sie eine <strong>.xlsx</strong>- oder <strong>.csv</strong>-Datei hoch. Spalten werden automatisch erkannt (z.B. Name, Ort, Beschreibung, Filter1/2/3, Kosten, Jahr, Code, Anzahl). Hinweis: Die Daten werden Validiert und müssen dann noch einmal aus sicherheits gründen hochgeladen werden!</p>
|
||||
<form method="POST" action="{{ url_for('upload_inventory_excel') }}" enctype="multipart/form-data" style="display:flex; gap:10px; flex-wrap:wrap; align-items:center;">
|
||||
<input type="file" name="inventory_excel" accept=".xlsx,.csv" required>
|
||||
<button type="button" class="btn btn-link" onclick="downloadSampleCsv('inventory')">Beispiel-CSV herunterladen</button>
|
||||
|
||||
Reference in New Issue
Block a user