🐛 Update: Enhanced API for printer list retrieval with additional query parameters for filtering active and inactive printers. Improved response structure to include printer reachability and display status for better UI integration. Added granular permissions management in user creation process. 📚

This commit is contained in:
2025-06-12 21:14:08 +02:00
parent a212fcc8a3
commit bcb8f80415
129 changed files with 694 additions and 8 deletions

View File

@ -686,7 +686,28 @@
printers.forEach(printer => {
const option = document.createElement('option');
option.value = printer.id;
option.textContent = `${printer.name} (${printer.model || 'Unbekannt'})`;
// Status-Anzeige im Dropdown
let statusText = '';
if (printer.status === 'offline' || !printer.is_reachable) {
statusText = ' [Offline]';
} else if (printer.status === 'busy' || printer.status === 'printing') {
statusText = ' [Beschäftigt]';
} else if (printer.status === 'online' || printer.status === 'available') {
statusText = ' [Verfügbar]';
}
// Drucker-Anzeige mit Modell, Standort und Status
const location = printer.location ? ` - ${printer.location}` : '';
option.textContent = `${printer.name} (${printer.model || 'Unbekannt'})${location}${statusText}`;
// Visueller Hinweis für Offline-Drucker (aber trotzdem auswählbar!)
if (printer.status === 'offline' || !printer.is_reachable) {
option.style.color = '#666';
option.style.fontStyle = 'italic';
}
// WICHTIG: Kein disabled-Attribut setzen - alle Drucker bleiben auswählbar!
select.appendChild(option);
});