fix of the template name
Release Inventarsystem / release-docker (push) Successful in 2m15s

This commit is contained in:
2026-08-12 11:45:48 +02:00
parent dd3d8649a7
commit 96d45710ac
3 changed files with 83 additions and 61 deletions
+16 -23
View File
@@ -103,7 +103,7 @@
background-color: #0056b3;
}
/* Scanner Video Styles */
/* Scanner Video Canvas */
#code4-scanner video, #code4-scanner canvas,
#isbn-scanner video, #isbn-scanner canvas {
width: 100%;
@@ -124,7 +124,7 @@
overflow: hidden;
}
/* Image management grid */
/* Image Management */
.existing-images-grid {
display: flex;
flex-wrap: wrap;
@@ -197,7 +197,7 @@
<input type="hidden" name="item_id" value="{{ item._id }}">
{% if show_library_features %}
<!-- BIBLIOTHEKS-MODUS: ISBN / Barcode -->
<!-- ================= LIBRARY MODE FIELDS ================= -->
<div class="form-group">
<label for="isbn">ISBN / Barcode:</label>
<div class="isbn-input-group">
@@ -211,13 +211,12 @@
</div>
{% endif %}
<!-- Allgemein: Name -->
<!-- ================= COMMON FIELDS ================= -->
<div class="form-group">
<label for="name">Name / Titel:</label>
<input type="text" id="name" name="name" value="{{ item.Name|default('') }}" required>
</div>
<!-- Allgemein: Ort -->
<div class="form-group">
<label for="ort">Ort / Standort:</label>
<select id="ort" name="ort" data-selected="{{ item.Ort|default('') }}" required>
@@ -234,13 +233,11 @@
</div>
</div>
<!-- Allgemein: Beschreibung -->
<div class="form-group">
<label for="beschreibung">Beschreibung:</label>
<textarea id="beschreibung" name="beschreibung" required>{{ item.Beschreibung|default('') }}</textarea>
</div>
<!-- Barcode / Basis-Code -->
<div class="form-group" id="primary_code_group">
<label for="code_4">Basis-Code (Haupt-Barcode)</label>
<div style="display: flex; gap: 10px;">
@@ -251,7 +248,6 @@
<small id="code4-scan-status" class="form-text text-muted"></small>
</div>
<!-- Weitere Einzelcodes der Gruppe -->
<div class="form-group" id="individual_codes_group">
<label for="individual_codes">Weitere Einzelcodes der Gruppe (je Zeile ein Code)</label>
<textarea id="individual_codes" name="individual_codes" rows="4" class="form-control" placeholder="z.B.&#10;ABC-001&#10;ABC-002">{{ item.IndividualCodes|default('') }}</textarea>
@@ -259,7 +255,7 @@
</div>
{% if show_library_features %}
<!-- BIBLIOTHEKS-MODUS: Spezifische Filter -->
<!-- ================= LIBRARY CATEGORIZATION ================= -->
<div class="filter-inputs">
<h3>Medientyp</h3>
<div class="form-group">
@@ -268,7 +264,7 @@
<option value="Schulbuch" {% if item.ItemType == 'Schulbuch' %}selected{% endif %}>Schulbuch</option>
<option value="CD" {% if item.ItemType == 'CD' %}selected{% endif %}>CD</option>
<option value="DVD" {% if item.ItemType == 'DVD' %}selected{% endif %}>DVD</option>
<option value="Sonstiges" {% if item.ItemType == 'Sonstiges' or not item.ItemType %}selected{% endif %}>Sonstiges</option>
<option value="Sonstiges" {% if item.ItemType == 'Sonstiges' %}selected{% endif %}>Sonstiges</option>
</select>
</div>
<h3>Kategorie / Fach:</h3>
@@ -277,7 +273,7 @@
</div>
</div>
{% else %}
<!-- INVENTAR-MODUS: Standard 3-Stufen-Filter -->
<!-- ================= INVENTORY FILTERS (1-3) ================= -->
<div class="filter-inputs">
<h3>Unterrichtsfach (Filter 1):</h3>
<div class="multi-filter">
@@ -315,7 +311,7 @@
</div>
{% endif %}
<!-- Finanzen & Datum -->
<!-- ================= DATES & FINANCIALS ================= -->
<div class="form-group">
<label for="anschaffungsjahr">Anschaffungsjahr:</label>
<input type="date" id="anschaffungsjahr" name="anschaffungsjahr" value="{{ item.Anschaffungsjahr|default('') }}">
@@ -326,7 +322,7 @@
</div>
{% if not show_library_features %}
<!-- INVENTAR-MODUS: Bilder & Medien verwalten -->
<!-- ================= INVENTORY IMAGE MANAGEMENT ================= -->
<div class="form-group">
<label>Bestehende Bilder behalten:</label>
{% if item.Images and item.Images|length > 0 %}
@@ -350,7 +346,6 @@
</div>
{% endif %}
<!-- Reservierbar -->
<div class="form-group">
<label for="reservierbar" style="display:inline-block; width:auto; margin-right:10px;">Reservierbar:</label>
<input type="checkbox" id="reservierbar" name="reservierbar" style="width:auto;" {% if item.Reservierbar %}checked{% endif %}>
@@ -369,7 +364,7 @@
let code4LastScanned = '';
let code4LastScannedAt = 0;
// Filter-Optionen vom Server laden & bestehende Werte vorauswählen
// Load filter dropdown options and pre-select current item values
function loadAndSelectFilterValues(filterNumber) {
fetch(`/get_predefined_filter_values/${filterNumber}`)
.then(res => res.json())
@@ -380,7 +375,6 @@
const selectedValue = select.getAttribute('data-selected') || '';
// Optionen befüllen
data.values.forEach(val => {
if (!val || String(val).trim() === '') return;
const opt = document.createElement('option');
@@ -389,7 +383,7 @@
select.appendChild(opt);
});
// Falls der gewählte Wert nicht in den Vorgaben war, als Option ergänzen
// Add custom option if the item has a value not in predefined list
if (selectedValue && !Array.from(select.options).some(o => o.value === selectedValue)) {
const customOpt = document.createElement('option');
customOpt.value = selectedValue;
@@ -400,10 +394,10 @@
select.value = selectedValue;
}
})
.catch(err => console.error(`Fehler beim Laden von Filter ${filterNumber}:`, err));
.catch(err => console.error(`Error loading Filter ${filterNumber}:`, err));
}
// Orte vom Server laden
// Load locations
function loadLocationOptions() {
fetch('/get_predefined_locations')
.then(res => res.json())
@@ -423,10 +417,10 @@
select.value = currentVal;
})
.catch(err => console.error('Fehler beim Laden der Orte:', err));
.catch(err => console.error('Error loading locations:', err));
}
// Ort hinzufügen UI
// New location handler
function addNewLocation() {
const input = document.getElementById('new-location-input');
const val = input.value.trim();
@@ -446,7 +440,7 @@
document.getElementById('new-location-input').value = '';
}
// Quagga Barcode Scanner Initialisierung
// Quagga Barcode Scanner Engine
function runEngineInitialization(targetSelector, activeCallback, completionMsg, errorStatusSetter) {
if (scannerRunning) { Quagga.stop(); scannerRunning = false; }
activeScannerCallback = activeCallback;
@@ -470,7 +464,6 @@
if (typeof activeScannerCallback === "function") activeScannerCallback(String(data.codeResult.code).trim());
});
// Barcode Scanner für Basis-Code
function startCode4Scanner() {
const scannerBox = document.getElementById('code4-scanner');
const scanBtn = document.getElementById('scan-code4-btn');