diff --git a/Web/templates/library_table.html b/Web/templates/library_table.html index 64b1500..56fc5bb 100644 --- a/Web/templates/library_table.html +++ b/Web/templates/library_table.html @@ -1425,7 +1425,10 @@ updatePhysicalScannerModal(result.message || 'Scan-Aktion fehlgeschlagen.', 'error'); } else if (result.action === 'borrowed') { setScanStatus(`Ausgeliehen: ${result.item_name}`, 'ok'); - showSmallConfirm(`Ausgeliehen: ${result.item_name}`, 'ok'); + showSmallConfirm(`Ausgeliehen: ${result.item_name}`, 'ok', { + actionLabel: 'Mit nächstem Ausweis starten', + onAction: startNextStudentCardScan + }); updatePhysicalScannerModal('Ausleihe erfolgreich. Bereit für den nächsten Mediencode.', 'ok'); } else if (result.action === 'returned') { setScanStatus(`Zurückgegeben: ${result.item_name}`, 'ok'); @@ -1491,7 +1494,10 @@ if (result.action === 'borrowed') { setScanStatus(`Ausgeliehen: ${result.item_name}`, 'ok'); - showSmallConfirm(`Ausgeliehen: ${result.item_name}`, 'ok'); + showSmallConfirm(`Ausgeliehen: ${result.item_name}`, 'ok', { + actionLabel: 'Mit nächstem Ausweis starten', + onAction: startNextStudentCardScan + }); updatePhysicalScannerModal('Ausleihe erfolgreich. Bereit für den nächsten Mediencode.', 'ok'); } else if (result.action === 'returned') { setScanStatus(`Zurückgegeben: ${result.item_name}`, 'ok'); @@ -1657,21 +1663,51 @@ if (kind) el.classList.add(kind); } - function showSmallConfirm(message, kind='ok') { + function showSmallConfirm(message, kind='ok', action = null) { // Append the small helper text in German const helper = 'Sie können fortfahren. Dies ist nur eine kleine Benachrichtigung.'; const el = document.createElement('div'); el.className = `small-popup ${kind === 'error' ? 'error' : 'ok'}`; - el.innerHTML = `