Fix printer selection panel showing N/A when CSF name is empty

Use location (machine number/alias) as display name fallback when
printercsfname is not set. Show model number as secondary info instead
of location to avoid redundancy.

Fixes Coaching 115 and similar printers without CSF names assigned.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-08 12:39:34 -05:00
parent a8fed88a18
commit 14caad857d

View File

@@ -406,10 +406,12 @@ function updateSelectionUI() {
var html = '';
for (var printerId in selectedPrinters) {
var printer = printerData[printerId];
// Use CSF name if available, otherwise fall back to location
var displayName = (printer.csf && printer.csf !== '') ? printer.csf : printer.location;
html += '<div class="selected-printer-item">' +
'<span class="remove-btn" onclick="togglePrinter(\'' + printerId + '\')">×</span>' +
'<strong>' + (printer.csf || 'N/A') + '</strong><br>' +
'<span style="font-size:11px; color:#aaa;">' + printer.location + '</span>' +
'<strong>' + displayName + '</strong><br>' +
'<span style="font-size:11px; color:#aaa;">' + printer.model + '</span>' +
'</div>';
}
container.innerHTML = html;